Code

Updated sudo
[gosa.git] / gosa-plugins / sudo / admin / sudo / generic.tpl
index 765bd271d730a7788100eca8987e2ee5b2296ba9..7fda69f487874e3db6f2b2fb2a83045a5e81bd6b 100644 (file)
@@ -1,14 +1,42 @@
+{if $is_default}
+
+<h2>{t}Sudo generic{/t} - {t}Global defaults{/t}</h2>
+<table> 
+ <tr>
+  <td>
+   {t}Name{/t}
+  </td>
+  <td>
+   <input type="text" name="dummy" value="{$cn}" disabled>
+  </td>
+ </tr>
+ <tr>
+  <td>
+   {t}Description{/t}
+  </td>
+  <td>
+   {render acl=$descriptionACL}
+   <input type="text" name="description" value="{$description}">
+   {/render}
+  </td>
+ </tr>
+</table>
+
+{else}
+
 <table style="width: 90%;">
  <tr>
   <td style="vertical-align:top;width:50%">
-   <h2>Sudo generic</h2>
+   <h2>{t}Sudo generic{/t}</h2>
    <table> 
     <tr>
      <td>
       {t}Name{/t}
      </td>
      <td>
+      {render acl=$cnACL}
       <input type="text" name="cn" value="{$cn}">
+      {/render}
      </td>
     </tr>
     <tr>
       {t}Description{/t}
      </td>
      <td>
+      {render acl=$descriptionACL}
       <input type="text" name="description" value="{$description}">
+      {/render}
      </td>
     </tr>
    </table>
   </td>
   <td style="padding-left:5px;border-left: solid 1px #AAAAAA;">
-   <h2><img alt="" class="center" align="middle" src="images/closedlock.png" /> {t}System trust{/t}</h2>
-    {t}Trust mode{/t}&nbsp;
-    {render acl=$trustmodeACL}
+   <h2><img alt="" class="center" align="middle" src="images/closedlock.png" />&nbsp; {t}System trust{/t}</h2>
+    {t}Trust mode{/t}&nbsp; 
+    {render acl=$trustModelACL}
         <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>
+               <br>
     {/render}
-    {render acl=$trustmodeACL}
+    {render acl=$trustModelACL}
        <select style="width:100%" id="wslist" name="workstation_list[]" size=5 multiple {$trusthide}>
         {html_options values=$workstations output=$workstations}
         {if $emptyArrAccess}
        </select>
     {/render}
        <br>
-    {render acl=$trustmodeACL}
+    {render acl=$trustModelACL}
        <input type="submit" id="add_ws" value="{msgPool type=addButton}" name="add_ws" {$trusthide}>&nbsp;
     {/render}
-    {render acl=$trustmodeACL}
+    {render acl=$trustModelACL}
        <input type="submit" id="del_ws" value="{msgPool type=delButton}" name="delete_ws" {$trusthide}>
     {/render}
 
  <tr>
   <td style="width:50%;padding-right:5px;">
    <h2><img src="images/select_user.png" alt="" class="center">&nbsp;User / Groups</h2>
+   {render acl=$sudoUserACL}
    {$divlist_sudoUser}
-   <input type='text' value='' name='new_sudoUser'><input type='submit' name='add_sudoUser' value='{msgPool type=addButton}'>
+   {/render}
+   {render acl=$sudoUserACL}
+   <input type='text' value='' name='new_sudoUser'>
+   {/render}
+   {render acl=$sudoUserACL}
+   <input type='submit' name='add_sudoUser' value='{msgPool type=addButton}'>
+   {/render}
+   {render acl=$sudoUserACL}
    <input type='submit' name='list_sudoUser' value='{t}Add from list{/t}'>
+   {/render}
   </td>
-  <td style="padding-left:5px;border-left: solid 1px #AAAAAA;"><h2><img src="images/select_workstation.png" alt="" class="center">&nbsp;Hosts</h2>
+  <td style="padding-left:5px;border-left: solid 1px #AAAAAA;">
+   <h2><img src="images/select_workstation.png" alt="" class="center">&nbsp;Hosts</h2>
+   {render acl=$sudoHostACL}
    {$divlist_sudoHost}
-   <input type='text' value='' name='new_sudoHost'><input type='submit' name='add_sudoHost' value='{msgPool type=addButton}'>
+   {/render}
+   {render acl=$sudoHostACL}
+   <input type='text' value='' name='new_sudoHost'>
+   {/render}
+   {render acl=$sudoHostACL}
+   <input type='submit' name='add_sudoHost' value='{msgPool type=addButton}'>
+   {/render}
+   {render acl=$sudoHostACL}
    <input type='submit' name='list_sudoHost' value='{t}Add from list{/t}'>
+   {/render}
   </td>
  </tr> 
  <tr><td style="width:100%;"colspan="2"><p class="seperator">&nbsp;</p></td></tr>
  <tr>
-  <td style="padding-right:5px;"><h2><img src="images/rocket.png" alt="" class="center">Commands</h2>
+  <td style="padding-right:5px;">
+   <h2><img src="images/rocket.png" alt="" class="center">&nbsp;Commands</h2>
+   {render acl=$sudoCommandACL}
    {$divlist_sudoCommand}
-   <input type='text' value='' name='new_sudoCommand'><input type='submit' name='add_sudoCommand' value='{msgPool type=addButton}'>
+   {/render}
+   {render acl=$sudoCommandACL}
+   <input type='text' value='' name='new_sudoCommand'>
+   {/render}
+   {render acl=$sudoCommandACL}
+   <input type='submit' name='add_sudoCommand' value='{msgPool type=addButton}'>
+   {/render}
   </td>
-  <td style="padding-left:5px;border-left: solid 1px #AAAAAA;"><h2><img src="images/select_user.png" alt="" class="center">&nbsp;Run as</h2>
-   {$divlist_sudoRunas}
-   <input type='text' value='' name='new_sudoRunas'><input type='submit' name='add_sudoRunas' value='{msgPool type=addButton}'>
+  <td style="padding-left:5px;border-left: solid 1px #AAAAAA;">
+   <h2><img src="images/select_user.png" alt="" class="center">&nbsp;Run as</h2>
+   {render acl=$sudoRunAsACL}
+   {$divlist_sudoRunAs}
+   {/render}
+   {render acl=$sudoRunAsACL}
+   <input type='text' value='' name='new_sudoRunAs'>
+   {/render}
+   {render acl=$sudoRunAsACL}
+   <input type='submit' name='add_sudoRunAs' value='{msgPool type=addButton}'>
+   {/render}
   </td>
  </tr>
 </table>
+{/if}