Code

Added navigation to registration process.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 5 Nov 2010 09:46:56 +0000 (09:46 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 5 Nov 2010 09:46:56 +0000 (09:46 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20190 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/generic/dashBoard/Register/class_RegisterGOsa.inc
gosa-core/plugins/generic/dashBoard/Register/register.tpl

index 4dfc17f6589acc68e71bd51377b3f754ed5b5632..332021ffeec1a6e0d508b140c2f946eb1b3d9d53 100644 (file)
@@ -10,6 +10,7 @@ class GOsaRegistration extends plugin
 {
     protected $defaultRegistrationType = "registered";
     protected $isRegistered = FALSE; 
+    protected $step = 0;
 
     function __construct(&$config)
     {
@@ -23,13 +24,17 @@ class GOsaRegistration extends plugin
     {
         $smarty = get_smarty();
         $smarty->assign("default", $this->defaultRegistrationType);
+        $smarty->assign("step", $this->step);
         return($smarty->fetch(get_template_path("Register/register.tpl", TRUE))); 
     } 
 
 
     function save_object()
     {
-       if(isset($_POST['registrationType']))  $this->defaultRegistrationType = get_post('registrationType');
+        if(isset($_POST['registrationType']))  $this->defaultRegistrationType = get_post('registrationType');
+        if(isset($_POST['startRegistration'])) $this->step = 1;
+
+        if(isset($_POST['stepBack'])) $this->step -= 1;
     }
     
 
index 87b4c35ff5fe037619d85e0e2a27f8b6775bd1d2..76b6f43c3067c6e60daa80bdb2f5167fa94548f3 100644 (file)
@@ -1,62 +1,75 @@
 <h3>{t}GOsa registration{/t}</h3>
 
-{t}Do you want to register GOsa and benefit from the features it brings?{/t}
 
-<p>
- <input type='radio' name='registrationType' value='' id="registrationType_"
-     {if $default == ""} checked {/if}><b><LABEL for="registrationType_">{t}I do not want to register{/t}</LABEL></b>
-    <p style='padding-left:20px;'>
-        <!-- Add a descritive text later -->
-    </p>
+{if $step == 0}
 
-    <input type='radio' name='registrationType' value='annonym' id="registrationType_annonym"
-        {if $default == "annonym"} checked {/if}><b><LABEL for="registrationType_annonym">{t}Annonym access{/t}</LABEL></b>
-    <p style='padding-left:20px;'>
-    <ul>
-        <li>{t}Access to the 'Open-Channels' to easily install or remove plugins within the GOsa user interface{/t}</li>
-        <li>{t}Use the inbuild bugtracker and keep track of their status on the dash-board.{/t}</li>
-    </ul>
-    </p>
+    {t}Do you want to register GOsa and benefit from the features it brings?{/t}
+    <p>
+     <input type='radio' name='registrationType' value='' id="registrationType_"
+         {if $default == ""} checked {/if}><b><LABEL for="registrationType_">{t}I do not want to register{/t}</LABEL></b>
+        <p style='padding-left:20px;'>
+            <!-- Add a descritive text later -->
+        </p>
+        <input type='radio' name='registrationType' value='annonym' id="registrationType_annonym"
+            {if $default == "annonym"} checked {/if}><b><LABEL for="registrationType_annonym">{t}Annonym access{/t}</LABEL></b>
+        <p style='padding-left:20px;'>
+        <ul>
+            <li>{t}Access to the 'Open-Channels' to easily install or remove plugins within the GOsa user interface{/t}</li>
+            <li>{t}Use the inbuild bugtracker and keep track of their status on the dash-board.{/t}</li>
+        </ul>
+        </p>
 
-    <p style='padding-left:20px;'>
-    {t}What information will be transmitted to the backend and maybe stored:{/t}
-    <ul>
-        <li>{t}Information about the installed plugins and their version.{/t}</li>
-        <li>{t}The GOsa-UUID (will be generated during the registration) and a password, to authenticate.{/t}</li>
-        <li>{t}The bugs you will report and the corresponding trace. You can select what information you want to send in.{/t}</li>
-    </ul>
-    </p>
-    
-    <input type='radio' name='registrationType' value='registered' id="registrationType_registered"
-        {if $default == "registered"} checked {/if}><b><LABEL for="registrationType_registered">{t}Register{/t}</LABEL></b>
-    <p style='padding-left:20px;'>
-    {t}Additionally to the 'Annonomous' account you can:{/t}
-    <ul>
-        <li>{t}Access to 'Premium-Channels'.{/t}</li>
-        <li>{t}Watch the status of current plugin updates/patches and the availability of new plugins.{/t}</li>
-        <li>{t}Receive newsletter, if wanted.{/t}</li>
-        <li>{t}View several usefull statistics about your GOsa installation{/t}.</li>
-    </ul>
-    </p>
-       
-    <p style='padding-left:20px;'>
-    {t}What information will be transmitted to the backend and maybe stored:{/t}
-    <ul>
-        <li>{t}All personal information filled in the registration form.{/t}</li>
-        <li>{t}Information about the installed plugins and their version.{/t}</li>
-        <li>{t}The GOsa-UUID (will be generated during the registration) and a password, to authenticate.{/t}</li>
-        <li>{t}The bugs you will report and the corresponding trace. You can select what information you want to send in.{/t}</li>
-        <li>{t}When the statistics extension is used. GOsa will transmit information about plugins, their usage and the amount of objects present in your ldap database. No sensitive data is transmitted here, just the object type, the action performed, cpu usage, memory usage, elapsed time...{/t}</li>
-    </ul>
+        <p style='padding-left:20px;'>
+        {t}What information will be transmitted to the backend and maybe stored:{/t}
+        <ul>
+            <li>{t}Information about the installed plugins and their version.{/t}</li>
+            <li>{t}The GOsa-UUID (will be generated during the registration) and a password, to authenticate.{/t}</li>
+            <li>{t}The bugs you will report and the corresponding trace. You can select what information you want to send in.{/t}</li>
+        </ul>
+        </p>
         
+        <input type='radio' name='registrationType' value='registered' id="registrationType_registered"
+            {if $default == "registered"} checked {/if}><b><LABEL for="registrationType_registered">{t}Register{/t}</LABEL></b>
+        <p style='padding-left:20px;'>
+        {t}Additionally to the 'Annonomous' account you can:{/t}
+        <ul>
+            <li>{t}Access to 'Premium-Channels'.{/t}</li>
+            <li>{t}Watch the status of current plugin updates/patches and the availability of new plugins.{/t}</li>
+            <li>{t}Receive newsletter, if wanted.{/t}</li>
+            <li>{t}View several usefull statistics about your GOsa installation{/t}.</li>
+        </ul>
+        </p>
+           
+        <p style='padding-left:20px;'>
+        {t}What information will be transmitted to the backend and maybe stored:{/t}
+        <ul>
+            <li>{t}All personal information filled in the registration form.{/t}</li>
+            <li>{t}Information about the installed plugins and their version.{/t}</li>
+            <li>{t}The GOsa-UUID (will be generated during the registration) and a password, to authenticate.{/t}</li>
+            <li>{t}The bugs you will report and the corresponding trace. You can select what information you want to send in.{/t}</li>
+            <li>{t}When the statistics extension is used. GOsa will transmit information about plugins, their usage and the amount of objects present in your ldap database. No sensitive data is transmitted here, just the object type, the action performed, cpu usage, memory usage, elapsed time...{/t}</li>
+        </ul>
+        </p>
     </p>
-</p>
+    <hr>
+    <div class="plugin-actions">
+        <button name='startRegistration'>{msgPool type=okButton}</button>
+    </div>
+
+{/if}
 
+{if $step == 1}
 
-<hr>
+    <hr>
+    <div class="plugin-actions">
+        <button name='stepBack'>{msgPool type=backButton}</button>
+    </div>
+{/if}
 
-<div class="plugin-actions">
-    <button name='startRegistration'>{msgPool type=okButton}</button>
-</div>
+{if $step == 2}
 
+    <hr>
+    <div class="plugin-actions">
+        <button name='stepBack'>{msgPool type=backButton}</button>
+    </div>
+{/if}