From: hickert Date: Tue, 28 Jun 2011 09:17:58 +0000 (+0000) Subject: Added ability to edit uid proposals for users created from a template X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=388d876a0b2e96c699fb523a5082e2c0f4499251;p=gosa.git Added ability to edit uid proposals for users created from a template git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20921 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_core.inc b/gosa-core/include/class_core.inc index 834ed53f6..29ddf149f 100644 --- a/gosa-core/include/class_core.inc +++ b/gosa-core/include/class_core.inc @@ -495,6 +495,16 @@ class core extends plugin { "group" => "core", "mandatory" => FALSE), + array( + "name" => "allowModificationOfUid", + "type" => "bool", + "default" => "false", + "description" => _("Allows to modify uid-proposals when creating a new user from a user-template."), + "check" => "gosaProperty::isBool", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + array( "name" => "modificationDetectionAttribute", "type" => "switch", diff --git a/gosa-core/plugins/admin/users/class_userManagement.inc b/gosa-core/plugins/admin/users/class_userManagement.inc index f554cf372..a16e1e202 100644 --- a/gosa-core/plugins/admin/users/class_userManagement.inc +++ b/gosa-core/plugins/admin/users/class_userManagement.inc @@ -481,6 +481,7 @@ class userManagement extends management $smarty->assign("template", array_pop($target)); $smarty->assign("templates", $templates); $smarty->assign("edit_uid", ""); + $smarty->assign("allowModificationOfUid", $this->config->get_cfg_value("core","allowModificationOfUid")); return($smarty->fetch(get_template_path('template.tpl', TRUE))); // -> See 'templateContinue' for further handling! @@ -517,6 +518,7 @@ class userManagement extends management $smarty->assign("template", "none"); $smarty->assign("templates", $templates); $smarty->assign("edit_uid", ""); + $smarty->assign("allowModificationOfUid", $this->config->get_cfg_value("core","allowModificationOfUid")); return($smarty->fetch(get_template_path('template.tpl', TRUE))); // -> See 'templateContinue' for further handling! @@ -570,6 +572,7 @@ class userManagement extends management $smarty->assign("templates",$templates); $smarty->assign("got_uid", $this->got_uid); $smarty->assign("edit_uid",false); + $smarty->assign("allowModificationOfUid", $this->config->get_cfg_value("core","allowModificationOfUid")); return($smarty->fetch(get_template_path('template.tpl', TRUE))); } @@ -625,6 +628,7 @@ class userManagement extends management $smarty->assign("template", get_post('template')); } $smarty->assign("templates",$templates); + $smarty->assign("allowModificationOfUid", $this->config->get_cfg_value("core","allowModificationOfUid")); return($smarty->fetch(get_template_path('template.tpl', TRUE))); } diff --git a/gosa-core/plugins/admin/users/template.tpl b/gosa-core/plugins/admin/users/template.tpl index ce9fee395..a1b443928 100644 --- a/gosa-core/plugins/admin/users/template.tpl +++ b/gosa-core/plugins/admin/users/template.tpl @@ -32,11 +32,22 @@ {t}Login{/t} {if $edit_uid eq "false"} - - {else} - + {if $allowModificationOfUid == "true"} + + + + {else} + + {/if} + {else} + {/if}