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: HTML_formulaireAppli.class.php,v 1.4 2006-12-01 10:39:14 alexandre_tb Exp $ |
// CVS : $Id: HTML_formulaireAppli.class.php,v 1.5 2007-06-26 14:18:53 florian Exp $ |
/** |
* Application projet |
* |
31,7 → 31,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.4 $ |
*@version $Revision: 1.5 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
94,17 → 94,30 |
*/ |
function construitFormulaire($url_retour) |
{ |
$this->addElement ('text', 'nom_appl', ADAP_NOM_APPL, array ('size' => 60)) ; |
$this->addRule ('nom_appl', ADAP_NOM_APPL_ALERTE, 'required', '', 'client') ; |
|
$squelette =& $this->defaultRenderer(); |
$squelette->setFormTemplate("\n".'<form {attributes}>'."\n".'{content}'."\n".'</form>'."\n"); |
$squelette->setElementTemplate( '<p class="formulaire_element"><span class="form_label">'."\n". |
'{label}'."\n". |
'<!-- BEGIN required --><span style="color:red; width:5px; margin:0; padding:0;">*</span><!-- END required -->'."\n". |
'</span>'."\n".'{element}'."\n". |
'<!-- BEGIN error --><span class="erreur">{error}</span><!-- END error -->'."\n". |
'</p>'."\n"); |
$squelette->setGroupElementTemplate('<p style="display:inline">{element}</p>', 'form_boutons'); |
$squelette->setRequiredNoteTemplate("\n".'<p class="symbole_obligatoire">* : {requiredNote}</p>'."\n"); |
//Note pour les erreurs javascript |
$this->setJsWarnings('Erreur de saisie', 'Veuillez verifier vos informations saisies'); |
// Note de fin de formulaire |
$this->setRequiredNote('Indique les champs obligatoires'); |
$this->addElement ('text', 'nom_appl', ADAP_NOM_APPL, array ('size' => 35)) ; |
$this->addRule ('nom_appl', ADAP_NOM_APPL_ALERTE, 'required', '', 'client') ; |
$this->addElement ('textarea', 'description', ADAP_DESCRIPTION, array ('cols' => 50, 'rows' => 5)) ; |
$this->addElement ('text', 'chemin', ADAP_CHEMIN, array('size' => 50)) ; |
|
$this->setRequiredNote('<span style="color: #ff0000">*</span>'.ADAP_CHAMPS_REQUIS) ; |
$this->addElement ('text', 'chemin', ADAP_CHEMIN, array('size' => 35)) ; |
$this->addElement('html', '<br />'); |
$this->setRequiredNote(ADAP_CHAMPS_REQUIS) ; |
// on fait un groupe avec les boutons pour les mettres sur la même ligne |
$buttons[] = &HTML_QuickForm::createElement('button', 'annuler', ADAP_ANNULER, array ("onclick" => "javascript:document.location.href='".str_replace ('&', '&', $url_retour->getURL())."'")); |
$buttons[] = &HTML_QuickForm::createElement('submit', 'valider', ADAP_VALIDER); |
$this->addGroup($buttons, null, null, ' '); |
$this->addGroup($buttons, 'form_boutons', null, ' '); |
} // end of member function _construitFormulaire |
} // end of HTML_formulaireProjet |
?> |