Code

Updated registration template
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 5 Nov 2010 11:06:34 +0000 (11:06 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 5 Nov 2010 11:06:34 +0000 (11:06 +0000)
-Added personal input fields

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20191 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index 332021ffeec1a6e0d508b140c2f946eb1b3d9d53..986a6bdedc44e6bd99473906c12c0aeeed0e0bb4 100644 (file)
@@ -12,10 +12,15 @@ class GOsaRegistration extends plugin
     protected $isRegistered = FALSE; 
     protected $step = 0;
 
+    public $attrs = array('mailAddress','surname','givenName', 'company', 'clients', 'knownFrom');
+    protected $values = array();
+
     function __construct(&$config)
     {
         $this->config = $config;    
         $this->isRegistered = GOsaRegistration::isRegistered($this->config);
+
+        foreach($this->attrs as $attr) $this->values[$attr] = "";
     }
 
 
@@ -25,6 +30,12 @@ class GOsaRegistration extends plugin
         $smarty = get_smarty();
         $smarty->assign("default", $this->defaultRegistrationType);
         $smarty->assign("step", $this->step);
+
+
+
+        foreach($this->attrs as $attr) $smarty->assign($attr, $this->values[$attr]);
+
+
         return($smarty->fetch(get_template_path("Register/register.tpl", TRUE))); 
     } 
 
index 76b6f43c3067c6e60daa80bdb2f5167fa94548f3..bf9b8306fcb9544ed2b3bc9b901a16f49c088f0e 100644 (file)
 
 {if $step == 1}
 
+    {if $default == ""}
+        <b>{t}Selected registration type:{/t} {$default}</b>
+    {elseif $default == "annonym"}
+        <b>{t}Selected registration type:{/t} {$default}</b>
+    {elseif $default == "registered"}
+        
+        <p>
+            {t}Please fill in the fields below.{/t}
+            <br>
+            <i>({$must} {t}Required fields{/t})</i>
+        </p>
+
+
+        <table style='width:100%;'>
+            <tr> 
+                <td style='width:180px;'><LABEL for="mailAddress">{t}Mail-address{/t}{$must}</LABEL></td>
+                <td>
+                    <input type='text' name="mailAddress" value="{$mailAddress}" id="mailAddress">
+                </td>
+            </tr>
+            <tr> 
+                <td style='width:180px;'><LABEL for="surname">{t}Surname{/t}{$must}</LABEL></td>
+                <td>
+                    <input type='text' name="surname" value="{$surname}" id="surname">
+                </td>
+            </tr>
+            <tr> 
+                <td style='width:180px;'><LABEL for="givenName">{t}Given name{/t}{$must}</LABEL></td>
+                <td>
+                    <input type='text' name="givenName" value="{$givenName}" id="givenName">
+                </td>
+            </tr>
+            <tr> 
+                <td style='width:180px;'><LABEL for="company">{t}Company{/t}{$must}</LABEL></td>
+                <td>
+                    <input type='text' name="company" value="{$company}" id="company">
+                </td>
+            </tr>
+            <tr> 
+                <td style='width:180px;'><LABEL for="clients">{t}Amount of managed clients{/t}{$must}</LABEL></td>
+                <td>
+                    <input type='text' name="clients" value="{$clients}" id="clients">
+                </td>
+            </tr>
+            <tr> 
+                <td style='width:180px;'><LABEL for="knownFrom">{t}Where do you know GOsa from?{/t}{$must}</LABEL></td>
+                <td>
+                    <input type='text' name="knownFrom" value="{$knownFrom}" id="knownFrom">
+                </td>
+            </tr>
+        </table>
+       
+
+    {/if}
+
     <hr>
     <div class="plugin-actions">
         <button name='stepBack'>{msgPool type=backButton}</button>
+        <button name='registerNow'>{msgPool type=okButton}</button>
     </div>
 {/if}