Code

more about sudo-ldap
authorzeph <zeph@594d385d-05f5-0310-b6e9-bd551577e9d8>
Sun, 23 Mar 2008 21:58:49 +0000 (21:58 +0000)
committerzeph <zeph@594d385d-05f5-0310-b6e9-bd551577e9d8>
Sun, 23 Mar 2008 21:58:49 +0000 (21:58 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5-plugins@9963 594d385d-05f5-0310-b6e9-bd551577e9d8

sudo-ldap/src/class_sudoldap.inc
sudo-ldap/src/class_sudoldapEditRole.inc
sudo-ldap/src/sudoldapeditrole.tpl [new file with mode: 0644]

index 7319e73ba8b4a78f90994e127c0fb42b88a8a505..b4384cf748ab5a1d27564fdaf4b66a41a868ae11 100644 (file)
@@ -17,13 +17,15 @@ class sudoldap extends plugin
 
   /* Plugin specific values */
  
-  var $attributes     = array( "sudoUser", 
+  var $dialog          = NULL;
+
+  var $attributes      = array("sudoUser", 
                                "sudoHost", 
                                "sudoCommand", 
                                "sudoRunAs", 
                                "sudoOption");
   
-  var $objectclasses  = array("sudoRole");
+  var $objectclasses   = array("sudoRole");
   
   /* constructor, if 'dn' is set, the node loads the given
      'dn' from LDAP */
index 0113233fef9ba42b5c53098aa8a7e26a099ad514..093d30056f7a0b06dc1ca4e999ec8427c187b05d 100644 (file)
@@ -3,13 +3,13 @@
 class sudoldapEditRole extends plugin
 {
   /* Plugin specific values */
-  var $attributes     = array( "sudoUser", 
+  var $attributes      = array("sudoUser", 
                                "sudoHost", 
                                "sudoCommand", 
                                "sudoRunAs", 
                                "sudoOption");
   
-  var $objectclasses  = array("sudoRole");
+  var $objectclasses   = array("sudoRole");
 
   function sudoldapEditRole ($config, $dn= NULL,$attrs = array())
   {
@@ -27,6 +27,10 @@ class sudoldapEditRole extends plugin
     $smarty= get_smarty();
     $display= "";
 
+    /* Display template */
+    $display.= $smarty->fetch(
+       get_template_path('sudoldapeditrole.tpl', TRUE));
+    return($display);
   }
 
   /* Save data to object */
diff --git a/sudo-ldap/src/sudoldapeditrole.tpl b/sudo-ldap/src/sudoldapeditrole.tpl
new file mode 100644 (file)
index 0000000..1f1b722
--- /dev/null
@@ -0,0 +1,19 @@
+<h2>{t}sudo-ldap role{/t}</h2>
+<table summary="" width="100%">
+       <tr>
+               <td>
+                       {t}form{/t}
+               </td>
+       </tr>
+</table>
+<div style="text-align:right;" align="right">
+       <p>
+               <input type="submit" name="SaveRoleChanges" value="{t}Save{/t}">
+               <input type="submit" name="CancelRoleChanges" value="{t}Cancel{/t}">
+       </p>
+</div>
+<script language="JavaScript" type="text/javascript">
+  <!-- // First input field on page
+       focus_field('roleName');
+  -->
+</script>