[FIX] empty html area, developer should be able to force a widget
bzr revid: fp@tinyerp.com-20120912144626-pl3ze0mltqt42uky
This commit is contained in:
parent
63ad47104f
commit
3a9c29d327
|
@ -2404,10 +2404,6 @@ instance.web.form.FieldTextHtml = instance.web.form.AbstractField.extend(instanc
|
||||||
template: 'FieldTextHtml',
|
template: 'FieldTextHtml',
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
if (this.field.type !== 'html' && ! this.options.safe) {
|
|
||||||
throw new Error(_.str.sprintf(
|
|
||||||
_t("Error with field %s, it is not allowed to use the widget 'html' with any other field type than 'html'"), this.string));
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
initialize_content: function() {
|
initialize_content: function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
@ -2441,7 +2437,7 @@ instance.web.form.FieldTextHtml = instance.web.form.AbstractField.extend(instanc
|
||||||
},
|
},
|
||||||
render_value: function() {
|
render_value: function() {
|
||||||
if (! this.get("effective_readonly")) {
|
if (! this.get("effective_readonly")) {
|
||||||
this.$textarea.val(this.get('value'));
|
this.$textarea.val(this.get('value') || '');
|
||||||
this._updating_editor = true;
|
this._updating_editor = true;
|
||||||
this.$cleditor.updateFrame();
|
this.$cleditor.updateFrame();
|
||||||
this._updating_editor = false;
|
this._updating_editor = false;
|
||||||
|
|
Loading…
Reference in New Issue