From 256ceea890b43ce3c41678ae892eb926adb55200 Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Sun, 20 Jan 2008 18:41:15 +0100 Subject: [PATCH] Start writing the event edition form. Signed-off-by: Florent Bruneau --- modules/xnetevents.php | 11 +- modules/xnetevents/xnetevents.editionsteps.inc.php | 49 +++++ templates/xnetevents/edit-start.tpl | 38 ++++ templates/xnetevents/edit.tpl | 244 --------------------- 4 files changed, 96 insertions(+), 246 deletions(-) create mode 100644 modules/xnetevents/xnetevents.editionsteps.inc.php create mode 100644 templates/xnetevents/edit-start.tpl delete mode 100644 templates/xnetevents/edit.tpl diff --git a/modules/xnetevents.php b/modules/xnetevents.php index 34cb9c2..e84fffc 100644 --- a/modules/xnetevents.php +++ b/modules/xnetevents.php @@ -35,7 +35,7 @@ class XnetEventsModule extends PLModule ); } - function handler_events(&$page, $group) + function handler_events(&$page, $group = null) { $page->changeTpl('xnetevents/index.tpl'); require_once dirname(__FILE__) . '/xnetevents/xnetevents.inc.php'; @@ -54,8 +54,15 @@ class XnetEventsModule extends PLModule { } - function handler_edit(&$page, $eid = null) + function handler_edit(&$page, $eid = null, $tab = null) { + $page->changeTpl('xnetevents/edit.tpl'); + require_once dirname(__FILE__) . '/xnetevents/xnetevents.editionsteps.inc.php'; + + global $globals; + $wiz = new PlWizard('XNetEvent_' . $globals->asso('diminutif'), 'core/plwizard.tpl', false, false); + $wiz->addPage('XNetEventEditStart', 'Nouvel événement', 'start'); + $wiz->apply($page, 'events/edit/' . $eid, $tab) } function handler_admin(&$page, $eid = null, $item_id = null) diff --git a/modules/xnetevents/xnetevents.editionsteps.inc.php b/modules/xnetevents/xnetevents.editionsteps.inc.php new file mode 100644 index 0000000..f093327 --- /dev/null +++ b/modules/xnetevents/xnetevents.editionsteps.inc.php @@ -0,0 +1,49 @@ + diff --git a/templates/xnetevents/edit-start.tpl b/templates/xnetevents/edit-start.tpl new file mode 100644 index 0000000..d82a417 --- /dev/null +++ b/templates/xnetevents/edit-start.tpl @@ -0,0 +1,38 @@ +{**************************************************************************} +{* *} +{* Copyright (C) 2003-2008 Polytechnique.org *} +{* http://opensource.polytechnique.org/ *} +{* *} +{* This program is free software; you can redistribute it and/or modify *} +{* it under the terms of the GNU General Public License as published by *} +{* the Free Software Foundation; either version 2 of the License, or *} +{* (at your option) any later version. *} +{* *} +{* This program is distributed in the hope that it will be useful, *} +{* but WITHOUT ANY WARRANTY; without even the implied warranty of *} +{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *} +{* GNU General Public License for more details. *} +{* *} +{* You should have received a copy of the GNU General Public License *} +{* along with this program; if not, write to the Free Software *} +{* Foundation, Inc., *} +{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *} +{* *} +{**************************************************************************} + +

+ Un événement peut être une réunion, un séminaire, une conférence, un voyage promo, + etc... Pour en organiser un et bénéficier des outils de suivi d'inscription et de + paiement offerts, il te faut remplir les quelques champs du formulaire ci-dessous. +

+

+ Tu as la possibilité, pour un événement donné, de distinguer plusieurs "moments" + distincts. Par exemple, dans le cas d'une réunion suivie d'un dîner, il peut être + utile de comptabiliser les présents à la réunion d'une part, et de compter ceux + qui s'inscrivent au repas d'autre part (en général certains participants à la réunion + ne restent pas pour le dîner...), de sorte que tu sauras combien de chaises prévoir + pour le premier "moment" (la réunion), et pour combien de personnes réserver le + restaurant. +

+ +{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} diff --git a/templates/xnetevents/edit.tpl b/templates/xnetevents/edit.tpl deleted file mode 100644 index 72d97a7..0000000 --- a/templates/xnetevents/edit.tpl +++ /dev/null @@ -1,244 +0,0 @@ -{**************************************************************************} -{* *} -{* Copyright (C) 2003-2008 Polytechnique.org *} -{* http://opensource.polytechnique.org/ *} -{* *} -{* This program is free software; you can redistribute it and/or modify *} -{* it under the terms of the GNU General Public License as published by *} -{* the Free Software Foundation; either version 2 of the License, or *} -{* (at your option) any later version. *} -{* *} -{* This program is distributed in the hope that it will be useful, *} -{* but WITHOUT ANY WARRANTY; without even the implied warranty of *} -{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *} -{* GNU General Public License for more details. *} -{* *} -{* You should have received a copy of the GNU General Public License *} -{* along with this program; if not, write to the Free Software *} -{* Foundation, Inc., *} -{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *} -{* *} -{**************************************************************************} - - - -

{$asso.nom} : {$evt.intitule|default:"Nouvel événement"}

- -

- Un événement peut être une réunion, un séminaire, une conférence, un voyage promo, - etc... Pour en organiser un et bénéficier des outils de suivi d'inscription et de - paiement offerts, il te faut remplir les quelques champs du formulaire ci-dessous. -

-

- Tu as la possibilité, pour un événement donné, de distinguer plusieurs "moments" - distincts. Par exemple, dans le cas d'une réunion suivie d'un dîner, il peut être - utile de comptabiliser les présents à la réunion d'une part, et de compter ceux - qui s'inscrivent au repas d'autre part (en général certains participants à la réunion - ne restent pas pour le dîner...), de sorte que tu sauras combien de chaises prévoir - pour le premier "moment" (la réunion), et pour combien de personnes réserver le - restaurant. -

- -
-

Description de l'événement

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Intitulé de l'événement -
- Nom complet : - - -
- Nom raccourci :
- (pour les mailings listes) -
- - (n'utiliser que chiffres, lettres, tiret et point. garder court) -
- Descriptif : - - -
- Inscriptions -
- Fin des inscriptions : - - - - {html_select_date prefix='inscr_' end_year='+5' day_value_format='%02d' - field_order='DMY' field_separator=' / ' month_format='%m' time=$evt.deadline_inscription} - compris. - -
- Options : - - Montrer la liste des inscrits aux membres : - oui - non - -
- Autoriser les non-membres : - oui - non - -
- Autoriser les invités : - oui - non -
- Paiement :  - -
- -
-

Déroulement de l'événement

- - - - - - - - - - - - - - - {foreach from=$moments item=i} - {assign var='moment' value=$items[$i]} - - - - - - - - - - - - - - - - {/foreach} -
- Début : - - le {html_select_date prefix='deb_' end_year='+5' day_value_format='%02d' - field_order='DMY' field_separator=' / ' month_format='%m' time=$evt.debut} - à {html_select_time use_24_hours=true display_seconds=false - time=$evt.debut prefix='deb_' minute_interval=5} -
- Fin : - - le {html_select_date prefix='fin_' end_year='+5' day_value_format='%02d' - field_order='DMY' field_separator=' / ' month_format='%m' time=$evt.fin} - à {html_select_time use_24_hours=true display_seconds=false - time=$evt.fin prefix='fin_' minute_interval=5} -
Moment {$i}
Intitulé :
Détails pratiques :
Tarif :
(par participant)
(0 si gratuit)
- -
- {if $evt.eid}{/if} - -   - -
- -
-{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} -- 2.1.4