summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dd97898)
raw | patch | inline | side by side (parent: dd97898)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 4 Apr 2006 07:09:00 +0000 (07:09 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 4 Apr 2006 07:09:00 +0000 (07:09 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2965 594d385d-05f5-0310-b6e9-bd551577e9d8
index a9a7fa7a6dc87db539e20211b5cccc18270187f9..e72431d334b10f711d7ebbf307d7ece491c5c008 100644 (file)
<br>
{$AttributesToFix}
<p class='seperator'> </p>
+ {if $SubDialog == false}
<br>
+
<div style='text-align:right;width:100%;'>
<input type='submit' name='PerformCopyPaste' value='{t}Save{/t}'>
<input type='submit' name='AbortCopyPaste' value='{t}Cancel{/t}'>
</div>
+ {/if}
{else}
<p class='seperator'> </p>
<br>
index ee53a31684b919f7081bdf005f15fc6549b16789..d8fb89ab3acf6febd495f617cc521ab4b3f70aa5 100644 (file)
foreach($obj->attributes as $attr){
$this->current->by_object[$name]->$attr = $obj->$attr;
}
+ if(isset($obj->CopyPasteVars)){
+ foreach($obj->CopyPasteVars as $attr){
+ $this->current->by_object[$name]->$attr = $obj->$attr;
+ }
+ }
foreach(array("is_account") as $attr){
if(isset($obj->$attr)){
$this->current->by_object[$name]->$attr = $obj->$attr;
$smarty = get_smarty();
$smarty->assign("Complete",false);
$smarty->assign("AttributesToFix",$this->generateAttributesToFix());
+ $smarty->assign("SubDialog",$this->current->SubDialog);
+
$smarty->assign("objectDN" ,$this->objectdn);
$smarty->assign("message", sprintf(_("You are going to copy the entry '%s'."), $this->objectdn));
return($smarty->fetch(get_template_path("copyPasteDialog.tpl",FALSE)));
diff --git a/include/class_tabs.inc b/include/class_tabs.inc
index f6865b9d08a99008db3bb2a164f0c0a840f062e5..689d89268149b06d7e47ceb8c7d23c8f5a040e0d 100644 (file)
--- a/include/class_tabs.inc
+++ b/include/class_tabs.inc
var $disabled= "";
var $by_name= array();
var $by_object= array();
+ var $SubDialog = false;
function tabs($config, $data, $dn)
{
function getCopyDialog()
{
$ret = "";
+ $this->SubDialog = false;
foreach ($this->by_object as $key => $obj){
if($obj->is_account){
- $ret .= $this->by_object[$key]->getCopyDialog();
+ $tmp = $this->by_object[$key]->getCopyDialog();
+ if($tmp['status'] == "SubDialog"){
+ $this->SubDialog = true;
+ return($tmp['string']);
+ }else{
+ $ret .= $tmp['string'];
+ }
}
}
return($ret);
diff --git a/plugins/admin/groups/class_groupGeneric.inc b/plugins/admin/groups/class_groupGeneric.inc
index f7410e9bad1f79ad680f143ef40dfb4cf361425c..7b4c787a6e7874dd56527e639c069020f52c277c 100644 (file)
*/
$tmp = search_config($this->config->data,"faiManagement","CLASS");
if(!empty($tmp)){
- if(isset($this->parent->by_object['appgroup'])){
- $baseObj = $this->parent->by_object['appgroup'];
- if($baseObj->is_account){
- if(isset($baseObj->Release)){
- $this->description .= " (".trim($baseObj->Release).")";
+ if(isset($this->parent)){
+ if(isset($this->parent->by_object['appgroup'])){
+ $baseObj = $this->parent->by_object['appgroup'];
+ if($baseObj->is_account){
+ if(isset($baseObj->Release)){
+ $this->description .= " (".trim($baseObj->Release).")";
+ }
}
}
}
index 4f11d399167104070e5e04af111ee4383f103f29..ab24dffcd1e812885282137b6772304f5ccb9a3e 100644 (file)
$smarty->assign("uid", $this->uid);
$smarty->assign("rand", $rand);
$str = $smarty->fetch(get_template_path("paste_generic.tpl",TRUE,dirname(__FILE__)));
-
- return($str);
+
+
+ $ret = array();
+ $ret['string'] = $str;
+ $ret['status'] = "";
+ return($ret);
}
function saveCopyDialog()
diff --git a/plugins/personal/posix/class_posixAccount.inc b/plugins/personal/posix/class_posixAccount.inc
index 7dfec52d2741c1a70368d7c973b1b80793634b34..2845c16ec4099e872d68988ecfaf0fda2a1082f5 100644 (file)
var $ui = array();
/* attribute list for save action */
- var $attributes= array("homeDirectory", "loginShell", "uidNumber", "gidNumber", "gecos",
+ var $CopyPasteVars = array("grouplist","groupMembership");
+ var $attributes = array("homeDirectory", "loginShell", "uidNumber", "gidNumber", "gecos",
"shadowMin", "shadowMax", "shadowWarning", "shadowInactive", "shadowLastChange",
"shadowExpire", "gosaDefaultPrinter", "gosaDefaultLanguage", "uid","accessTo","trustModel");
var $objectclasses= array("posixAccount", "shadowAccount");
/* execute generates the html output for this node */
- function execute()
+ function execute($isCopyPaste = false)
{
/* Call parent execute */
plugin::execute();
+ $display= "";
+ if(!$isCopyPaste){
/* Do we need to flip is_account state? */
if (isset($_POST['modify_state'])){
$this->is_account= !$this->is_account;
return ($display);
}
- $display= "";
/* Show tab dialog headers */
if ($this->parent != NULL){
$obj= $this->parent->by_object['sambaAccount'];
}
if (isset($obj) && $obj->is_account == TRUE &&
- ((isset($this->parent->by_object['sambaAccount']))&&($this->parent->by_object['sambaAccount']->is_account))
- ||(isset($this->parent->by_object['environment'] ))&&($this->parent->by_object['environment'] ->is_account)){
+ ((isset($this->parent->by_object['sambaAccount']))&&($this->parent->by_object['sambaAccount']->is_account))
+ ||(isset($this->parent->by_object['environment'] ))&&($this->parent->by_object['environment'] ->is_account)){
/* Samba3 dependency on posix accounts are enabled
in the moment, because I need to rely on unique
return($display);
}
}
+ }
+ /* Trigger group edit? */
+ if (isset($_POST['edit_groupmembership'])){
+ $this->group_dialog= TRUE;
+ $this->dialog= TRUE;
+ }
- /* Trigger group edit? */
- if (isset($_POST['edit_groupmembership'])){
- $this->group_dialog= TRUE;
- $this->dialog= TRUE;
- }
-
- /* Cancel group edit? */
- if (isset($_POST['add_groups_cancel']) ||
- isset($_POST['add_groups_finish'])){
- $this->group_dialog= FALSE;
- $this->dialog= FALSE;
- }
+ /* Cancel group edit? */
+ if (isset($_POST['add_groups_cancel']) ||
+ isset($_POST['add_groups_finish'])){
+ $this->group_dialog= FALSE;
+ $this->dialog= FALSE;
+ }
- /* Add selected groups */
- if (isset($_POST['add_groups_finish']) && isset($_POST['groups']) &&
- count($_POST['groups'])){
+ /* Add selected groups */
+ if (isset($_POST['add_groups_finish']) && isset($_POST['groups']) &&
+ count($_POST['groups'])){
if (chkacl ($this->acl, "memberUid") == ""){
$this->addGroup ($_POST['groups']);
$smarty->assign("shells", $this->loginShellList);
$smarty->assign("secondaryGroups", $this->secondaryGroups);
$smarty->assign("primaryGroup", $this->primaryGroup);
- if (!count($this->groupMembership)){
+ if (!count($this->groupMembership)){
$smarty->assign("groupMembership", array(" "));
} else {
$smarty->assign("groupMembership", $this->groupMembership);
}
$force_ids = "";
}
-
- /*
- if(isset($_POST['editGroupMembership'])){
+
+ $sta = "";
+
+ if(isset($_POST['edit_groupmembership'])){
$this->group_dialog = TRUE;
+ $sta = "SubDialog";
}
if(isset($_POST['add_groups_finish']) || isset($_POST['add_groups_cancel'])){
}
if($this->group_dialog){
- return($this->execute());
+ $str = $this->execute(true);
+ $ret = array();
+ $ret['string'] = $str;
+ $ret['status'] = $sta;
+ return($ret);
+ }
+
+ if(isset($_POST['delete_groupmembership'])){
+ $this->execute();
}
- */
$smarty = get_smarty();
$smarty->assign("homeDirectory",$this->homeDirectory);
$smarty->assign("gidNumber",$this->gidNumber);
$smarty->assign("forceMode",$forceMode);
$smarty->assign("force_ids",$force_ids);
+ if (!count($this->groupMembership)){
+ $smarty->assign("groupMembership", array(" "));
+ } else {
+ $smarty->assign("groupMembership", $this->groupMembership);
+ }
+ if (count($this->groupMembership) > 16){
+ $smarty->assign("groups", "too_many_for_nfs");
+ } else {
+ $smarty->assign("groups", "");
+ }
$str = $smarty->fetch(get_template_path("paste_generic.tpl",TRUE,dirname(__FILE__)));
- return($str);
+
+ $ret = array();
+ $ret['string'] = $str;
+ $ret['status'] = $sta;
+ return($ret);
}
}
index ec7adedc44333ef3263b18b2dde36b57a57217ba..2256073e52624cc47b46dd8c700caef5a9d60c47 100644 (file)
<input id="gidNumber" name="gidNumber" size=5 maxlength=5 {$forceMode} value="{$gidNumber}">
</td>
</tr>
-<!--
<tr>
- <td>
- "._("Group membership")."
- </td>
- <td>
- <input type='submit' name='editGroupMembership' value='"._("Edit")."'>
+ <td style="vertical-align:top;" colspan="3">
+ <h2><img alt="" class="center" align="middle" src="images/members.png" /> {t}Group membership{/t}</h2>
+ {if $groups eq "too_many_for_nfs"}
+ <b style="color:red">{t}(Warning: more than 16 groups are not supported by NFS!){/t}</b>
+ <br>
+ {/if}
+ <select style="width:100%; height:130px;" name="group_list[]" size=16 multiple>
+ {html_options options=$groupMembership}
+ </select>
+ <br>
+ <input type=submit value="{t}Add{/t}" name="edit_groupmembership">
+ <input type=submit value="{t}Delete{/t}" name="delete_groupmembership">
</td>
</tr>
- -->
</table>
</td>
</tr>