================================================================================
-VERSION 0.9.11 ?? ?? 2006
+VERSION 0.9.12 ?? ?? 2006
-From 0.9.10 branch:
+Bug/Wish:
+
+ * Admin:
+ - #468: Can edit requests before validation -FRU
+
+From 0.9.11 branch:
* Payment:
- #482: fix action in the form. -MC
var $unique;
// enable the refuse button
var $refuse = true;
+
var $type;
var $comments = Array();
// the validations rules : comments for admins
return true;
}
+ // mise à jour des informations
+ if (Env::has('edit')) {
+ if ($this->handle_editor()) {
+ $this->update();
+ $this->trig('requête mise à jour');
+ return true;
+ }
+ return false;
+ }
+
// ajout d'un commentaire
if (Env::has('hold') && Env::has('comm')) {
$formid = Env::i('formid');
{ return null; }
// }}}
+ // {{{ function editor()
+
+ /** nom du formulaire d'édition */
+ function editor()
+ { return null; }
+
+ // }}}
// {{{ function answers()
/** automatic answers table for this type of validation */
{ return 'include/form.valid.evts.tpl'; }
// }}}
+ // {{{ functon editor()
+
+ function editor()
+ { return 'include/form.valid.edit-evts.tpl'; }
+
+ // }}}
+ // {{{ function handle_editor()
+
+ function handle_editor()
+ {
+ $this->titre = Env::v('titre');
+ $this->texte = Env::v('texte');
+ $this->pmin = Env::i('promo_min');
+ $this->pmax = Env::i('promo_max');
+ $this->peremption = Env::v('peremption');
+ return true;
+ }
+
+ // }}}
// {{{ function _mail_subj
function _mail_subj()
}
// }}}
+ // {{{ function editor()
+
+ function editor()
+ {
+ return 'include/form.valid.edit-nl.tpl';
+ }
+
+ // }}}
+ // {{{ function handle_editor()
+
+ function handle_editor()
+ {
+ $this->art->_body = Env::v('nl_body');
+ $this->art->_title = Env::v('nl_title');
+ $this->art->_append = Env::v('nl_append');
+ return true;
+ }
+
+ // }}}
// {{{ function _mail_subj
function _mail_subj()
{ return 'include/form.valid.paiements.tpl'; }
// }}}
+ // {{{ function editor()
+
+ function editor()
+ {
+ return 'include/form.valid.edit-paiements.tpl';
+ }
+
+ // }}}
+ // {{{ function handle_editor()
+
+ function handle_editor()
+ {
+ $this->titre = Env::v('pay_titre');
+ $this->site = Env::v('pay_site');
+ $this->montant = Env::i('pay_montant');
+ $this->montant_min = Env::i('pay_montant_min');
+ $this->montant_max = Env::i('pay_montant_max');
+ $this->msg_reponse = Env::v('pay_msg_reponse');
+ return true;
+ }
+
+ // }}}
// {{{ function _mail_subj
function _mail_subj()
</td>
</tr>
{include file=$valid->formu()}
+ {if $valid->editor()}
+ <tr>
+ <td colspan="2" class="center">
+ <form action="admin/validate" method="post">
+ <div>
+ {include file=$valid->editor()}
+ <input type="hidden" name="uid" value="{$valid->uid}" />
+ <input type="hidden" name="type" value="{$valid->type}" />
+ <input type="hidden" name="stamp" value="{$valid->stamp}" />
+ <br />
+ <input type="submit" name="edit" value="Editer" />
+ </div>
+ </form>
+ </td>
+ </tr>
+ {/if}
<tr><th colspan='2'>Commentaires</th></tr>
{foreach from=$valid->comments item=c}
<tr class="{cycle values="impair,pair"}">
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2006 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 *}
+{* *}
+{**************************************************************************}
+
+<input type="text" name="titre" size="50" maxlength="200" value="{$valid->titre}" />
+<br />
+<textarea rows="10" cols="60" name="texte">{$valid->texte}</textarea>
+<br />
+<strong>Péremption :</strong> <input type="text" name="peremption" size="10" value="{$valid->peremption}" />
+<strong>Promos : </strong>
+min <input type="text" name="promo_min" size="4" maxlength="4" value="{$valid->pmin}" />
+ -> max <input type="text" name="promo_max" size="4" maxlength="4" value="{$valid->pmax}" />
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2006 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 *}
+{* *}
+{**************************************************************************}
+
+<input type="text" name="nl_title" size="50" maxlength="200" value="{$valid->art->_title}" />
+<br />
+<textarea rows="10" cols="60" name="nl_body">{$valid->art->_body}</textarea>
+<br />
+<textarea rows="3" cols="60" name="nl_append">{$valid->art->_append}</textarea>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2006 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 *}
+{* *}
+{**************************************************************************}
+
+<input type="text" name="pay_titre" size="50" maxlength="200" value="{$valid->titre}" />
+<br />
+<textarea rows="10" cols="60" name="pay_msg_reponse">{$valid->msg_reponse}</textarea>
+<br />
+<strong>Site :</strong> <input type="text" name="pay_site" size="45" value="{$valid->site}" />
+<br>
+<strong>Montant :</strong> <input type="text" name="pay_montant" size="5" value="{$valid->montant}" />
+(min <input type="text" name="pay_montant_min" size="5" value="{$valid->montant_min}" />
+ -> max <input type="text" name="pay_montant_max" size="5" value="{$valid->montant_max}" />)
+
+{* vim:set et sw=2 sts=2 sws=2: *}
{**************************************************************************}
-<tr class="impair">
+<tr class="pair">
<td class="titre">Titre</td>
<td>{$valid->titre}</td>
</tr>
-<tr class="impair">
+<tr class="pair">
<td class="titre">Texte</td>
<td>{$valid->texte|nl2br}</td>
</tr>
-<tr class="impair">
+<tr class="pair">
<td class="titre">Péremption</td>
<td>{$valid->peremption|date_format}</td>
</tr>
-<tr class="impair">
+<tr class="pair">
<td class="titre">Promos</td>
<td>{$valid->pmin} - {$valid->pmax}</td>
</tr>
-<tr class="impair">
+<tr class="pair">
<td class="titre">Commentaire</td>
<td>{$valid->comment}</td>
</tr>