Subversion Repositories Applications.papyrus

Rev

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

Rev 448 Rev 474
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_formulaireProjet.class.php,v 1.1 2005-09-22 14:02:48 ddelon Exp $
22
// CVS : $Id: HTML_formulaireProjet.class.php,v 1.2 2005-09-27 16:42:00 alexandre_tb Exp $
23
/**
23
/**
24
* Application projet
24
* Application projet
25
*
25
*
26
* La classe HTML_formulaireProjet
26
* La classe HTML_formulaireProjet
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 94... Line 94...
94
     * Ajoute les champs nécessaire au formulaire.
94
     * Ajoute les champs nécessaire au formulaire.
95
     *
95
     *
96
     * @return void
96
     * @return void
97
     * @access public
97
     * @access public
98
     */
98
     */
99
    function construitFormulaire(&$tableau_projet)
99
    function construitFormulaire(&$tableau_projet, $tableau_type = '')
100
    {
100
    {
101
        $this->addElement ('text', 'projet_titre', PROJET_TITRE, array ('size' => 60)) ;
101
        $this->addElement ('text', 'projet_titre', PROJET_TITRE, array ('class' => 'projet_titre', 'maxlength' => 255)) ;
102
        $this->addRule ('projet_titre', PROJET_ALERTE_TITRE, 'required', '', 'client') ;
102
        $this->addRule ('projet_titre', PROJET_ALERTE_TITRE, 'required', '', 'client') ;
Line 103... Line 103...
103
        
103
        
104
        $this->addElement ('textarea', 'projet_resume', PROJET_RESUME, array('cols'=>"60", 'rows'=>"10")) ;
104
        $this->addElement ('textarea', 'projet_resume', PROJET_RESUME, array('class'=>'projet_resume', 'rows'=>"10")) ;
105
        $this->addElement ('textarea', 'projet_description', PROJET_DESCRIPTION, array('cols'=>"60", 'rows'=>"40")) ;
105
        $this->addElement ('textarea', 'projet_description', PROJET_DESCRIPTION, array('class'=>"projet_resume", 'rows'=>"40")) ;
Line 106... Line 106...
106
        $this->addElement ('text', 'projet_espace_internet', PROJET_ESPACE_INTERNET, array ('size' => 60)) ;
106
        $this->addElement ('text', 'projet_espace_internet', PROJET_ESPACE_INTERNET, array ('class' => 'projet_espace_internet')) ;
107
        
107
        
108
        $label_projet = array() ;
108
        $label_projet = array() ;
109
        $id_projet = array() ;
109
        $id_projet = array() ;
110
        foreach ($tableau_projet as $projet) {
110
        foreach ($tableau_projet as $projet) {
111
            $label_projet[] = $projet->getTitre() ;
111
            $label_projet[] = $projet->getTitre() ;
112
            $id_projet[] = $projet->getId() ;
112
            $id_projet[] = $projet->getId() ;
113
        }
113
        }
114
        $select = new HTML_QuickForm_select ('projet_asso', PROJET_PERE, $label_projet) ;
114
        $select = new HTML_QuickForm_select ('projet_asso', PROJET_PERE, $label_projet, array ('class' => 'projet_asso')) ;
Line 115... Line 115...
115
        $this->addElement($select) ;
115
        $this->addElement($select) ;
116
        unset ($select) ;
116
        unset ($select) ;
-
 
117
        
-
 
118
        $this->applyFilter(array('projet_resume', 'projet_description'), 'addslashes') ;
-
 
119
        
-
 
120
        if ($tableau_type != '') {
-
 
121
            $select = new HTML_QuickForm_select ('projet_type', PROJET_TYPE, $tableau_type, array ('class' => 'projet_type')) ;
117
        
122
            $this->addElement($select) ;
118
        $this->applyFilter(array('projet_resume', 'projet_description'), 'addslashes') ;
123
            unset ($select) ;
119
       
124
        }
Line 120... Line 125...
120
        $this->setRequiredNote('<span style="color: #ff0000">*</span>'.PROJET_CHAMPS_REQUIS) ;
125
        $this->setRequiredNote('<span style="color: #ff0000">*</span>'.PROJET_CHAMPS_REQUIS) ;