summaryrefslogtreecommitdiff
path: root/addons/web/static/src/xml
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@openerp.com>2013-03-21 16:04:05 +0100
committerChristophe Matthieu <chm@openerp.com>2013-03-21 16:04:05 +0100
commit7d5ea8896ea71fc4031dbe8f2e8f34888a117aed (patch)
treec08e4d030f50e9b7fc99c51ae22beb271072a691 /addons/web/static/src/xml
parentcad21aff66fa3517e6d5e1c79cff93c0792c03f6 (diff)
[IMP] view_form radio button with div inline-block
bzr revid: chm@openerp.com-20130321150405-fz61r51opx2m9kmt
Diffstat (limited to 'addons/web/static/src/xml')
-rw-r--r--addons/web/static/src/xml/base.xml22
1 files changed, 21 insertions, 1 deletions
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index 68973632dab..02129b2fb9a 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -1088,7 +1088,27 @@
</span>
</t>
<t t-name="FieldRadio">
- <span class="oe_form_field oe_form_field_radio" t-att-style="widget.node.attrs.style"></span>
+ <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-raw="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-raw="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">