Subversion Repositories Applications.papyrus

Rev

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

Rev 1361 Rev 1497
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: adwi_HTML_formulaireWikini.class.php,v 1.12 2007-04-20 13:14:05 neiluj Exp $
22
// CVS : $Id: adwi_HTML_formulaireWikini.class.php,v 1.13 2007-06-26 14:18:53 florian Exp $
23
/**
23
/**
24
*
24
*
25
* Admin Wikini
25
* Admin Wikini
26
*
26
*
27
* Classe affichage gestion des Wikini de Papyrus
27
* Classe affichage gestion des Wikini de Papyrus
Line 30... Line 30...
30
//Auteur original :
30
//Auteur original :
31
*@author        David Delon <david.delon@clapas.net>
31
*@author        David Delon <david.delon@clapas.net>
32
//Autres auteurs :
32
//Autres auteurs :
33
*@author        Aucun
33
*@author        Aucun
34
*@copyright     Tela-Botanica 2000-2004
34
*@copyright     Tela-Botanica 2000-2004
35
*@version       $Revision: 1.12 $
35
*@version       $Revision: 1.13 $
36
// +------------------------------------------------------------------------------------------------------+
36
// +------------------------------------------------------------------------------------------------------+
37
*/
37
*/
Line 38... Line 38...
38
 
38
 
Line 93... Line 93...
93
     * @return void
93
     * @return void
94
     * @access public
94
     * @access public
95
     */
95
     */
96
    function construitFormulaire($url_retour)
96
    function construitFormulaire($url_retour)
97
    {
97
    {
-
 
98
		$squelette =& $this->defaultRenderer();
-
 
99
        $squelette->setFormTemplate("\n".'<form {attributes}>'."\n".'{content}'."\n".'</form>'."\n");
-
 
100
		$squelette->setElementTemplate( '<p class="formulaire_element"><span class="form_label">'."\n".
-
 
101
			'{label}'."\n".
-
 
102
			'<!-- BEGIN required --><span style="color:red; width:5px; margin:0; padding:0;">*</span><!-- END required -->'."\n".		
-
 
103
			'</span>'."\n".'{element}'."\n".
-
 
104
			'<!-- BEGIN error --><span class="erreur">{error}</span><!-- END error -->'."\n".
-
 
105
			'</p>'."\n");
-
 
106
		$squelette->setGroupElementTemplate('<p style="display:inline">{element}</p>', 'form_boutons');
-
 
107
		$squelette->setRequiredNoteTemplate("\n".'<p class="symbole_obligatoire">*&nbsp;:&nbsp;{requiredNote}</p>'."\n");
-
 
108
		//Note pour les erreurs javascript
-
 
109
		$this->setJsWarnings('Erreur de saisie', 'Veuillez verifier vos informations saisies');
Line 98... Line 110...
98
 
110
 
99
        $this->addElement ('text', 'code_alpha_wikini', ADWI_NOM_WIKINI, array ('size' => 60)) ;
111
        $this->addElement ('text', 'code_alpha_wikini', ADWI_NOM_WIKINI, array ('size' => 35)) ;
100
        $this->addRule ('code_alpha_wikini', ADWI_NOM_WIKINI_ALERTE, 'required', '', 'client') ;
112
        $this->addRule ('code_alpha_wikini', ADWI_NOM_WIKINI_ALERTE, 'required', '', 'client') ;
-
 
113
		$this->addRule ('code_alpha_wikini', ADWI_NOM_WIKINI_NON_VALIDE, 'lettersonly', '', 'client');
-
 
114
        
-
 
115
		$script = 'function switchMenu(obj) {
-
 
116
				var el = document.getElementById(obj);
-
 
117
				if(el.style.display != "block")
-
 
118
				{
-
 
119
					el.style.display = "block";
-
 
120
				}
-
 
121
				else
-
 
122
				{
-
 
123
					el.style.display = "none";
-
 
124
				}
101
		$this->addRule ('code_alpha_wikini', ADWI_NOM_WIKINI_NON_VALIDE, 'lettersonly', '', 'client');
125
			}';
102
        // Défault : PagePrincipale
126
    	GEN_stockerCodeScript($script);
-
 
127
    	//Lien javascript pour cacher les options compliquées
103
        $this->addElement ('text', 'page', ADWI_PAGE, array ('size' => 60)) ;
128
    	$this->addElement('html', '<br /><a href="#" onclick="switchMenu(\'config_avancee\');" title="Afficher/Cacher la configuration avanc&eacute;e">Afficher/Cacher la configuration avanc&eacute;e</a><br />'."\n");
-
 
129
    
-
 
130
	    //début de la div cachée pour les options compliquées-----------------------------------------------
-
 
131
	    $this->addElement('html', '<div id="config_avancee" style="display:none;">');
104
 
132
		// Défault : PagePrincipale
105
        $this->addElement ('static', '', 'Configuration avancée : ') ;
-
 
106
 
133
        $this->addElement ('text', 'page', ADWI_PAGE, array ('size' => 35)) ;
107
        $this->addElement ('text', 'bdd_hote', ADWI_BDD_HOTE, array ('size' => 60)) ;
134
        $this->addElement ('text', 'bdd_hote', ADWI_BDD_HOTE, array ('size' => 35)) ;
108
        $this->addElement ('text', 'bdd_nom', ADWI_BDD_NOM, array ('size' => 60)) ;
135
        $this->addElement ('text', 'bdd_nom', ADWI_BDD_NOM, array ('size' => 35)) ;
109
        $this->addElement ('text', 'bdd_utilisateur', ADWI_BDD_UTILISATEUR, array ('size' => 60)) ;
136
        $this->addElement ('text', 'bdd_utilisateur', ADWI_BDD_UTILISATEUR, array ('size' => 35)) ;
110
        $this->addElement ('password', 'bdd_mdp', ADWI_BDD_MDP, array ('size' => 60)) ;
137
        $this->addElement ('password', 'bdd_mdp', ADWI_BDD_MDP, array ('size' => 35)) ;
111
        $this->addElement ('text', 'table_prefix', ADWI_TABLE_PREFIX, array ('size' => 60)) ;
138
        $this->addElement ('text', 'table_prefix', ADWI_TABLE_PREFIX, array ('size' => 35)) ;
-
 
139
        $this->addElement ('text', 'chemin', ADWI_CHEMIN, array ('size' => 35)) ;
-
 
140
		//fin de la div cachée pour les options compliquées-------------------------------------------------
112
        $this->addElement ('text', 'chemin', ADWI_CHEMIN, array ('size' => 60)) ;
141
    	$this->addElement('html', "\n".'</div>');
113
 
142
    	
Line 114... Line 143...
114
        $this->setRequiredNote('<span style="color: #ff0000">*</span>'.ADWI_CHAMPS_REQUIS) ;
143
        $this->setRequiredNote(ADWI_CHAMPS_REQUIS) ;
115
 
144
 
116
        // on fait un groupe avec les boutons pour les mettres sur la même ligne
145
        // on fait un groupe avec les boutons pour les mettres sur la même ligne
117
        $buttons[] = &HTML_QuickForm::createElement('button', 'annuler', ADWI_ANNULER, array ("onclick" => "javascript:document.location.href='".str_replace ('&amp;', '&', $url_retour->getURL())."'",
146
        $buttons[] = &HTML_QuickForm::createElement('button', 'annuler', ADWI_ANNULER, array ("onclick" => "javascript:document.location.href='".str_replace ('&amp;', '&', $url_retour->getURL())."'",
118
        												'id' => 'annuler', 'class' => 'bouton'));
147
        												'id' => 'annuler', 'class' => 'bouton'));
Line 119... Line 148...
119
        $buttons[] = &HTML_QuickForm::createElement('submit', 'valider', ADWI_VALIDER, array ('id' => 'valider', 'class' =>'bouton'));
148
        $buttons[] = &HTML_QuickForm::createElement('submit', 'valider', ADWI_VALIDER, array ('id' => 'valider', 'class' =>'bouton'));
120
        $this->addGroup($buttons, null, null, '&nbsp;');
149
        $this->addGroup($buttons, 'form_boutons', null, '&nbsp;');
121
 
150