diff --git a/edit-admin.php b/edit-admin.php index b3de4f3b..a3d4bc88 100644 --- a/edit-admin.php +++ b/edit-admin.php @@ -38,6 +38,8 @@ require_once('common.php'); authentication_require_role('global-admin'); $error = 1; +$pAdminEdit_admin_password_text_error = ""; + if(isset($_GET['username'])) { $username = escape_string ($_GET['username']); $result = db_query("SELECT * FROM $table_admin WHERE username = '$username'"); @@ -81,12 +83,12 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") } else { $error = 1; - flash_error(sprintf($PALANG['pPasswordTooShort'], $CONF['min_password_length'])); + $pAdminEdit_admin_password_text_error = sprintf($PALANG['pPasswordTooShort'], $CONF['min_password_length']); } } else { $error = 1; - $pAdminEdit_admin_password_text = $PALANG['pAdminEdit_admin_password_text_error']; + $pAdminEdit_admin_password_text_error = $PALANG['pAdminEdit_admin_password_text_error']; } } } @@ -151,11 +153,10 @@ if ($result['rows'] >= 1) { } $smarty->assign ('username', $username); -$smarty->assign ('pAdminEdit_admin_password_text', $pAdminEdit_admin_password_text, false); +$smarty->assign ('pAdminEdit_admin_password_text_error', $pAdminEdit_admin_password_text_error, false); $smarty->assign ('tActive_checked', $tActive_checked); $smarty->assign ('tSadmin_checked', $tSadmin_checked); $smarty->assign ('select_options', select_options ($tAllDomains, $tDomains), false); -$smarty->assign ('tMessage', $tMessage, false); $smarty->assign ('smarty_template', 'admin_edit-admin'); $smarty->display ('index.tpl'); diff --git a/templates/admin_edit-admin.tpl b/templates/admin_edit-admin.tpl index 1d6fa91a..dfd29a6a 100644 --- a/templates/admin_edit-admin.tpl +++ b/templates/admin_edit-admin.tpl @@ -2,44 +2,43 @@
diff --git a/variables.inc.php b/variables.inc.php index 6e39863b..19ec190a 100644 --- a/variables.inc.php +++ b/variables.inc.php @@ -81,7 +81,6 @@ $pAdminCreate_admin_password_text = " "; $pAdminCreate_admin_username_text = " "; $pAdminCreate_domain_defaultaliases_text = " "; $pAdminCreate_domain_domain_text = " "; -$pAdminEdit_admin_password_text = " "; $pCreate_alias_address_text = " "; $pCreate_alias_goto_text = " "; $pCreate_mailbox_name_text = " ";