diff --git a/lam/templates/initsuff.php b/lam/templates/initsuff.php index 5495f470..13494760 100644 --- a/lam/templates/initsuff.php +++ b/lam/templates/initsuff.php @@ -126,22 +126,43 @@ if ($_POST['add_suff'] || $_POST['cancel']) { } echo $_SESSION['header']; echo "\n"; - echo "initsuff\n"; + echo "initsuff\n"; echo "\n"; - echo "\n"; + echo "\n\n"; // print error/success messages if ($_POST['add_suff']) { if (sizeof($fail) > 0) { + // print error messages for ($i = 0; $i < sizeof($fail); $i++) { StatusMessage("ERROR", _("Failed to create entry!") . "
" . $error[$i], $fail[$i]); } + echo "

 

\n"; + echo "" . _("User list") . "\n"; + echo "\n"; + } + else { + // print success message + StatusMessage("INFO", "", _("All changes were successful.")); + if ($_SESSION['config']->is_samba3()) { + $doms = $_SESSION['ldap']->search_domains($_SESSION['config']->get_domainSuffix()); + echo "

 

\n"; + echo "" . _("No domains found, please create one.") . "\n"; + echo "\n"; + } + else { + echo "

 

\n"; + echo "" . _("User list") . "\n"; + echo "\n"; + } } - else StatusMessage("INFO", "", _("All changes were successful.")); } - else StatusMessage("INFO", "", _("No changes were made.")); - echo "

 

\n"; - echo "" . _("User list") . "\n"; - echo "\n"; + else { + // no suffixes were created + StatusMessage("INFO", "", _("No changes were made.")); + echo "

 

\n"; + echo "" . _("User list") . "\n"; + echo "\n"; + } exit; }