From: Ben Klang Date: Fri, 15 Jul 2005 05:23:57 +0000 (+0000) Subject: User form is now posting. Turns out that wasn't a stupid browser bug but rather X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=e15ea7968e2f9c15354de94964fdd88cf85ed253;p=horde.git User form is now posting. Turns out that wasn't a stupid browser bug but rather fatigue, coffee, and oversight. Oh well, the new structure ain't so bad. If necessary I can always go back too. git-svn-id: https://svn.alkaloid.net/gpl/shout/trunk@59 06cd67b6-e706-0410-b29e-9de616bca6e9 --- diff --git a/index.php b/index.php index 2d753d0a6..5dbddfa4a 100644 --- a/index.php +++ b/index.php @@ -62,7 +62,7 @@ switch ($section) { case "system": case "users": case "moh": - require "$section.php"; + require "main/$section.php"; break; default: diff --git a/lib/User.php b/lib/User.php index d11b2d1d8..ea2514aa0 100644 --- a/lib/User.php +++ b/lib/User.php @@ -12,9 +12,11 @@ class UserDetailsForm extends Horde_Form { parent::Horde_Form($vars, _("Add User - Context: $context")); - $this->preserve($vars); $users = $shout->getUsers($context); - + + $this->addHidden('', 'context', 'text', true); + $this->addHidden('', 'action', 'text', true); + $vars->set('action', 'save'); $this->addVariable(_("Full Name"), 'name', 'text', true); $this->addVariable(_("Extension"), 'extension', 'int', true); $this->addVariable(_("E-Mail Address"), 'email', 'text', false); diff --git a/shout.webprj b/shout.webprj index 8b2793df2..dd0ba5589 100644 --- a/shout.webprj +++ b/shout.webprj @@ -12,14 +12,14 @@ - + - + @@ -30,10 +30,15 @@ - + + + + + + @@ -50,10 +55,11 @@ - + - + + @@ -98,14 +104,15 @@ - - + + - - - - - + + + + + + diff --git a/users.php b/users.php index 46fb92a0a..605c6962c 100644 --- a/users.php +++ b/users.php @@ -8,7 +8,7 @@ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html. */ -@define('SHOUT_BASE', dirname(__FILE__) . "/.."); +@define('SHOUT_BASE', dirname(__FILE__)); $shout_configured = (@is_readable(SHOUT_BASE . '/config/conf.php'));# && #@is_readable(SHOUT_BASE . '/config/prefs.php')); if (!$shout_configured) { @@ -28,7 +28,7 @@ $contexts = $shout->getContexts(); $vars = &Variables::getDefaultVariables(); if (!isset($context)) {#FIXME || !Shout::checkContext()) { - $url = Horde::applicationUrl("/shout/index.php"); + $url = Horde::applicationUrl("index.php"); header("Location: $url"); exit(0); } @@ -45,6 +45,7 @@ echo $tabs->render($section); switch ($action) { case "add": case "edit": + case "save": case "delete": require SHOUT_BASE . "/users/$action.php"; break; diff --git a/users/add.php b/users/add.php index a314106a2..2c362b994 100644 --- a/users/add.php +++ b/users/add.php @@ -24,7 +24,7 @@ $title = _("System Settings"); $UserDetailsForm = &Horde_Form::singleton('UserDetailsForm', $vars); $UserDetailsFormValid = $UserDetailsForm->validate($vars, true); -$UserDetailsForm->open($RENDERER, $vars, 'index.php', 'post'); +$UserDetailsForm->open($RENDERER, $vars, 'users.php', 'post'); $UserDetailsForm->preserveVarByPost($vars, "section"); $UserDetailsForm->preserve($vars); $RENDERER->beginActive($UserDetailsForm->getTitle());