Code

Moved posix copy & paste dialog into template
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 23 Mar 2006 04:47:47 +0000 (04:47 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 23 Mar 2006 04:47:47 +0000 (04:47 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2898 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/posix/class_posixAccount.inc
plugins/personal/posix/paste_generic.tpl [new file with mode: 0644]

index c68ed4e2f97706989bc935b03a39ba542af3c436..7dfec52d2741c1a70368d7c973b1b80793634b34 100644 (file)
@@ -1180,62 +1180,13 @@ $ldap->modify ($this->attrs);
     }
   */
 
-    $str ="
-      <table width='100%'>
-        <tr>    
-          <td style='vertical-align:top;'>
-            <h2>"._("Posix settings")."</h2>
-            <table>
-              <tr>
-                <td>
-                  <label for=\"homeDirectory\">"._("Home directory")."</label>
-                </td>
-                <td>
-                  <input id=\"homeDirectory\" name=\"homeDirectory\" size=40 maxlength=120 value=\"".$this->homeDirectory."\">
-                </td>
-              </tr>
-              <tr>
-                <td>
-                  <input id=\"force_ids\" type=checkbox name=\"force_ids\" value=\"1\" ".$force_ids."} 
-                             onclick=\"changeState('uidNumber');changeState('gidNumber');\">
-                </td>
-                <td>
-                  <label for=\"force_ids\">
-                    "._("Force UID/GID")."
-                  </label>
-                </td>
-                    <td style=\"width:20px;\"></td>
-                    <td>
-                        <label for=\"uidNumber\">"._("UID")."</label>
-                    </td>
-                    <td>
-                        <input id=\"uidNumber\" name=\"uidNumber\" size=5 maxlength=5 {$forceMode} value=\"".$this->uidNumber."\">
-                    </td>
-                </tr>
-                <tr>
-                    <td colspan=\"3\"></td>
-                    <td>
-                        <label for=\"gidNumber\">"._("GID")."</label>
-                    </td>
-                    <td>
-                        <input id=\"gidNumber\" name=\"gidNumber\" size=5 maxlength=5 {$forceMode} value=\"".$this->gidNumber."\">
-                    </td>
-                </tr>
-                <!--
-                <tr>
-                    <td>
-                    "._("Group membership")."
-                    </td>
-                    <td>
-                      <input type='submit' name='editGroupMembership' value='"._("Edit")."'>
-                    </td>
-                </tr>
-                -->
-            </table>
-          </td>
-        </tr>
-      </table>
-    ";
+    $smarty = get_smarty();
+    $smarty->assign("homeDirectory",$this->homeDirectory);
+    $smarty->assign("uidNumber",$this->uidNumber);
+    $smarty->assign("gidNumber",$this->gidNumber);
+    $smarty->assign("forceMode",$forceMode);
+    $smarty->assign("force_ids",$force_ids);
+    $str = $smarty->fetch(get_template_path("paste_generic.tpl",TRUE,dirname(__FILE__)));
     return($str);
   }
 
diff --git a/plugins/personal/posix/paste_generic.tpl b/plugins/personal/posix/paste_generic.tpl
new file mode 100644 (file)
index 0000000..ec7aded
--- /dev/null
@@ -0,0 +1,55 @@
+<table width='100%'>
+<tr>
+  <td style='vertical-align:top;'>
+       <h2>{t}Posix settings{/t}</h2>
+       <table>
+         <tr>
+               <td>
+                 <label for="homeDirectory">{t}Home directory{/t}</label>
+               </td>
+               <td>
+                 <input id="homeDirectory" name="homeDirectory" size=40 maxlength=120 value="{$homeDirectory}">
+               </td>
+         </tr>
+         <tr>
+               <td>
+                 <input id="force_ids" type=checkbox name="force_ids" value="1" ".$force_ids."}
+                                        onclick="changeState('uidNumber');changeState('gidNumber');">
+               </td>
+               <td>
+                 <label for="force_ids">
+                       {t}Force UID/GID{/t}
+                 </label>
+               </td>
+                       <td style="width:20px;"></td>
+                       <td>
+                               <label for="uidNumber">{t}UID{/t}</label>
+                       </td>
+                       <td>
+                               <input id="uidNumber" name="uidNumber" size=5 maxlength=5 {$forceMode} value="{$uidNumber}">
+                       </td>
+               </tr>
+               <tr>
+                       <td colspan="3"></td>
+                       <td>
+                               <label for="gidNumber">{t}GID{/t}</label>
+                       </td>
+                       <td>
+                               <input id="gidNumber" name="gidNumber" size=5 maxlength=5 {$forceMode} value="{$gidNumber}">
+                       </td>
+               </tr>
+<!--
+               <tr>
+                       <td>
+                       "._("Group membership")."
+                       </td>
+                       <td>
+                         <input type='submit' name='editGroupMembership' value='"._("Edit")."'>
+                       </td>
+               </tr>
+               -->
+       </table>
+  </td>
+</tr>
+</table>
+