From: hickert Date: Fri, 4 Apr 2008 07:26:04 +0000 (+0000) Subject: Updated sudo options X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3d095eea8d2c409ca0cd3b803a4518d7a6144fed;p=gosa.git Updated sudo options -Fixed w3c problems. -Updated list save -styled option dialog git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10189 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/admin/sudo/class_sudoOptions.inc b/gosa-core/plugins/admin/sudo/class_sudoOptions.inc index d24c82e1f..b9954a503 100644 --- a/gosa-core/plugins/admin/sudo/class_sudoOptions.inc +++ b/gosa-core/plugins/admin/sudo/class_sudoOptions.inc @@ -212,7 +212,7 @@ class sudoOption extends plugin /***** Negate STRING / INTEGER *****/ - if(in_array($this->options[$opt]['TYPE'],array('STRING','INTEGER'))){ + if(in_array($this->options[$opt]['TYPE'],array('STRING','INTEGER','LISTS'))){ $this->sudoOption[$opt][$id]['NEGATE'] = !$this->sudoOption[$opt][$id]['NEGATE']; } @@ -354,10 +354,10 @@ class sudoOption extends plugin Save LISTS ****/ if($type=="LISTS"){ - if(empty($val)){ + if(empty($value)){ $option = $name; }else{ - $option = $name."=".$val; + $option = $name."=".$value; } if($neg){ $option = "!".$option; diff --git a/gosa-core/plugins/admin/sudo/options.tpl b/gosa-core/plugins/admin/sudo/options.tpl index 80ed89694..28d86bdd9 100644 --- a/gosa-core/plugins/admin/sudo/options.tpl +++ b/gosa-core/plugins/admin/sudo/options.tpl @@ -1,4 +1,78 @@ +

Used sudo role options

+ +{foreach from=$sudoOption item=item key=key} + {foreach from=$item item=entry key=entry_key} + + + + + + + {/foreach} +{/foreach} +
{$key} + {if $entry.NEGATE} + ! + {/if} + + + {if $options[$entry.NAME].TYPE == "STRING"} + + + {elseif $options[$entry.NAME].TYPE == "LISTS"} + + + {elseif $options[$entry.NAME].TYPE == "INTEGER"} + + + {elseif $options[$entry.NAME].TYPE == "BOOLEAN"} + + + {elseif $options[$entry.NAME].TYPE == "BOOL_INTEGER"} + + + + {elseif $options[$entry.NAME].TYPE == "STRING_BOOL"} + + + + {/if} + + + +
+ +

 

+
+

{t}Available options{/t}:

- - -{foreach from=$sudoOption item=item key=key} - {foreach from=$item item=entry key=entry_key} - - - - - {elseif $options[$entry.NAME].TYPE == "INTEGER"} - - - {elseif $options[$entry.NAME].TYPE == "BOOLEAN"} - - - {elseif $options[$entry.NAME].TYPE == "BOOL_INTEGER"} - - - - {elseif $options[$entry.NAME].TYPE == "STRING_BOOL"} - - - - {/if} - - - - {/foreach} -{/foreach} -
{$key} - {if $entry.NEGATE} - ! - {/if} - + - {if $options[$entry.NAME].TYPE == "STRING"} - - - {elseif $options[$entry.NAME].TYPE == "LISTS"} - - - -