diff options
| author | niv-openerp <nicolas.vanhoren@openerp.com> | 2012-03-19 17:13:58 +0100 |
|---|---|---|
| committer | niv-openerp <nicolas.vanhoren@openerp.com> | 2012-03-19 17:13:58 +0100 |
| commit | e3a8b30a153a00b26b81f3e82ee3b6deec7fffd7 (patch) | |
| tree | fc230448233595cb274891b21a992239c54bd806 /addons/web/static/src/xml/base.xml | |
| parent | e3ba4192e46317aaea7ebb7c40331002a8740790 (diff) | |
[imp] refactored fields binary & image
bzr revid: nicolas.vanhoren@openerp.com-20120319161358-uw9h91fakkc1e2fu
Diffstat (limited to 'addons/web/static/src/xml/base.xml')
| -rw-r--r-- | addons/web/static/src/xml/base.xml | 103 |
1 files changed, 55 insertions, 48 deletions
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index c8df69c2bdc..37ca7e25e0a 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -1152,54 +1152,61 @@ </table> </t> <t t-name="FieldBinaryFile"> - <table t-attf-class="oe_form_field_#{widget.type}" cellpadding="0" cellspacing="0" border="0"> - <tr> - <td> - <input type="text" size="1" readonly="readonly" - t-att-name="widget.name" - t-att-id="widget.element_id + '_field'" - t-attf-class="field_#{widget.type}" - /> - </td> - <td class="oe-binary" nowrap="true"> - <table cellspacing="0" cellpadding="0" border="0"> - <tr> - <td> - <div class="oe-binary-file-set" style="width: 80px; height:22px;"> - <form class="oe-binary-form" t-att-target="widget.iframe" - method="post" enctype="multipart/form-data" action="/web/binary/upload"> - <input type="hidden" name="session_id" value=""/> - <input type="hidden" name="callback" t-att-value="widget.iframe"/> - <button class="oe_button oe_field_button" type="button" title="Set Image"> - <img t-att-src='_s + "/web/static/src/img/icons/STOCK_DIRECTORY.png"'/> - <span>Select</span> - </button> - <input type="file" class="oe-binary-file" name="ufile"/> - </form> - </div> - </td> - <td> - <button class="oe_button oe-binary-file-save" type="button" title="Save As"> - <img t-att-src='_s + "/web/static/src/img/icons/gtk-save.png"'/> - <span>Save As</span> - </button> - </td> - <td> - <button class="oe_button oe-binary-file-clear" type="button" title="Clear"> - <img t-att-src='_s + "/web/static/src/img/icons/STOCK_MISSING_IMAGE.png"'/> - <span>Clear</span> - </button> - </td> - </tr> - </table> - </td> - <td class="oe-binary-progress" style="display: none" nowrap="true"> - <img t-att-src='_s + "/web/static/src/img/throbber.gif"' width="16" height="16"/> - <b>Uploading ...</b> - <iframe t-att-id="widget.iframe" t-att-name="widget.iframe" style="display: none"/> - </td> - </tr> - </table> + <t t-if="!widget.get('effective_readonly')"> + <table t-attf-class="oe_form_field_#{widget.type}" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td> + <input type="text" size="1" readonly="readonly" + t-att-name="widget.name" + t-att-id="widget.element_id + '_field'" + t-attf-class="field_#{widget.type}" + /> + </td> + <td class="oe-binary" nowrap="true"> + <table cellspacing="0" cellpadding="0" border="0"> + <tr> + <td> + <div class="oe-binary-file-set" style="width: 80px; height:22px;"> + <form class="oe-binary-form" t-att-target="widget.iframe" + method="post" enctype="multipart/form-data" action="/web/binary/upload"> + <input type="hidden" name="session_id" value=""/> + <input type="hidden" name="callback" t-att-value="widget.iframe"/> + <button class="oe_button oe_field_button" type="button" title="Set Image"> + <img t-att-src='_s + "/web/static/src/img/icons/STOCK_DIRECTORY.png"'/> + <span>Select</span> + </button> + <input type="file" class="oe-binary-file" name="ufile"/> + </form> + </div> + </td> + <td> + <button class="oe_button oe-binary-file-save" type="button" title="Save As"> + <img t-att-src='_s + "/web/static/src/img/icons/gtk-save.png"'/> + <span>Save As</span> + </button> + </td> + <td> + <button class="oe_button oe-binary-file-clear" type="button" title="Clear"> + <img t-att-src='_s + "/web/static/src/img/icons/STOCK_MISSING_IMAGE.png"'/> + <span>Clear</span> + </button> + </td> + </tr> + </table> + </td> + <td class="oe-binary-progress" style="display: none" nowrap="true"> + <img t-att-src='_s + "/web/static/src/img/throbber.gif"' width="16" height="16"/> + <b>Uploading ...</b> + <iframe t-att-id="widget.iframe" t-att-name="widget.iframe" style="display: none"/> + </td> + </tr> + </table> + </t> + <t t-if="widget.get('effective_readonly')"> + <div> + <a href="javascript:void(0)" class="oe_form_uri"/> + </div> + </t> </t> <t t-name="WidgetButton"> <div t-attf-class="oe_form_field_#{widget.type}"> |
