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.

45 lines
1.5KB

  1. {% extends app.request.query.get('action') == 'edit' ? '@LcShop/backend/default/edit.html.twig' : '@LcShop/backend/default/new.html.twig' %}
  2. {% trans_default_domain 'lcshop' %}
  3. {% block entity_form %}
  4. {% import '@LcShop/backend/default/block/macros.html.twig' as macros %}
  5. {{ form_start(form) }}
  6. {% form_theme form '@LcShop/backend/form/custom_bootstrap_4.html.twig' %}
  7. <div class="row">
  8. <div class="col-7">
  9. {{ macros.card_start() }}
  10. <div class="col">
  11. {% for field in form.children %}
  12. {{ form_row(field) }}
  13. {% endfor %}
  14. </div>
  15. {{ macros.card_end() }}
  16. </div>
  17. <div class="col-5">
  18. <div class="row" id="user-addresses">
  19. {% for address in entity.addresses %}
  20. {% include '@LcShop/backend/user/block_useraddress.html.twig' %}
  21. {% endfor %}
  22. </div>
  23. <button type="button" data-url="{{ path('easyadmin', {"action": 'editAddressUser', 'entity': 'User', 'id': entity.id, 'addressId': 'new'}) }}"
  24. class="btn btn-primary btn-add-user-address" ><i class="fa fa-plus"></i> {{ 'action.address.add'|trans }}
  25. </button>
  26. </div>
  27. </div>
  28. {{ form_end(form) }}
  29. {% endblock entity_form %}
  30. {% block script_javascript %}
  31. {{ parent() }}
  32. {% include '@LcShop/backend/default/block/script-vuejs.html.twig' %}
  33. <script src="{{ asset('bundles/lcshop/js/backend/script/user/init-edit.js') }}"></script>
  34. {% endblock %}