summaryrefslogtreecommitdiff
path: root/addons/web_unsplash/static/src/xml/unsplash_image_widget.xml
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web_unsplash/static/src/xml/unsplash_image_widget.xml')
-rw-r--r--addons/web_unsplash/static/src/xml/unsplash_image_widget.xml73
1 files changed, 40 insertions, 33 deletions
diff --git a/addons/web_unsplash/static/src/xml/unsplash_image_widget.xml b/addons/web_unsplash/static/src/xml/unsplash_image_widget.xml
index e1104b6014f..6514297af23 100644
--- a/addons/web_unsplash/static/src/xml/unsplash_image_widget.xml
+++ b/addons/web_unsplash/static/src/xml/unsplash_image_widget.xml
@@ -2,10 +2,10 @@
<templates id="template" xml:space="preserve">
<t t-extend="web_editor.dialog.image">
- <t t-jquery=".card-body .form-inline" t-operation="append">
- <div class="ml8">
- <span class="text-muted">— or —</span>
- <input type="text" class="form-control unsplash_search mr8" placeholder="Search from Unsplash" style="width: 250px;"/>
+ <t t-jquery=".o_media_image_card .form-inline" t-operation="append">
+ <div class="ml-auto border-left pl-4">
+ <span class="d-block font-weight-bold">Photos by <a href="https://unsplash.com" target="_blank">Unsplash</a></span>
+ <input type="text" class="form-control unsplash_search mr8" placeholder="Search free high-resolution photos" style="width: 250px;"/>
</div>
</t>
<t t-jquery=".existing-attachments" t-operation="after">
@@ -29,49 +29,56 @@
</div>
</t>
+<t t-name="web_unsplash.dialog.error.credentials">
+ <h4 class="text-muted">
+ <t t-esc="title"/>
+ </h4>
+ <div class="details">
+ <t t-esc="subtitle"/>
+ <div class="form-group btn-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/unsplash_access_key.html" target="_blank"><i class="fa fa-arrow-right"/> Generate an access key</a>
+ <div class="form-group btn-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/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>
+</t>
+
<t t-name="web_unsplash.dialog.error.content">
<div class="row mt16 text-muted unsplash_error">
<div class="m-auto text-center">
<t t-if="key_not_found">
- <p class="title">
- Access key is not set
- </p>
- <div class="details">
- <a href="https://unsplash.com/oauth/applications" target="_blank"><i class="fa fa-arrow-right"/> Generate an access key</a>
- <div>
- <div class="form-group btn-group access_key_box">
- <input type="text" class="form-control float-left" id="accessKeyInput" placeholder="Paste your access key here"/>
- <button type="button" class="btn btn-primary access_key">Apply</button>
- </div>
- </div>
- </div>
+ <t t-call="web_unsplash.dialog.error.credentials">
+ <t t-set="title">
+ Unsplash requires an access key and an application ID
+ </t>
+ </t>
</t>
<t t-elif="status == 403">
- <p class="title">
- Search is temporary unavailable
- </p>
+ <h4 class="text-muted">
+ Search is temporarily unavailable
+ </h4>
<div class="details">
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">
- <p class="title">
- Unauthorized Key
- </p>
- <div class="details">
- Please check your unsplash api key.
- <div>
- <div class="form-group btn-group mt16 access_key_box">
- <input type="text" class="form-control float-left" id="accessKeyInput" placeholder="Paste your access key here"/>
- <button type="button" class="btn btn-primary access_key">Add</button>
- </div>
- </div>
- </div>
+ <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="">
- <p class="title">
+ <h4 class="text-muted">
Something went wrong
- </p>
+ </h4>
<div class="details">
Please check your internet connection or contact administrator.
</div>