summaryrefslogtreecommitdiff
path: root/addons/web/static/src/xml/base.xml
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@openerp.com>2013-03-28 10:53:45 +0100
committerChristophe Matthieu <chm@openerp.com>2013-03-28 10:53:45 +0100
commit2653bcf329ebe2d5eb9e94247440d6c3d17a8f2a (patch)
treeebddad4daffa44c955aae1e95734935667675bb3 /addons/web/static/src/xml/base.xml
parentb1e422ceb0777bbfaa47e3fb2233c1d21b3ccda2 (diff)
parent7e895d90cbf2735fd07723d25c22c874133d7e13 (diff)
[MERGE] radio button: display vertical and horizontal; click on radio label = select the label; click on field label = do nothing; bounce effect on edit in page mode; the goal is replacement of some selection box -> desable other options; not clickable in read only mode
bzr revid: chm@openerp.com-20130328095345-nc5rizcmste0bncp
Diffstat (limited to 'addons/web/static/src/xml/base.xml')
-rw-r--r--addons/web/static/src/xml/base.xml23
1 files changed, 23 insertions, 0 deletions
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index bcd5763a37e..41067240b52 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -1111,6 +1111,29 @@
</select>
</span>
</t>
+<t t-name="FieldRadio">
+ <span t-attf-class="oe_form_field oe_form_field_radio #{widget.horizontal ? 'oe_horizontal' : 'oe_vertical'}" t-att-style="widget.node.attrs.style">
+ <t t-if="widget.horizontal">
+ <t t-set="width" t-value="Math.floor(100 / widget.field.selection.length)"/>
+ <t t-if="!widget.no_radiolabel">
+ <t t-foreach="widget.field.selection" t-as="selection">
+ <div class="oe_radio_header" t-att-style="'width: ' + width + '%;'"><t t-esc="selection[1]"/></div>
+ </t>
+ <br/>
+ </t>
+ <t t-foreach="widget.field.selection" t-as="selection">
+ <div class="oe_radio_input" t-att-style="'width: ' + width + '%;'" t-att-data-id="selection[0]">&amp;nbsp;</div>
+ </t>
+ </t>
+ <t t-if="!widget.horizontal">
+ <t t-foreach="widget.field.selection" t-as="selection">
+ <div class="oe_radio_header" t-att-style="'width: ' + width + '%;'" t-att-data-id="selection[0]">
+ <div class="oe_radio_input">&amp;nbsp;</div><t t-if="!widget.no_radiolabel" t-esc="selection[1]"/>
+ </div>
+ </t>
+ </t>
+ </span>
+</t>
<t t-name="FieldMany2One">
<span class="oe_form_field oe_form_field_many2one oe_form_field_with_button" t-att-style="widget.node.attrs.style">
<t t-if="widget.get('effective_readonly')">