Subversion Repositories Applications.papyrus

Rev

Rev 229 | Rev 832 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 229 Rev 300
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.1 2004-12-13 18:07:28 alex Exp $
22
// CVS : $Id: HTML_formulaireAppli.class.php,v 1.2 2005-03-09 10:40:33 alex 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.1 $
34
*@version       $Revision: 1.2 $
35
// +------------------------------------------------------------------------------------------------------+
35
// +------------------------------------------------------------------------------------------------------+
36
*/
36
*/
Line 37... Line 37...
37
 
37
 
Line 53... Line 53...
53
 
53
 
54
/**
54
/**
55
 * class HTML_formulaireProjet
55
 * class HTML_formulaireProjet
56
 * Cette classe représente un formulaire pour saisir un projet ou le modifier.
56
 * Cette classe représente un formulaire pour saisir un projet ou le modifier.
57
 */
57
 */
58
class HTML_formulaireAuth extends HTML_QuickForm
58
class HTML_formulaireAppl extends HTML_QuickForm
59
{
59
{
60
    /**
60
    /**
61
     * Constructeur
61
     * Constructeur
62
     *
62
     *
Line 67... Line 67...
67
     * @param Array attributes Des attributs supplémentaires pour la balise <form>
67
     * @param Array attributes Des attributs supplémentaires pour la balise <form>
68
     * @param bool trackSubmit Pour repérer si la formulaire a été soumis.
68
     * @param bool trackSubmit Pour repérer si la formulaire a été soumis.
69
     * @return void
69
     * @return void
70
     * @access public
70
     * @access public
71
     */
71
     */
72
    function HTML_formulaireAuth( $formName = "",  $method = "post",  $action = "",  $target = "_self",  $attributes = "",  $trackSubmit = false )
72
    function HTML_formulaireAppl( $formName = "",  $method = "post",  $action = "",  $target = "_self",  $attributes = "",  $trackSubmit = false )
73
    {
73
    {
74
        HTML_QuickForm::HTML_QuickForm($formName, $method, $action, $target, $attributes, $trackSubmit) ;
74
        HTML_QuickForm::HTML_QuickForm($formName, $method, $action, $target, $attributes, $trackSubmit) ;
75
    } // end of member function HTML_formulaireProjet
75
    } // end of member function HTML_formulaireProjet
Line 76... Line 76...
76
 
76
 
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
        $this->addElement ('text', 'nom_auth', ADAU_NOM_AUTH, array ('size' => 60)) ;
97
        $this->addElement ('text', 'nom_appl', ADAP_NOM_APPL, array ('size' => 60)) ;
98
        $this->addRule ('nom_auth', ADAU_NOM_AUTH_ALERTE, 'required', '', 'client') ;
98
        $this->addRule ('nom_appl', ADAP_NOM_APPL_ALERTE, 'required', '', 'client') ;
Line 99... Line -...
99
        
-
 
100
        
99
        
101
        $this->addElement ('text', 'abreviation', ADAU_ABREVIATION) ;
-
 
102
        $this->addRule ('abreviation', ADAU_ABREVIATION_ALERTE, 'required', '', 'client') ;
-
 
103
        
-
 
104
        $this->addElement ('text', 'dsn', ADAU_DSN) ;
-
 
105
        $this->addRule ('dsn', ADAU_DSN_ALERTE, 'required', '', 'client') ;
-
 
106
        
-
 
107
        
-
 
108
        $this->addElement ('text', 'nom_table', ADAU_NOM_TABLE) ;
-
 
109
        $this->addRule ('nom_table', ADAU_NOM_TABLE_ALERTE, 'required', '', 'client') ;
-
 
110
        
-
 
111
        
100
        $this->addElement ('textarea', 'description', ADAP_DESCRIPTION, array ('cols' => 50, 'rows' => 5)) ;
112
        $this->addElement ('text', 'champs_login', ADAU_CHAMPS_LOGIN) ;
-
 
113
        $this->addRule ('champs_login', ADAU_CHAMPS_LOGIN_ALERTE, 'required', '', 'client') ;
-
 
114
        
-
 
115
        
-
 
116
        $this->addElement ('text', 'champs_passe', ADAU_CHAMPS_PASSE) ;
-
 
117
        $this->addRule ('champs_passe', ADAU_CHAMPS_PASSE_ALERTE, 'required', '', 'client') ;
-
 
118
        
-
 
119
        
101
        $this->addElement ('text', 'chemin', ADAP_CHEMIN, array('size' => 50)) ;
120
        $this->addElement ('text', 'cryptage', ADAU_CRYPTAGE) ;
-
 
Line 121... Line 102...
121
        $this->addRule ('cryptage', ADAU_CRYPTAGE_ALERTE, 'required', '', 'client') ;
102
        $this->addElement ('checkbox', 'applette', ADAP_APPLETTE, '', 0) ;
122
 
103
 
123
        $this->setRequiredNote('<span style="color: #ff0000">*</span>'.ADAU_CHAMPS_REQUIS) ;
104
        $this->setRequiredNote('<span style="color: #ff0000">*</span>'.ADAP_CHAMPS_REQUIS) ;
124
        // on fait un groupe avec les boutons pour les mettres sur la même ligne
105
        // on fait un groupe avec les boutons pour les mettres sur la même ligne
125
        $buttons[] = &HTML_QuickForm::createElement('button', 'annuler', ADAU_ANNULER, array ("onclick" => "javascript:document.location.href='".str_replace ('&amp;', '&', $url_retour->getURL())."'"));
106
        $buttons[] = &HTML_QuickForm::createElement('button', 'annuler', ADAP_ANNULER, array ("onclick" => "javascript:document.location.href='".str_replace ('&amp;', '&', $url_retour->getURL())."'"));
126
        $buttons[] = &HTML_QuickForm::createElement('submit', 'valider', ADAU_VALIDER);
107
        $buttons[] = &HTML_QuickForm::createElement('submit', 'valider', ADAP_VALIDER);
127
        $this->addGroup($buttons, null, null, '&nbsp;');
-
 
128
    } // end of member function _construitFormulaire
108
        $this->addGroup($buttons, null, null, '&nbsp;');
129
 
109
    } // end of member function _construitFormulaire