You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
1.0 KiB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <templates>
  3. <t t-name="FieldColor">
  4. <span t-attf-class="oe_form_field {{widget.widget_class}}" t-att-style="widget.attrs.style">
  5. <input type="text"
  6. t-att-id="widget.id_for_label"
  7. t-att-tabindex="widget.attrs.tabindex"
  8. t-att-autofocus="widget.attrs.autofocus"
  9. t-att-placeholder="widget.attrs.placeholder"
  10. t-att-maxlength="widget.field.size"
  11. t-att-value="widget.value"
  12. class="o_input"
  13. t-if="widget.mode !== 'readonly'"/>
  14. <t t-else="">
  15. <div t-if="!('readonly_mode' in widget.nodeOptions) or widget.nodeOptions.readonly_mode != 'text'" class="color_box" t-attf-style="background-color: {{widget.value}}" />
  16. <span t-if="!('readonly_mode' in widget.nodeOptions) or widget.nodeOptions.readonly_mode != 'color'" class="oe_form_char_content"><t t-esc="widget.value" /></span>
  17. </t>
  18. </span>
  19. </t>
  20. </templates>