Line 17... |
Line 17... |
17 |
// | |
|
17 |
// | |
|
18 |
// | You should have received a copy of the GNU General Public |
|
18 |
// | You should have received a copy of the GNU General Public |
|
19 |
// | License along with this library; if not, write to the Free Software |
|
19 |
// | License along with this library; if not, write to the Free Software |
|
20 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
20 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
22 |
// CVS : $Id: HTML_formulaireAppli.class.php,v 1.4 2006-12-01 10:39:14 alexandre_tb Exp $
|
22 |
// CVS : $Id: HTML_formulaireAppli.class.php,v 1.5 2007-06-26 14:18:53 florian Exp $
|
23 |
/**
|
23 |
/**
|
24 |
* Application projet
|
24 |
* Application projet
|
25 |
*
|
25 |
*
|
26 |
* La classe HTML_formulaireAuth
|
26 |
* La classe HTML_formulaireAuth
|
27 |
*
|
27 |
*
|
Line 29... |
Line 29... |
29 |
//Auteur original :
|
29 |
//Auteur original :
|
30 |
*@author Alexandre Granier <alexandre@tela-botanica.org>
|
30 |
*@author Alexandre Granier <alexandre@tela-botanica.org>
|
31 |
//Autres auteurs :
|
31 |
//Autres auteurs :
|
32 |
*@author Aucun
|
32 |
*@author Aucun
|
33 |
*@copyright Tela-Botanica 2000-2004
|
33 |
*@copyright Tela-Botanica 2000-2004
|
34 |
*@version $Revision: 1.4 $
|
34 |
*@version $Revision: 1.5 $
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
36 |
*/
|
36 |
*/
|
Line 37... |
Line 37... |
37 |
|
37 |
|
Line 92... |
Line 92... |
92 |
* @return void
|
92 |
* @return void
|
93 |
* @access public
|
93 |
* @access public
|
94 |
*/
|
94 |
*/
|
95 |
function construitFormulaire($url_retour)
|
95 |
function construitFormulaire($url_retour)
|
96 |
{
|
96 |
{
|
- |
|
97 |
$squelette =& $this->defaultRenderer();
|
- |
|
98 |
$squelette->setFormTemplate("\n".'<form {attributes}>'."\n".'{content}'."\n".'</form>'."\n");
|
- |
|
99 |
$squelette->setElementTemplate( '<p class="formulaire_element"><span class="form_label">'."\n".
|
- |
|
100 |
'{label}'."\n".
|
- |
|
101 |
'<!-- BEGIN required --><span style="color:red; width:5px; margin:0; padding:0;">*</span><!-- END required -->'."\n".
|
- |
|
102 |
'</span>'."\n".'{element}'."\n".
|
- |
|
103 |
'<!-- BEGIN error --><span class="erreur">{error}</span><!-- END error -->'."\n".
|
- |
|
104 |
'</p>'."\n");
|
- |
|
105 |
$squelette->setGroupElementTemplate('<p style="display:inline">{element}</p>', 'form_boutons');
|
- |
|
106 |
$squelette->setRequiredNoteTemplate("\n".'<p class="symbole_obligatoire">* : {requiredNote}</p>'."\n");
|
- |
|
107 |
//Note pour les erreurs javascript
|
- |
|
108 |
$this->setJsWarnings('Erreur de saisie', 'Veuillez verifier vos informations saisies');
|
- |
|
109 |
// Note de fin de formulaire
|
- |
|
110 |
$this->setRequiredNote('Indique les champs obligatoires');
|
97 |
$this->addElement ('text', 'nom_appl', ADAP_NOM_APPL, array ('size' => 60)) ;
|
111 |
$this->addElement ('text', 'nom_appl', ADAP_NOM_APPL, array ('size' => 35)) ;
|
98 |
$this->addRule ('nom_appl', ADAP_NOM_APPL_ALERTE, 'required', '', 'client') ;
|
112 |
$this->addRule ('nom_appl', ADAP_NOM_APPL_ALERTE, 'required', '', 'client') ;
|
99 |
|
- |
|
100 |
$this->addElement ('textarea', 'description', ADAP_DESCRIPTION, array ('cols' => 50, 'rows' => 5)) ;
|
113 |
$this->addElement ('textarea', 'description', ADAP_DESCRIPTION, array ('cols' => 50, 'rows' => 5)) ;
|
101 |
$this->addElement ('text', 'chemin', ADAP_CHEMIN, array('size' => 50)) ;
|
114 |
$this->addElement ('text', 'chemin', ADAP_CHEMIN, array('size' => 35)) ;
|
102 |
|
- |
|
- |
|
115 |
$this->addElement('html', '<br />');
|
103 |
$this->setRequiredNote('<span style="color: #ff0000">*</span>'.ADAP_CHAMPS_REQUIS) ;
|
116 |
$this->setRequiredNote(ADAP_CHAMPS_REQUIS) ;
|
104 |
// on fait un groupe avec les boutons pour les mettres sur la même ligne
|
117 |
// on fait un groupe avec les boutons pour les mettres sur la même ligne
|
105 |
$buttons[] = &HTML_QuickForm::createElement('button', 'annuler', ADAP_ANNULER, array ("onclick" => "javascript:document.location.href='".str_replace ('&', '&', $url_retour->getURL())."'"));
|
118 |
$buttons[] = &HTML_QuickForm::createElement('button', 'annuler', ADAP_ANNULER, array ("onclick" => "javascript:document.location.href='".str_replace ('&', '&', $url_retour->getURL())."'"));
|
106 |
$buttons[] = &HTML_QuickForm::createElement('submit', 'valider', ADAP_VALIDER);
|
119 |
$buttons[] = &HTML_QuickForm::createElement('submit', 'valider', ADAP_VALIDER);
|
107 |
$this->addGroup($buttons, null, null, ' ');
|
120 |
$this->addGroup($buttons, 'form_boutons', null, ' ');
|
108 |
} // end of member function _construitFormulaire
|
121 |
} // end of member function _construitFormulaire
|
109 |
} // end of HTML_formulaireProjet
|
122 |
} // end of HTML_formulaireProjet
|
110 |
?>
|
123 |
?>
|