]> git.agnieray.net Git - galette.git/commitdiff
Fix telemetry; fixes #1680
authorGuillaume AGNIERAY <dev@agnieray.net>
Mon, 12 Jun 2023 15:41:50 +0000 (17:41 +0200)
committerGuillaume AGNIERAY <dev@agnieray.net>
Mon, 12 Jun 2023 15:41:50 +0000 (17:41 +0200)
galette/templates/default/modals/telemetry.html.twig

index c91138313d010e03f0d31a834a6558f9255942d2..b0bcb07d779c3d12f0245bb17419ed9dccd5b123 100644 (file)
                 $('#telemetry_panel').modal({
                     title: '{{ _T("Send telemetry information")|e('js') }}',
                     class: 'large',
-                    actions: [{
-                        text    : '{{ _T("Send")|e('js') }}',
-                        icon    : 'share',
-                        class   : 'primary icon labeled approve',
-                        click   : function() {
+                    onApprove: function() {
                             $.ajax({
                                 url:  '{{ url_for('telemetrySend') }}',
                                 method: 'POST',
                                         modal_classname: "redalert",
                                     } %}
                                 }
-                            });}
+                            });
+                    },
+                    onDeny: function() {
+                            $(this).find('.tdata').empty();
+                    },
+                    actions: [{
+                        text    : '{{ _T("Send")|e('js') }}',
+                        icon    : 'share',
+                        class   : 'primary icon labeled approve'
                     }, {
                         text    : '{{ _T("Cancel")|e('js') }}',
-                        class   : 'icon labeled cancel',
                         icon    : 'times',
-                        click   : function() {
-                            $(this).find('.tdata').empty();
-                        }
+                        class   : 'icon labeled cancel'
                     }]
                 });