From e385e71551978c6f51704ca25b085d602f22786b Mon Sep 17 00:00:00 2001 From: Jakub Onderka Date: Mon, 28 Mar 2022 12:44:56 +0200 Subject: [PATCH] fix: [UI] Avoid calling submitPublish() JS method --- app/View/EventBlocklists/mass_delete.ctp | 12 +++++------- .../Events/ajax/eventPublishConfirmationForm.ctp | 6 ++---- app/View/Events/ajax/toggle_correlation.ctp | 6 ++---- app/View/Feeds/ajax/feedToggleConfirmation.ctp | 6 ++---- .../GalaxyClusters/ajax/publishConfirmationForm.ctp | 6 ++---- app/webroot/js/misp.js | 4 ---- 6 files changed, 13 insertions(+), 27 deletions(-) diff --git a/app/View/EventBlocklists/mass_delete.ctp b/app/View/EventBlocklists/mass_delete.ctp index 38f7f87a3..2fb591eb3 100644 --- a/app/View/EventBlocklists/mass_delete.ctp +++ b/app/View/EventBlocklists/mass_delete.ctp @@ -2,9 +2,9 @@ Form->create('EventBlocklist', array('style' => 'margin:0px;', 'id' => 'PromptForm')); echo $this->Form->input('ids', array( - 'type' => 'hidden', - 'div' => 'hidden', - 'value' => json_encode($event_ids) + 'type' => 'hidden', + 'div' => 'hidden', + 'value' => json_encode($event_ids), )); ?> @@ -13,7 +13,7 @@ @@ -23,7 +23,5 @@
- Yes +
- Form->end(); - ?> + Form->end(); ?> diff --git a/app/View/Events/ajax/eventPublishConfirmationForm.ctp b/app/View/Events/ajax/eventPublishConfirmationForm.ctp index 6da745041..10bfd4d3f 100644 --- a/app/View/Events/ajax/eventPublishConfirmationForm.ctp +++ b/app/View/Events/ajax/eventPublishConfirmationForm.ctp @@ -25,7 +25,7 @@ @@ -35,7 +35,5 @@
- +
- Form->end(); - ?> + Form->end(); ?> diff --git a/app/View/Events/ajax/toggle_correlation.ctp b/app/View/Events/ajax/toggle_correlation.ctp index c2c7d3619..7b2d31aa9 100644 --- a/app/View/Events/ajax/toggle_correlation.ctp +++ b/app/View/Events/ajax/toggle_correlation.ctp @@ -17,7 +17,7 @@ @@ -27,7 +27,5 @@
- +
- Form->end(); - ?> + Form->end(); ?> diff --git a/app/View/Feeds/ajax/feedToggleConfirmation.ctp b/app/View/Feeds/ajax/feedToggleConfirmation.ctp index facc1e4c0..ba5160175 100644 --- a/app/View/Feeds/ajax/feedToggleConfirmation.ctp +++ b/app/View/Feeds/ajax/feedToggleConfirmation.ctp @@ -8,7 +8,7 @@ @@ -18,7 +18,5 @@
- Yes +
- Form->end(); - ?> + Form->end(); ?> diff --git a/app/View/GalaxyClusters/ajax/publishConfirmationForm.ctp b/app/View/GalaxyClusters/ajax/publishConfirmationForm.ctp index e18935307..3f5a2cef4 100644 --- a/app/View/GalaxyClusters/ajax/publishConfirmationForm.ctp +++ b/app/View/GalaxyClusters/ajax/publishConfirmationForm.ctp @@ -22,7 +22,7 @@ @@ -32,7 +32,5 @@
- +
- Form->end(); - ?> + Form->end(); ?> diff --git a/app/webroot/js/misp.js b/app/webroot/js/misp.js index 853bb5e03..f54823f76 100644 --- a/app/webroot/js/misp.js +++ b/app/webroot/js/misp.js @@ -166,10 +166,6 @@ function screenshotPopup(url, title) { $("#gray_out").fadeIn(); } -function submitPublish() { - $("#PromptForm").submit(); -} - function editTemplateElement(type, id) { simplePopup(baseurl + "/template_elements/edit/" + type + "/" + id); }