diff options
| author | Julien Mougenot <jum@odoo.com> | 2020-06-12 09:01:44 +0000 |
|---|---|---|
| committer | Julien Mougenot <jum@odoo.com> | 2020-06-12 09:01:50 +0000 |
| commit | c4786fccfd23360a02e442c48ae2fb9f1e70aa4c (patch) | |
| tree | 95434422bfecf324a2112fadfc078a9bced134e7 /addons/web/static/src/js/widgets | |
| parent | d093fd4236a7c7f18645a85970cbdda6fec44c92 (diff) | |
[IMP] *: update notifications to optional title
closes odoo/odoo#52826
Related: odoo/enterprise#11084
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/widgets')
| -rw-r--r-- | addons/web/static/src/js/widgets/attach_document.js | 4 | ||||
| -rw-r--r-- | addons/web/static/src/js/widgets/domain_selector.js | 7 | ||||
| -rw-r--r-- | addons/web/static/src/js/widgets/model_field_selector.js | 9 |
3 files changed, 10 insertions, 10 deletions
diff --git a/addons/web/static/src/js/widgets/attach_document.js b/addons/web/static/src/js/widgets/attach_document.js index a4a72a62765..8ad48882ac2 100644 --- a/addons/web/static/src/js/widgets/attach_document.js +++ b/addons/web/static/src/js/widgets/attach_document.js @@ -62,7 +62,7 @@ var AttachDocument = Widget.extend({ }); warnings.unshift('<ul>'); warnings.push('</ul>'); - this.do_warn(_t("The following fields are invalid:"), warnings.join('')); + this.do_warn(_t("Invalid fields:"), warnings.join('')); }, //-------------------------------------------------------------------------- @@ -87,7 +87,7 @@ var AttachDocument = Widget.extend({ // but due to this security restriction give warning to save record first. // https://stackoverflow.com/questions/29728705/trigger-click-on-input-file-on-asynchronous-ajax-done/29873845#29873845 if (!this.res_id) { - return this.do_warn(_t('Warning : You have to save first before attaching a file.')); + return this.do_warn(false, _t('Please save before attaching a file')); } this.$('input.o_input_file').trigger('click'); }, diff --git a/addons/web/static/src/js/widgets/domain_selector.js b/addons/web/static/src/js/widgets/domain_selector.js index 755ee32979e..9fe71ce163f 100644 --- a/addons/web/static/src/js/widgets/domain_selector.js +++ b/addons/web/static/src/js/widgets/domain_selector.js @@ -535,10 +535,7 @@ var DomainSelector = DomainTree.extend({ // Warn the user if the domain is not valid after rendering if (!this._isValid) { - this.do_warn( - _t("Domain error"), - _t("The domain you entered is not properly formed") - ); + this.do_warn(false, _t("Domain not supported")); } }, /** @@ -583,7 +580,7 @@ var DomainSelector = DomainTree.extend({ try { domain = Domain.prototype.stringToArray($(e.currentTarget).val()); } catch (err) { // If there is a syntax error, just ignore the change - this.do_warn(_t("Syntax error"), _t("The domain you entered is not properly formed")); + this.do_warn(_t("Syntax error"), _t("Domain not properly formed")); return; } this._redraw(domain).then((function () { diff --git a/addons/web/static/src/js/widgets/model_field_selector.js b/addons/web/static/src/js/widgets/model_field_selector.js index 8f560be6d39..1856bccfade 100644 --- a/addons/web/static/src/js/widgets/model_field_selector.js +++ b/addons/web/static/src/js/widgets/model_field_selector.js @@ -433,8 +433,8 @@ var ModelFieldSelector = Widget.extend({ if (!this.valid) { this.do_warn( - _t("Invalid field chain"), - _t("The field chain is not valid. Did you maybe use a non-existing field name or followed a non-relational field?") + false, + _t("Invalid field chain. You may have used a non-existing field name or followed a non-relational field.") ); } }, @@ -495,7 +495,10 @@ var ModelFieldSelector = Widget.extend({ var userChainStr = this.$input.val(); var userChain = userChainStr.split("."); if (!this.options.followRelations && userChain.length > 1) { - this.do_warn(_t("Relation not allowed"), _t("You cannot follow relations for this field chain construction")); + this.do_warn( + _t("Relation not allowed"), + _t("You cannot follow relations for this field chain construction") + ); userChain = [userChain[0]]; } this.setChain(userChain).then((function () { |
