소스 검색

Ajout d'un blocage de turbo.js des pages d'édition (supp. des images)

garthh 3 주 전
부모
커밋
8fc0e20d09
3개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      templates/admin/event/edit.html.twig
  2. 1 1
      templates/admin/game/edit.html.twig
  3. 1 1
      templates/admin/gamemaster/edit.html.twig

+ 1 - 1
templates/admin/event/edit.html.twig

@@ -61,7 +61,7 @@
                 {{ form_help(form.picture) }}
                 {% if event.picture %}
                 <div class="field mt-2">
-                <p><a href="{{ path('app_admin_event_del_pic', {id: event.id}) }}" class="button is-danger"><twig:ux:icon name="bi:trash-fill" class="small-icon-in-text"/> Supprimer l'image chargée.</a></p>
+                <p><a href="#" data-id="{{ path('app_admin_event_del_pic', {id: event.id}) }}" class="button is-danger" {{ stimulus_controller('admin_confirm') }}><twig:ux:icon name="bi:trash-fill" class="small-icon-in-text"/> Supprimer l'image chargée.</a></p>
                 </div>
                 {% endif %}
                 

+ 1 - 1
templates/admin/game/edit.html.twig

@@ -32,7 +32,7 @@
                 {{ form_help(form.picture) }}
                 {% if game.picture %}
                 <div class="field mt-2">
-                <p><a href="{{ path('app_admin_game_del_pic', {id: game.id}) }}" class="button is-danger"><twig:ux:icon name="bi:trash-fill" class="small-icon-in-text"/> Supprimer l'image chargée.</a></p>
+                <p><a data-id="{{ path('app_admin_game_del_pic', {id: game.id}) }}" href="#" class="button is-danger" {{ stimulus_controller('admin_confirm') }}><twig:ux:icon name="bi:trash-fill" class="small-icon-in-text"/> Supprimer l'image chargée.</a></p>
                 </div>
                 {% endif %}
                 

+ 1 - 1
templates/admin/gamemaster/edit.html.twig

@@ -39,7 +39,7 @@
                 {{ form_help(form.picture) }}
                 {% if gamemaster.picture %}
                 <div class="field mt-2">
-                <p><a href="{{ path('app_admin_gamemaster_del_pic', {id: gamemaster.id}) }}" class="button is-danger"><twig:ux:icon name="bi:trash-fill" class="small-icon-in-text"/> Supprimer l'image chargée.</a></p>
+                <p><a href="#" data-id="{{ path('app_admin_gamemaster_del_pic', {id: gamemaster.id}) }}" class="button is-danger" {{ stimulus_controller('admin_confirm') }}><twig:ux:icon name="bi:trash-fill" class="small-icon-in-text"/> Supprimer l'image chargée.</a></p>
                 </div>
                 {% endif %}