Code

Moved setup navigation buttons to page bottom
[gosa.git] / setup / class_setup.inc
index 3b2fe43aad3413ad9bfb566c6c2747ac43d24c96..327a1f9d41f5c747618e0b1d2f78cbb3b5df2ab1 100644 (file)
@@ -41,6 +41,13 @@ class setup
     $this->o_steps[8] = new setup_step_7();
     $this->o_steps[9] = new setup_step_8();
 
+    /* Ensure that setup is not reachable if gosa.conf (CONFIG_FILE) */
+    if(file_exists(CONFIG_DIR."/".CONFIG_FILE)){
+      session_destroy();
+      header("Location: index.php")    ;
+      exit();
+    }
+    
     foreach($this->o_steps as $key => $step){
       $this->o_steps[$key]->parent = $this;
     }
@@ -206,6 +213,23 @@ class setup
   }
 
   
+
+  function get_bottom_html()
+  {
+    $str ="";
+    $str.="   <div style='text-align:right;float:top;'>";
+    if(isset($this->o_steps[$this->i_current -1]) && $this->o_steps[$this->i_current -1]->is_enabled()){
+      $str .= "<input type='submit' name='last' value='"._("Backward")."'>";
+    }else{
+      $str .= "<input type='button' name='last' value='"._("Backward")."' disabled>";
+    }
+
+    $str .= "<input type='submit' name='next' value='"._("Forward")."'>";
+    $str .="</div>";
+    return($str);
+  }
+
+  
   /* Create header entry */
   function get_header_html()
   {
@@ -216,18 +240,18 @@ class setup
     $str.=   $this->o_steps[$this->i_current]->get_long_title();
     $str.="     </font>";
     $str.="   </div>";
-    $str.="   <div style='text-align:right;float:top;'>";
-    if(isset($this->o_steps[$this->i_current -1]) && $this->o_steps[$this->i_current -1]->is_enabled()){
-      $str.="   <input class='center' type='image' name='last' src='images/setup_step_back.png'  title='"._("Last step")."'>";
-    }else{
-      $str.="   <img class='center' src='images/setup_step_back_gray.png' title='"._("Last step")."'>";
-    }
-#   if(isset($this->o_steps[$this->i_current +1]) && $this->o_steps[$this->i_current +1]->is_enabled()){
-      $str.="   <input class='center' type='image' name='next' src='images/setup_step_forward.png'  title='"._("Next step")."'>";
-#   }else{
-#     $str.="   <img class='center' src='images/setup_step_forward_gray.png'  title='"._("Next step")."'>";
-#   }
-    $str.= "  </div>";
+    $str.="   <div style='text-align:right;float:top;'>";
+    if(isset($this->o_steps[$this->i_current -1]) && $this->o_steps[$this->i_current -1]->is_enabled()){
+      $str.="   <input class='center' type='image' name='last' src='images/setup_step_back.png'  title='"._("Last step")."'>";
+    }else{
+      $str.="   <img class='center' src='images/setup_step_back_gray.png' title='"._("Last step")."'>";
+    }
+#     if(isset($this->o_steps[$this->i_current +1]) && $this->o_steps[$this->i_current +1]->is_enabled()){
+      $str.="   <input class='center' type='image' name='next' src='images/setup_step_forward.png'  title='"._("Next step")."'>";
+#     }else{
+#       $str.="   <img class='center' src='images/setup_step_forward_gray.png'  title='"._("Next step")."'>";
+#     }
+    $str.= "  </div>";
     $str.= "</div>";
     return ($str);
   }