Subversion Repositories Applications.papyrus

Rev

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

Rev 1033 Rev 1497
Line 30... Line 30...
30
 
30
 
31
// Le fait que vous puissiez accéder à cet en-tête signifie que vous avez 
31
// Le fait que vous puissiez accéder à cet en-tête signifie que vous avez 
32
// pris connaissance de la licence CeCILL, et que vous en avez accepté les
32
// pris connaissance de la licence CeCILL, et que vous en avez accepté les
33
// termes.
33
// termes.
34
// ----
34
// ----
35
// CVS : $Id: adme_menu_classique.fonct.php,v 1.37 2006-10-16 15:49:07 ddelon Exp $
35
// CVS : $Id: adme_menu_classique.fonct.php,v 1.38 2007-06-26 14:18:53 florian Exp $
36
/**
36
/**
37
* Fonctions de gestion des menus classiques
37
* Fonctions de gestion des menus classiques
38
*
38
*
39
* Permet de lister, d'ajouter, de modifier, et de déplacer des menus classiques.
39
* Permet de lister, d'ajouter, de modifier, et de déplacer des menus classiques.
Line 45... Line 45...
45
//Auteur original :
45
//Auteur original :
46
*@author        Jean-Pascal MILCENT <jpm@tela-botanica.org>
46
*@author        Jean-Pascal MILCENT <jpm@tela-botanica.org>
47
//Autres auteurs :
47
//Autres auteurs :
48
*@author        Alexandre GRANIER <alexandre@tela-botanica.org>
48
*@author        Alexandre GRANIER <alexandre@tela-botanica.org>
49
*@copyright     Tela-Botanica 2000-2004
49
*@copyright     Tela-Botanica 2000-2004
50
*@version       $Revision: 1.37 $ $Date: 2006-10-16 15:49:07 $
50
*@version       $Revision: 1.38 $ $Date: 2007-06-26 14:18:53 $
51
// +------------------------------------------------------------------------------------------------------+
51
// +------------------------------------------------------------------------------------------------------+
52
*/
52
*/
Line 53... Line 53...
53
 
53
 
54
// +------------------------------------------------------------------------------------------------------+
54
// +------------------------------------------------------------------------------------------------------+
Line 522... Line 522...
522
function ADME_afficherFormMenuClassique($db, $url, $adme_site_id, $adme_menu_id, $aso_valeurs,$traduction=FALSE)
522
function ADME_afficherFormMenuClassique($db, $url, $adme_site_id, $adme_menu_id, $aso_valeurs,$traduction=FALSE)
523
{
523
{
524
    // Initialisation de variable
524
    // Initialisation de variable
525
    $url->addQueryString('adme_site_id', $adme_site_id);
525
    $url->addQueryString('adme_site_id', $adme_site_id);
526
    $url->addQueryString('adme_menu_id', $adme_menu_id);
526
    $url->addQueryString('adme_menu_id', $adme_menu_id);
-
 
527
    $script = 'function switchMenu(obj) {
-
 
528
		var el = document.getElementById(obj);
-
 
529
		if(el.style.display != "block")
-
 
530
		{
-
 
531
			el.style.display = "block";
527
    
532
		}
-
 
533
		else
-
 
534
		{
-
 
535
			el.style.display = "none";
-
 
536
		}
-
 
537
	}';
-
 
538
    GEN_stockerCodeScript($script);
528
    // Nous sommes toujours en modification car un menu est ajouté automatiquement!
539
    // Nous sommes toujours en modification car un menu est ajouté automatiquement!
529
    // Récupération des informations du menu concerné.
540
    // Récupération des informations du menu concerné.
530
    if (!isset($aso_valeurs[ADME_LG_ACTION_CLASSIQUE_VERIFIER]) && !isset($aso_valeurs[ADME_LG_ACTION_CLASSIQUE_VERIFIER_TRADUCTION])) {
541
    if (!isset($aso_valeurs[ADME_LG_ACTION_CLASSIQUE_VERIFIER]) && !isset($aso_valeurs[ADME_LG_ACTION_CLASSIQUE_VERIFIER_TRADUCTION])) {
531
        $aso_valeurs = GEN_lireInfoMenu($db, $adme_menu_id, DB_FETCHMODE_ASSOC);
542
        $aso_valeurs = GEN_lireInfoMenu($db, $adme_menu_id, DB_FETCHMODE_ASSOC);
532
        if ($aso_valeurs === false) {
543
        if ($aso_valeurs === false) {
Line 559... Line 570...
559
    // Création du formulaire
570
    // Création du formulaire
560
    // Notes : Quickform semble remplacer les & des &amp; à nouveau par des &amp; solution utiliser str_replace()...
571
    // Notes : Quickform semble remplacer les & des &amp; à nouveau par des &amp; solution utiliser str_replace()...
561
    $form =& new HTML_QuickForm('form_menu_classique', 'post', str_replace('&amp;', '&', $url->getUrl()));
572
    $form =& new HTML_QuickForm('form_menu_classique', 'post', str_replace('&amp;', '&', $url->getUrl()));
562
    $tab_index = 1000;
573
    $tab_index = 1000;
563
    $squelette =& $form->defaultRenderer();
574
    $squelette =& $form->defaultRenderer();
564
    $squelette->setFormTemplate("\n".'<form{attributes}>'."\n".'{content}'."\n".'</form>'."\n");
575
    $squelette->setFormTemplate("\n".'<form {attributes}>'."\n".'{content}'."\n".'</form>'."\n");
565
    $squelette->setElementTemplate(  '<li>'."\n".
576
	$squelette->setElementTemplate( '<p class="formulaire_element"><span class="form_label">'."\n".
566
                                    '{label}'."\n".
577
		'{label}'."\n".
567
                                    '{element}'."\n".
-
 
568
                                    '<!-- BEGIN required --><span class="symbole_obligatoire">'.ADME_LG_FORM_SYMBOLE_CHP_OBLIGATOIRE.'</span><!-- END required -->'."\n".
578
		'<!-- BEGIN required --><span style="color:red; width:5px; margin:0; padding:0;">*</span><!-- END required -->'."\n".		
-
 
579
		'</span>'."\n".'{element}'."\n".
569
                                    '<!-- BEGIN error --><span class="erreur">{error}</span><!-- END error -->'."\n".
580
		'<!-- BEGIN error --><span class="erreur">{error}</span><!-- END error -->'."\n".
570
                                    '</li>'."\n");
581
		'</p>'."\n");
-
 
582
	$squelette->setGroupElementTemplate('<p style="display:inline">{element}</p>', 'form_boutons');
571
    $squelette->setRequiredNoteTemplate("\n".'<p><span class="symbole_obligatoire">'.ADME_LG_FORM_SYMBOLE_CHP_OBLIGATOIRE.'</span> {requiredNote}</p>'."\n");
583
	$squelette->setRequiredNoteTemplate("\n".'<p class="symbole_obligatoire">*&nbsp;:&nbsp;{requiredNote}</p>'."\n");
-
 
584
	//Note pour les erreurs javascript
-
 
585
	$form->setJsWarnings('Erreur de saisie', 'Veuillez verifier vos informations saisies');
-
 
586
    // Note de fin de formulaire
-
 
587
    $form->setRequiredNote(ADME_LG_FORM_TXT_CHP_OBLIGATOIRE);
572
    
588
 
573
    $partie_menu_debut = '<fieldset>'."\n".'<legend>'.ADME_LG_FORM_MENU_CLASSIQUE_TITRE_CONFIG.'</legend>'."\n".'<ul>'."\n";
589
    $partie_menu_debut = '<fieldset>'."\n".'<legend>'.ADME_LG_FORM_MENU_CLASSIQUE_TITRE_CONFIG.'</legend>'."\n";
574
    $form->addElement('html', $partie_menu_debut);
590
    $form->addElement('html', $partie_menu_debut);
Line 575... Line -...
575
    
-
 
576
    $id = 'gm_code_num';
-
 
577
    $aso_attributs = array('id'=>$id, 'tabindex' => $tab_index++, 'size' => 5, 'maxlength' => 100);
-
 
578
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_CODE_NUM.'</label>';
-
 
579
    $form->addElement('text', $id, $label, $aso_attributs);
-
 
580
    $form->addRule($id, ADME_LG_FORM_MENU_REGLE_CODE_NUM, 'required', '', 'client');
-
 
581
    
591
    
582
    $id = 'gm_code_alpha';
592
    $id = 'gm_code_alpha';
583
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'size' => 50, 'maxlength' => 50);
593
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'size' => 35, 'maxlength' => 50);
584
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_CODE_ALPHA.'</label>';
594
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_CODE_ALPHA.'</label>';
585
    $form->addElement('text', $id, $label, $aso_attributs);
595
    $form->addElement('text', $id, $label, $aso_attributs);
Line 586... Line 596...
586
    $form->addRule($id, ADME_LG_FORM_MENU_REGLE_CODE_ALPHA, 'required', '', 'client');
596
    $form->addRule($id, ADME_LG_FORM_MENU_REGLE_CODE_ALPHA, 'required', '', 'client');
587
    
597
    
588
    $id = 'gm_nom';
598
    $id = 'gm_nom';
589
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'size' => 50, 'maxlength' => 100);
599
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'size' => 35, 'maxlength' => 100);
590
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_NOM.'</label>';
600
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_NOM.'</label>';
591
    $form->addElement('text', $id, $label, $aso_attributs);
601
    $form->addElement('text', $id, $label, $aso_attributs);
Line 592... Line -...
592
    $form->addRule($id, ADME_LG_FORM_MENU_REGLE_NOM, 'required', '', 'client');
-
 
593
    $form->applyFilter($id, 'trim');
-
 
594
    
-
 
595
    $id = 'gm_raccourci_clavier';
-
 
596
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'size' => 1, 'maxlength' => 1);
-
 
597
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_RACCOURCI.'</label>';
-
 
598
    $form->addElement('text', $id, $label, $aso_attributs);
-
 
599
    
-
 
600
    $id = 'defaut';
-
 
601
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++);
-
 
602
    if ($aso_valeurs[$id] === true) {
-
 
603
        $aso_attributs['checked'] = 'checked';
-
 
604
    }
-
 
605
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_DEFAUT.'</label>';
-
 
606
    $form->addElement('checkbox', $id, $label, '', $aso_attributs);
-
 
607
    
-
 
608
    $id = 'gm_fichier_squelette';
-
 
609
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'size' => 50, 'maxlength' => 255);
-
 
610
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_FICHIER_SQUELETTE.'</label>';
602
    $form->addRule($id, ADME_LG_FORM_MENU_REGLE_NOM, 'required', '', 'client');
611
    $form->addElement('text', $id, $label, $aso_attributs);
603
    $form->applyFilter($id, 'trim');
612
    
604
    
613
    $id = 'gm_description_resume';
605
    $id = 'gm_description_resume';
614
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'rows' => 2, 'cols' => 50);
606
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'rows' => 2, 'cols' => 50);
Line 690... Line 682...
690
    	$aso_attributs = array('id' => $id, 'tabindex' => $tab_index++);
682
    	$aso_attributs = array('id' => $id, 'tabindex' => $tab_index++);
691
    	$label = '<label for="'.$id.'">'.'Langue : '.'</label>';
683
    	$label = '<label for="'.$id.'">'.'Langue : '.'</label>';
692
    	$form->addElement('select', $id, $label, $aso_options, $aso_attributs);
684
    	$form->addElement('select', $id, $label, $aso_options, $aso_attributs);
693
    }
685
    }
Line 694... Line -...
694
    
-
 
695
    
686
    
696
    $id = 'gm_application_arguments';
687
    $id = 'gm_titre';
697
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'size' => 45, 'maxlength' => 255);
688
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'size' => 35, 'maxlength' => 255);
698
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_APPLI_ARGUMENT.'</label>';
689
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_TITRE.'</label>';
Line -... Line 690...
-
 
690
    $form->addElement('text', $id, $label, $aso_attributs);
-
 
691
    
-
 
692
    $id = 'gm_mots_cles';
-
 
693
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'rows' => 3, 'cols' => 50);
-
 
694
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_MOT_CLE.'</label>';
-
 
695
    $form->addElement('textarea', $id, $label, $aso_attributs);
-
 
696
    
-
 
697
    $id = 'gm_description_libre';
-
 
698
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'rows' => 3, 'cols' => 45);
-
 
699
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_DESCRIPTION.'</label>';
699
    $form->addElement('text', $id, $label, $aso_attributs);
700
    $form->addElement('textarea', $id, $label, $aso_attributs);
700
    
701
        
Line -... Line 702...
-
 
702
    $partie_menu_fin = "\n".'</fieldset>'."\n";
-
 
703
    $form->addElement('html', $partie_menu_fin);
-
 
704
    
-
 
705
    //Lien javascript pour cacher les options compliquées
-
 
706
    $form->addElement('html', '<a href="#" onclick="switchMenu(\'config_avancee\');" title="'.ADME_VOIR_CONFIG_AVANCEE.'">'.ADME_VOIR_CONFIG_AVANCEE.'</a><br />'."\n");
701
    $partie_menu_fin = '</ul>'."\n".'</fieldset>'."\n";
707
    
702
    $form->addElement('html', $partie_menu_fin);
708
    //début de la div cachée pour les options compliquées-----------------------------------------------
Line -... Line 709...
-
 
709
    $form->addElement('html', '<div id="config_avancee" style="display:none;">');
-
 
710
    $partie_entete_debut = '<fieldset>'."\n".'<legend>'.ADME_CONFIG_AVANCEE.'</legend>'."\n";
-
 
711
    $form->addElement('html', $partie_entete_debut);
-
 
712
    
-
 
713
    $id = 'gm_code_num';
-
 
714
    $aso_attributs = array('id'=>$id, 'tabindex' => $tab_index++, 'size' => 5, 'maxlength' => 100);
-
 
715
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_CODE_NUM.'</label>';
-
 
716
    $form->addElement('text', $id, $label, $aso_attributs);
-
 
717
    $form->addRule($id, ADME_LG_FORM_MENU_REGLE_CODE_NUM, 'required', '', 'client');
-
 
718
    
-
 
719
    $id = 'gm_raccourci_clavier';
-
 
720
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'size' => 1, 'maxlength' => 1);
-
 
721
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_RACCOURCI.'</label>';
-
 
722
    $form->addElement('text', $id, $label, $aso_attributs);
-
 
723
    
-
 
724
    $id = 'defaut';
-
 
725
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++);
-
 
726
    if ($aso_valeurs[$id] === true) {
-
 
727
        $aso_attributs['checked'] = 'checked';
-
 
728
    }
-
 
729
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_DEFAUT.'</label>';
-
 
730
    $form->addElement('checkbox', $id, $label, '', $aso_attributs);
-
 
731
    
-
 
732
    $id = 'gm_fichier_squelette';
-
 
733
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'size' => 35, 'maxlength' => 255);
-
 
734
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_FICHIER_SQUELETTE.'</label>';
-
 
735
    $form->addElement('text', $id, $label, $aso_attributs);
-
 
736
    
-
 
737
    $id = 'gm_application_arguments';
703
    
738
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'size' => 35, 'maxlength' => 255);   
704
    $partie_entete_debut = '<fieldset>'."\n".'<legend>'.ADME_LG_FORM_MENU_CLASSIQUE_TITRE_ENTETE.'</legend>'."\n".'<ul>'."\n";
739
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_APPLI_ARGUMENT.'</label>';
705
    $form->addElement('html', $partie_entete_debut);
740
    $form->addElement('text', $id, $label, $aso_attributs);
706
    
741
    
707
    $id = 'gm_robot';
742
    $id = 'gm_robot';
708
    $aso_options = array(   'index,follow' => ADME_LG_FORM_MENU_INDEX_FOLLOW,
743
    $aso_options = array(   'index,follow' => ADME_LG_FORM_MENU_INDEX_FOLLOW,
709
                            'index' => ADME_LG_FORM_MENU_INDEX,
744
                            'index' => ADME_LG_FORM_MENU_INDEX,
710
                            'noindex' => ADME_LG_FORM_MENU_NOINDEX,
745
                            'noindex' => ADME_LG_FORM_MENU_NOINDEX,
711
                            'noindex,nofollow' => ADME_LG_FORM_MENU_NOINDEX_NOFOLLOW,
746
                            'noindex,nofollow' => ADME_LG_FORM_MENU_NOINDEX_NOFOLLOW,
Line 712... Line -...
712
                            '' => ADME_LG_FORM_MENU_INDEX_VIDE);
-
 
713
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++);
-
 
714
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_ROBOT.'</label>';
-
 
715
    $form->addElement('select', $id, $label, $aso_options, $aso_attributs);
-
 
716
    
-
 
717
    $id = 'gm_titre';
747
                            '' => ADME_LG_FORM_MENU_INDEX_VIDE);
718
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'size' => 45, 'maxlength' => 255);
748
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++);
719
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_TITRE.'</label>';
749
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_ROBOT.'</label>';
720
    $form->addElement('text', $id, $label, $aso_attributs);
750
    $form->addElement('select', $id, $label, $aso_options, $aso_attributs);
Line 721... Line -...
721
    
-
 
722
    $id = 'gm_titre_alternatif';
-
 
723
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'size' => 45, 'maxlength' => 255);
-
 
724
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_TITRE_ALTERNATIF.'</label>';
-
 
725
    $form->addElement('text', $id, $label, $aso_attributs);
-
 
726
    
-
 
727
    $id = 'gm_mots_cles';
-
 
728
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'rows' => 3, 'cols' => 50);
-
 
729
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_MOT_CLE.'</label>';
-
 
Line 730... Line 751...
730
    $form->addElement('textarea', $id, $label, $aso_attributs);
751
    
731
    
752
    $id = 'gm_titre_alternatif';
732
    $id = 'gm_description_libre';
753
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'size' => 35, 'maxlength' => 255);
733
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'rows' => 3, 'cols' => 45);
754
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_TITRE_ALTERNATIF.'</label>';
Line 734... Line 755...
734
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_DESCRIPTION.'</label>';
755
    $form->addElement('text', $id, $label, $aso_attributs);
735
    $form->addElement('textarea', $id, $label, $aso_attributs);
756
    
736
    
757
    
737
    $id = 'gm_description_table_matieres';
758
    $id = 'gm_description_table_matieres';
Line 738... Line 759...
738
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'rows' => 3, 'cols' => 45);
759
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'rows' => 3, 'cols' => 45);
739
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_TABLE_MATIERE.'</label>';
760
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_TABLE_MATIERE.'</label>';
740
    $form->addElement('textarea', $id, $label, $aso_attributs);
761
    $form->addElement('textarea', $id, $label, $aso_attributs);
741
    
762
    
Line 742... Line 763...
742
    $id = 'gm_source';
763
    $id = 'gm_source';
743
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'size' => 45, 'maxlength' => 255);
764
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'size' => 35, 'maxlength' => 255);
744
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_SOURCE.'</label>';
765
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_SOURCE.'</label>';
745
    $form->addElement('text', $id, $label, $aso_attributs);
766
    $form->addElement('text', $id, $label, $aso_attributs);
Line 746... Line 767...
746
    
767
    
747
    $id = 'gm_auteur';
768
    $id = 'gm_auteur';
748
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'size' => 45, 'maxlength' => 255);
769
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'size' => 35, 'maxlength' => 255);
749
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_AUTEUR.'</label>';
770
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_AUTEUR.'</label>';
Line 750... Line 771...
750
    $form->addElement('text', $id, $label, $aso_attributs);
771
    $form->addElement('text', $id, $label, $aso_attributs);
751
    
772
    
Line 778... Line 799...
778
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'size' => 19, 'maxlength' => 19);
799
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'size' => 19, 'maxlength' => 19);
779
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_DATE_COPYRIGHT.'</label>';
800
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_DATE_COPYRIGHT.'</label>';
780
    $form->addElement('text', $id, $label, $aso_attributs);
801
    $form->addElement('text', $id, $label, $aso_attributs);
Line 781... Line 802...
781
    
802
    
782
    $id = 'gm_licence';
803
    $id = 'gm_licence';
783
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'size' => 45, 'maxlength' => 255);
804
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'size' => 35, 'maxlength' => 255);
784
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_URL_LICENCE.'</label>';
805
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_URL_LICENCE.'</label>';
Line 785... Line 806...
785
    $form->addElement('text', $id, $label, $aso_attributs);
806
    $form->addElement('text', $id, $label, $aso_attributs);
786
    
807
    
787
    $id = 'gm_categorie';
808
    $id = 'gm_categorie';
788
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'size' => 45, 'maxlength' => 100);
809
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'size' => 35, 'maxlength' => 100);
Line 789... Line 810...
789
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_CATEGORIE.'</label>';
810
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_CATEGORIE.'</label>';
790
    $form->addElement('text', $id, $label, $aso_attributs);
811
    $form->addElement('text', $id, $label, $aso_attributs);
791
    
812
    
792
    $id = 'gm_public';
813
    $id = 'gm_public';
Line 793... Line 814...
793
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'size' => 45, 'maxlength' => 255);
814
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'size' => 35, 'maxlength' => 255);
794
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_PUBLIC.'</label>';
815
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_PUBLIC.'</label>';
Line 808... Line 829...
808
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++);
829
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++);
809
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_ZG_TYPE.'</label>';
830
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_ZG_TYPE.'</label>';
810
    $form->addElement('select', $id, $label, $aso_options, $aso_attributs);
831
    $form->addElement('select', $id, $label, $aso_options, $aso_attributs);
Line 811... Line 832...
811
    
832
    
812
    $id = 'gm_portee_spatiale';
833
    $id = 'gm_portee_spatiale';
813
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'size' => 45, 'maxlength' => 100);
834
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'size' => 35, 'maxlength' => 100);
814
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_ZG_VALEUR.'</label>';
835
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_ZG_VALEUR.'</label>';
Line 815... Line 836...
815
    $form->addElement('text', $id, $label, $aso_attributs);
836
    $form->addElement('text', $id, $label, $aso_attributs);
816
    
837
    
Line 821... Line 842...
821
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++);
842
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++);
822
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_TMP_TYPE.'</label>';
843
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_TMP_TYPE.'</label>';
823
    $form->addElement('select', $id, $label, $aso_options, $aso_attributs);
844
    $form->addElement('select', $id, $label, $aso_options, $aso_attributs);
Line 824... Line 845...
824
    
845
    
825
    $id = 'gm_portee_temporelle';
846
    $id = 'gm_portee_temporelle';
826
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'size' => 45, 'maxlength' => 100);
847
    $aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'size' => 35, 'maxlength' => 100);
827
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_TMP_VALEUR.'</label>';
848
    $label = '<label for="'.$id.'">'.ADME_LG_FORM_MENU_TMP_VALEUR.'</label>';
828
    $form->addElement('text', $id, $label, $aso_attributs);
-
 
829
    
849
    $form->addElement('text', $id, $label, $aso_attributs);
830
   	
-
 
831
    
-
 
832
    
-
 
833
    $partie_entete_fin = '</ul>'."\n".'</fieldset>'."\n";
-
 
834
    $form->addElement('html', $partie_entete_fin);
-
 
835
    
850
  
836
    // Requete pour connaitre les informations sur l'administrateur ayant fait la dernière modif
851
    // Requete pour connaitre les informations sur l'administrateur ayant fait la dernière modif
837
    if (!isset($aso_valeurs[ADME_LG_ACTION_CLASSIQUE_VERIFIER]) && !isset($aso_valeurs[ADME_LG_ACTION_CLASSIQUE_VERIFIER_TRADUCTION])) {
852
    if (!isset($aso_valeurs[ADME_LG_ACTION_CLASSIQUE_VERIFIER]) && !isset($aso_valeurs[ADME_LG_ACTION_CLASSIQUE_VERIFIER_TRADUCTION])) {
838
	    $requete_admin =    'SELECT * '.
853
	    $requete_admin =    'SELECT * '.
839
    	                    'FROM gen_annuaire '.
854
    	                    'FROM gen_annuaire '.
Line 845... Line 860...
845
    	$ligne_admin = $resultat_admin->fetchRow(DB_FETCHMODE_OBJECT);
860
    	$ligne_admin = $resultat_admin->fetchRow(DB_FETCHMODE_OBJECT);
846
    	$info_admin =   '<p class="info">Dernière modification par '.$ligne_admin->ga_prenom.' '.$ligne_admin->ga_nom.'</p>';
861
    	$info_admin =   '<p class="info">Dernière modification par '.$ligne_admin->ga_prenom.' '.$ligne_admin->ga_nom.'</p>';
847
    	$form->addElement('html', $info_admin);
862
    	$form->addElement('html', $info_admin);
848
    }
863
    }
Line 849... Line 864...
849
    
864
    
850
    $liste_bouton_debut = '<ul class="liste_bouton">'."\n";
865
    //fin de la div cachée pour les options compliquées-------------------------------------------------
851
    $form->addElement('html', $liste_bouton_debut);
-
 
Line 852... Line -...
852
    
-
 
853
   
866
    $form->addElement('html', "\n".'</fieldset>'."\n".'</div>');
854
    if ($traduction) {
867
   
855
    	$form->addElement('submit', ADME_LG_ACTION_CLASSIQUE_VERIFIER_TRADUCTION, ADME_LG_FORM_MENU_VALIDER);
-
 
856
		$form->addElement('hidden', 'adme_site_id', $adme_site_id);
-
 
857
    }    
868
    $buttons[] = &HTML_QuickForm::createElement('link', 'annuler', ADME_LG_FORM_MENU_ANNULER, 
858
    else {
-
 
859
    	$form->addElement('submit', ADME_LG_ACTION_CLASSIQUE_VERIFIER, ADME_LG_FORM_MENU_VALIDER);
-
 
860
    }
869
                 str_replace ("&amp;", "&", $url->getURL()), ADME_LG_FORM_MENU_ANNULER); // Le preg_replace contourne un pb de QuickForm et Net_URL
861
	
870
                                                                                         // qui remplacent deux fois les & par des &amp;
862
    $bouton_annuler = '<li><a class="bouton" href="'.$url->getURL().'" title="'.ADME_LG_FORM_MENU_ANNULER.'" >'.ADME_LG_FORM_MENU_ANNULER.'</a>'.'</li>'."\n";
-
 
863
    $form->addElement('html', $bouton_annuler);
-
 
864
    
-
 
865
    
871
	//Bouton de validation du formulaire                                                 // ce qui fait échouer le lien
Line 866... Line 872...
866
    $liste_bouton_fin = '</ul>'."\n";
872
	$buttons[] = &HTML_QuickForm::createElement('submit', 'valider', ADME_LG_FORM_MENU_VALIDER);
Line 867... Line 873...
867
    $form->addElement('html', $liste_bouton_fin);
873
	$form->addGroup($buttons, 'form_boutons', null, '&nbsp;');
868
    
874
    
869
    $form->addElement('hidden', 'gm_id_menu', $aso_valeurs['gm_id_menu']);
-
 
870
    
-
 
871
    // Instanciation avec les valeur par défaut
-
 
Line 872... Line 875...
872
    $form->setDefaults($aso_valeurs);
875
    $form->addElement('hidden', 'gm_id_menu', $aso_valeurs['gm_id_menu']);
873
    
876
    
874
    // Note de fin de formulaire
877
    // Instanciation avec les valeur par défaut
Line 1721... Line 1724...
1721
 
1724
 
1722
 
1725
 
1723
/* +--Fin du code ----------------------------------------------------------------------------------------+
1726
/* +--Fin du code ----------------------------------------------------------------------------------------+
-
 
1727
*
-
 
1728
* $Log: not supported by cvs2svn $
-
 
1729
* Revision 1.37  2006/10/16 15:49:07  ddelon
1724
*
1730
* Refactorisation code mulitlinguisme et gestion menu invisibles
1725
* $Log: not supported by cvs2svn $
1731
*
1726
* Revision 1.36  2006/10/06 13:38:45  florian
1732
* Revision 1.36  2006/10/06 13:38:45  florian
1727
* ergonomie amélioree
1733
* ergonomie amélioree
1728
*
1734
*