Can change the name of a list before validation
authorx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Wed, 11 Oct 2006 11:44:12 +0000 (11:44 +0000)
committerx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Wed, 11 Oct 2006 11:44:12 +0000 (11:44 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@968 839d8a87-29fc-0310-9880-83ba4fa771e5

include/validations/listes.inc.php
templates/include/form.valid.edit-listes.tpl [new file with mode: 0644]

index e74eb02..956e135 100644 (file)
@@ -61,6 +61,25 @@ class ListeReq extends Validate
     { return 'include/form.valid.listes.tpl'; }
 
     // }}}
+    // {{{ function editor()
+
+    function editor()
+    {
+        return 'include/form.valid.edit-listes.tpl';
+    }
+
+    // }}}
+    // {{{ function handle_editor()
+
+    function handle_editor()
+    {
+        if (Env::has('listname')) {
+            $this->liste = trim(Env::v('listname'));
+        }
+        return true;
+    }
+
+    // }}}
     // {{{ function _mail_subj
 
     function _mail_subj()
diff --git a/templates/include/form.valid.edit-listes.tpl b/templates/include/form.valid.edit-listes.tpl
new file mode 100644 (file)
index 0000000..22b43a7
--- /dev/null
@@ -0,0 +1,25 @@
+{**************************************************************************}
+{*                                                                        *}
+{*  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="listname" size="25" maxlength="200" value="{$valid->liste}" />
+
+{* vim:set et sw=2 sts=2 sws=2: *}