File tree 2 files changed +7
-3
lines changed 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 6
6
{{ form_start(form, { attr: { novalidate: 'novalidate' } }) }}
7
7
#}
8
8
9
- {{ form_start(form ) }}
9
+ {% if confirmation_message is defined %}
10
+ {% set attr = {' data-confirmation-message' : confirmation_message } %}
11
+ {% endif %}
12
+
13
+ {{ form_start(form , {attr : attr |default ({})}) }}
10
14
{{ form_widget(form ) }}
11
15
12
16
<input type =" submit" value =" {{ button_label | default (' label.create_post' |trans) }}"
Original file line number Diff line number Diff line change 155
155
$ (document ).ready (function () {
156
156
hljs .initHighlightingOnLoad ();
157
157
158
- $ (' [data-toggle=" confirmation"][data -message]' ).on (' click ' , function (event ) {
159
- var message = $ (this ).data (' message' );
158
+ $ (' form [data-confirmation-message]' ).on (' submit ' , function (event ) {
159
+ var message = $ (this ).data (' confirmation- message' );
160
160
161
161
if (confirm (message) === false ) {
162
162
// cancel the event
You can’t perform that action at this time.
0 commit comments