diff --git a/CHANGELOG b/CHANGELOG index 6b0d9aa6cf..4834687cdc 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,4 @@ +* Use spellcheck and lang attributes for textbox widget * Support icon on page * Add keyword attribute to button tag * Support field name on image tag @@ -42,7 +43,7 @@ Version 4.2.0 - 2016-11-28 * Manage confirm attribute on buttons * Call autocompletion when setting record value * Limit readonly state for xxx2Many -* Simplify login with single database +* Simplify login with single database * Show records names in relate window title * Add support for count on Action Window Domains * Manage custom login process diff --git a/src/view/form.js b/src/view/form.js index 850b59f15a..0f6bb2a877 100644 --- a/src/view/form.js +++ b/src/view/form.js @@ -1749,6 +1749,11 @@ function eval_pyson(value){ if (record) { var value = record.field_get_client(this.field_name); this.input.val(value); + if(this.attributes.spell) { + this.input.attr('lang', + record.expr_eval(this.attributes.spell)); + this.input.attr('spellcheck', 'true'); + } } else { this.input.val(''); } @@ -1933,6 +1938,11 @@ function eval_pyson(value){ var value = ''; if (record) { value = record.field_get_client(this.field_name); + if(this.attributes.spell) { + this.input.attr('lang', + record.expr_eval(this.attributes.spell)); + this.input.attr('spellcheck', 'true'); + } } this.input.html(value); },