[horde] problem with Horde_Form_Renderer
Galoppin Fabian
fgaloppin at altern.org
Wed Jan 21 12:32:46 PST 2004
OK I found the problem...
I needed the lib NLS that wasn't in my lib... and with the @ ...no errors appears :)
On Wed, 21 Jan 2004 09:31:12 +0100 (CET)
<fgaloppin at altern.org> wrote:
>I've problem with some code...
>This program works right when I don't use the line
>$template->set('formulaire', Horde::bufferOutput(array($form, 'renderActive'), $renderer, $vars, '', 'post'));
>When I insert it in my code.. I've a white page.
>Can anyone say me what I do really bad ? or some docs or any others comments ? :)
>define(IGA_BASE, dirname(__FILE__));
>require_once IGA_BASE . '/lib/base.php';
>
>$vars = &Horde_Form::getDefaultVars();
>$formname = $vars->getVar('formname');
>
>if ($vars->isVarSet('dn')) {
> $dn = $vars->getVar('dn');
>} else {
> $notification->push(_("Aucun utilisateur _ supprimer"));
> header('Location: ' . Horde::applicationUrl('recherche.php'));
> exit;
>}
>$form = Horde_Form::singleton('', $vars, _("Supprimer"));
>
>$form->_useFormToken = true;
>$form->_submit = array(_("Supprimer"), _("Ne pas supprimer"));
>$form->addHidden('', 'dn', 'text', true);
>$form->addVariable(_("Supprimer cet utilisateur ?"), 'question', 'description', true);
>if ($vars->getVar('submitbutton') == _("Supprimer")) {
> $form->validate($vars);
>
> if ($form->isValid()) {
> $form->getInfo($vars, $info);
> $r = $iga->supprime($info['dn'], $notification);
> header('Location: ' . Horde::applicationUrl('recherche.php'));
> exit;
> }
>} elseif ($vars->getVar('submitbutton') == _("Ne pas supprimer")) {
> $notification->push(_("Entr_e non supprim_e"), 'horde.message');
> header('Location: ' . Horde::applicationUrl('recherche.php'));
> exit;
>}
>$renderer = &new Horde_Form_Renderer();
>
>$template->set('menu', Iga::menu());
>
>$template->set('notify', Horde::bufferOutput(array($notification, 'notify')));
>$template->set('formulaire',Horde::bufferOutput(array($form, 'renderActive'), $renderer, $vars, '', 'post'));
>
>require IGA_TEMPLATES . '/common-header.inc';
>echo $template->fetch(IGA_TEMPLATES . '/supprime/supprime.inc');
>require IGA_TEMPLATES . '/common-footer.inc';
>?>
>
>
>I've that in my common-header.inc :
>
><html>
><head>
><?php
>echo Horde::stylesheetLink(Horde::getThemeConfig(), 'iga');
>?>
></head>
><body>
>
>and that in my supprime.inc :
>
><table border="0" cellpadding="2" cellspacing="0" width="100%">
><tr><td class="menu"><table border="0" width="100%"><tr>
>
><loop:menu> <tag:menu /> </loop:menu>
>
><td width="100%"> </td><!-- spacer -->
></tr></table></td></tr></table><br />
>
><tag:notify />
>
><tag:formulaire />
>
>
>
>I don't understand why there is nothing on my page except if I comment the line :
>$template->set('formulaire',Horde::bufferOutput(array($form, 'renderActive'), $renderer, $vars, '', 'post'));
>
>
>Thx in advance
>Galoppin Fabian
>fgaloppin at altern.org
>
>
>--
>Horde mailing list
>Frequently Asked Questions: http://horde.org/faq/
>To unsubscribe, mail: horde-unsubscribe at lists.horde.org
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=|
Galoppin Fabian |
Rue Louis Bertrand N°34 |
7100 La Louviere |
BE (Belgium) |
+32 64 22 66 02 |
+32 494 28 17 39 |
|
Mail me at : fgaloppin at altern.org |
Get my GnuPG pub key at : |
http://masternet.homeunix.org/fgaloppin.pgp |
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
More information about the horde
mailing list