Code

Some branch adds
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 11 Jan 2006 12:51:07 +0000 (12:51 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 11 Jan 2006 12:51:07 +0000 (12:51 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2448 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/fai/faiNewBranch.tpl [new file with mode: 0755]
plugins/admin/fai/remove_branch.tpl [new file with mode: 0755]
plugins/admin/systems/class_workstationStartup.inc
plugins/personal/environment/class_environment.inc

diff --git a/plugins/admin/fai/faiNewBranch.tpl b/plugins/admin/fai/faiNewBranch.tpl
new file mode 100755 (executable)
index 0000000..e3ec480
--- /dev/null
@@ -0,0 +1,61 @@
+<br>
+<p class="seperator">
+{t}Please enter a name for the branch. Names like 'scripts', 'hooks', 'partitions', 'variables', 'templates', 'fai' and aƶready existing names are not allowed.{/t}
+<br>
+<br>
+</p>
+<p class="seperator">
+<br>
+<b>{t}Please enter a name for the branch.{/t}</b>
+<br>
+<br>
+</p>
+<br>
+<table summary="" style='width:100%'>
+ <tr>
+  <td style='width:49%'>
+   <table summary="">
+    <tr>
+     <td> 
+       <h1>{t}Enter FAI branch name.{/t}</h1>
+     </td>
+   </tr>
+   <tr>
+     <td>
+      {t}Branch name{/t}&nbsp;<input type="text"        name="BranchName" value="" style="width:120px;">
+     </td>
+    </tr>
+   </table>
+   <br>
+   <br>
+  </td>
+ </tr>
+</table>
+<p class="seperator">&nbsp;</p>
+
+<div align="right">
+       <p>
+               <input type="submit" value="{t}Use{/t}"         name="UseBranchName">           
+               <input type="submit" value="{t}Cancel{/t}"      name="CancelBranchName">                
+       </p>
+</div>
+
+
+
+
+
+
+
+
+<!-- Place cursor -->
+<script language="JavaScript" type="text/javascript">
+       <!--
+       document.mainform.UseTextInputName.select();
+       document.mainform.UseTextInputName.focus();
+       -->
+</script>
+
+
+
+
+
diff --git a/plugins/admin/fai/remove_branch.tpl b/plugins/admin/fai/remove_branch.tpl
new file mode 100755 (executable)
index 0000000..3ed7f23
--- /dev/null
@@ -0,0 +1,18 @@
+<div style="font-size:18px;">
+ <img alt="" src="images/button_cancel.png" align=top>&nbsp;{t}Warning{/t}
+</div>
+<p>
+  {$info}
+  {t}This includes all account data, system access, etc. for this branch. Please double check if your really want to do this since there is no way for GOsa to get your data back.{/t}
+</p>
+
+<p>
+ {t}So - if you're sure - press 'Delete' to continue or 'Cancel' to abort.{/t}
+</p>
+
+<p class="plugbottom">
+  <input type=submit name="delete_branch_confirm" value="{t}Delete{/t}">
+  &nbsp;
+  <input type=submit name="delete_cancel" value="{t}Cancel{/t}">
+</p>
+
index 755713815b74002f107c1e29755a6f06cda4374f..07a925b61fed2d0d44e97c36b1ccb5ff5f66c9ac 100644 (file)
@@ -20,7 +20,7 @@ class workstartup extends plugin
   var $FAIclass             = array();
   var $FAIclasses           = array();
   var $FAIclassInfo         = array();
-  var $FAIdebianMirror      = array();
+  var $FAIdebianMirror      = "auto";
 
 
   /* attribute list for save action */
@@ -68,9 +68,10 @@ class workstartup extends plugin
           }
         }
       }
-    } 
+    }
+    ksort($ret);
     $this->FAIdebianMirrors = $ret;
+
     /* Get arrays */
     foreach (array("gotoModules", "gotoAutoFs", "gotoFilesystem") as $val){
       if (isset($this->attrs["$val"]["count"])){
@@ -462,6 +463,7 @@ class workstartup extends plugin
   function getFAIdebianMirrors()
   {
     $ret = array();
+    $ret['auto']=_("automatic");
     $secs  = array();
     if(is_array($this->FAIclass)){
       foreach($this->FAIclass as $classes){
@@ -490,7 +492,6 @@ class workstartup extends plugin
         }
       }
     }
-    $ret['auto']=_("automatic");
     return($ret);
   }
 
index c4b4c2a86562c8829eab44bf732c388ee026a557..cf3ddcbd08a93e545e6152b5985a4075d28a8bbd 100644 (file)
@@ -490,7 +490,15 @@ class environment extends plugin
       /* We assign a share to this user, if we don't know where to mount the share */
       if((!isset($_POST['gotoShareMountPoint']))||(empty($_POST['gotoShareMountPoint']))||(preg_match("/[\|]/i",$_POST['gotoShareMountPoint']))){
         print_red(_("You must specify a valid mount point."));
-      }elseif($_POST['gotoShareMountPoint'][0] !="/" ){
+      }elseif(!(
+        preg_match("/^\//",$_POST['gotoShareMountPoint'])  ||
+        preg_match("/^~/",$_POST['gotoShareMountPoint']) ||
+        preg_match("/^\$HOME/",$_POST['gotoShareMountPoint']) ||
+        preg_match("/^.HOME/",$_POST['gotoShareMountPoint']) ||
+        preg_match("/^\$USER/",$_POST['gotoShareMountPoint']) ||
+        preg_match("/^.USER/",$_POST['gotoShareMountPoint'])
+        )
+      ){
         print_red(_("You must specify a valid mount point.")); 
       }else{
         $a_share = $this->gotoAvailableShares[$_POST['gotoShareSelection']];