Simplify drop object confirmation questions
This commit is contained in:
parent
a137f248f7
commit
a954f7d4b4
|
@ -198,7 +198,7 @@ edit_fields($row["fields"], $collations, "TABLE", $foreign_keys, $comments);
|
||||||
<input type="submit" value="<?php echo lang('Save'); ?>">
|
<input type="submit" value="<?php echo lang('Save'); ?>">
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if ($TABLE != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop') . " $TABLE"); ?><?php } ?>
|
<?php if ($TABLE != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', $TABLE)); ?><?php } ?>
|
||||||
<?php
|
<?php
|
||||||
if (support("partitioning")) {
|
if (support("partitioning")) {
|
||||||
$partition_table = preg_match('~RANGE|LIST~', $row["partition_by"]);
|
$partition_table = preg_match('~RANGE|LIST~', $row["partition_by"]);
|
||||||
|
|
|
@ -70,7 +70,7 @@ echo script("focus(qs('#name'));");
|
||||||
<input type="submit" value="<?php echo lang('Save'); ?>">
|
<input type="submit" value="<?php echo lang('Save'); ?>">
|
||||||
<?php
|
<?php
|
||||||
if (DB != "") {
|
if (DB != "") {
|
||||||
echo "<input type='submit' name='drop' value='" . lang('Drop') . "'>" . confirm(lang('Drop') . " " . DB) . "\n";
|
echo "<input type='submit' name='drop' value='" . lang('Drop') . "'>" . confirm(lang('Drop %s?', DB)) . "\n";
|
||||||
} elseif (!$_POST["add_x"] && $_GET["db"] == "") {
|
} elseif (!$_POST["add_x"] && $_GET["db"] == "") {
|
||||||
echo "<input type='image' class='icon' name='add' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "'>\n";
|
echo "<input type='image' class='icon' name='add' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "'>\n";
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,6 +47,6 @@ if (!$row && $EVENT != "") {
|
||||||
<p><?php textarea("EVENT_DEFINITION", $row["EVENT_DEFINITION"]); ?>
|
<p><?php textarea("EVENT_DEFINITION", $row["EVENT_DEFINITION"]); ?>
|
||||||
<p>
|
<p>
|
||||||
<input type="submit" value="<?php echo lang('Save'); ?>">
|
<input type="submit" value="<?php echo lang('Save'); ?>">
|
||||||
<?php if ($EVENT != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop') . " $EVENT"); ?><?php } ?>
|
<?php if ($EVENT != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', $EVENT)); ?><?php } ?>
|
||||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -86,6 +86,6 @@ foreach ($row["source"] as $key => $val) {
|
||||||
<input type="submit" value="<?php echo lang('Save'); ?>">
|
<input type="submit" value="<?php echo lang('Save'); ?>">
|
||||||
<noscript><p><input type="submit" name="add" value="<?php echo lang('Add column'); ?>"></noscript>
|
<noscript><p><input type="submit" name="add" value="<?php echo lang('Add column'); ?>"></noscript>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ($name != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop') . " $name"); ?><?php } ?>
|
<?php if ($name != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', $name)); ?><?php } ?>
|
||||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -225,7 +225,7 @@ function select_input($attrs, $options, $value = "", $onchange = "", $placeholde
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function confirm($message = "", $selector = "qsl('input')") {
|
function confirm($message = "", $selector = "qsl('input')") {
|
||||||
return script("$selector.onclick = function () { return confirm('" . ($message ? js_escape($message) . ". " : "") . lang('Are you sure?') . "'); };", "");
|
return script("$selector.onclick = function () { return confirm('" . ($message ? js_escape($message) : lang('Are you sure?')) . "'); };", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Print header for hidden fieldset (close by </div></fieldset>)
|
/** Print header for hidden fieldset (close by </div></fieldset>)
|
||||||
|
|
|
@ -171,6 +171,7 @@ $translations = array(
|
||||||
'Default value' => 'Výchozí hodnota',
|
'Default value' => 'Výchozí hodnota',
|
||||||
'Default values' => 'Výchozí hodnoty',
|
'Default values' => 'Výchozí hodnoty',
|
||||||
'Drop' => 'Odstranit',
|
'Drop' => 'Odstranit',
|
||||||
|
'Drop %s?' => 'Odstranit %s?',
|
||||||
'Are you sure?' => 'Opravdu?',
|
'Are you sure?' => 'Opravdu?',
|
||||||
'Size' => 'Velikost',
|
'Size' => 'Velikost',
|
||||||
'Compute' => 'Spočítat',
|
'Compute' => 'Spočítat',
|
||||||
|
|
|
@ -172,7 +172,8 @@ $translations = array(
|
||||||
'Default value' => 'Xx',
|
'Default value' => 'Xx',
|
||||||
'Default values' => 'Xx',
|
'Default values' => 'Xx',
|
||||||
'Drop' => 'Xx',
|
'Drop' => 'Xx',
|
||||||
'Are you sure?' => 'Xx',
|
'Drop %s?' => 'Xx?',
|
||||||
|
'Are you sure?' => 'Xx?',
|
||||||
'Size' => 'Xx',
|
'Size' => 'Xx',
|
||||||
'Compute' => 'Xx',
|
'Compute' => 'Xx',
|
||||||
'Move up' => 'Xx',
|
'Move up' => 'Xx',
|
||||||
|
|
|
@ -49,6 +49,6 @@ if (isset($_GET["function"])) {
|
||||||
<p><?php textarea("definition", $row["definition"]); ?>
|
<p><?php textarea("definition", $row["definition"]); ?>
|
||||||
<p>
|
<p>
|
||||||
<input type="submit" value="<?php echo lang('Save'); ?>">
|
<input type="submit" value="<?php echo lang('Save'); ?>">
|
||||||
<?php if ($PROCEDURE != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop') . " $PROCEDURE"); ?><?php } ?>
|
<?php if ($PROCEDURE != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', $PROCEDURE)); ?><?php } ?>
|
||||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -31,7 +31,7 @@ if (!$row) {
|
||||||
<input type="submit" value="<?php echo lang('Save'); ?>">
|
<input type="submit" value="<?php echo lang('Save'); ?>">
|
||||||
<?php
|
<?php
|
||||||
if ($_GET["ns"] != "") {
|
if ($_GET["ns"] != "") {
|
||||||
echo "<input type='submit' name='drop' value='" . lang('Drop') . "'>" . confirm(lang('Drop') . " $_GET[ns]") . "\n";
|
echo "<input type='submit' name='drop' value='" . lang('Drop') . "'>" . confirm(lang('Drop %s?', $_GET["ns"])) . "\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||||
|
|
|
@ -28,7 +28,7 @@ if (!$row) {
|
||||||
<input type="submit" value="<?php echo lang('Save'); ?>">
|
<input type="submit" value="<?php echo lang('Save'); ?>">
|
||||||
<?php
|
<?php
|
||||||
if ($SEQUENCE != "") {
|
if ($SEQUENCE != "") {
|
||||||
echo "<input type='submit' name='drop' value='" . lang('Drop') . "'>" . confirm(lang('Drop') . " $SEQUENCE") . "\n";
|
echo "<input type='submit' name='drop' value='" . lang('Drop') . "'>" . confirm(lang('Drop %s?', $SEQUENCE)) . "\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||||
|
|
|
@ -44,6 +44,6 @@ page_header(($name != "" ? lang('Alter trigger') . ": " . h($name) : lang('Creat
|
||||||
<p><?php textarea("Statement", $row["Statement"]); ?>
|
<p><?php textarea("Statement", $row["Statement"]); ?>
|
||||||
<p>
|
<p>
|
||||||
<input type="submit" value="<?php echo lang('Save'); ?>">
|
<input type="submit" value="<?php echo lang('Save'); ?>">
|
||||||
<?php if ($name != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop') . " $name"); ?><?php } ?>
|
<?php if ($name != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', $name)); ?><?php } ?>
|
||||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -22,7 +22,7 @@ if (!$row) {
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
if ($TYPE != "") {
|
if ($TYPE != "") {
|
||||||
echo "<input type='submit' name='drop' value='" . lang('Drop') . "'>" . confirm(lang('Drop') . " $TYPE") . "\n";
|
echo "<input type='submit' name='drop' value='" . lang('Drop') . "'>" . confirm(lang('Drop %s?', $TYPE)) . "\n";
|
||||||
} else {
|
} else {
|
||||||
echo "<input name='name' value='" . h($row['name']) . "' autocapitalize='off'>\n";
|
echo "<input name='name' value='" . h($row['name']) . "' autocapitalize='off'>\n";
|
||||||
textarea("as", $row["as"]);
|
textarea("as", $row["as"]);
|
||||||
|
|
|
@ -184,6 +184,6 @@ echo "</table>\n";
|
||||||
?>
|
?>
|
||||||
<p>
|
<p>
|
||||||
<input type="submit" value="<?php echo lang('Save'); ?>">
|
<input type="submit" value="<?php echo lang('Save'); ?>">
|
||||||
<?php if (isset($_GET["host"])) { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop') . " $USER@$_GET[host]"); ?><?php } ?>
|
<?php if (isset($_GET["host"])) { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', "$USER@$_GET[host]")); ?><?php } ?>
|
||||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -53,6 +53,6 @@ page_header(($TABLE != "" ? lang('Alter view') : lang('Create view')), $error, a
|
||||||
<p><?php textarea("select", $row["select"]); ?>
|
<p><?php textarea("select", $row["select"]); ?>
|
||||||
<p>
|
<p>
|
||||||
<input type="submit" value="<?php echo lang('Save'); ?>">
|
<input type="submit" value="<?php echo lang('Save'); ?>">
|
||||||
<?php if ($TABLE != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop') . " $TABLE"); ?><?php } ?>
|
<?php if ($TABLE != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', $TABLE)); ?><?php } ?>
|
||||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||||
</form>
|
</form>
|
||||||
|
|
Loading…
Reference in a new issue