[FIX] FieldTextHtml: allow using widget=html on regular char/text fields
This is required when we want to easily preview arbitrary HTML content, such as the body of the email templates used in marketing_campaign modules bzr revid: odo@openerp.com-20120901003712-m1h9s5tlbn2kyvnn
This commit is contained in:
parent
8ba3942676
commit
77e92aeaad
|
@ -2385,13 +2385,6 @@ instance.web.form.FieldText = instance.web.form.AbstractField.extend(instance.we
|
|||
*/
|
||||
instance.web.form.FieldTextHtml = instance.web.form.AbstractField.extend(instance.web.form.ReinitializeFieldMixin, {
|
||||
template: 'FieldTextHtml',
|
||||
init: function() {
|
||||
this._super.apply(this, arguments);
|
||||
if (this.field.type !== 'html') {
|
||||
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() {
|
||||
var self = this;
|
||||
if (! this.get("effective_readonly")) {
|
||||
|
|
Loading…
Reference in New Issue