]> git.joonet.de Git - adminer.git/commitdiff
Simplify drop object confirmation questions
authorJakub Vrana <jakub@vrana.cz>
Wed, 24 Jan 2018 17:36:19 +0000 (18:36 +0100)
committerJakub Vrana <jakub@vrana.cz>
Wed, 24 Jan 2018 17:36:19 +0000 (18:36 +0100)
14 files changed:
adminer/create.inc.php
adminer/database.inc.php
adminer/event.inc.php
adminer/foreign.inc.php
adminer/include/functions.inc.php
adminer/lang/cs.inc.php
adminer/lang/xx.inc.php
adminer/procedure.inc.php
adminer/scheme.inc.php
adminer/sequence.inc.php
adminer/trigger.inc.php
adminer/type.inc.php
adminer/user.inc.php
adminer/view.inc.php

index 9eebde4bff3920c5df1b433276dc0416c2855ddf..b950771d225099f928a3992a0c7c0505eae80e98 100644 (file)
@@ -198,7 +198,7 @@ edit_fields($row["fields"], $collations, "TABLE", $foreign_keys, $comments);
 <input type="submit" value="<?php echo lang('Save'); ?>">
 <?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
 if (support("partitioning")) {
        $partition_table = preg_match('~RANGE|LIST~', $row["partition_by"]);
index 7ff83142774ce8e08a52ef653a11b9008ce9a9ff..5346e46c4e93b1912e15155558728efb4f1afb56 100644 (file)
@@ -70,7 +70,7 @@ echo script("focus(qs('#name'));");
 <input type="submit" value="<?php echo lang('Save'); ?>">
 <?php
 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"] == "") {
        echo "<input type='image' class='icon' name='add' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "'>\n";
 }
index 019a2cd57c8f9a514a87283ea08afa1da364c049..92e4cb16e62f4f0a4e756824f6e340391d245dfc 100644 (file)
@@ -47,6 +47,6 @@ if (!$row && $EVENT != "") {
 <p><?php textarea("EVENT_DEFINITION", $row["EVENT_DEFINITION"]); ?>
 <p>
 <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; ?>">
 </form>
index 216e4b0dca81aea1339a48383a2a05dc208caf22..47c623f617119e93e73bd939c8067c24fb30e286 100644 (file)
@@ -86,6 +86,6 @@ foreach ($row["source"] as $key => $val) {
 <input type="submit" value="<?php echo lang('Save'); ?>">
 <noscript><p><input type="submit" name="add" value="<?php echo lang('Add column'); ?>"></noscript>
 <?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; ?>">
 </form>
index 42ed855033e60061dd23bd357d21c3855d024af2..5e208f0e2bd3f7031a9515461faf7b2611e5e1b1 100644 (file)
@@ -225,7 +225,7 @@ function select_input($attrs, $options, $value = "", $onchange = "", $placeholde
 * @return string
 */
 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>)
index 54d999d0c0336d015d2e73a9500bb792135c804f..56cae3b0da1b3dbbe24bf282e3845bcde36be79e 100644 (file)
@@ -171,6 +171,7 @@ $translations = array(
        'Default value' => 'Výchozí hodnota',
        'Default values' => 'Výchozí hodnoty',
        'Drop' => 'Odstranit',
+       'Drop %s?' => 'Odstranit %s?',
        'Are you sure?' => 'Opravdu?',
        'Size' => 'Velikost',
        'Compute' => 'Spočítat',
index 890fc8fe8677779c3d2a0c9a77cb051c2e218539..c6004666c19e6d9fea34e6ca21d446865ea84ae1 100644 (file)
@@ -172,7 +172,8 @@ $translations = array(
        'Default value' => 'Xx',
        'Default values' => 'Xx',
        'Drop' => 'Xx',
-       'Are you sure?' => 'Xx',
+       'Drop %s?' => 'Xx?',
+       'Are you sure?' => 'Xx?',
        'Size' => 'Xx',
        'Compute' => 'Xx',
        'Move up' => 'Xx',
index f16d93ac5bead7cb41171d1c2764c488476687ec..fede3e33b2f39f23541df8865074127c8a6d626c 100644 (file)
@@ -49,6 +49,6 @@ if (isset($_GET["function"])) {
 <p><?php textarea("definition", $row["definition"]); ?>
 <p>
 <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; ?>">
 </form>
index 4f64ecc41ec185575e30132f693a742453e9b7eb..b17745418c86cda6fc427dfb344cc553d8242c46 100644 (file)
@@ -31,7 +31,7 @@ if (!$row) {
 <input type="submit" value="<?php echo lang('Save'); ?>">
 <?php
 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; ?>">
index e51e4aee1b6e6b0e64332577739ed4148a133019..0e1af4e6d15c497374506bf61c042564d756844f 100644 (file)
@@ -28,7 +28,7 @@ if (!$row) {
 <input type="submit" value="<?php echo lang('Save'); ?>">
 <?php
 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; ?>">
index a99dca21078cef74832cd1b0165e5c44f0243e7c..54454991071d46d20c2265439fcf48bbbb860f00 100644 (file)
@@ -44,6 +44,6 @@ page_header(($name != "" ? lang('Alter trigger') . ": " . h($name) : lang('Creat
 <p><?php textarea("Statement", $row["Statement"]); ?>
 <p>
 <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; ?>">
 </form>
index 310b5be30960ff891b89b455d8b6ba8823633d07..2c97a1a69cd65e783381944ad69aa209e8328f3d 100644 (file)
@@ -22,7 +22,7 @@ if (!$row) {
 <p>
 <?php
 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 {
        echo "<input name='name' value='" . h($row['name']) . "' autocapitalize='off'>\n";
        textarea("as", $row["as"]);
index af0fb72fa2f937a96848e30cd0e9ad4a1f2b249c..176e307fd1946d37643c8aaba8b29243b9ff1407 100644 (file)
@@ -184,6 +184,6 @@ echo "</table>\n";
 ?>
 <p>
 <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; ?>">
 </form>
index 35acc5b92c10d0029ed140ccee7b5948a8453629..0b2f8fa21a0791fc55e11062703fe4924bd647b5 100644 (file)
@@ -53,6 +53,6 @@ page_header(($TABLE != "" ? lang('Alter view') : lang('Create view')), $error, a
 <p><?php textarea("select", $row["select"]); ?>
 <p>
 <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; ?>">
 </form>