src/Flexy/FrontBundle/Themes/Lasalle/templates/admin/shopadmin/customer/edit.html.twig line 1

  1. {# @var ea \EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext #}
  2. {# @var entity \EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto #}
  3. {% extends ea.templatePath('layout') %}
  4. {% form_theme edit_form with ea.crud.formThemes only %}
  5. {% trans_default_domain ea.i18n.translationDomain %}
  6. {% block body_id 'ea-edit-' ~ entity.name ~ '-' ~ entity.primaryKeyValue %}
  7. {% block body_class 'ea-edit ea-edit-' ~ entity.name %}
  8. {% set ea_field_assets = ea.crud.fieldAssets(constant('EasyCorp\\Bundle\\EasyAdminBundle\\Config\\Crud::PAGE_EDIT')) %}
  9. {% block configured_head_contents %}
  10.     {{ parent() }}
  11.     {% if dataTurbo is defined %}
  12.         {% if dataTurbo == false %}
  13.             <meta name="turbo-visit-control" content="reload">
  14.         {% endif %}
  15.     {% endif %}
  16.     {% for htmlContent in ea_field_assets.headContents %}
  17.         {{ htmlContent|raw }}
  18.     {% endfor %}
  19. {% endblock %}
  20. {% block configured_body_contents %}
  21.     {{ parent() }}
  22.     {% for htmlContent in ea_field_assets.bodyContents %}
  23.         {{ htmlContent|raw }}
  24.     {% endfor %}
  25. {% endblock %}
  26. {% block configured_stylesheets %}
  27.     {{ parent() }}
  28.     {{ include('@EasyAdmin/includes/_css_assets.html.twig', { assets: ea_field_assets.cssAssets }, with_context = false) }}
  29.     {{ include('@EasyAdmin/includes/_encore_link_tags.html.twig', { assets: ea_field_assets.webpackEncoreAssets }, with_context = false) }}
  30. {% endblock %}
  31. {% block content_title %}
  32.     {%- apply spaceless -%}
  33.         {% set custom_page_title = ea.crud.customPageTitle(pageName, entity ? entity.instance : null, ea.i18n.translationParameters) %}
  34.         {{ custom_page_title is null
  35.             ? ea.crud.defaultPageTitle(null, null, ea.i18n.translationParameters)|trans|raw
  36.             : custom_page_title|trans|raw }}
  37.     {%- endapply -%}
  38. {% endblock %}
  39. {% block page_actions %}
  40.     {% for action in entity.actions %}
  41.         {{ include(action.templatePath, { action: action }, with_context = false) }}
  42.     {% endfor %}
  43. {% endblock %}
  44. {% block main %}
  45.     {% block edit_form %}
  46.         {{ form(edit_form) }}
  47.     {% endblock edit_form %}
  48.     {% if dataTurbo is defined %}
  49.     {{dump(dataTurbo)}}
  50.         {% if dataTurbo == false %}
  51.             <meta name="turbo-visit-control" content="reload">
  52.         {% endif %}
  53.     {% endif %}
  54.     {% block delete_form %}
  55.         {{ include('@EasyAdmin/crud/includes/_delete_form.html.twig', { entity_id: entity.primaryKeyValue }, with_context = false) }}
  56.     {% endblock delete_form %}
  57. {% endblock %}
  58. {% block body_javascript %}
  59. {{parent()}}
  60. <script>
  61. document.addEventListener('turbo:load', function(event) {
  62.  $("body").on("change","select[name$='[paymentMethod]']",function(){
  63.     var checkFields = $(this).parent().parent().parent().parent().parent().parent().find(".check-field");
  64.     if($(this).find("option:selected").text() == "Cheque"){
  65.         $(checkFields).removeClass("d-none");
  66.     }else{
  67.         $(checkFields).addClass("d-none");
  68.     }
  69.     
  70.  }
  71.  );
  72.   });
  73. </script>
  74. {% endblock %}