summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0b61183)
raw | patch | inline | side by side (parent: 0b61183)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 7 Sep 2006 04:04:55 +0000 (04:04 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 7 Sep 2006 04:04:55 +0000 (04:04 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4610 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/users/class_userManagement.inc | patch | blob | history |
diff --git a/plugins/admin/users/class_userManagement.inc b/plugins/admin/users/class_userManagement.inc
index cc6fc5f060558c7967ca0eb34c259cdb16e9dd7d..d2aea37b4d6e90762e6f5a3336e2f7d7b8325014 100644 (file)
foreach(array("del" => "user_del", "edit" => "user_edit",
"new" => "user_new",
"new_tpl" => "user_tplnew",
+ "create_user_from_tpl" => "userfrom_tpl",
"change_pw" => "user_chgpw",
"editPaste" => "editPaste", "copy" => "copy",
"cut" => "cut") as $act => $name){
Create a new user,template, user from template
********************/
+ /* Check selected options for template */
+ if (isset($_POST['template_continue'])){
+ if(!isset($_POST['template']) || (empty($_POST['template']))){
+ $message[] = _("Please select a valid template.");
+ }
+ if(!isset($_POST['sn']) || (empty($_POST['sn']))){
+ $message[]= _("The required field 'Name' is not set.");
+ }
+ if(!isset($_POST['givenName']) || (empty($_POST['givenName']))){
+ $message[]= _("The required field 'Given name' is not set.");
+ }
+
+ /* Show error message / continue editing */
+ if (count($message) > 0){
+ show_errors ($message);
+
+ foreach(array("sn", "givenName", "uid", "template") as $attr){
+ if(isset($_POST[$attr])){
+ $smarty->assign("$attr", $_POST[$attr]);
+ }else{
+ $smarty->assign("$attr", "");
+ }
+ }
+ $smarty->assign("templates",$this->templates);
+ $smarty->assign("got_uid",$this->got_uid);
+ $smarty->assign("edit_uid",false);
+
+ return($smarty->fetch(get_template_path('template.tpl', TRUE)));
+
+ }
+ }
+
/* New user/template request */
if (($s_action=="create_user_from_tpl")||($s_action=="new") || ($s_action=="new_tpl")){
/* By default we set 'dn' to 'new', all relevant plugins will
********************/
/* Continue template editing */
- if ((isset($_POST['template_continue']) && $_POST['template'] != 'none' && !isset($_POST['uid']))){
+ if ((isset($_POST['template_continue'])) && ($_POST['template'] != 'none') && (!isset($_POST['uid']))){
+
$this->sn = $_POST['sn'];
$this->givenName = $_POST['givenName'];
return($smarty->fetch(get_template_path('template.tpl', TRUE)));
}
-
/********************
No template selected continue edit
********************/