Merge pull request #13291 from manishbisht/remove-inline-javascript

Removed inline onsubmit
This commit is contained in:
Michal Čihař 2017-05-23 11:35:10 +02:00 committed by GitHub
commit 39a256dc90
3 changed files with 8 additions and 4 deletions

View File

@ -756,5 +756,10 @@ AJAX.registerOnload('indexes.js', function () {
}
PMA_showAddIndexDialog(source_array, array_index, target_columns, -1, source_array[array_index]);
})
});
$('#index_frm').on('submit', function () {
if (typeof(this.elements['index[Key_name]'].disabled) != 'undefined')
this.elements['index[Key_name]'].disabled = false;
});
});

View File

@ -2,8 +2,7 @@
method="post"
name="index_frm"
id="index_frm"
class="ajax"
onsubmit="if (typeof(this.elements['index[Key_name]'].disabled) != 'undefined') this.elements['index[Key_name]'].disabled = false;">
class="ajax">
<?= PMA\libraries\URL::getHiddenInputs($form_params); ?>

View File

@ -1,4 +1,4 @@
<form method="post" action="tbl_addfield.php" id="addColumns" name="addColumns" onsubmit="return checkFormElementInRange(this, 'num_fields', '<?= str_replace('\'', '\\\'', __('You have to add at least one column.')); ?>', 1)">
<form method="post" action="tbl_addfield.php" id="addColumns" name="addColumns">
<?= PMA\libraries\URL::getHiddenInputs($GLOBALS['db'], $GLOBALS['table']); ?>
<?php if (PMA\libraries\Util::showIcons('ActionLinksMode')): ?>
<?= PMA\libraries\Util::getImage('b_insrow.png', __('Add column')); ?>&nbsp;