This commit has been accessed 583 times via Git panel.
commit 4f053fd0e4f29965507d8b929b1b7f177674ce52
tree e8f00cb512bf9b19d0e34ffd6cdc77cb73025485
parent 33e23f79674afd5f50b9d5b1153641f3f0981235
author Engels Antonio <engels@majcms.org> 1333783332 +0800
committer Engels Antonio <engels@majcms.org> 1333783332 +0800
Add folder delete and trash purge confirmation
diff --git a/folders.php b/folders.php
index f04cb1d..845e439 100644
--- a/folders.php
+++ b/folders.php
@@ -62,7 +62,7 @@ if ($folder == "Trash") {
echo "<form method=\"post\">";
echo "<input type=\"hidden\" name=\"emt\" value=\"1\">";
echo "<input type=\"hidden\" name=\"box\" value=\"Trash\">";
- echo "<tr><td width=\"32\"><input type=\"image\" src=\"images/trashcan_purge.png\"></td><td><nobr>Empty Trash</nobr></td></tr>";
+ echo "<tr><td width=\"32\"><input type=\"image\" src=\"images/trashcan_purge.png\" onclick=\"if (confirm('Delete ALL messages in Trash permanently?')) {return true;} else {return false;}\"></td><td><nobr>Empty Trash</nobr></td></tr>";
echo "</form>";
}
}
diff --git a/index.php b/index.php
index 0570a9a..3ccab56 100644
--- a/index.php
+++ b/index.php
@@ -1031,7 +1031,7 @@ if (isset($_SESSION['logged_uid'])) {
echo "<option value=\"$fdel_name\">$fdel_name</option>";
}
- echo "</select></td><td width=\"197\"><input class=\"button\" type=\"submit\" value=\"delete folder\"></td><td></td></tr>";
+ echo "</select></td><td width=\"197\"><input class=\"button\" type=\"submit\" value=\"delete folder\" onclick=\"if (confirm('Delete folder ($fdel_name) and all messages in it?')) {return true;} else {return false;}\"></td><td></td></tr>";
echo "</form>";
}
echo "</table>";
tree e8f00cb512bf9b19d0e34ffd6cdc77cb73025485
parent 33e23f79674afd5f50b9d5b1153641f3f0981235
author Engels Antonio <engels@majcms.org> 1333783332 +0800
committer Engels Antonio <engels@majcms.org> 1333783332 +0800
Add folder delete and trash purge confirmation
diff --git a/folders.php b/folders.php
index f04cb1d..845e439 100644
--- a/folders.php
+++ b/folders.php
@@ -62,7 +62,7 @@ if ($folder == "Trash") {
echo "<form method=\"post\">";
echo "<input type=\"hidden\" name=\"emt\" value=\"1\">";
echo "<input type=\"hidden\" name=\"box\" value=\"Trash\">";
- echo "<tr><td width=\"32\"><input type=\"image\" src=\"images/trashcan_purge.png\"></td><td><nobr>Empty Trash</nobr></td></tr>";
+ echo "<tr><td width=\"32\"><input type=\"image\" src=\"images/trashcan_purge.png\" onclick=\"if (confirm('Delete ALL messages in Trash permanently?')) {return true;} else {return false;}\"></td><td><nobr>Empty Trash</nobr></td></tr>";
echo "</form>";
}
}
diff --git a/index.php b/index.php
index 0570a9a..3ccab56 100644
--- a/index.php
+++ b/index.php
@@ -1031,7 +1031,7 @@ if (isset($_SESSION['logged_uid'])) {
echo "<option value=\"$fdel_name\">$fdel_name</option>";
}
- echo "</select></td><td width=\"197\"><input class=\"button\" type=\"submit\" value=\"delete folder\"></td><td></td></tr>";
+ echo "</select></td><td width=\"197\"><input class=\"button\" type=\"submit\" value=\"delete folder\" onclick=\"if (confirm('Delete folder ($fdel_name) and all messages in it?')) {return true;} else {return false;}\"></td><td></td></tr>";
echo "</form>";
}
echo "</table>";