19,7 → 19,7 |
// | License along with this library; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id: inscription.class.php,v 1.2 2004-12-17 17:41:57 alex Exp $ |
// CVS : $Id: inscription.class.php,v 1.3 2005-03-02 12:46:40 alex Exp $ |
/** |
* Inscription |
* |
31,7 → 31,7 |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
//Autres auteurs : |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.2 $ $Date: 2004-12-17 17:41:57 $ |
*@version $Revision: 1.3 $ $Date: 2005-03-02 12:46:40 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
71,13 → 71,13 |
{ |
$squelette =& $this->defaultRenderer(); |
$squelette->setFormTemplate("\n".'<form{attributes}>'."\n".'{content}'."\n".'</form>'."\n"); |
$squelette->setElementTemplate( '<li class="liste_inscription">'."\n".'{label}'."\n".'{element}'."\n". |
$squelette->setElementTemplate( '<li class="liste_inscription">'."\n".'<label>{label}</label>'."\n".'{element}'."\n". |
'<!-- BEGIN required --><span class="symbole_obligatoire">*</span><!-- END required -->'."\n". |
'<!-- BEGIN error --><span class="erreur">{error}</span><!-- END error -->'."\n". |
'</li>'."\n"); |
$squelette->setGroupElementTemplate ('<span class="groupe_formulaire">{label}{element}</span>', 'groupe_mot_de_passe') ; |
$squelette->setGroupElementTemplate ('<span class="groupe_formulaire">{label}{element}</span>', 'groupe_cp_ville') ; |
$squelette->setGroupElementTemplate ('<span class="groupe_formulaire">{label}{element}</span>', 'groupe_nom') ; |
|
$squelette->setGroupElementTemplate ('<span class="groupe_formulaire"><label>{label}</label> {element}</span>', 'groupe_cp_ville') ; |
$squelette->setGroupElementTemplate ('<span class="groupe_formulaire"><label>{label}</label> {element}</span>', 'groupe_nom') ; |
$squelette->setRequiredNoteTemplate("\n".'<p>'."\n".'<span class="symbole_obligatoire">*</span> {requiredNote}'."\n".'</p>'."\n"); |
|
$fieldset_debut = '<fieldset>'."\n". |
92,19 → 92,19 |
|
|
// A faire, grouper les mots de passe |
$this->addElement ('password', 'mot_de_passe', INS_MOT_DE_PASSE) ; |
$this->addElement ('password', 'mot_de_passe_repete', INS_REPETE_MOT_DE_PASSE) ; |
$this->addElement ('password', 'mot_de_passe', INS_MOT_DE_PASSE, array ('size' => '8')) ; |
$this->addElement ('password', 'mot_de_passe_repete', INS_REPETE_MOT_DE_PASSE, array ('size' => '8')) ; |
$this->addRule ('mot_de_passe', INS_MOT_DE_PASSE_REQUIS, 'required', '', 'client') ; |
$this->addRule ('mot_de_passe_repete', INS_MOT_DE_PASSE_REQUIS, 'required', '', 'client') ; |
$this->addRule (array ('mot_de_passe', 'mot_de_passe_repete'), INS_MOTS_DE_PASSE_DIFFERENTS, 'compare', '', 'client') ; |
|
|
$nom_prenom[] = & HTML_QuickForm::createElement ('text', 'nom', INS_NOM) ; |
$nom_prenom[] = & HTML_QuickForm::createElement ('text', 'prenom', INS_PRENOM) ; |
$nom_prenom[] = & HTML_QuickForm::createElement ('text', 'nom', INS_NOM, array ('size' => '12')) ; |
$nom_prenom[] = & HTML_QuickForm::createElement ('text', 'prenom', INS_PRENOM, array ('size' => '12')) ; |
$this->addGroup ($nom_prenom, 'groupe_nom', '', '', false) ; |
|
if (INS_UTILISE_WIKINI) { |
$this->addElement ('text', 'nom_wikini', INS_NOM_WIKI) ; |
$this->addElement ('text', 'nom_wikini', INS_NOM_WIKI, array ('size' => '12')) ; |
$this->addRule ('nom_wikini', INS_MAUVAIS_NOM_WIKI, 'regex', '/(!?[A-Z][A-Za-z0-9]*[a-z0-9]+[A-Z][A-Za-z0-9]*)/', 'client') ; |
$this->registerRule('doublonwikini', 'callback', 'verif_doublonNomWiki'); |
$this->addRule('nom_wikini', INS_NOMWIKI_DOUBLE, 'doublonwikini', true); |
111,11 → 111,11 |
} |
$this->addElement ('text', 'adresse_1', INS_ADRESSE) ; |
$this->addElement ('text', 'adresse_2', INS_ADRESSE) ; |
if (INS_CHAMPS_TELEPHONE) $this->addElement('text', 'telephone', INS_TELEPHONE) ; |
if (INS_CHAMPS_FAX) $this->addElement('text', 'fax', INS_FAX) ; |
if (INS_CHAMPS_TELEPHONE) $this->addElement('text', 'telephone', INS_TELEPHONE, array ('size' => '12')) ; |
if (INS_CHAMPS_FAX) $this->addElement('text', 'fax', INS_FAX, array ('size' => '12')) ; |
$this->addElement ('text', 'region', INS_REGION) ; |
|
$cp_ville[] = & HTML_QuickForm::createElement ('text', 'cp', INS_CODE_POSTAL) ; |
$cp_ville[] = & HTML_QuickForm::createElement ('text', 'cp', INS_CODE_POSTAL, array ('size' => '6')) ; |
$cp_ville[] = & HTML_QuickForm::createElement ('text', 'ville', INS_VILLE) ; |
$this->addGroup ($cp_ville, 'groupe_cp_ville', '', '', false) ; |
$this->addGroupRule ('groupe_cp_ville', INS_CODE_POSTAL_REQUIS, 'required', '', 1, 'client') ; |