summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorJeremy Kersten <jke@odoo.com>2018-08-29 12:50:26 +0200
committerJeremy Kersten <jke@odoo.com>2018-08-29 15:18:19 +0200
commit19cc218d03c9e2eb32ce354db96668b4c5280854 (patch)
tree8689ed4e52abae6a7a3acafa60157e90c1ec6c52 /addons
parent2a9a514551ca951db656e139cb4d177657eb95e7 (diff)
[FIX] website: make field required once feature enable via checkbox
Now that this field is computed (true if value), once the user check a feature, it is required to fill in the field. Before this commit, you can click on checkbox, and save without key in field, and a refresh checkbow was again unchecked.
Diffstat (limited to 'addons')
-rw-r--r--addons/website/views/res_config_settings_views.xml10
1 files changed, 5 insertions, 5 deletions
diff --git a/addons/website/views/res_config_settings_views.xml b/addons/website/views/res_config_settings_views.xml
index 8bb2a648667..2d7c6ea9233 100644
--- a/addons/website/views/res_config_settings_views.xml
+++ b/addons/website/views/res_config_settings_views.xml
@@ -131,7 +131,7 @@
<div class="row mt16">
<label class="col-lg-3 o_light_label" string="Tracking ID" for="google_analytics_key"/>
<field name="google_analytics_key" placeholder="UA-XXXXXXXX-Y"
- attrs="{'required': [('google_management_client_id', '!=', False)]}"/>
+ attrs="{'required': [('has_google_analytics', '=', True)]}"/>
</div>
</div>
<div attrs="{'invisible': [('has_google_analytics', '=', False)]}">
@@ -156,11 +156,11 @@
<div class="content-group" attrs="{'invisible': [('has_google_analytics_dashboard', '=', False)]}">
<div class="row mt16">
<label class="col-lg-3 o_light_label" string="Client ID" for="google_management_client_id"/>
- <field name="google_management_client_id"/>
+ <field name="google_management_client_id" attrs="{'required': [('has_google_analytics_dashboard', '=', True)]}"/>
</div>
<div class="row">
<label class="col-lg-3 o_light_label" string="Client Secret" for="google_management_client_secret"/>
- <field name="google_management_client_secret"/>
+ <field name="google_management_client_secret" attrs="{'required': [('has_google_analytics_dashboard', '=', True)]}"/>
</div>
</div>
<div attrs="{'invisible': [('has_google_analytics_dashboard', '=', False)]}">
@@ -180,12 +180,12 @@
<label for="has_google_maps"/>
<span class="fa fa-lg fa-globe" title="Values set here are website-specific." groups="website.group_multi_website"/>
<div class="text-muted">
- Show your address on a map in the <a href="/contactus">Contact Us</a> page
+ Use Google Map on your website (<a href="/contactus">Contact Us</a> page, snippets, ...)
</div>
<div class="content-group" attrs="{'invisible': [('has_google_maps', '=', False)]}">
<div class="row mt16">
<label class="col-lg-3 o_light_label" string="API Key" for="google_maps_api_key"/>
- <field name="google_maps_api_key"/>
+ <field name="google_maps_api_key" attrs="{'required': [('has_google_maps', '=', True)]}" />
</div>
</div>
<div attrs="{'invisible': [('has_google_maps', '=', False)]}">