From fbfdc63f8d65d8f0e5fd366cc94dbcf82bad0206 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 5 Nov 2010 15:17:53 +0000 Subject: [PATCH] Update regsitration git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20194 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../dashBoard/Register/class_RegisterGOsa.inc | 21 ++++++++++++++++--- .../generic/dashBoard/Register/register.tpl | 4 ++-- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/gosa-core/plugins/generic/dashBoard/Register/class_RegisterGOsa.inc b/gosa-core/plugins/generic/dashBoard/Register/class_RegisterGOsa.inc index 86da0d32b..66fbc8ecf 100644 --- a/gosa-core/plugins/generic/dashBoard/Register/class_RegisterGOsa.inc +++ b/gosa-core/plugins/generic/dashBoard/Register/class_RegisterGOsa.inc @@ -8,7 +8,7 @@ class GOsaRegistration extends plugin { - protected $defaultRegistrationType = "registered"; + protected $selectedRegistrationType = "registered"; protected $isRegistered = FALSE; protected $step = 0; @@ -21,11 +21,26 @@ class GOsaRegistration extends plugin $this->isRegistered = GOsaRegistration::isRegistered($this->config); foreach($this->attrs as $attr) $this->values[$attr] = ""; + + // Try to establish a rpc connection. + $this->rpcConfigured = FALSE; + if ($this->config->get_cfg_value("core","gosaRpcServer") != ""){ + $this->rpcConfigured = TRUE; + $this->rpcHandle = $this->config->getRpcHandle( + "http://10.3.64.59:4000", + "65717fe6-9e3e-11df-b010-5452005f1250", + "WyukwauWoid2", + TRUE); + } } function registerNow() { + if($this->selectedRegistrationType == "registered"){ + print_a($this->rpcHandle->registerUser('cajus', $this->values)); + } + $this->step = 200; // Awaiting verification } @@ -44,7 +59,7 @@ class GOsaRegistration extends plugin $smarty = get_smarty(); - $smarty->assign("default", $this->defaultRegistrationType); + $smarty->assign("default", $this->selectedRegistrationType); $smarty->assign("step", $this->step); foreach($this->attrs as $attr) $smarty->assign($attr, set_post($this->values[$attr])); @@ -56,7 +71,7 @@ class GOsaRegistration extends plugin function save_object() { - if(isset($_POST['registrationType'])) $this->defaultRegistrationType = get_post('registrationType'); + if(isset($_POST['registrationType'])) $this->selectedRegistrationType = get_post('registrationType'); if(isset($_POST['startRegistration'])) $this->step = 1; if(isset($_POST['stepBack'])) $this->step -= 1; diff --git a/gosa-core/plugins/generic/dashBoard/Register/register.tpl b/gosa-core/plugins/generic/dashBoard/Register/register.tpl index 1027cdbfc..42eb5e1ec 100644 --- a/gosa-core/plugins/generic/dashBoard/Register/register.tpl +++ b/gosa-core/plugins/generic/dashBoard/Register/register.tpl @@ -35,7 +35,7 @@

@@ -131,6 +131,6 @@ {/if} {if $step == 200} -

VERIFY TEXTS!!!

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

VERIFY TEXTS!!!

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