public function __construct(array $data = null, array $files = null) { parent::__construct($data, $files); $this->set_prefix('account'); $this->login = new SCharField(array('required' => true, 'label' => __('Login'))); $this->password = new SCharField(array('input' => 'SPasswordInput', 'required' => true, 'label' => __('Password'))); $this->password_confirmation = new SCharField(array('input' => 'SPasswordInput', 'required' => true, 'label' => __('Password confirmation'))); $this->email = new SEmailField(array('required' => true, 'label' => __('Email'))); }
$mListeServeurs->AjouterFiltreEgal(COL_JEU, $jeuId); $mListeServeurs->AjouterFiltreDifferent(COL_SUPPRIME, true); GReferentiel::AjouterReferentiel(COL_SERVEUR, $mListeServeurs, array(COL_ID, array(COL_LIBELLE, COL_LIBELLE)), $dejaCharge); $mListeTypesGroupes = new MListeTypesGroupes(); $mListeTypesGroupes->AjouterColSelection(COL_ID); $mListeTypesGroupes->AjouterColSelection(COL_LIBELLE); $mListeTypesGroupes->AjouterColOrdre(COL_LIBELLE); $mListeTypesGroupes->AjouterFiltreEgal(COL_JEU, $jeuId); GReferentiel::AjouterReferentiel(COL_TYPEGROUPE, $mListeTypesGroupes, array(COL_ID, array(COL_LIBELLE, COL_LIBELLE)), $dejaCharge); $org = new SOrganiseur(2, 1, true); $elem = new SElement($prefixIdClass . CLASSTEXTE_INFO); $elem->AjouterClasse(CLASSTEXTE_INFO); $elem->SetText(GTexte::FormaterTexteSimple(GSession::Libelle(LIBTEXT_GPE_NOUVGPEDESC, false, true))); $org->AttacherCellule(1, 1, $elem); // Construction du formulaire. $form = new SForm($prefixIdClass, 2, 1); $form->SetCadreInputs(1, 1, 5, 6); $form->FusionnerCelluleCadre(1, 1, 1, 1); $form->FusionnerCelluleCadre(1, 3, 0, 3); $form->FusionnerCelluleCadre(2, 3, 0, 3); $form->FusionnerCelluleCadre(3, 1, 0, 1); $form->FusionnerCelluleCadre(3, 3, 0, 1); $form->FusionnerCelluleCadre(3, 5, 0, 1); $form->FusionnerCelluleCadre(4, 1, 0, 5); $form->FusionnerCelluleCadre(5, 1, 0, 5); $img = $form->AjouterInputImage(1, 1, GSession::Libelle(LIB_GPE_ICONE), '', false, GContexte::FormaterVariable($nomContexte, COL_ICONE), PATH_IMAGES . 'Jeu/', '', GSession::Libelle(LIB_GPE_ICONEINFO), '', TYPEFICHIER_IMAGEGLOBALE_JEU, $nomContexte); $img->AjouterElementsFromListe(COL_ICONE); $form->AjouterInputText(1, 3, GSession::Libelle(LIB_GPE_NOM), '', true, GContexte::FormaterVariable($nomContexte, COL_NOM), '', 1, 100, 50, false, '', GSession::Libelle(LIB_GPE_NOMINFO), GSession::Libelle(LIB_GPE_NOMERREUR), INPUTTEXT_REGEXP_TOUT_FV); $select = $form->AjouterInputSelect(2, 3, GSession::Libelle(LIB_GPE_JEU), INPUTSELECT_TYPE_FIND, true, GContexte::FormaterVariable($nomContexte, COL_JEU), GSession::Libelle(LIB_GPE_JEUINFO), GSession::Libelle(LIB_GPE_JEUERREUR), $nomContexte . COL_JEU, $nomContexte . COL_SERVEUR . ';' . $nomContexte . COL_TYPEGROUPE); $select->AjouterElementsFromListe(COL_JEU, COL_ID, array(COL_LIBELLE, COL_LIBELLE), '', $jeuId); $select = $form->AjouterInputSelect(3, 1, GSession::Libelle(LIB_GPE_SERVEUR), '', false, GContexte::FormaterVariable($nomContexte, COL_SERVEUR), '', '', $nomContexte . COL_SERVEUR, '', $nomContexte . COL_JEU, AJAXFONC_CHARGERREFERENTIELCONTEXTE, 'contexte=' . $nomContexte);
// Construction des 2 listes du formulaire. $mListeServeurs = new MListeServeurs(); GReferentiel::AjouterReferentiel(COL_SERVEUR, $mListeServeurs, array(COL_ID, array(COL_LIBELLE, COL_LIBELLE)), true); $cListeJeuServeurs = new CListeJeuServeurs(PIC_NJEU, COL_SERVEUR, $nomContexte); $cListeJeuServeurs->InjecterListeObjetsMetiers($mListeServeurs, true); $mListeTypesGroupes = new MListeTypesGroupes(); GReferentiel::AjouterReferentiel(COL_TYPEGROUPE, $mListeTypesGroupes, array(COL_ID, array(COL_LIBELLE, COL_LIBELLE)), true); $cListeJeuTypesGroupes = new CListeJeuTypesGroupes(PIC_NJEU, COL_TYPEGROUPE, $nomContexte); $cListeJeuTypesGroupes->InjecterListeObjetsMetiers($mListeTypesGroupes, true); $org = new SOrganiseur(2, 1, true); $elem = new SElement($prefixIdClass . CLASSTEXTE_INFO); $elem->AjouterClasse(CLASSTEXTE_INFO); $elem->SetText(GTexte::FormaterTexteSimple(GSession::Libelle(LIBTEXT_JEU_NOUVJEUDESC, false, true))); $org->AttacherCellule(1, 1, $elem); // Construction du formulaire. $form = new SForm(PIC_NJEU, 3, 1); $form->SetCadreInputs(1, 1, 9, 2); $form->FusionnerCelluleCadre(2, 1, 0, 1); $form->FusionnerCelluleCadre(3, 1, 0, 1); $form->FusionnerCelluleCadre(4, 1, 0, 1); $form->FusionnerCelluleCadre(5, 1, 0, 1); $form->FusionnerCelluleCadre(7, 1, 0, 1); $form->FusionnerCelluleCadre(8, 1, 0, 1); $form->FusionnerCelluleCadre(9, 1, 0, 1); $img = $form->AjouterInputImage(1, 1, GSession::Libelle(LIB_JEU_ICONE), '', false, GContexte::FormaterVariable($nomContexte, COL_ICONE), PATH_IMAGES . 'Jeu/', '', GSession::Libelle(LIB_JEU_ICONEINFO), '', TYPEFICHIER_IMAGEGLOBALE_JEU, $nomContexte); $img->AjouterElementsFromListe(COL_ICONE); $form->AjouterInputText(1, 2, GSession::Libelle(LIB_JEU_NOM), '', true, GContexte::FormaterVariable($nomContexte, array(COL_LIBELLE, COL_LIBELLE)), '', 1, 100, 50, false, '', GSession::Libelle(LIB_JEU_NOMINFO), GSession::Libelle(LIB_JEU_NOMERREUR), INPUTTEXT_REGEXP_TOUT_FV); $select = $form->AjouterInputSelect(2, 1, GSession::Libelle(LIB_JEU_TYPEJEU), '', true, GContexte::FormaterVariable($nomContexte, COL_TYPEJEU), GSession::Libelle(LIB_JEU_TYPEJEUINFO), GSession::Libelle(LIB_JEU_TYPEJEUERREUR), $nomContexte . COL_TYPEJEU); $select->AjouterElementsFromListe(COL_TYPEJEU, COL_ID, array(COL_LIBELLE, COL_LIBELLE), array(COL_DESCRIPTION, COL_LIBELLE)); $form->AjouterInputCheckbox(3, 1, GSession::Libelle(LIB_JEU_NECBOSS), '', false, GContexte::FormaterVariable($nomContexte, COL_NECESSITEBOSS), GSession::Libelle(LIB_JEU_NECBOSSINFO)); $form->AjouterInputCheckbox(4, 1, GSession::Libelle(LIB_JEU_NECCLASSE), '', false, GContexte::FormaterVariable($nomContexte, COL_NECESSITECLASSE), GSession::Libelle(LIB_JEU_NECCLASSEINFO));
<?php require_once 'cst.php'; require_once INC_GSESSION; require_once INC_SFORM; require_once PATH_METIER . 'mListeLangues.php'; $mListeLangues = new MListeLangues(false); $mListeLangues->AjouterColSelection(COL_ID); $mListeLangues->AjouterColSelection(COL_LIBELLE); $mListeLangues->AjouterColOrdre(COL_LIBELLE); GReferentiel::AjouterReferentiel(COL_LANGUE, $mListeLangues, array(COL_ID, array(COL_LIBELLE, COL_LIBELLE))); if ($dejaCharge === false) { $selectLangue = new SForm('sellan', 1, 1); $selectLangue->SetCadreInputs(1, 1, 1, 1); $select = $selectLangue->AjouterInputSelect(1, 1, GSession::Libelle(LIB_CON_LANGUE), '', true, GContexte::FormaterVariable($nomContexte, 'langue')); $select->AjouterElementsFromListe(COL_LANGUE, COL_ID, array(COL_LIBELLE, COL_LIBELLE), '', GSession::Langue(COL_ID)); GContexte::AjouterContenu(CADRE_INFO_LANGUE, $selectLangue); } else { GReferentiel::GetDifferentielReferentielForSelect(COL_LANGUE, COL_ID, array(COL_LIBELLE, COL_LIBELLE)); }
public function __construct(array $data = null, array $files = null) { parent::__construct($data, $files); $this->set_prefix('user'); $this->email = new SEmailField(array('required' => true, 'label' => __('Email'))); }
$creerJoueurForm->AjouterInputText(1, 1, GSession::Libelle(LIB_CON_EMAIL), '', true, GContexte::FormaterVariable(CONT_CONNEXION, 'login'), '', 1, 70, 70, false, '', GSession::Libelle(LIB_CON_EMAILINFO), GSession::Libelle(LIB_CON_EMAILERREUR), INPUTTEXT_REGEXP_EMAIL_FV); $creerJoueurForm->AjouterInputText(2, 1, GSession::Libelle(LIB_CON_MOTDEPASSE), INPUTTEXT_TYPE_PASSWORD, true, GContexte::FormaterVariable(CONT_CONNEXION, 'motDePasse'), '', 5, 20, 20, false, '', GSession::Libelle(LIB_CON_MOTDEPASSEINFO), GSession::Libelle(LIB_CON_MOTDEPASSEERREUR)); $creerJoueurForm->AjouterInputText(3, 1, GSession::Libelle(LIB_CON_PSEUDO), '', true, GContexte::FormaterVariable(CONT_CONNEXION, 'pseudo'), '', 1, 30, 30, false, '', GSession::Libelle(LIB_CON_PSEUDOINFO), GSession::Libelle(LIB_CON_PSEUDOERREUR)); $label = $creerJoueurForm->AjouterInputLabel(6, 1, GSession::Libelle(LIB_CON_DATENAISSANCE)); $label->AjouterInputText(GSession::Libelle(LIB_CON_ANNEE), '', false, GContexte::FormaterVariable(CONT_CONNEXION, 'annee'), '', 1, 4, 4, false, '', '', '', INPUTTEXT_REGEXP_DECIMAL_FV, 1900, intval(date('Y'))); $label->AjouterInputText(GSession::Libelle(LIB_CON_MOIS), '', false, GContexte::FormaterVariable(CONT_CONNEXION, 'mois'), '', 1, 2, 2, false, '', '', '', INPUTTEXT_REGEXP_DECIMAL_FV, 1, 12); $label->AjouterInputText(GSession::Libelle(LIB_CON_JOUR), '', false, GContexte::FormaterVariable(CONT_CONNEXION, 'jour'), '', 1, 2, 2, false, '', '', '', INPUTTEXT_REGEXP_DECIMAL_FV, 1, 31); $creerJoueurForm->SetCadreBoutons(2, 1, 1, 2); $creerJoueurForm->AjouterInputButtonValiderAjaxContexte(1, 1, CONT_CONNEXION, 'CreerJoueur'); $creerJoueurForm->AjouterInputButtonAnnuler(1, 2); $connexionForm = new SForm('connexion', 1, 2); $connexionForm->SetCadreInputs(1, 1, 1, 2); $select = $connexionForm->AjouterInputNewText(1, 1, GSession::Libelle(LIB_CON_EMAIL), true, GContexte::FormaterVariable(CONT_CONNEXION, 'login'), '', 1, 70, 20, false, '', '', '', INPUTTEXT_REGEXP_EMAIL_FV); $select->AjouterFormulaire(GSession::Libelle(LIB_CON_CREERCOMPTE), $creerJoueurForm); $connexionForm->AjouterInputText(1, 2, GSession::Libelle(LIB_CON_MOTDEPASSE), INPUTTEXT_TYPE_PASSWORD, true, GContexte::FormaterVariable(CONT_CONNEXION, 'motDePasse'), '', 5, 20, 10, false, '', '', ''); $connexionForm->SetCadreBoutons(1, 2, 1, 1); $bouton = $connexionForm->AjouterInputButton(1, 1, '', GSession::Libelle(LIB_CON_CONNEXION), GSession::Libelle(LIB_CON_CONNEXION), true, AJAXFONC_CHARGERCONTEXTES, true, true); $bouton->AjouterParamRetour('contextes[0]', CONT_CONNEXION); GContexte::AjouterContenu(CADRE_INFO_JOUEUR, $connexionForm); } else { if (GDroit::EstConnecte(false) === true && (GSession::Connecte() === false || $dejaCharge === false)) { GSession::Connecte(true); $connecteForm = new SForm('connecte', 1, 2); $connecteForm->SetCadreInputs(1, 1, 1, 1); $connecteForm->AjouterInputInfo(1, 1, GSession::Libelle(LIB_CON_PSEUDO), GSession::Joueur(COL_PSEUDO), true); $connecteForm->SetCadreBoutons(1, 2, 1, 1); $bouton = $connecteForm->AjouterInputButton(1, 1, '', GSession::Libelle(LIB_CON_DECONNEXION), GSession::Libelle(LIB_CON_DECONNEXION), true, AJAXFONC_CHARGERCONTEXTES, true, true); $bouton->AjouterParamRetour('contextes[0]', CONT_DECONNEXION); GContexte::AjouterContenu(CADRE_INFO_JOUEUR, $connecteForm); } }
<?php require_once 'cst.php'; require_once INC_GSESSION; require_once INC_SFORM; require_once INC_SCADRE; $activationInfo = new SElement(CLASSTEXTE_INFO); $activationInfo->SetText(GSession::Libelle(LIB_ACT_INFOACTIVATION)); $activationForm = new SForm('activation', 2, 1, false); $activationForm->SetCadreInputs(1, 1, 1, 1, false); $activationForm->AjouterInputText(1, 1, GSession::Libelle(LIB_ACT_CODEACTIVATION), '', true, GContexte::FormaterVariable($nomContexte, 'codeActivation'), '', 1, 40, 40, false, '', GSession::Libelle(LIB_ACT_CODEACTIVATIONINFO)); $activationForm->SetCadreBoutons(2, 1, 1, 1); $activationForm->AjouterInputButtonModifierDansContexte(1, 1, CONT_ACTIVATION, true); $activationOrg = new SOrganiseur(2, 1); $activationOrg->AttacherCellule(1, 1, $activationInfo); $activationOrg->AttacherCellule(2, 1, $activationForm); $activationCadre = new SCadre('activation', GSession::Libelle(LIB_ACT_ACTIVATIONCOMPTE), $activationOrg, true, true); GContexte::AjouterContenu(CADRE_CONTENU_CONTENU, $activationCadre);
$cListeModificationPresentation = new cListeModificationPresentation('', 'ModifPres', $nomContexte, -1, -1, false, '', true, '', '', '', '', '', '', '', AJAXFONC_RECHARGER); $libelle = GSession::Libelle(LIB_PRS_CHAMP, true, true); $cListeModificationPresentation->AjouterElement($libelle . '10', $libelle, '', $libelle, $libelle, $libelle); $cListeModificationPresentation->AjouterElement($libelle . '11', $libelle, '', $libelle, $libelle, $libelle); $cListeModificationPresentation->AjouterElement($libelle . '12', $libelle, '', $libelle, $libelle, $libelle); $cadre = new SCadre('', GSession::Libelle(LIB_PRS_LISTES), $cListeModificationPresentation, true, false); $vue->AttacherCellule(3, 1, $cadre); $classeur = new SClasseur('', 'presex', true, true); GContexte::AjouterOnglet('presex', GSession::Libelle(LIB_PRS_ONGLET), '', '', '', true, false); GContexte::AjouterOnglet('presex', GSession::Libelle(LIB_PRS_ONGLET), '', '', '', true, false); GContexte::AjouterOnglet('presex', GSession::Libelle(LIB_PRS_ONGLET), '', '', '', true, false); $cadre = new SCadre('', GSession::Libelle(LIB_PRS_TABONGLETS), $classeur, true, false); $vue->AttacherCellule(4, 1, $cadre); $cListeCssParties->AjouterElement(GSession::Libelle(LIB_PRS_PRESGEN, false, true), $vue); /*********************************************/ $form = new SForm($prefixIdClass, 2, 1, true, false); $form->SetCadreInputs(1, 1, 1, 1); $form->AjouterInput(1, 1, '', $cListeCssParties, false); $form->SetCadreBoutons(2, 1, 1, 1); $form->AjouterInputButtonModifierDansContexte(1, 1, $nomContexte, false, GSession::Libelle(LIB_PRS_SAUVEGARDER)); GContexte::AjouterContenu(CADRE_CONTENU_CONTENU, $form); $mListePresentationsModules = new mListePresentationsModules(); $mListePresentationsModules->AjouterColSelection(COL_RESSOURCEJS); $mListePresentationsModules->AjouterFiltreEgal(COL_PRESENTATION, $presentationModif); $numJointure = $mListePresentationsModules->AjouterJointure(COL_TYPEPRESENTATIONMODULE, COL_ID, 0, SQL_RIGHT_JOIN); $mListePresentationsModules->AjouterColSelectionPourJointure($numJointure, COL_ID); $mListePresentationsModules->AjouterFiltreEgalPourJointure($numJointure, COL_ACTIF, true); $mListePresentationsModules->Charger(); foreach ($mListePresentationsModules->GetListe() as $mPresentationModule) { if ($mPresentationModule->RessourceJS() != NULL) { GReponse::AjouterElementJS($mPresentationModule->TypePresentationModule()->Id(), PATH_SERVER_HTTP . $mPresentationModule->RessourceJS(), true);
$form->AjouterInputFile(3, 1, 'Image:', '', false, 1, 'Fichier image.', '', INPUTFILE_TYPE_IMAGEPERSO); $select = $form->AjouterInputNewSelect(3, 4, 'Jeu:', false, 'Le jeu auquel tu joues.', '', 'JEU', '', ''); $select->AjouterCategorie(1, 'RPG'); $select->AjouterElement(1, 'Guild War', 'Jeu avec des PPBL.'); $select->AjouterElement(2, 'Warhammer', 'Jeu avec des nains.', true); $select->AjouterElement(3, 'World of Warcraft', 'Jeu avec des gnomes.'); $select->AjouterCategorie(2, 'RTS'); $select->AjouterElement(4, 'Age of Empires', 'Jeu avec des paysans.'); $select->AjouterElement(5, 'Warcraft 3', 'Jeu avec des elfes.'); $select->AjouterFormulaire('Créer Jeu', $sousForm); $form->SetCadreBoutons(2, 1, 2, 1); $form->AjouterInputButton(1, 1, '', 'Valider', 'Validation en cours', true, 'test', true, true); $form->AjouterInputButton(2, 1, '', 'Annuler', '', '', 'alert', false, true); echo $form->BuildHTML(); echo "\n\n"; $form = new SForm('form', 2, 1); $form->SetCadreInputs(1, 1, 3, 6); $form->FusionnerCelluleCadre(1, 1, 0, 2); $form->FusionnerCelluleCadre(1, 4, 0, 2); $form->FusionnerCelluleCadre(2, 1, 0, 1); $form->FusionnerCelluleCadre(2, 3, 0, 1); $form->FusionnerCelluleCadre(2, 5, 0, 1); $form->FusionnerCelluleCadre(3, 1, 0, 5); $select = $form->AjouterInputSelect(1, 1, 'Jeu:'); $select->AjouterElement(1, 'Guild War', 'Jeu gratuit.'); $select->AjouterElement(2, 'Warhammer', 'Jeu avec des nains.', true); $select->AjouterElement(3, 'World of Warcraft', 'Jeu avec des gnomes.'); $select = $form->AjouterInputSelect(1, 4, 'Jeu:', '', true, 'Le jeu auquel tu joues.', 'Il faut choisir un jeu.', 'JEU', '', ''); $select->AjouterCategorie(1, 'RPG'); $select->AjouterElement(1, 'Guild War', 'Jeu avec des PPBL.'); $select->AjouterElement(2, 'Warhammer', 'Jeu avec des nains.', true);
<?php require_once 'cst.php'; require_once INC_GSESSION; require_once INC_SFORM; require_once PATH_METIER . 'mListeCommunautes.php'; $mListeCommunautes = new MListeCommunautes(false); $mListeCommunautes->AjouterColSelection(COL_ID); $mListeCommunautes->AjouterColSelection(COL_LIBELLE); $mListeCommunautes->AjouterColOrdre(COL_LIBELLE); GReferentiel::AjouterReferentiel(COL_COMMUNAUTE, $mListeCommunautes, array(COL_ID, array(COL_LIBELLE, COL_LIBELLE))); if ($dejaCharge === false) { $selectCommunaute = new SForm('selcom', 1, 1); $selectCommunaute->SetCadreInputs(1, 1, 1, 1); $select = $selectCommunaute->AjouterInputSelect(1, 1, GSession::Libelle(LIB_CON_COMMUNAUTE), '', true, GContexte::FormaterVariable($nomContexte, 'communaute')); $select->AjouterElementsFromListe(COL_COMMUNAUTE, COL_ID, array(COL_LIBELLE, COL_LIBELLE), '', GSession::Communaute(COL_ID)); GContexte::AjouterContenu(CADRE_INFO_COMMUNAUTE, $selectCommunaute); } else { GReferentiel::GetDifferentielReferentielForSelect(COL_COMMUNAUTE, COL_ID, array(COL_LIBELLE, COL_LIBELLE)); }
$elemInfoPresActive->AjouterClasse(CLASSTEXTE_INFO); $elemInfoPresActive->SetText(GTexte::FormaterTexteSimple(GSession::Libelle(LIBTEXT_PRS_PRESACTIVE, false, true))); $elemInfoPresModif = new SElement($prefixIdClass . CLASSTEXTE_INFO); $elemInfoPresModif->AjouterClasse(CLASSTEXTE_INFO); $elemInfoPresModif->SetText(GTexte::FormaterTexteSimple(GSession::Libelle(LIBTEXT_PRS_PRESMODIF, false, true))); //$rechargeFonc = AJAXFONC_CHARGERREFERENTIELCONTEXTE; //$rechargeParam = 'contexte='.$nomContexte; $changeFonc = AJAXFONC_MODIFIERDANSCONTEXTE; $changeParam = 'cf=' . GSession::NumCheckFormulaire() . '&contexte=' . $nomContexte; $selectPresActive = new SForm($prefixIdClass, 1, 2, true, false); $selectPresActive->SetCadreInputs(1, 1, 1, 1); $select = $selectPresActive->AjouterInputSelect(1, 1, GSession::Libelle(LIB_PRS_PRESACTIVE), '', true, GContexte::FormaterVariable($nomContexte, COL_PRESENTATION . 'active'), '', '', '', '', '', '', '', $changeFonc, $changeParam); $select->AjouterElementsFromListe(COL_PRESENTATION . 'active', COL_ID, COL_NOM, '', GSession::PresentationActive()); $selectPresActive->SetCadreBoutonsCache(1, 2); $elemPresActive = new SCentreur($selectPresActive); $selectPresModif = new SForm($prefixIdClass, 1, 2, false, false); $selectPresModif->SetCadreInputs(1, 1, 1, 1); $select = $selectPresModif->AjouterInputNewSelect(1, 1, GSession::Libelle(LIB_PRS_PRESMODIF), true, GContexte::FormaterVariable($nomContexte, COL_PRESENTATION . 'modif'), '', '', '', '', '', '', '', $changeFonc, $changeParam); $formCreerPres = new SForm($prefixIdClass, 2, 1); $formCreerPres->SetCadreInputs(1, 1, 1, 1); $formCreerPres->AjouterInputText(1, 1, GSession::Libelle(LIB_PRS_NOM), '', true, GContexte::FormaterVariable($nomContexte, COL_NOM), '', 1, 200, 40); $formCreerPres->SetCadreBoutons(2, 1, 1, 2); $bouton = $formCreerPres->AjouterInputButtonAjouterAuContexte(1, 1, $nomContexte); $bouton->AjouterParamRetour('nouvPres', '1'); $formCreerPres->AjouterInputButtonAnnuler(1, 2); $select->AjouterFormulaire(GSession::Libelle(LIB_PRS_CREERPRES), $formCreerPres); $select->AjouterElementsFromListe(COL_PRESENTATION . 'modif', COL_ID, COL_NOM, '', GSession::PresentationModif()); $selectPresModif->SetCadreBoutonsCache(1, 2); $elemPresModif = new SCentreur($selectPresModif); $classeurPres = new SClasseur($prefixIdClass, 'pres', true, true); $mListe = new MListeTypesPresentationsModules();
$mGroupe->Nom(GSession::Groupe(COL_NOM)); $mGroupe->Description(GSession::Groupe(COL_DESCRIPTION)); if ($mJeu !== NULL) { $mGroupe->Jeu()->Id($mJeu->Id()); $mGroupe->Jeu()->Libelle($mJeu->Libelle()); } $mListeGroupes->AjouterElement($mGroupe); } if ($dejaCharge === false) { $rechargeFonc = AJAXFONC_CHARGERREFERENTIELCONTEXTE; $rechargeParam = 'contexte=' . $nomContexte; $changeFonc = AJAXFONC_MODIFIERDANSCONTEXTE; $changeParam = 'cf=' . GSession::NumCheckFormulaire() . '&contexte=' . $nomContexte; GReferentiel::AjouterReferentiel(COL_JEU, $mListeJeux, array(COL_ID, array(COL_LIBELLE, COL_LIBELLE)), true); GReferentiel::AjouterReferentiel(COL_GROUPE, $mListeGroupes, array(COL_ID, COL_NOM, COL_DESCRIPTION, COL_JEU), true); $selectGroupe = new SForm(PIC_LOC, 1, 2, false, false); $selectGroupe->SetCadreInputs(1, 1, 1, 2); $select = $selectGroupe->AjouterInputSelect(1, 1, GSession::Libelle(LIB_CON_JEU), INPUTSELECT_TYPE_FIND, true, GContexte::FormaterVariable($nomContexte, COL_JEU), '', '', $nomContexte . COL_JEU, '', '', $rechargeFonc, $rechargeParam, $changeFonc, $changeParam); $select->AjouterElementsFromListe(COL_JEU, COL_ID, array(COL_LIBELLE, COL_LIBELLE), '', $jeuId); $select = $selectGroupe->AjouterInputSelect(1, 2, GSession::Libelle(LIB_CON_GROUPE), INPUTSELECT_TYPE_FIND, true, GContexte::FormaterVariable($nomContexte, COL_GROUPE), '', '', $nomContexte . COL_GROUPE, '', '', $rechargeFonc, $rechargeParam, $changeFonc, $changeParam); $select->AjouterReference(COL_GROUPE); $select->AjouterCategorie(0, 'Groupes généraux'); $mTypeGroupe = new MTypeGroupe(TYPEGROUPE_COMMUNAUTE); $mTypeGroupe->AjouterColSelection(COL_LIBELLE); $mTypeGroupe->Charger(); $select->AjouterElement(-1, $mTypeGroupe->Libelle(), '', GSession::Groupe(COL_TYPEGROUPE) === TYPEGROUPE_COMMUNAUTE, false); if (GSession::Jeu(COL_ID) != NULL) { $mTypeGroupe = new MTypeGroupe(TYPEGROUPE_JEU); $mTypeGroupe->AjouterColSelection(COL_LIBELLE); $mTypeGroupe->Charger(); $select->AjouterElement(-2, $mTypeGroupe->Libelle(), '', GSession::Groupe(COL_TYPEGROUPE) === TYPEGROUPE_JEU, false);
public function __construct(array $data = null, array $files = null) { parent::__construct($data, $files); $this->set_prefix('comment'); $this->body = new STextField(array('required' => true, 'label' => __('Message'), 'input_attrs' => array('cols' => 80, 'rows' => 5))); $this->attachment = new SFileField(array('required' => false, 'label' => __('Attach a file'))); }