summaryrefslogtreecommitdiff
path: root/addons/web/static/src/xml
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@openerp.com>2013-04-10 15:56:43 +0200
committerChristophe Matthieu <chm@openerp.com>2013-04-10 15:56:43 +0200
commit60be4d49c5f5d74c140cf16fb6040528b6f222e8 (patch)
treeff5503145a42ac272bdf8b6a12e43a495418f298 /addons/web/static/src/xml
parentc756cb72b67d0af3c5e36c53596c31b9829506d2 (diff)
[IMP] view_form: field radio, display only the selected text in read only mode
bzr revid: chm@openerp.com-20130410135643-szjzolgpbr73kpxh
Diffstat (limited to 'addons/web/static/src/xml')
-rw-r--r--addons/web/static/src/xml/base.xml33
1 files changed, 18 insertions, 15 deletions
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index e74ff0bb796..e89865e42e1 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -1113,25 +1113,28 @@
</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.selection.length)"/>
- <t t-if="!widget.no_radiolabel">
+ <span class="oe_radio_edit_only">
+ <t t-if="widget.horizontal">
+ <t t-set="width" t-value="Math.floor(100 / widget.selection.length)"/>
+ <t t-if="!widget.no_radiolabel">
+ <t t-foreach="widget.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.selection" t-as="selection">
- <div class="oe_radio_header" t-att-style="'width: ' + width + '%;'"><t t-esc="selection[1]"/></div>
+ <div class="oe_radio_input" t-att-style="'width: ' + width + '%;'" t-att-data-id="selection[0]">&amp;nbsp;</div>
</t>
- <br/>
</t>
- <t t-foreach="widget.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.selection" t-as="selection">
- <div class="oe_radio_header" 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-if="!widget.horizontal">
+ <t t-foreach="widget.selection" t-as="selection">
+ <div class="oe_radio_header" 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>
- </t>
+ </span>
+ <span class="oe_radio_read_only"><div class="oe_radio_header"><t t-esc="widget.get('value')[1]"/></div></span>
</span>
</t>
<t t-name="FieldMany2One">