From: hickert Date: Mon, 8 Nov 2010 12:39:21 +0000 (+0000) Subject: Updated registration dialog. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=75eb5a332b3ae6c37033cd78f007e5c4b379f179;p=gosa.git Updated registration dialog. -Sorted attributes -Removed annonym auth git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20202 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/generic/dashBoard/Register/class_RegistrationDialog.inc b/gosa-core/plugins/generic/dashBoard/Register/class_RegistrationDialog.inc index 189d4f717..72f0b4eae 100644 --- a/gosa-core/plugins/generic/dashBoard/Register/class_RegistrationDialog.inc +++ b/gosa-core/plugins/generic/dashBoard/Register/class_RegistrationDialog.inc @@ -12,7 +12,17 @@ class RegistrationDialog extends plugin protected $isRegistered = FALSE; protected $step = 0; - public $attrs = array('mailAddress','surname','givenName', 'company', 'clients', 'knownFrom'); + public $attrs = array( + + // User table + 'uid','password','password_repeated','restoreQuestion','restoreAnswer', + 'mailAddress','surname','givenName','newsletter', + + // Contact table + 'phone','contact','contact_mail','company','street', + 'postal_code','city','trade','employees','description'); + + protected $values = array(); function __construct(&$config) @@ -37,10 +47,31 @@ class RegistrationDialog extends plugin function registerNow() { if($this->selectedRegistrationType == "registered"){ + + // Register user print_a($this->rpcHandle->registerUser('cajus', $this->values)); + + // Register Instance with User. } - $this->step = 200; // Awaiting verification + #$this->step = 200; // Awaiting verification + } + + + function check() + { + $message = array(); + if($this->step == 1){ + + // Checking for a valid 'uid'. + if(empty($this->values['uid'])) { + $message[] = msgPool::required(_("Account-ID")); + }elseif(!preg_match("/^[a-z0-9_-]+$/", $this->values['uid'])){ + $message[] = msgPool::invalid(_("Account-ID"), $this->values['uid'],'/[a-z0-9_-]/'); + } + } + + return($message); } diff --git a/gosa-core/plugins/generic/dashBoard/Register/register.tpl b/gosa-core/plugins/generic/dashBoard/Register/register.tpl index 42eb5e1ec..55e3d977f 100644 --- a/gosa-core/plugins/generic/dashBoard/Register/register.tpl +++ b/gosa-core/plugins/generic/dashBoard/Register/register.tpl @@ -1,3 +1,5 @@ + +

{t}GOsa registration{/t}

@@ -10,6 +12,8 @@

+ +

@@ -66,52 +70,95 @@ {t}Selected registration type:{/t} {$default} {elseif $default == "registered"} -

- {t}Please fill in the fields below.{/t} -
- ({$must} {t}Required fields{/t}) -

- - +

{t}Account settings{/t}

+ + + + +
+ +
+ +
+ +

{t}Password{/t}

+ - + - - + + - + - + - +
{t}Surname{/t}{$must} - + {factory type='password' name='password' id='password' + onkeyup="testPasswordCss(\$('password').value)"} +
{t}Given name{/t}{$must}
- +
+ + +
{t}Company{/t}{$must} - + {factory type='password' name='password_repeated' id='password_repeated'}
{t}Amount of managed clients{/t}{$must} - +
{t}Where do you know GOsa from?{/t}{$must} - +
+
+

{t}Personal information{/t}

+ + + + + + + + + +
+ +
+ +
+ +
+

{t}Newsletter{/t}

+ + + + + +
+ +
+
+ ({$must} {t}Required fields{/t}) + {/if} @@ -120,6 +167,9 @@ + {/if} {if $step == 2} @@ -131,6 +181,6 @@ {/if} {if $step == 200} -

VERIFY TEXTS!!!

You have reciefed a mail, bafasel, please click link and so on. +

VERIFY TEXTS!!!

You have receifed a mail, bafasel, please click link and so on. {/if}