Code

Added a new step, the welcome step
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 19 Apr 2007 06:18:03 +0000 (06:18 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 19 Apr 2007 06:18:03 +0000 (06:18 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6104 594d385d-05f5-0310-b6e9-bd551577e9d8

html/setup.php
setup/class_setup.inc
setup/class_setupStep_Language.inc
setup/class_setupStep_Welcome.inc [new file with mode: 0644]
setup/setup_welcome.tpl [new file with mode: 0644]

index 7e1e86ef833225b6a89c203c81749982343f3e15..52f528b38b1fc285dbc4855a89959338f119c36e 100644 (file)
@@ -27,6 +27,7 @@ require_once ("functions.inc");
 
 require_once("../setup/class_setup.inc");
 require_once("../setup/class_setupStep.inc");
+require_once("../setup/class_setupStep_Welcome.inc");
 require_once("../setup/class_setupStep_Language.inc");
 require_once("../setup/class_setupStep_Checks.inc");
 require_once("../setup/class_setupStep_License.inc");
index 0b45f4231d2bdec54eb6e91dc5423146f15bea9b..a51d922c51e4d8ab6ae2925a88208c63df96b456 100644 (file)
@@ -30,16 +30,17 @@ class setup
 
   function setup()
   {
-    
-    $this->o_steps[1] = new Step_Language();
-    $this->o_steps[2] = new Step_Checks();
-    $this->o_steps[3] = new Step_License();
-    $this->o_steps[4] = new Step_Ldap();
-    $this->o_steps[5] = new Step_Schema();
-    $this->o_steps[6] = new Step_Config1();
-    $this->o_steps[7] = new Step_Config2();
-    $this->o_steps[8] = new Step_Config3();
-    $this->o_steps[9] = new Step_Finish();
+    $i = 1; 
+    $this->o_steps[$i++] = new Step_Welcome();
+    $this->o_steps[$i++] = new Step_Language();
+    $this->o_steps[$i++] = new Step_Checks();
+    $this->o_steps[$i++] = new Step_License();
+    $this->o_steps[$i++] = new Step_Ldap();
+    $this->o_steps[$i++] = new Step_Schema();
+    $this->o_steps[$i++] = new Step_Config1();
+    $this->o_steps[$i++] = new Step_Config2();
+    $this->o_steps[$i++] = new Step_Config3();
+    $this->o_steps[$i++] = new Step_Finish();
 
     /* Ensure that setup is not reachable if gosa.conf (CONFIG_FILE) */
     if(file_exists(CONFIG_DIR."/".CONFIG_FILE)){
index a549ca6aa21432e7153fd5320e9988411b309795..5f2e98588870954aa9b12a54f4ecbae455e39840 100644 (file)
@@ -32,8 +32,6 @@ class Step_Language extends setup_step
   {
     $this->lang           = get_browser_language();
     $this->lang_selected  = "";
-    $this->is_enabled     = TRUE;
-    $this->is_active      = TRUE;
     $this->update_strings(); 
   }
 
diff --git a/setup/class_setupStep_Welcome.inc b/setup/class_setupStep_Welcome.inc
new file mode 100644 (file)
index 0000000..06c3237
--- /dev/null
@@ -0,0 +1,56 @@
+<?php
+
+/*
+   This code is part of GOsa (https://gosa.gonicus.de)
+   Copyright (C) 2007 Fabian Hickert
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+class Step_Welcome  extends setup_step
+{
+  var $languages      = array();
+  var $attributes     = array();
+  var $header_image   = "images/locale.png";
+
+  function Step_Welcome()
+  {
+    $this->is_enabled     = TRUE;
+    $this->is_active      = TRUE;
+    $this->update_strings(); 
+  }
+
+  function update_strings()
+  {
+    $this->s_title      = _("Welcome");
+    $this->s_title_long = _("Welcome to GOsa setup");
+    $this->s_info       = _("Welcome to GOsa setup");
+  }
+  
+  function execute()
+  {
+    $this->is_completed = true;
+    $smarty = get_smarty();
+    return($smarty->fetch(get_template_path("setup_welcome.tpl",TRUE,dirname(__FILE__))));
+  }
+
+  function save_object()
+  {
+  }
+}
+
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/setup/setup_welcome.tpl b/setup/setup_welcome.tpl
new file mode 100644 (file)
index 0000000..90a4d4c
--- /dev/null
@@ -0,0 +1,6 @@
+<div>
+    <div class='default'>
+        <p><b>{t}Welcome to the GOsa setup routine{/t}</b></p>
+               Nothing yet 
+       </div>
+</div>