Added success message after changing a list

This commit is contained in:
2021-08-13 12:41:32 +02:00
parent 8f98a565f1
commit da5a01c567
4 changed files with 10 additions and 1 deletions

View File

@@ -4,6 +4,7 @@ require("init.php");
$list_name = isset($_GET["list_name"]) ? $_GET["list_name"] : ""; $list_name = isset($_GET["list_name"]) ? $_GET["list_name"] : "";
$domain = $_SESSION["domain"]; $domain = $_SESSION["domain"];
$success = isset($_GET["success"]) ? true : false;
if (!isset($_SESSION["auth"]) || $_SESSION["auth"] != 1) if (!isset($_SESSION["auth"]) || $_SESSION["auth"] != 1)
{ {
@@ -79,6 +80,7 @@ $smarty->assign("domain", $domain);
$smarty->assign("moderators", $moderators); $smarty->assign("moderators", $moderators);
$smarty->assign("prefix", $prefix); $smarty->assign("prefix", $prefix);
$smarty->assign("username", $_SESSION["username"]); $smarty->assign("username", $_SESSION["username"]);
$smarty->assign("success", $success);
$smarty->display("edit_list.tpl"); $smarty->display("edit_list.tpl");
?> ?>

View File

@@ -56,6 +56,7 @@
<div id="breadcrumbs"> <div id="breadcrumbs">
<a href="index.php">Home</a>&nbsp;/&nbsp;{$list_name} <a href="index.php">Home</a>&nbsp;/&nbsp;{$list_name}
</div> </div>
{if $success eq true}<p class="success">List was successfully updated.</p>{/if}
<form method="post" action="save_list.php" id="save_list" onsubmit="return validate_form()"> <form method="post" action="save_list.php" id="save_list" onsubmit="return validate_form()">
<div id="edit_page"> <div id="edit_page">
<input type="hidden" name="list_name" value="{$list_name}"> <input type="hidden" name="list_name" value="{$list_name}">

View File

@@ -209,7 +209,7 @@ if (!$return["success"])
} }
} }
header("Location: edit_list.php?list_name=$list_name"); header("Location: edit_list.php?list_name=$list_name&success");
exit(); exit();

View File

@@ -221,6 +221,12 @@ td
height: 100%; height: 100%;
} }
.success
{
font-weight: bold;
color: #00aa00;
}
#save_list #save_list
{ {
margin-top: 20px; margin-top: 20px;