[IMP] web_unsplash : update unsplash messages
The goal of this commit is to update all unsplash alert messages : - message : "unsplash key not found" - message : "search temporarily unavailable" - message : "unauthorized key" - message : "something went wrong" and replace them with cleaner content. task-2341558 closes odoo/odoo#59014 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
.unsplash_error {
|
||||
padding: 30px 0;
|
||||
.access_key_box {
|
||||
padding: 9px;
|
||||
background-color: #fcfcfc;
|
||||
border: 1px solid #ededee;
|
||||
input {
|
||||
min-width: 300px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -27,58 +27,67 @@
|
||||
</t>
|
||||
|
||||
<t t-name="web_unsplash.dialog.error.credentials">
|
||||
<h4><t t-esc="title"/></h4>
|
||||
<div class="details">
|
||||
<t t-esc="subtitle"/>
|
||||
<div class="form-group mt-4 access_key_box">
|
||||
<input type="text" class="form-control w-100" id="accessKeyInput" placeholder="Paste your access key here"/>
|
||||
</div>
|
||||
<a href="https://www.odoo.com/documentation/user/general/unsplash/unsplash_access_key.html" target="_blank"><i class="fa fa-arrow-right"/> Generate an access key</a>
|
||||
<div class="form-group mt-4 access_key_box">
|
||||
<input type="text" class="form-control w-100" id="appIdInput" placeholder="Paste your application ID here"/>
|
||||
</div>
|
||||
<a href="https://www.odoo.com/documentation/user/general/unsplash/unsplash_application_id.html" target="_blank"><i class="fa fa-arrow-right"/> How to find my Unsplash Application ID?</a>
|
||||
<button type="button" class="btn btn-primary btn-block mt-4 save_unsplash">Apply</button>
|
||||
<div class="alert alert-info w-100">
|
||||
<h4><t t-esc="title"/></h4>
|
||||
<p><t t-esc="subtitle"/></p>
|
||||
<t t-if="showUnsplashSetup">
|
||||
<div class="form-inline">
|
||||
<div class="form-group">
|
||||
<span>
|
||||
<a href="https://www.odoo.com/documentation/user/general/unsplash/unsplash_access_key.html" target="_blank">Get an Access key</a>
|
||||
and paste it here:
|
||||
<input type="text" class="form-control w-auto" id="accessKeyInput" placeholder="Paste your access key here"/>
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group my-md-3">
|
||||
<span class="ml-xl-1">
|
||||
and paste
|
||||
<a href="https://www.odoo.com/documentation/user/general/unsplash/unsplash_application_id.html" target="_blank">Application ID</a>
|
||||
here:
|
||||
<input type="text" class="form-control w-auto" id="appIdInput" placeholder="Paste your application ID here"/>
|
||||
</span>
|
||||
</div>
|
||||
<button type="button" class="btn btn-primary btn-block w-auto ml-2 save_unsplash">Apply</button>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
<t t-name="web_unsplash.dialog.error.content">
|
||||
<div class="d-flex mt-2 unsplash_error">
|
||||
<div class="mx-auto text-center">
|
||||
<t t-call="web_unsplash.dialog.error.credentials">
|
||||
<t t-if="status == 'key_not_found'">
|
||||
<t t-call="web_unsplash.dialog.error.credentials">
|
||||
<t t-set="title">
|
||||
Unsplash requires an access key and an application ID
|
||||
</t>
|
||||
<t t-set="title">
|
||||
Setup Unsplash to access royalty free photos.
|
||||
</t>
|
||||
<t t-set="showUnsplashSetup" t-value="true"/>
|
||||
</t>
|
||||
<t t-elif="status == 403">
|
||||
<h4 class="text-muted">
|
||||
<t t-set="title">
|
||||
Search is temporarily unavailable
|
||||
</h4>
|
||||
<div class="details">
|
||||
</t>
|
||||
<t t-set="subtitle">
|
||||
The max number of searches is exceeded. Please retry in an hour or extend to a better account.
|
||||
</div>
|
||||
</t>
|
||||
<t t-elif="status == 401">
|
||||
<t t-call="web_unsplash.dialog.error.credentials">
|
||||
<t t-set="title">
|
||||
Unauthorized Key
|
||||
</t>
|
||||
<t t-set="subtitle">
|
||||
Please check your Unsplash access key and application ID.
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<h4 class="text-muted">
|
||||
Something went wrong
|
||||
</h4>
|
||||
<div class="details">
|
||||
Please check your internet connection or contact administrator.
|
||||
</div>
|
||||
<t t-elif="status == 401">
|
||||
<t t-set="title">
|
||||
Unauthorized Key
|
||||
</t>
|
||||
<t t-set="subtitle">
|
||||
Please check your Unsplash access key and application ID.
|
||||
</t>
|
||||
<t t-set="showUnsplashSetup" t-value="true"/>
|
||||
</t>
|
||||
</div>
|
||||
<t t-else="">
|
||||
<t t-set="title">
|
||||
Something went wrong
|
||||
</t>
|
||||
<t t-set="subtitle">
|
||||
Please check your internet connection or contact administrator.
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
<odoo>
|
||||
<template id="web_unsplash_assets" inherit_id="web_editor.assets_wysiwyg" name="Unsplash Images Editor Assets">
|
||||
<xpath expr="." position="inside">
|
||||
<link rel="stylesheet" type="text/scss" href="/web_unsplash/static/src/scss/unsplash.scss"/>
|
||||
<script type="text/javascript" src="/web_unsplash/static/src/js/unsplashapi.js"></script>
|
||||
<script type="text/javascript" src="/web_unsplash/static/src/js/unsplash_image_widget.js"></script>
|
||||
</xpath>
|
||||
|
||||
Reference in New Issue
Block a user