[IMP] Use label@colspan in order to diferentiate fields label from paragraph
bzr revid: fme@openerp.com-20110628164238-zctbvza7isf4166t
This commit is contained in:
parent
48a7655126
commit
f07f60b3da
|
@ -677,12 +677,18 @@ openerp.base.form.WidgetButton = openerp.base.form.Widget.extend({
|
|||
|
||||
openerp.base.form.WidgetLabel = openerp.base.form.Widget.extend({
|
||||
init: function(view, node) {
|
||||
this.is_field_label = true;
|
||||
this.element_name = 'label_' + node.attrs.name;
|
||||
|
||||
this._super(view, node);
|
||||
|
||||
this.template = "WidgetLabel";
|
||||
// TODO fme: support for attrs.align
|
||||
if (this.node.tag == 'label' && this.node.attrs.colspan) {
|
||||
this.is_field_label = false;
|
||||
this.template = "WidgetParagraph";
|
||||
} else {
|
||||
this.is_field_label = true;
|
||||
this.template = "WidgetLabel";
|
||||
}
|
||||
this.colspan = 1;
|
||||
},
|
||||
render: function () {
|
||||
|
|
|
@ -468,6 +468,9 @@
|
|||
<t t-if="widget.string and widget.node.tag != 'label'">:</t>
|
||||
</label>
|
||||
</t>
|
||||
<t t-name="WidgetParagraph">
|
||||
<p class="oe_form_paragraph"><t t-esc="widget.string"/></p>
|
||||
</t>
|
||||
<t t-name="FieldChar">
|
||||
<input type="text"
|
||||
t-att-name="widget.name"
|
||||
|
|
Loading…
Reference in New Issue