summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e2c5613)
raw | patch | inline | side by side (parent: e2c5613)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 4 Apr 2008 07:26:04 +0000 (07:26 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 4 Apr 2008 07:26:04 +0000 (07:26 +0000) |
-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
-Updated list save
-styled option dialog
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10189 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/admin/sudo/class_sudoOptions.inc | patch | blob | history | |
gosa-core/plugins/admin/sudo/options.tpl | patch | blob | history |
diff --git a/gosa-core/plugins/admin/sudo/class_sudoOptions.inc b/gosa-core/plugins/admin/sudo/class_sudoOptions.inc
index d24c82e1f176962057fe2dc860468c69e1959242..b9954a50378420366cee8404d3b8a6a01de68947 100644 (file)
/*****
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'];
}
Save LISTS
****/
if($type=="LISTS"){
- if(empty($val)){
+ if(empty($value)){
$option = $name;
}else{
- $option = $name."=".$val;
+ $option = $name."=".$value;
}
if($neg){
$option = "!".$option;
index 80ed89694a245733bd6936b9831a8c0ca59e4a07..28d86bdd96d8c396eab99a348d3340f33f328e35 100644 (file)
+<h2>Used sudo role options</h2>
+<table style="width:650px;">
+{foreach from=$sudoOption item=item key=key}
+ {foreach from=$item item=entry key=entry_key}
+ <tr>
+ <td>{$key}</td>
+ <td style="width:20px;">
+ {if $entry.NEGATE}
+ <img src='images/negate.png' alt="!">
+ {/if}
+ </td>
+ <td>
+
+ {if $options[$entry.NAME].TYPE == "STRING"}
+ <!-- STRING
+ -->
+ <input type='text' name='option_value__{$key}_{$entry_key}' value="{$entry.VALUE}" style='width:280px;'>
+ {elseif $options[$entry.NAME].TYPE == "LISTS"}
+ <!-- LISTS
+ -->
+ <input type='text' value="{$entry.VALUE}" name="list_value__{$key}_{$entry_key}" style='width:280px;'>
+ {elseif $options[$entry.NAME].TYPE == "INTEGER"}
+ <!-- INTEGER
+ -->
+ <input type='text' name='option_value__{$key}_{$entry_key}' value="{$entry.VALUE}" style='width:280px;'>
+ {elseif $options[$entry.NAME].TYPE == "BOOLEAN"}
+ <!-- BOOLEAN
+ -->
+ <select name="option_value__{$key}_{$entry_key}" style="width:80px;;">
+ <option {if $entry.VALUE == "FALSE"} selected {/if}value="FALSE">FALSE</option>
+ <option {if $entry.VALUE == "TRUE"} selected {/if}value="TRUE">TRUE</option>
+ </select>
+ {elseif $options[$entry.NAME].TYPE == "BOOL_INTEGER"}
+ <!-- BOOLEAN_INTEGER
+ -->
+ <select name="option_selection__{$key}_{$entry_key}" id="option_selection__{$key}_{$entry_key}"
+ style="width:80px;;"
+ onChange="toggle_bool_fields('option_selection__{$key}_{$entry_key}','option_value__{$key}_{$entry_key}');">
+ <option {if $entry.VALUE == "FALSE"} selected {/if}value="FALSE">FALSE</option>
+ <option {if $entry.VALUE == "TRUE"} selected {/if}value="TRUE">TRUE</option>
+ <option {if $entry.VALUE != "TRUE" && $entry.VALUE != "FALSE"} selected {/if}
+ value="STRING">INTEGER</option>
+ </select>
+ <input type='text' value="{$entry.VALUE}" style='width:280px;' name='option_value__{$key}_{$entry_key}'
+ id="option_value__{$key}_{$entry_key}"
+ {if $entry.VALUE == "FALSE" || $entry.VALUE == "TRUE"} disabled {/if}>
+ {elseif $options[$entry.NAME].TYPE == "STRING_BOOL"}
+ <!-- STRING_BOOLEAN
+ -->
+ <select name="option_selection__{$key}_{$entry_key}" id="option_selection__{$key}_{$entry_key}"
+ style="width:80px;;"
+ onChange="toggle_bool_fields('option_selection__{$key}_{$entry_key}','option_value__{$key}_{$entry_key}');">
+ <option {if $entry.VALUE == "FALSE"} selected {/if}value="FALSE">FALSE</option>
+ <option {if $entry.VALUE == "TRUE"} selected {/if}value="TRUE">TRUE</option>
+ <option {if $entry.VALUE != "TRUE" && $entry.VALUE != "FALSE"} selected {/if}
+ value="STRING">STRING</option>
+ </select>
+ <input type='text' value="{$entry.VALUE}" style='width:280px;' name='option_value__{$key}_{$entry_key}'
+ id="option_value__{$key}_{$entry_key}"
+ {if $entry.VALUE == "FALSE" || $entry.VALUE == "TRUE"} disabled {/if}>
+ {/if}
+ </td>
+ <td style='width: 40px;'>
+ <input type='image' src='images/negate.png' name='negOption_{$key}_{$entry_key}' class='center'>
+ <input type='image' src='images/edittrash.png' name='delOption_{$key}_{$entry_key}' class='center'>
+ </td>
+ </tr>
+ {/foreach}
+{/foreach}
+</table>
+
+<p class="seperator"> </p>
+<br>
+<h2>{t}Available options{/t}:</h2>
<select name='option'>
{foreach from=$options item=item key=key}
{if !isset($sudoOption.$key) || ($sudoOption.$key && $item.TYPE == "LISTS")}
{/if}
{/foreach}
</select>
-<input type="submit" name="add_option" value="{msgPool type=addButton}">
-<table>
-{foreach from=$sudoOption item=item key=key}
- {foreach from=$item item=entry key=entry_key}
- <tr>
- <td>{$key}</td>
- <td style="width:20px;">
- {if $entry.NEGATE}
- <img src='images/negate.png' alt="!">
- {/if}
- </td>
- <td>
+<input type="submit" name="add_option" value="{msgPool type=addButton}">
- {if $options[$entry.NAME].TYPE == "STRING"}
- <!-- STRING
- -->
- <input type='text' name='option_value__{$key}_{$entry_key}' value="{$entry.VALUE}" style='width:280px;'>
- {elseif $options[$entry.NAME].TYPE == "LISTS"}
- <input type='text' value="{$entry.VALUE}" name="list_value__{$key}_{$entry_key}"></td>
- {elseif $options[$entry.NAME].TYPE == "INTEGER"}
- <!-- INTEGER
- -->
- <input type='text' name='option_value__{$key}_{$entry_key}' value="{$entry.VALUE}" style='width:280px;'>
- {elseif $options[$entry.NAME].TYPE == "BOOLEAN"}
- <!-- BOOLEAN
- -->
- <select name="option_value__{$key}_{$entry_key}">
- <option {if $entry.VALUE == "FALSE"} selected {/if}value="FALSE">FALSE</option>
- <option {if $entry.VALUE == "TRUE"} selected {/if}value="TRUE">TRUE</option>
- </select>
- {elseif $options[$entry.NAME].TYPE == "BOOL_INTEGER"}
- <!-- BOOLEAN_INTEGER
- -->
- <select name="option_selection__{$key}_{$entry_key}" id="option_selection__{$key}_{$entry_key}"
- onChange="toggle_bool_fields('option_selection__{$key}_{$entry_key}','option_value__{$key}_{$entry_key}');">
- <option {if $entry.VALUE == "FALSE"} selected {/if}value="FALSE">FALSE</option>
- <option {if $entry.VALUE == "TRUE"} selected {/if}value="TRUE">TRUE</option>
- <option {if $entry.VALUE != "TRUE" && $entry.VALUE != "FALSE"} selected {/if}
- value="STRING">STRING</option>
- <input type='text' value="{$entry.VALUE}" style='width:280px;' name='option_value__{$key}_{$entry_key}'
- id="option_value__{$key}_{$entry_key}"
- {if $entry.VALUE == "FALSE" || $entry.VALUE == "TRUE"} disabled {/if}>
- </select>
- {elseif $options[$entry.NAME].TYPE == "STRING_BOOL"}
- <!-- STRING_BOOLEAN
- -->
- <select name="option_selection__{$key}_{$entry_key}" id="option_selection__{$key}_{$entry_key}"
- onChange="toggle_bool_fields('option_selection__{$key}_{$entry_key}','option_value__{$key}_{$entry_key}');">
- <option {if $entry.VALUE == "FALSE"} selected {/if}value="FALSE">FALSE</option>
- <option {if $entry.VALUE == "TRUE"} selected {/if}value="TRUE">TRUE</option>
- <option {if $entry.VALUE != "TRUE" && $entry.VALUE != "FALSE"} selected {/if}
- value="STRING">STRING</option>
- <input type='text' value="{$entry.VALUE}" style='width:280px;' name='option_value__{$key}_{$entry_key}'
- id="option_value__{$key}_{$entry_key}"
- {if $entry.VALUE == "FALSE" || $entry.VALUE == "TRUE"} disabled {/if}>
- </select>
- {/if}
- </td>
- <td style='width: 40px;'>
- <input type='image' src='images/negate.png' name='negOption_{$key}_{$entry_key}' class='center'>
- <input type='image' src='images/edittrash.png' name='delOption_{$key}_{$entry_key}' class='center'>
- </td>
- </tr>
- {/foreach}
-{/foreach}
-</table>
<script language="JavaScript" type="text/javascript">
<!--