summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e54fec8)
raw | patch | inline | side by side (parent: e54fec8)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 16 May 2008 13:33:13 +0000 (13:33 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 16 May 2008 13:33:13 +0000 (13:33 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10934 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/systems/goto/SelectDeviceType.tpl | patch | blob | history | |
gosa-plugins/goto/admin/systems/goto/class_SelectDeviceType.inc | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/systems/goto/SelectDeviceType.tpl b/gosa-plugins/goto/admin/systems/goto/SelectDeviceType.tpl
index 6e0e8bf9af1888d8b9f15714b11bde667965de18..79bb51ae6b8c9044db7f6797d49940c0cf6c71bb 100644 (file)
</p>
<p class="seperator">
<br>
+{if $dns_cnt == 1}
<b>{t}Please select a system type and an optional bundle of predefined settings to be inherited.{/t}</b>
+{else}
+<b>{t}Please select a system type and an bundle of predefined settings to be inherited.{/t}</b>
+{/if}
<br>
<br>
</p>
+<pre>
+{foreach from=$dns item=item}
+ {$item}
+{/foreach}
+</pre>
<br>
<table summary="" style='width:100%'>
<tr>
diff --git a/gosa-plugins/goto/admin/systems/goto/class_SelectDeviceType.inc b/gosa-plugins/goto/admin/systems/goto/class_SelectDeviceType.inc
index 378d5beecf8b3000707e0180fddf911f9bd34744..e734199e45154cde4fe0e90007cd096b5a421d21 100644 (file)
var $ObjectGroup = "";
var $SystemType = "";
+ var $dn;
+
function SelectDeviceType (&$config, $dn= NULL)
{
- plugin::plugin ($config, $dn);
+ plugin::plugin ($config, NULL);
+
+ if(!is_array($dn)){
+ $this->dns = array($dn);
+ }else{
+ $this->dns = $dn;
+ }
/* Get object groups */
$ldap = $this->config->get_ldap_link();
$tmp[$attrs['dn']]= $attrs['cn'][0];
}
asort($tmp, SORT_LOCALE_STRING);
- $tmpa['none']=_("none");
- $this->ObjectGroups= array_merge($tmpa, $tmp);
+ $this->ObjectGroups= $tmp;
$this->SystemTypes =array("workstation"=>_("Workstation"), "terminal"=>_("Terminal"), "server"=>_("Server"));
}
$smarty= get_smarty();
$display= "";
- $smarty->assign("ObjectGroups" ,$this->ObjectGroups);
- $smarty->assign("ObjectGroupKeys" ,array_flip($this->ObjectGroups));
+ $smarty->assign("dns" , $this->dns);
+ $smarty->assign("dns_cnt" , count($this->dns));
+
+ /* Add none to the list of object groups, if there is only one
+ object that currently edited. This will allow to modify attributes manually and
+ skip object group inherit.
+ */
+ $ogs = $this->ObjectGroups;
+ if(count($this->dns) == 1){
+ $tmpa['none']=_("none");
+ $ogs = array_merge($tmpa,$ogs);
+ }
+
+ $smarty->assign("ObjectGroups" ,$ogs);
+ $smarty->assign("ObjectGroupKeys" ,array_flip($ogs));
$smarty->assign("SystemTypes" ,$this->SystemTypes);
$smarty->assign("SystemTypeKeys" ,array_flip($this->SystemTypes));