mirror of https://github.com/MISP/MISP
fix: [UI] Submit form on CTRL+ENTER on select
parent
3fc1441259
commit
aacd19a318
|
@ -35,7 +35,7 @@ class AppController extends Controller
|
|||
|
||||
public $helpers = array('OrgImg', 'FontAwesome', 'UserName');
|
||||
|
||||
private $__queryVersion = '145';
|
||||
private $__queryVersion = '146';
|
||||
public $pyMispVersion = '2.4.162';
|
||||
public $phpmin = '7.2';
|
||||
public $phprec = '7.4';
|
||||
|
|
|
@ -12,16 +12,9 @@
|
|||
<?= $this->Form->postLink(
|
||||
h($actionName),
|
||||
$this->request->here(),
|
||||
['class' => 'btn btn-primary button-execute']
|
||||
['class' => 'btn btn-primary']
|
||||
)
|
||||
?>
|
||||
<button type="button" class="btn btn-secondary cancel-button" data-dismiss="modal"><?= __('Cancel') ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).keydown(function(e) {
|
||||
if(e.which === 13 && e.ctrlKey) {
|
||||
$('.button-execute').click();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -12,16 +12,9 @@
|
|||
<?= $this->Form->postLink(
|
||||
h($actionName),
|
||||
$this->request->here(),
|
||||
['class' => 'btn btn-primary button-execute']
|
||||
['class' => 'btn btn-primary']
|
||||
)
|
||||
?>
|
||||
<button type="button" class="btn btn-secondary cancel-button" data-dismiss="modal"><?= __('Cancel') ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).keydown(function(e) {
|
||||
if(e.which === 13 && e.ctrlKey) {
|
||||
$('.button-execute').click();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -23,17 +23,10 @@ $title = Inflector::singularize(Inflector::humanize(Inflector::underscore($this-
|
|||
<?= $this->Form->postLink(
|
||||
'Delete',
|
||||
$this->request->here(),
|
||||
['class' => 'btn btn-primary button-execute']
|
||||
['class' => 'btn btn-primary']
|
||||
)
|
||||
?>
|
||||
<button type="button" class="btn btn-secondary cancel-button" data-dismiss="modal"><?= __('Cancel') ?></button>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).keydown(function(e) {
|
||||
if (e.which === 13 && e.ctrlKey) {
|
||||
$('.button-execute').click();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</div>
|
|
@ -18,14 +18,7 @@
|
|||
?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary button-execute" onclick="$('#<?= $randomNumber . 'Form' ?>').submit();"><?= __('Submit') ?></button>
|
||||
<button type="button" class="btn btn-primary" onclick="$('#<?= $randomNumber . 'Form' ?>').submit();"><?= __('Submit') ?></button>
|
||||
<button type="button" class="btn btn-secondary cancel-button" data-dismiss="modal"><?= __('Cancel') ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).keydown(function(e) {
|
||||
if(e.which === 13 && e.ctrlKey) {
|
||||
$('.button-execute').click();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -4849,8 +4849,8 @@ $(document.body).on('keyup', '#quickFilterField', function(e) {
|
|||
}
|
||||
});
|
||||
|
||||
// Send textarea form on CMD+ENTER or CTRL+ENTER
|
||||
$(document.body).on('keydown', 'textarea', function(e) {
|
||||
// Send textarea or select form on CMD+ENTER or CTRL+ENTER
|
||||
$(document.body).on('keydown', 'textarea, select', function(e) {
|
||||
if (e.keyCode === 13 && (e.metaKey || e.ctrlKey)) { // CMD+ENTER or CTRL+ENTER key
|
||||
if (e.target.form) {
|
||||
$(e.target.form).submit();
|
||||
|
|
Loading…
Reference in New Issue