diff options
| author | Denis Ledoux <dle@openerp.com> | 2013-10-23 13:09:26 +0200 |
|---|---|---|
| committer | Denis Ledoux <dle@openerp.com> | 2013-10-23 13:09:26 +0200 |
| commit | 3279b24128178c9d3e604ff7dd1e716adf3dff06 (patch) | |
| tree | 713110bf01ea977ba845f984c5be4d06e47512f3 /addons/web/static/src | |
| parent | c58f13c8e91f193201dba08b63c19c16617870d6 (diff) | |
| parent | 993bff902e22ab77b7a36d3f48ed12511e93e2b1 (diff) | |
[MERGE] Forward-port of latest saas-1 bugfixes, up to rev. 3748 rev-id: dle@openerp.com-20131023103308-18pj2gqq3imrcir7
bzr revid: dle@openerp.com-20131023110926-tc2n3oqg0l2ga138
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/js/search.js | 5 | ||||
| -rw-r--r-- | addons/web/static/src/xml/base.xml | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js index e086678c937..5e97a708a32 100644 --- a/addons/web/static/src/js/search.js +++ b/addons/web/static/src/js/search.js @@ -1733,7 +1733,10 @@ instance.web.search.CustomFilters = instance.web.search.Input.extend({ var $name = this.$('input:first'); var private_filter = !this.$('#oe_searchview_custom_public').prop('checked'); var set_as_default = this.$('#oe_searchview_custom_default').prop('checked'); - + if (_.isEmpty($name.val())){ + this.do_warn(_t("Error"), _t("Filter name is required.")); + return false; + } var search = this.view.build_search_data(); instance.web.pyeval.eval_domains_and_contexts({ domains: search.domains, diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 6cbc3fb5692..28c8b08ced0 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -1664,8 +1664,8 @@ <ul class="oe_searchview_custom_list"/> <div class="oe_searchview_custom"> <h4>Save current filter</h4> - <form> - <p><input id="oe_searchview_custom_input" placeholder="Filter name"/></p> + <form class="oe_form"> + <p class="oe_form_required"><input id="oe_searchview_custom_input" placeholder="Filter name"/></p> <p> <input id="oe_searchview_custom_public" type="checkbox"/> <label for="oe_searchview_custom_public">Share with all users</label> |
