diff options
| author | Denis Ledoux <dle@openerp.com> | 2013-10-23 13:34:14 +0200 |
|---|---|---|
| committer | Denis Ledoux <dle@openerp.com> | 2013-10-23 13:34:14 +0200 |
| commit | 6bf5d02627aba2c3a92ac3e3f4f83ec856d6df18 (patch) | |
| tree | c0d6ba9fe771b740814992fc1e5cb6945e2c22f9 /addons/web/static/src | |
| parent | 55ac10cd3d523e36026d2534eb6cca82b7cff1f8 (diff) | |
| parent | 3279b24128178c9d3e604ff7dd1e716adf3dff06 (diff) | |
[MERGE] Forward-port of latest saas-2 bugfixes, up to rev. 3859 rev-id: dle@openerp.com-20131023110926-tc2n3oqg0l2ga138
bzr revid: dle@openerp.com-20131023113414-mlwppd4d7vyh1tyj
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 f7cde7ce54d..513e42bf899 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -1666,8 +1666,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> |
