mirror of
https://github.com/vrana/adminer.git
synced 2025-08-17 03:53:59 +02:00
No AJAX in drop table, drop database and logout
This commit is contained in:
@@ -42,8 +42,8 @@ function connect_error() {
|
||||
echo "\n";
|
||||
}
|
||||
echo "</table>\n";
|
||||
echo "<p><input type='submit' name='drop' value='" . lang('Drop') . "'" . confirm("formChecked(this, /db/)") . ">\n";
|
||||
echo "<a href='" . h(ME) . "refresh=1'>" . lang('Refresh') . "</a>\n";
|
||||
echo "<p><input type='submit' name='drop' value='" . lang('Drop') . "'" . confirm("formChecked(this, /db/)", 1) . ">\n"; // 1 - eventStop
|
||||
echo "<a href='" . h(ME) . "refresh=1' onclick='eventStop(event);'>" . lang('Refresh') . "</a>\n";
|
||||
echo "</form>\n";
|
||||
}
|
||||
}
|
||||
|
@@ -137,10 +137,11 @@ function html_select($name, $options, $value = "", $onchange = true) {
|
||||
|
||||
/** Get onclick confirmation
|
||||
* @param string JavaScript expression
|
||||
* @param bool stop event propagation
|
||||
* @return string
|
||||
*/
|
||||
function confirm($count = "") {
|
||||
return " onclick=\"return confirm('" . lang('Are you sure?') . ($count ? " (' + $count + ')" : "") . "');\"";
|
||||
function confirm($count = "", $stop = false) {
|
||||
return " onclick=\"" . ($stop ? "eventStop(event); " : "") . "return confirm('" . lang('Are you sure?') . ($count ? " (' + $count + ')" : "") . "');\"";
|
||||
}
|
||||
|
||||
/** Escape string for JavaScript apostrophes
|
||||
|
Reference in New Issue
Block a user