[IMP] Use label@colspan in order to diferentiate fields label from paragraph

bzr revid: fme@openerp.com-20110628164238-zctbvza7isf4166t
This commit is contained in:
Fabien Meghazi 2011-06-28 18:42:38 +02:00
parent 48a7655126
commit f07f60b3da
2 changed files with 11 additions and 2 deletions

View File

@ -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 () {

View File

@ -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"