fix: [UI] Avoid calling submitPublish() JS method

pull/8246/head
Jakub Onderka 2022-03-28 12:44:56 +02:00
parent 86cfcefb10
commit e385e71551
6 changed files with 13 additions and 27 deletions

View File

@ -2,9 +2,9 @@
<?php
echo $this->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),
));
?>
<legend><?php echo __('Delete blocklisted events'); ?></legend>
@ -13,7 +13,7 @@
<table>
<tr>
<td style="vertical-align:top">
<span role="button" tabindex="0" aria-label="Publish" title="Publish" id="PromptYesButton" class="btn btn-primary" onClick="submitPublish()">Yes</span>
<button role="button" tabindex="0" aria-label="Delete" title="Delete" id="PromptYesButton" class="btn btn-primary">Yes</button>
</td>
<td style="width:540px;">
</td>
@ -23,7 +23,5 @@
</tr>
</table>
</div>
<?php
echo $this->Form->end();
?>
<?= $this->Form->end(); ?>
</div>

View File

@ -25,7 +25,7 @@
<table>
<tr>
<td style="vertical-align:top">
<span role="button" tabindex="0" aria-label="<?php echo __('Publish');?>" title="<?php echo __('Publish');?>" id="PromptYesButton" class="btn btn-primary" onClick="submitPublish()"><?php echo __('Yes');?></span>
<button role="button" tabindex="0" aria-label="<?php echo __('Publish');?>" title="<?php echo __('Publish');?>" id="PromptYesButton" class="btn btn-primary"><?php echo __('Yes');?></button>
</td>
<td style="width:540px;">
</td>
@ -35,7 +35,5 @@
</tr>
</table>
</div>
<?php
echo $this->Form->end();
?>
<?= $this->Form->end(); ?>
</div>

View File

@ -17,7 +17,7 @@
<table>
<tr>
<td style="vertical-align:top">
<span role="button" tabindex="0" aria-label="<?php echo __('Toggle correlation');?>" title="<?php echo __('Toggle correlation');?>" id="PromptYesButton" class="btn btn-primary" onClick="submitPublish();"><?php echo __('Yes');?></span>
<button role="button" tabindex="0" aria-label="<?php echo __('Toggle correlation');?>" title="<?php echo __('Toggle correlation');?>" id="PromptYesButton" class="btn btn-primary"><?php echo __('Yes');?></button>
</td>
<td style="width:540px;">
</td>
@ -27,7 +27,5 @@
</tr>
</table>
</div>
<?php
echo $this->Form->end();
?>
<?= $this->Form->end(); ?>
</div>

View File

@ -8,7 +8,7 @@
<table>
<tr>
<td style="vertical-align:top">
<span role="button" tabindex="0" aria-label="Publish" title="Publish" id="PromptYesButton" class="btn btn-primary" onClick="submitPublish()">Yes</span>
<button role="button" tabindex="0" aria-label="Publish" title="Publish" id="PromptYesButton" class="btn btn-primary">Yes</button>
</td>
<td style="width:540px;">
</td>
@ -18,7 +18,5 @@
</tr>
</table>
</div>
<?php
echo $this->Form->end();
?>
<?= $this->Form->end(); ?>
</div>

View File

@ -22,7 +22,7 @@
<table>
<tr>
<td style="vertical-align:top">
<span role="button" tabindex="0" aria-label="<?php echo __('Publish');?>" title="<?php echo __('Publish');?>" id="PromptYesButton" class="btn btn-primary" onClick="submitPublish()"><?php echo __('Yes');?></span>
<button role="button" tabindex="0" aria-label="<?php echo __('Publish');?>" title="<?php echo __('Publish');?>" id="PromptYesButton" class="btn btn-primary"><?php echo __('Yes');?></button>
</td>
<td style="width:540px;">
</td>
@ -32,7 +32,5 @@
</tr>
</table>
</div>
<?php
echo $this->Form->end();
?>
<?= $this->Form->end(); ?>
</div>

View File

@ -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);
}