[FIX] Honor field's @size with html's @maxlength

lp bug: https://launchpad.net/bugs/956582 fixed

bzr revid: fme@openerp.com-20120417095414-12j26ywn2pnjpd8p
This commit is contained in:
Fabien Meghazi 2012-04-17 11:54:14 +02:00
parent ccafcb6d90
commit c86dec8f2d
1 changed files with 2 additions and 0 deletions

View File

@ -995,6 +995,7 @@
<input t-att-type="widget.password ? 'password' : 'text'" size="1"
t-att-name="widget.name"
t-att-id="widget.element_id"
t-att-maxlength="widget.field.size"
t-attf-class="field_#{widget.type} #{_(['integer', 'float', 'float_time']).contains(widget.type) ? 'oe-number' : ''}"
style="width: 100%"
/><img class="oe_field_translate oe_input_icon" t-if="widget.field.translate" t-att-src='_s + "/web/static/src/img/icons/terp-translate.png"' width="16" height="16" border="0"/>
@ -1042,6 +1043,7 @@
<textarea rows="6"
t-att-name="widget.name"
t-att-id="widget.element_id"
t-att-maxlength="widget.field.size"
t-attf-class="field_#{widget.type}"
style="width: 100%"
></textarea><img class="oe_field_translate oe_input_icon" t-if="widget.field.translate" t-att-src='_s + "/web/static/src/img/icons/terp-translate.png"' width="16" height="16" border="0"/>