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_formulaireProjet.class.php,v 1.7 2007-11-21 09:42:50 alexandre_tb Exp $ |
// CVS : $Id: HTML_formulaireProjet.class.php,v 1.8 2008-08-25 15:15:09 alexandre_tb Exp $ |
/** |
* Application projet |
* |
31,11 → 31,10 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.7 $ |
*@version $Revision: 1.8 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
|
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
46,11 → 45,6 |
require_once PAP_CHEMIN_API_PEAR.'HTML/QuickForm/checkbox.php' ; |
require_once PAP_CHEMIN_API_PEAR.'HTML/QuickForm/select.php' ; |
|
// +------------------------------------------------------------------------------------------------------+ |
// | LISTE des constantes | |
// +------------------------------------------------------------------------------------------------------+ |
|
|
/** |
* class HTML_formulaireProjet |
* Cette classe représente un formulaire pour saisir un projet ou le modifier. |
58,7 → 52,6 |
class HTML_formulaireProjet extends HTML_QuickForm |
{ |
|
|
/** |
* Constructeur |
* |
73,6 → 66,7 |
*/ |
function HTML_formulaireProjet( $formName = "", $method = "post", $action = "", $target = "_self", $attributes = "", $trackSubmit = false ) |
{ |
|
HTML_QuickForm::HTML_QuickForm($formName, $method, $action, $target, $attributes, $trackSubmit) ; |
} // end of member function HTML_formulaireProjet |
|
96,9 → 90,9 |
* @return void |
* @access public |
*/ |
function construitFormulaire(&$tableau_projet, $tableau_type = '') |
function construitFormulaire(&$tableau_projet, $tableau_type = '', $tableau_theme = '') |
{ |
$this->addElement ('text', 'projet_titre', PROJET_TITRE, array ('class' => 'projet_titre', 'maxlength' => 255)) ; |
$this->addElement ('text', 'projet_titre', PROJET_TITRE, array ('class' => 'projet_titre', 'maxlength' => 255, 'size' => '80')) ; |
$this->addRule ('projet_titre', PROJET_ALERTE_TITRE, 'required', '', 'client') ; |
if ($tableau_type != '') { |
$select = new HTML_QuickForm_select ('projet_type', PROJET_TYPE, $tableau_type, array ('class' => 'projet_type')) ; |
105,16 → 99,46 |
$this->addElement($select) ; |
unset ($select) ; |
} |
$this->addElement ('textarea', 'projet_resume', PROJET_RESUME, array('class'=>'projet_resume', 'rows'=>"10")) ; |
$this->addElement ('textarea', 'projet_description', PROJET_DESCRIPTION, array('class'=>"projet_resume", 'rows'=>"20")) ; |
$this->addElement ('text', 'projet_espace_internet', PROJET_ESPACE_INTERNET, array ('class' => 'projet_espace_internet')) ; |
/* impossible de faire fonctionner dojo Editor !!! |
* |
GEN_stockerStyleExterne('tundra', 'api/js/dojo1.0/dijit/themes/tundra/tundra.css'); |
GEN_stockerStyleExterne('dojo', 'api/js/dojo1.0/dojo/resources/dojo.css'); |
|
GEN_AttributsBody('class', 'tundra'); |
|
|
|
GEN_stockerFichierScript('dojo', 'api/js/dojo1.0/dojo/dojo.js', |
'text/javascript', |
array ('djConfig' => 'parseOnLoad: true, isDebug: true')); |
GEN_stockerFichierScript('dojo.editor', 'api/js/dojo1.0/dijit/Editor.js', 'text/javascript'); |
GEN_stockerCodeScript('dojo.config.allowXdRichTextSave = true;'); |
*/ |
$this->addElement ('textarea', 'projet_resume', PROJET_RESUME, array('class'=>'projet_resume', 'rows'=>"5", 'cols'=>'80', |
'width'=>"200", /*'dojoType' => 'dijit.Editor',*/ 'id' => 'resume_editeur')) ; |
|
$this->addElement ('textarea', 'projet_description', PROJET_DESCRIPTION, |
array('class'=>"projet_resume", 'rows'=>"20", 'cols'=>'80'/*, 'dojoType' => 'dijit.Editor'*/)) ; |
|
$this->addElement ('text', 'projet_espace_internet', PROJET_ESPACE_INTERNET, array ('class' => 'projet_espace_internet', 'size' => '80')) ; |
|
// on fait un groupe avec les boutons radio pour les mettres sur la même ligne |
|
$radio[] = &HTML_QuickForm::createElement('radio', 'projet_moderation', '0', PROJET_NON_MODERE, '0') ; |
$radio[] = &HTML_QuickForm::createElement('radio', 'projet_moderation', '1', PROJET_MODERE, '1'); |
$radio[] = & HTML_QuickForm::createElement('radio', 'projet_moderation', '0', PROJET_NON_MODERE, '0') ; |
$radio[] = & HTML_QuickForm::createElement('radio', 'projet_moderation', '1', PROJET_MODERE, '1'); |
$this->addGroup($radio, null, PROJET_INSCRIPTION, ' '); |
|
|
/** Theme du projet ajout 05/2008 */ |
//var_dump ($tableau_theme); |
if ($tableau_theme != '') { |
|
foreach ($tableau_theme as $cle => $theme) { |
$checkbox[$cle] = new HTML_QuickForm_checkbox('projet_theme['.$cle.']', '', $theme); |
$this->addElement($checkbox[$cle]); |
} |
} |
|
$label_projet = array() ; |
$id_projet = array() ; |
foreach ($tableau_projet as $projet) { |
135,15 → 159,17 |
|
// on fait un groupe avec les boutons pour les mettres sur la même ligne |
$buttons[] = &HTML_QuickForm::createElement('link', 'annuler', PROJET_FICHIER_ANNULER, |
preg_replace ("/&/", "&", $url_annuler->getURL()), PROJET_FICHIER_ANNULER); // Le preg_replace contourne un pb de QuickForm et Net_URL |
// qui remplacent deux fois les & par des & |
// ce qui fait échouer le lien |
preg_replace ("/&/", "&", $url_annuler->getURL()), PROJET_FICHIER_ANNULER); |
$buttons[] = &HTML_QuickForm::createElement('submit', 'valider', PROJET_FICHIER_VALIDER); |
$this->addGroup($buttons, null, null, ' '); |
|
} // end of member function _construitFormulaire |
} |
|
|
|
} // end of HTML_formulaireProjet |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |