removed inline onsubmit

Signed-off-by: Manish Bisht <manish.bisht490@gmail.com>
This commit is contained in:
Manish Bisht 2017-05-22 11:34:10 +05:30
parent 6245c12367
commit c7a2c0257b
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;