From 9ea346fe5ad109237190202c7d9c144e9ec6d473 Mon Sep 17 00:00:00 2001 From: x2000habouzit Date: Sat, 7 Feb 2004 17:18:15 +0000 Subject: [PATCH] passage pour les emplois. mettre le nom du template dans un champs n'est pas malin, ca le stocke dans la bd, et rend les objets de l'ancien site incompatibles. d'ou l'utilsiation d'une fonction pour ca ... --- include/valid_aliases.inc.php | 3 ++- include/valid_emploi.inc.php | 42 ++------------------------------ include/validations.inc.php | 6 ++--- templates/admin/valider.tpl | 4 +-- templates/include/form.valid.aliases.tpl | 4 +-- templates/include/form.valid.emploi.tpl | 35 ++++++++++++++++++++++++++ 6 files changed, 46 insertions(+), 48 deletions(-) create mode 100644 templates/include/form.valid.emploi.tpl diff --git a/include/valid_aliases.inc.php b/include/valid_aliases.inc.php index e6296a6..35481b2 100644 --- a/include/valid_aliases.inc.php +++ b/include/valid_aliases.inc.php @@ -1,6 +1,5 @@ entreprise); - $mail = htmlentities($this->mail); - $titre = htmlentities($this->titre); - $texte = wordwrap($this->text, 80); - return <<<________EOF -
- - - - - - - - - - - - - - - - - - - - - - - - - -
Offre d'emploi
Demandeur$ent ($mail)
Titre du post$titre
{$texte}
- - -
-
-________EOF; - } - function handle_formu() { if (isset($_POST['submit'])) { require("tpl.mailer.inc.php"); @@ -92,6 +52,8 @@ ________EOF; } } + function formu() { return 'include/form.valid.emploi.tpl'; } + function commit() { } } diff --git a/include/validations.inc.php b/include/validations.inc.php index 075a000..d1e4a1f 100644 --- a/include/validations.inc.php +++ b/include/validations.inc.php @@ -1,6 +1,6 @@ unique ? "" : " AND stamp='".$this->stamp."'")); } + /** nom du template qui contient le formulaire */ + function formu() { return null; } /** fonction à réaliser en cas de valistion du formulaire * XXX la fonction est "virtuelle" XXX */ diff --git a/templates/admin/valider.tpl b/templates/admin/valider.tpl index 0eb9511..8a4d2b9 100644 --- a/templates/admin/valider.tpl +++ b/templates/admin/valider.tpl @@ -1,10 +1,10 @@ -{* $Id: valider.tpl,v 1.2 2004-02-07 16:57:58 x2000habouzit Exp $ *} +{* $Id: valider.tpl,v 1.3 2004-02-07 17:18:15 x2000habouzit Exp $ *} {dynamic} {$mail} {foreach item=valid from=$valids}
-{include file=$valid->tpl_form valid=$valid} +{include file=$valid->formu() valid=$valid} {/foreach} {/dynamic} diff --git a/templates/include/form.valid.aliases.tpl b/templates/include/form.valid.aliases.tpl index 3e7e429..de46392 100644 --- a/templates/include/form.valid.aliases.tpl +++ b/templates/include/form.valid.aliases.tpl @@ -1,5 +1,5 @@ -{* $Id: form.valid.aliases.tpl,v 1.1 2004-02-07 16:57:59 x2000habouzit Exp $ *} -{assign var="newAlias" value=""} +{* $Id: form.valid.aliases.tpl,v 1.2 2004-02-07 17:18:16 x2000habouzit Exp $ *} +
diff --git a/templates/include/form.valid.emploi.tpl b/templates/include/form.valid.emploi.tpl new file mode 100644 index 0000000..1ff0b12 --- /dev/null +++ b/templates/include/form.valid.emploi.tpl @@ -0,0 +1,35 @@ +{* $Id: form.valid.emploi.tpl,v 1.1 2004-02-07 17:18:16 x2000habouzit Exp $ *} + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Offre d'emploi
Demandeur{$valid->entreprise|escape:"html"} ({$valid->mail|escape:"html"})
Titre du post{$valid->titre|escape:"html"}
{$valid->text|escape:"html"}
+ + +
+
+ +{* vim:set et sw=2 sts=2 sws=2: *} -- 2.1.4