column_attribute.twig 909 B

123456789101112131415161718192021
  1. {% if submit_attribute is defined and submit_attribute != false %}
  2. {% set attribute = submit_attribute %}
  3. {% elseif column_meta['Extra'] is defined
  4. and column_meta['Extra'] == 'on update CURRENT_TIMESTAMP' %}
  5. {% set attribute = 'on update CURRENT_TIMESTAMP' %}
  6. {% elseif extracted_columnspec['attribute'] is defined %}
  7. {% set attribute = extracted_columnspec['attribute'] %}
  8. {% else %}
  9. {% set attribute = '' %}
  10. {% endif %}
  11. {% set attribute = attribute|upper %}
  12. <select name="field_attribute[{{ column_number }}]"
  13. id="field_{{ column_number }}_{{ ci - ci_offset }}">
  14. {% set cnt_attribute_types = attribute_types|length - 1 %}
  15. {% for i in 0..cnt_attribute_types %}
  16. <option value="{{ attribute_types[i] }}"
  17. {{- attribute == attribute_types[i]|upper ? ' selected="selected"' }}>
  18. {{ attribute_types[i] }}
  19. </option>
  20. {% endfor %}
  21. </select>