From 6d1083412f67dee5c43e00af13a3be702facd8e1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 24 Jun 2010 18:51:37 +0000 Subject: [PATCH] Fix: Removed not translated combo box. --- htdocs/adherents/admin/adherent.php | 83 +++++++++++++++++++---------- 1 file changed, 56 insertions(+), 27 deletions(-) diff --git a/htdocs/adherents/admin/adherent.php b/htdocs/adherents/admin/adherent.php index 59fe5f778a1..bef6fb9a00e 100644 --- a/htdocs/adherents/admin/adherent.php +++ b/htdocs/adherents/admin/adherent.php @@ -23,7 +23,7 @@ /** * \file htdocs/adherents/admin/adherent.php * \ingroup adherent - * \brief Page d'administration/configuration du module Adherent + * \brief Page to setup the module Foundation * \version $Id$ */ @@ -45,7 +45,14 @@ if ($_POST["action"] == 'update' || $_POST["action"] == 'add') { if (($_POST["constname"]=='ADHERENT_CARD_TYPE' || $_POST["constname"]=='ADHERENT_ETIQUETTE_TYPE') && $_POST["constvalue"] == -1) $_POST["constvalue"]=''; - $result=dolibarr_set_const($db, $_POST["constname"],$_POST["constvalue"],$typeconst[$_POST["consttype"]],0,isset($_POST["constnote"])?$_POST["constnote"]:'',$conf->entity); + + $const=$_POST["constname"]; + $value=$_POST["constvalue"]; + if (in_array($const,array('ADHERENT_MAIL_COTIS','ADHERENT_MAIL_RESIL'))) $value=$_POST["constvalue".$const]; + $type=$_POST["consttype"]; + $constnote=isset($_POST["constnote"])?$_POST["constnote"]:''; + + $result=dolibarr_set_const($db,$const,$value,$typeconst[$type],0,$constnote,$conf->entity); if ($result < 0) { print $db->error(); @@ -126,9 +133,6 @@ print '\n"; print ''; - - - // Insertion cotisations dans compte financier $var=!$var; print '
'; @@ -156,6 +160,8 @@ print '
'; print ''; print '
'; + + /* * Mailman */ @@ -179,7 +185,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 1) } else { - $lien=''.$langs->trans("Activate").''; + $lien=''.$langs->trans("Activate").''; print_fiche_titre("Mailman mailing list system",$lien,''); } @@ -193,7 +199,7 @@ $var=!$var; if ($conf->global->ADHERENT_USE_SPIP) { $lien=img_tick().' '; - $lien.=''.$langs->trans("Disable").''; + $lien.=''.$langs->trans("Disable").''; // Edition des varibales globales rattache au theme Mailman $constantes=array('ADHERENT_USE_SPIP_AUTO', 'ADHERENT_SPIP_SERVEUR', @@ -206,7 +212,7 @@ if ($conf->global->ADHERENT_USE_SPIP) } else { - $lien=''.$langs->trans("Activate").''; + $lien=''.$langs->trans("Activate").''; print_fiche_titre("SPIP - CMS",$lien,''); } @@ -300,7 +306,7 @@ function form_constantes($tableau) print ''; print ''.$langs->trans("Description").''; print ''.$langs->trans("Value").'*'; - print ''.$langs->trans("Type").''; + print ' '; print ''.$langs->trans("Action").''; print "\n"; $var=true; @@ -320,23 +326,24 @@ function form_constantes($tableau) $sql.= " ORDER BY name ASC, entity DESC"; $result = $db->query($sql); - dol_syslog("list params sql=".$sql); + dol_syslog("List params sql=".$sql); if ($result) { $obj = $db->fetch_object($result); // Take first result of select $var=!$var; - print '
'; + print "\n".''; + + print ""; + + // Affiche nom constante + print ''; print ''; print ''; print ''; print ''; print ''; - print ""; - - // Affiche nom constante - print ''; print $langs->trans("Desc".$const) != ("Desc".$const) ? $langs->trans("Desc".$const) : ($obj->note?$obj->note:$const); print "\n"; @@ -352,38 +359,60 @@ function form_constantes($tableau) } print $form->selectarray('constvalue',$arrayoflabels,($obj->value?$obj->value:'CARD'),1,0,0); print ''; - print $form->selectarray('consttype',array('yesno','texte','chaine'),1); + print ''; + print ''; } else { print ''; - if ($obj->type == 'yesno') - { - print $form->selectyesno('constvalue',$obj->value,1); - print ''; - print $form->selectarray('consttype',array('yesno','texte','chaine'),0); - } - else if ($obj->type == 'texte') + //print 'aa'.$const; + if (in_array($const,array('ADHERENT_CARD_TEXT','ADHERENT_CARD_TEXT_RIGHT'))) { print '\n"; print ''; - print $form->selectarray('consttype',array('yesno','texte','chaine'),1); + print ''; + } + else if (in_array($const,array('ADHERENT_MAIL_COTIS','ADHERENT_MAIL_RESIL'))) + { + // Editor wysiwyg + if ($conf->fckeditor->enabled) + { + require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); + $doleditor=new DolEditor('constvalue'.$const,$obj->value,160,'dolibarr_notes','',false,false); + $doleditor->Create(); + } + else + { + print ''; + } + + print ''; + print ''; + } + else if ($obj->type == 'yesno') + { + print $form->selectyesno('constvalue',$obj->value,1); + print ''; + print ''; } else { print ''; print ''; - print $form->selectarray('consttype',array('yesno','texte','chaine'),2); + print ''; } print ''; } print ''; print '  '; // print ''.img_delete().''; - print "\n"; - print '
'; + print ""; + print "\n"; + print "\n"; $i++; } }