diff --git a/htdocs/admin/adherent.php b/htdocs/admin/adherent.php index 86a7e1d5628..f35e29a6974 100644 --- a/htdocs/admin/adherent.php +++ b/htdocs/admin/adherent.php @@ -1,7 +1,7 @@ * Copyright (C) 2003 Jean-Louis Bergamo - * Copyright (C) 2004-2008 Laurent Destailleur + * Copyright (C) 2004-2009 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * @@ -159,7 +159,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 1) { $lien=img_tick().' '; $lien.=''.$langs->trans("Disable").''; - // Edition des varibales globales rattache au theme Mailman + // Edition des varibales globales rattache au theme Mailman $constantes=array('ADHERENT_MAILMAN_LISTS', 'ADHERENT_MAILMAN_LISTS_COTISANT', 'ADHERENT_MAILMAN_ADMINPW', @@ -189,7 +189,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 1) { $lien=img_tick().' '; $lien.=''.$langs->trans("Disable").''; - // Edition des varibales globales rattache au theme Mailman + // Edition des varibales globales rattache au theme Mailman $constantes=array('ADHERENT_USE_SPIP_AUTO', 'ADHERENT_SPIP_SERVEUR', 'ADHERENT_SPIP_DB', @@ -209,7 +209,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 1) } /* - * Edition des varibales globales non rattache a un theme specifique + * Edition des varibales globales non rattache a un theme specifique */ $constantes=array( 'ADHERENT_MAIL_VALID_SUBJECT', @@ -231,7 +231,7 @@ print '%DOL_MAIN_URL_ROOT%, %ID%, %PRENOM%, %NOM%, %LOGIN%, %PASSWORD%,'; print '%SOCIETE%, %ADRESSE%, %CP%, %VILLE%, %PAYS%, %EMAIL%, %NAISS%, %PHOTO%, %TYPE%,'; //print '%INFOS%'; Deprecated print '
'; - + form_constantes($constantes); @@ -268,24 +268,24 @@ function form_constantes($tableau) print ''; print ''; print ''; - + print ""; - + // Affiche nom constante print ''; print $langs->trans("Desc".$obj->name) != ("Desc".$obj->name) ? $langs->trans("Desc".$obj->name) : $obj->note; print "\n"; - + if ($obj->name == 'ADHERENT_ETIQUETTE_TYPE') { print ''; - // List of possible labels. Values must exists in + // List of possible labels. Values must exists in // file htdocs/adherents/PDF_Card.class.php require_once(DOL_DOCUMENT_ROOT.'/includes/modules/member/PDF_card.class.php'); - $pdfcard=new PDF_card('5160',1,1,'mm'); - $arrayoflabels=array_keys($pdfcard->_Avery_Labels); - - $form->select_array('constvalue',$arrayoflabels,$obj->value); + $pdfcardstatic=new PDF_card('5160',1,1,'mm'); + $arrayoflabels=array_keys($pdfcardstatic->_Avery_Labels); + + $form->select_array('constvalue',$arrayoflabels,$obj->value,1,0,1); print ''; $form->select_array('consttype',array('yesno','texte','chaine'),1); } @@ -314,16 +314,16 @@ function form_constantes($tableau) } print ''; } - + print ''; - + print '  '; // print ''.img_delete().''; print "\n"; - + print ''; $i++; - } + } } print ''; } diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index e8c18663f84..5cd49638e47 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -2409,7 +2409,7 @@ class Form * \param id Preselected key * \param show_empty 1 si il faut ajouter une valeur vide dans la liste, 0 sinon * \param key_in_label 1 pour afficher la key dans la valeur "[key] value" - * \param value_as_key 1 pour utiliser la valeur comme clé + * \param value_as_key 1 to use value as key * \param optionType Type de l'option: 1 pour des fonctions javascript * \param option Valeur de l'option en fonction du type choisi * \param translate Traduire la valeur diff --git a/htdocs/includes/modules/member/PDF_card.class.php b/htdocs/includes/modules/member/PDF_card.class.php index 96b4ae7aca2..a466264622e 100644 --- a/htdocs/includes/modules/member/PDF_card.class.php +++ b/htdocs/includes/modules/member/PDF_card.class.php @@ -179,18 +179,6 @@ class PDF_card extends FPDF { 'width'=>99.1, 'height'=>38.1, 'font-size'=>10), - 'FREELUG'=>array('name'=>'FREELUG', - 'paper-size'=>'A4', - 'metric'=>'mm', - 'marginLeft'=>0, - 'marginTop'=>0, - 'NX'=>2, - 'NY'=>8, - 'SpaceX'=>0, - 'SpaceY'=>0, - 'width'=>105, - 'height'=>38, - 'font-size'=>10), 'CARD'=>array('name'=>'CARD', 'paper-size'=>'A4', 'metric'=>'mm', @@ -225,9 +213,13 @@ class PDF_card extends FPDF { // Si c'est un format personnel alors on maj les valeurs $Tformat = $format; } else { - // Si c'est un format avery on stocke le nom de ce format selon la norme Avery. - // Permettra d'aller récupérer les valeurs dans le tableau _Avery_Labels + // If it's an Avery format, we get array that describe it from key and we store it in Tformat. $Tformat = $this->_Avery_Labels[$format]; + if (empty($Tformat)) + { + dol_print_error('','Format value "'.$format.'" is not supported.'); + exit; + } } parent::FPDF('P', $unit, $Tformat['paper-size']);