summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3fc82f2)
raw | patch | inline | side by side (parent: 3fc82f2)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 14 Aug 2008 06:20:59 +0000 (06:20 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 14 Aug 2008 06:20:59 +0000 (06:20 +0000) |
-Fixed problem with mutliple edit. Nagios and trust settings will now be saved correctly.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12213 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12213 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/admin/groups/class_groupGeneric.inc | patch | blob | history | |
gosa-core/plugins/admin/groups/generic.tpl | patch | blob | history |
diff --git a/gosa-core/plugins/admin/groups/class_groupGeneric.inc b/gosa-core/plugins/admin/groups/class_groupGeneric.inc
index 955216970e0bc93420bcc72c1e347920721136c5..13c16fac5dde0e62af68c8ca4c107fc14b743322 100644 (file)
$smarty->assign("use_".$val,FALSE);
}
}
- foreach(array("base","smbgroup","groupType","sambaDomainName","fon_group") as $val){
+ foreach(array("base","smbgroup","groupType","sambaDomainName","fon_group","nagios_group","trustmode") as $val){
if(in_array($val,$this->multi_boxes)){
$smarty->assign("use_".$val,TRUE);
}else{
plugin::save_object();
$this->base = $base_tmp;
- foreach(array("base","smbgroup","groupType","sambaDomainName","fon_group") as $attr){
+ foreach(array("base","smbgroup","groupType","sambaDomainName","fon_group","nagios_group","trustmode") as $attr){
if(isset($_POST['use_'.$attr])){
$this->multi_boxes[] = $attr;
}
}
}
- foreach (array( "smbgroup" => "sambaGroupType") as $val => $aclname) {
+ foreach (array( "smbgroup" => "sambaGroupType" ,"nagios_group" => "nagios_group") as $val => $aclname) {
if ($this->acl_is_writeable($aclname)){
if(isset($_POST["$val"])){
$this->$val= TRUE;
$this->groupType= $_POST['groupType'];
}
+ /* Trust mode - special handling */
+ if($this->acl_is_writeable("trustModel")){
+ if (isset($_POST['trustmode'])){
+ $saved= $this->trustModel;
+ if ($_POST['trustmode'] == "1"){
+ $this->trustModel= "fullaccess";
+ } elseif ($_POST['trustmode'] == "2"){
+ $this->trustModel= "byhost";
+ } else {
+ $this->trustModel= "";
+ }
+ if ($this->trustModel != $saved){
+ $this->is_modified= TRUE;
+ }
+ }
+ }
+
/* Save fon attribute */
if ($this->acl_is_writeable("fonGroup")){
if (isset ($_POST['fon_group'])){
{
$ret = plugin::get_multi_edit_values();
- foreach(array("base","smbgroup","groupType","sambaDomainName","fon_group") as $attr){
+ foreach(array("base","smbgroup","groupType","sambaDomainName","fon_group","nagios_group") as $attr){
if(in_array($attr,$this->multi_boxes)){
$ret[$attr] = $this->$attr;
}
}
+
+ if(in_array("trustmode",$this->multi_boxes)){
+ $ret['trustModel'] = $this->trustModel;
+ $ret['accessTo'] = $this->accessTo;
+ }
+
$ret['memberUid'] = $this->memberUid;
$ret['memberUid_used_by_some'] = $this->memberUid_used_by_some;
return($ret);
diff --git a/gosa-core/plugins/admin/groups/generic.tpl b/gosa-core/plugins/admin/groups/generic.tpl
index 726d1e12ddf7a3e5601fbdffa8973db20063f7ec..45e95d51699e1c62017c2714e1b4747b494340b1 100644 (file)
</tr>
<tr>
<td colspan=2>
-{render acl=$nagiosGroupACL}
- <input type=checkbox name="nagios_group" value="1" {$nagios_group}>{t}Members are in a nagios group{/t}
+{render acl=$nagiosGroupACL checkbox=$multiple_support checked=$use_nagios_group}
+ <input class="center" type=checkbox name="nagios_group" value="1" {$nagios_group}>{t}Members are in a nagios group{/t}
{/render}
</td>
</tr>
<tr>
<td colspan=2> <div style="height:15px; width:100%;"></div> </td>
</tr>
+{if !$multiple_support}
<tr>
<td colspan="2">
{t}Trust mode{/t}
</td>
</tr>
+
+{else}
+
+ <tr>
+ <td colspan="2">
+ <input type="checkbox" name="use_trustmode" {if $use_trustmode} checked {/if}
+ class="center" onClick="toggle('div_trustmode');">
+ {t}Trust mode{/t}
+ <div {if !$use_trustmode} style="visibility:hidden;" {/if} id="div_trustmode">
+ {render acl=$trustmodeACL}
+ <select name="trustmode" id="trustmode" size=1
+ onChange="changeSelectState('trustmode', 'wslist');
+ changeSelectState('trustmode', 'add_ws');
+ changeSelectState('trustmode', 'del_ws');">
+ {html_options options=$trustmodes selected=$trustmode}
+ </select>
+ {/render}
+ {render acl=$trustmodeACL}
+ <select style="width:100%" id="wslist" name="workstation_list[]" size=8 multiple {$trusthide}>
+ {html_options values=$workstations output=$workstations}
+ {if $emptyArrAccess}
+ <option disabled> </option>
+ {/if}
+ </select>
+ {/render}
+ <br>
+ {render acl=$trustmodeACL}
+ <input type="submit" id="add_ws" value="{msgPool type=addButton}" name="add_ws" {$trusthide}>
+ {/render}
+ {render acl=$trustmodeACL}
+ <input type="submit" id="del_ws" value="{msgPool type=delButton}" name="delete_ws" {$trusthide}>
+ {/render}
+ </div>
+ </td>
+ </tr>
+
+{/if}
</table>
</td>