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.

38 lines
1.6KB

  1. {% macro startCard(col, zone = "default", card ='primary', fullWidth = false ) %}
  2. {% if col > 0 %}<div class="col-{{ col }}">{% endif %}
  3. <div class="card card-{{ card }}">
  4. <div class="card-header">
  5. <h3 class="card-title">
  6. {% set label = "group."~zone %}
  7. {{ label|trans({}, 'lcshop')|raw }}
  8. </h3>
  9. </div>
  10. <div class="card-body {{ fullWidth == true ? 'p-0' : 'row' }}">
  11. {% endmacro %}
  12. {% macro endCard(noCol = false) %}
  13. </div>
  14. </div>
  15. {% if noCol == false %}</div>{% endif %}
  16. {% endmacro %}
  17. {% macro productField(colspan, field, fieldName, fieldDisplay = false, displaySuffix="",attr="") %}
  18. {% if fieldDisplay == false %}{% set fieldDisplay = fieldName %}{% endif %}
  19. <td {{ attr|raw }} colspan="{{ colspan }}" class="{{ fieldName }}" v-on:click="{{ fieldName }}Inherited = true">
  20. <div v-show="{{ fieldName }}Inherited == false">
  21. <div v-if="{{ fieldName }}">
  22. {% verbatim %}{{ {% endverbatim %}{{ fieldDisplay }} {% verbatim %}}}{% endverbatim %}{{ displaySuffix }}
  23. </div>
  24. <div v-else class="inherited">
  25. {% verbatim %}{{ productFamily.{% endverbatim %}{{ fieldDisplay }} {% verbatim %}}}{% endverbatim %}{{ displaySuffix }}
  26. </div>
  27. </div>
  28. <div v-show="{{ fieldName }}Inherited == true">
  29. {{ form_widget(field, {'attr' : {'v-model' : fieldName , 'v-on:focusout': fieldName~'Inherited = false', '@change' : fieldName~'Updated'}}) }}
  30. </div>
  31. </td>
  32. {% endmacro %}