From a1cccc021ed1c6c963680ea62044c014bc304337 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sat, 12 Nov 2016 09:48:34 +0100 Subject: [PATCH 01/18] Fix: missing encrypt data for llx_const --- htdocs/install/mysql/migration/3.8.0-3.9.0.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/install/mysql/migration/3.8.0-3.9.0.sql b/htdocs/install/mysql/migration/3.8.0-3.9.0.sql index 1a776c27e66..86d2549a8bc 100755 --- a/htdocs/install/mysql/migration/3.8.0-3.9.0.sql +++ b/htdocs/install/mysql/migration/3.8.0-3.9.0.sql @@ -22,7 +22,7 @@ -- -- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup); -insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_ENABLE_LOG_TO_HTML','0','chaine','If this option is set to 1, it is possible to see log output at end of HTML sources by adding paramater logtohtml=1 on URL',1,0); +insert into llx_const (name, value, type, note, visible, entity) values (__ENCRYPT('MAIN_ENABLE_LOG_TO_HTML')__,__ENCRYPT('0')__,'chaine','If this option is set to 1, it is possible to see log output at end of HTML sources by adding paramater logtohtml=1 on URL',1,0); -- Was done into a 3.8 fix, so we must do it also in 3.9 @@ -61,7 +61,7 @@ update llx_opensurvey_sondage set format = 'D' where format = 'D+'; update llx_opensurvey_sondage set format = 'A' where format = 'A+'; INSERT INTO llx_const (name, value, type, note, visible) values (__ENCRYPT('MAIN_DELAY_EXPENSEREPORTS_TO_PAY')__,__ENCRYPT('31')__,'chaine','Tolérance de retard avant alerte (en jours) sur les notes de frais impayées',0); -INSERT INTO llx_const (name, value, type, note, visible) values ('MAIN_SIZE_SHORTLISTE_LIMIT','4','chaine','Longueur maximum des listes courtes (fiche client)',0); +INSERT INTO llx_const (name, value, type, note, visible) values (__ENCRYPT('MAIN_SIZE_SHORTLISTE_LIMIT')__,__ENCRYPT('4')__,'chaine','Longueur maximum des listes courtes (fiche client)',0); ALTER TABLE llx_accounting_system MODIFY COLUMN pcg_version varchar(32); ALTER TABLE llx_accountingaccount MODIFY COLUMN fk_pcg_version varchar(32); From 5b49b7bca0ccd265424de8b5fb7af3b75f9d4239 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 22 Nov 2016 21:06:44 +0100 Subject: [PATCH 02/18] FIX #6010 --- htdocs/public/paypal/paymentko.php | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/htdocs/public/paypal/paymentko.php b/htdocs/public/paypal/paymentko.php index f21b2d2409c..4bad572ed8b 100644 --- a/htdocs/public/paypal/paymentko.php +++ b/htdocs/public/paypal/paymentko.php @@ -51,6 +51,13 @@ $langs->load("companies"); $langs->load("paybox"); $langs->load("paypal"); +$PAYPALTOKEN=GETPOST('TOKEN'); +if (empty($PAYPALTOKEN)) $PAYPALTOKEN=GETPOST('token'); +$PAYPALPAYERID=GETPOST('PAYERID'); +if (empty($PAYPALPAYERID)) $PAYPALPAYERID=GETPOST('PayerID'); +$PAYPALFULLTAG=GETPOST('FULLTAG'); +if (empty($PAYPALFULLTAG)) $PAYPALFULLTAG=GETPOST('fulltag'); + /* * Actions @@ -73,6 +80,18 @@ dol_syslog("POST=".$tracepost, LOG_DEBUG, 0, '_paypal'); // Send an email if (! empty($conf->global->PAYPAL_PAYONLINE_SENDEMAIL)) { + // Get on url call + $token = $PAYPALTOKEN; + $fulltag = $PAYPALFULLTAG; + $payerID = $PAYPALPAYERID; + // Set by newpayment.php + $paymentType = $_SESSION['PaymentType']; + $currencyCodeType = $_SESSION['currencyCodeType']; + $FinalPaymentAmt = $_SESSION["Payment_Amount"]; + // From env + $ipaddress = $_SESSION['ipaddress']; + + $sendto=$conf->global->PAYPAL_PAYONLINE_SENDEMAIL; $from=$conf->global->MAILING_EMAIL_FROM; @@ -102,11 +121,6 @@ print ''."\n"; print '
'."\n"; print $langs->trans("YourPaymentHasNotBeenRecorded")."

"; -$PAYPALTOKEN=GETPOST('TOKEN'); -if (empty($PAYPALTOKEN)) $PAYPALTOKEN=GETPOST('token'); -$PAYPALFULLTAG=GETPOST('FULLTAG'); -if (empty($PAYPALFULLTAG)) $PAYPALFULLTAG=GETPOST('fulltag'); - if (! empty($conf->global->PAYPAL_MESSAGE_KO)) print $conf->global->PAYPAL_MESSAGE_KO; print "\n
\n"; From 3830c405a80e7581e778f2a7894e5fa5e2b5ec0d Mon Sep 17 00:00:00 2001 From: jfefe Date: Tue, 22 Nov 2016 23:41:46 +0100 Subject: [PATCH 03/18] =?UTF-8?q?Disable=20CSRF=20check=20for=20REST=C2=A0?= =?UTF-8?q?API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allow to do POST requests from another website. --- htdocs/api/index.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/htdocs/api/index.php b/htdocs/api/index.php index 660c90d3476..a390ecfa6e3 100644 --- a/htdocs/api/index.php +++ b/htdocs/api/index.php @@ -26,6 +26,7 @@ * */ if (! defined("NOLOGIN")) define("NOLOGIN",'1'); +if (! defined("NOCSRFCHECK")) define("NOCSRFCHECK",'1'); $res=0; if (! $res && file_exists("../main.inc.php")) $res=include '../main.inc.php'; @@ -121,9 +122,9 @@ foreach ($modulesdir as $dir) $classname = str_replace('Api_','',ucwords($reg[1])).'Api'; $classname = ucfirst($classname); require_once $dir_part.$file_searched; - if (class_exists($classname)) + if (class_exists($classname)) { - dol_syslog("Found API classname=".$classname); + dol_syslog("Found API classname=".$classname); $api->r->addAPIClass($classname,''); $listofapis[]=array('classname'=>$classname, 'fullpath'=>$file_searched); } @@ -142,7 +143,3 @@ foreach ($modulesdir as $dir) // Call API (we suppose we found it) $api->r->handle(); - - - - From b436df32029999604d1021b70d5b34e0c56eb2a9 Mon Sep 17 00:00:00 2001 From: jfefe Date: Tue, 22 Nov 2016 23:44:10 +0100 Subject: [PATCH 04/18] Allow HTTP POST request for login API method. This is more secure than do the request with sensitive value like password into URL parameters. --- htdocs/api/class/api_generic.class.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/htdocs/api/class/api_generic.class.php b/htdocs/api/class/api_generic.class.php index 9a630a9da47..e2874de369a 100644 --- a/htdocs/api/class/api_generic.class.php +++ b/htdocs/api/class/api_generic.class.php @@ -45,11 +45,14 @@ class GenericApi extends DolibarrApi * @return array Response status and user token * * @throws RestException + * + * @url POST /login + * @url GET /login */ public function login($login, $password, $entity=0, $reset=0) { global $conf, $dolibarr_main_authentication, $dolibarr_auto_user; - + // Authentication mode if (empty($dolibarr_main_authentication)) $dolibarr_main_authentication = 'http,dolibarr'; @@ -67,21 +70,21 @@ class GenericApi extends DolibarrApi } $token = 'failedtogenerateorgettoken'; - + $tmpuser=new User($this->db); $tmpuser->fetch(0, $login); - + // Renew the hash if (empty($tmpuser->api_key) || $reset) { // Generate token for user $token = dol_hash($login.uniqid().$conf->global->MAIN_API_KEY,1); - + // We store API token into database $sql = "UPDATE ".MAIN_DB_PREFIX."user"; $sql.= " SET api_key = '".$this->db->escape($token)."'"; $sql.= " WHERE login = '".$this->db->escape($login)."'"; - + dol_syslog(get_class($this)."::login", LOG_DEBUG); // No log $result = $this->db->query($sql); if (!$result) @@ -93,7 +96,7 @@ class GenericApi extends DolibarrApi { $token = $tmpuser->api_key; } - + //return token return array( 'success' => array( From 0322104e8e773312b53a5001426469fcea780224 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 24 Nov 2016 17:27:32 +0100 Subject: [PATCH 05/18] Fix: use string instead integer --- htdocs/fourn/commande/list.php | 60 +++++++++++++++++----------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index a7a642c4e85..c8d333f578d 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -64,7 +64,7 @@ $search_state=trim(GETPOST("search_state")); $search_country=GETPOST("search_country",'int'); $search_type_thirdparty=GETPOST("search_type_thirdparty",'int'); $search_user=GETPOST('search_user','int'); -$search_request_author=GETPOST('search_request_author','int'); +$search_request_author=GETPOST('search_request_author','alpha'); $search_ht=GETPOST('search_ht'); $search_ttc=GETPOST('search_ttc'); $search_status=(GETPOST('search_status','alpha')!=''?GETPOST('search_status','alpha'):GETPOST('statut','alpha')); // alpha and not intbecause it can be '6,7' @@ -192,7 +192,7 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP $search_type=''; $search_country=''; $search_type_thirdparty=''; - $search_request_author=-1; + $search_request_author=''; $search_total_ht=''; $search_total_vat=''; $search_total_ttc=''; @@ -205,7 +205,7 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP $deliveryyear=''; $billed=''; $search_array_options=array(); - + } if (empty($reshook)) @@ -248,7 +248,7 @@ if ($socid > 0) $fourn->fetch($socid); $title .= ' - '.$fourn->name; } -if ($status) +if ($status) { if ($status == '1,2,3') $title.=' - '.$langs->trans("StatusOrderToProcessShort"); if ($status == '6,7') $title.=' - '.$langs->trans("StatusOrderCanceled"); @@ -300,7 +300,7 @@ if ($search_ref) $sql .= natural_search('cf.ref', $search_ref); if ($search_refsupp) $sql.= natural_search("cf.ref_supplier", $search_refsupp); if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall); if ($search_company) $sql .= natural_search('s.nom', $search_company); -if ($search_request_author > 0) $sql.= " AND u.login LIKE '%".$db->escape($search_request_author)."%'"; +if ($search_request_author) $sql.= " AND u.login LIKE '%".$db->escape($search_request_author)."%'"; if ($billed != '' && $billed >= 0) $sql .= " AND cf.billed = ".$billed; //Required triple check because statut=0 means draft filter @@ -382,7 +382,7 @@ $sql.= $db->plimit($limit+1, $offset); $resql = $db->query($sql); if ($resql) -{ +{ if ($socid > 0) { $soc = new Societe($db); @@ -393,7 +393,7 @@ if ($resql) { $title = $langs->trans('ListOfSupplierOrders'); } - + $num = $db->num_rows($resql); $param=''; @@ -410,13 +410,13 @@ if ($resql) if ($search_ref) $param.='&search_ref='.$search_ref; if ($search_company) $param.='&search_company='.$search_company; if ($search_user > 0) $param.='&search_user='.$search_user; - if ($search_request_author > 0) $param.='&search_request_author='.$search_request_author; + if ($search_request_author) $param.='&search_request_author='.$search_request_author; if ($search_sale > 0) $param.='&search_sale='.$search_sale; if ($search_total_ht != '') $param.='&search_total_ht='.$search_total_ht; if ($search_total_ttc != '') $param.="&search_total_ttc=".$search_total_ttc; if ($search_refsupp) $param.="&search_refsupp=".$search_refsupp; if ($search_status >= 0) $param.="&search_status=".$search_status; - if ($billed != '') $param.="&billed=".$billed; + if ($billed != '') $param.="&billed=".$billed; if ($optioncss != '') $param.='&optioncss='.$optioncss; // Add $param from extra fields foreach ($search_array_options as $key => $val) @@ -425,9 +425,9 @@ if ($resql) $tmpkey=preg_replace('/search_options_/','',$key); if ($val != '') $param.='&search_options_'.$tmpkey.'='.urlencode($val); } - + //$massactionbutton=$form->selectMassAction('', $massaction == 'presend' ? array() : array('presend'=>$langs->trans("SendByMail"), 'builddoc'=>$langs->trans("PDFMerge"))); - + // Lignes des champs de filtre print '
'; if ($optioncss != '') print ''; @@ -437,9 +437,9 @@ if ($resql) print ''; print ''; print ''; - + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_commercial.png', 0, '', '', $limit); - + if ($sall) { foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val); @@ -447,7 +447,7 @@ if ($resql) } $moreforfilter=''; - + // If the user can view prospects other than his' if ($user->rights->societe->client->voir || $socid) { @@ -485,7 +485,7 @@ if ($resql) print $moreforfilter; print ''; } - + $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields @@ -511,9 +511,9 @@ if ($resql) // Extra fields if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) { - foreach($extrafields->attribute_label as $key => $val) + foreach($extrafields->attribute_label as $key => $val) { - if (! empty($arrayfields["ef.".$key]['checked'])) + if (! empty($arrayfields["ef.".$key]['checked'])) { $align=$extrafields->getAlignFlag($key); print_liste_field_titre($extralabels[$key],$_SERVER["PHP_SELF"],"ef.".$key,"",$param,($align?'align="'.$align.'"':''),$sortfield,$sortorder); @@ -538,7 +538,7 @@ if ($resql) print ''; } // Ref customer - if (! empty($arrayfields['cf.ref_supplier']['checked'])) + if (! empty($arrayfields['cf.ref_supplier']['checked'])) { print ''; } @@ -551,11 +551,11 @@ if ($resql) if (! empty($arrayfields['u.login']['checked'])) { print ''; - //print ''; + print ''; print ''; } // Thirpdarty - if (! empty($arrayfields['s.nom']['checked'])) + if (! empty($arrayfields['s.nom']['checked'])) { print ''; } @@ -594,7 +594,7 @@ if ($resql) print ''; } // Date delivery - if (! empty($arrayfields['cf.date_delivery']['checked'])) + if (! empty($arrayfields['cf.date_delivery']['checked'])) { print ''; if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print ''; @@ -622,7 +622,7 @@ if ($resql) print ''; print ''; print ''; - } + } // Extra fields if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) { @@ -649,7 +649,7 @@ if ($resql) // Fields from hook $parameters=array('arrayfields'=>$arrayfields); $reshook=$hookmanager->executeHooks('printFieldListOption',$parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; + print $hookmanager->resPrint; // Date creation if (! empty($arrayfields['cf.datec']['checked'])) { @@ -681,13 +681,13 @@ if ($resql) $searchpitco=$form->showFilterAndCheckAddButtons(0); print $searchpitco; print ''; - + print "\n"; $total=0; $subtotal=0; $productstat_cache=array(); - + $userstatic = new User($db); $objectstatic=new CommandeFournisseur($db); $projectstatic=new Project($db); @@ -699,7 +699,7 @@ if ($resql) { $obj = $db->fetch_object($resql); $var=!$var; - + $objectstatic->id=$obj->rowid; $objectstatic->ref=$obj->ref; $objectstatic->ref_supplier = $obj->ref_supplier; @@ -708,7 +708,7 @@ if ($resql) $objectstatic->total_ttc = $obj->total_ttc; $objectstatic->date_delivery = $db->jdate($obj->date_delivery); $objectstatic->statut = $obj->fk_statut; - + print ""; // Ref @@ -802,7 +802,7 @@ if ($resql) print ''; if (! $i) $totalarray['nbfield']++; } - + // Order date if (! empty($arrayfields['cf.date_commande']['checked'])) { @@ -847,7 +847,7 @@ if ($resql) if (! $i) $totalarray['totalttcfield']=$totalarray['nbfield']; $totalarray['totalttc'] += $obj->total_ttc; } - + // Extra fields if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) { @@ -898,7 +898,7 @@ if ($resql) print ''.yn($obj->billed).''; if (! $i) $totalarray['nbfield']++; } - + // Action column print ''; if (! $i) $totalarray['nbfield']++; From 8ea49d88875275bc3c5f20a2007dbcd232004ef2 Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Fri, 25 Nov 2016 10:55:09 +0100 Subject: [PATCH 06/18] add extrafields thirdparty on contact export --- htdocs/core/modules/modSociete.class.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index 737bb8e3bf5..1943e3f7b20 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -242,12 +242,12 @@ class modSociete extends DolibarrModules $this->rights[$r][4] = 'contact'; $this->rights[$r][5] = 'export'; - + // Menus //------- $this->menu = 1; // This module add menu entries. They are coded into menu manager. - - + + // Exports //-------- $r=0; @@ -282,7 +282,7 @@ class modSociete extends DolibarrModules $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as paymode ON s.mode_reglement = paymode.id'; $this->export_sql_end[$r] .=' WHERE s.entity IN ('.getEntity('societe', 1).')'; if(!$user->rights->societe->client->voir) $this->export_sql_end[$r] .=' AND sc.fk_user = '.$user->id; - + // Export list of contacts and attributes $r++; $this->export_code[$r]=$this->rights_class.'_'.$r; @@ -300,9 +300,12 @@ class modSociete extends DolibarrModules } $keyforselect='socpeople'; $keyforelement='contact'; $keyforaliasextra='extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; + $keyforselect='societe'; $keyforelement='company'; $keyforaliasextra='extrasoc'; + include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; $this->export_sql_start[$r]='SELECT DISTINCT '; $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'socpeople as c'; $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'societe as s ON c.fk_soc = s.rowid'; + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'societe_extrafields as extrasoc ON s.rowid = extrasoc.fk_object'; if(!$user->rights->societe->client->voir) $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid'; $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_departements as d ON c.fk_departement = d.rowid'; $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as co ON c.fk_pays = co.rowid'; @@ -402,7 +405,7 @@ class modSociete extends DolibarrModules 'sr.code_banque'=>"0000", 'sr.code_guichet'=>"1111",'sr.number'=>"3333333333", 'sr.cle_rib'=>"22",'sr.bic'=>"USHINGMMXXX",'sr.iban_prefix'=>"US00 0000 1111 22 3333 3333" ); - + // Import Company Salesman $r++; $this->import_code[$r]=$this->rights_class.'_'.$r; @@ -411,7 +414,7 @@ class modSociete extends DolibarrModules $this->import_entities_array[$r]=array('sr.fk_user'=>'user'); // We define here only fields that use another icon that the one defined into import_icon $this->import_tables_array[$r]=array('sr'=>MAIN_DB_PREFIX.'societe_commerciaux'); $this->import_fields_array[$r]=array('sr.fk_soc'=>"ThirdPartyName*",'sr.fk_user'=>"User*"); - + $this->import_convertvalue_array[$r]=array( 'sr.fk_soc'=>array('rule'=>'fetchidfromref','classfile'=>'/societe/class/societe.class.php','class'=>'Societe','method'=>'fetch','element'=>'ThirdParty'), 'sr.fk_user'=>array('rule'=>'fetchidfromref','classfile'=>'/user/class/user.class.php','class'=>'User','method'=>'fetch','element'=>'User') From a8c3ce4e55e799a0bce6dd3bb54255dc22425661 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 26 Nov 2016 12:21:50 +0100 Subject: [PATCH 07/18] FIX A form should not be inside a table. Create javascript troubles. --- htdocs/comm/mailing/cibles.php | 105 ++++++++++----- .../modules/mailings/modules_mailings.php | 14 +- .../modules/mailings/xinputfile.modules.php | 5 +- .../modules/mailings/xinputuser.modules.php | 7 +- htdocs/langs/en_US/mails.lang | 2 + htdocs/main.inc.php | 1 + htdocs/public/test/test_arrays.php | 127 +----------------- 7 files changed, 91 insertions(+), 170 deletions(-) diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index 3767ba17add..e22b8538a66 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -238,14 +238,22 @@ if ($object->fetch($id) >= 0) { print load_fiche_titre($langs->trans("ToAddRecipientsChooseHere"), ($user->admin?info_admin($langs->trans("YouCanAddYourOwnPredefindedListHere"),1):''), 'title_generic'); - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print "\n"; - + //print '
'.$langs->trans("RecipientSelectionModules").''.$langs->trans("NbOfUniqueEMails").''.$langs->trans("Filter").' 
'; + print '
'; + + //print '
'; + print '
'; + //print '
'; + print '
'.$langs->trans("RecipientSelectionModules").'
'; + //print ''; + print '
'.$langs->trans("NbOfUniqueEMails").'
'; + //print ''; + print '
'.$langs->trans("Filter").'
'; + //print ''; + print '
 
'; + //print "\n"; + print ''; + clearstatcache(); $var=true; @@ -303,19 +311,28 @@ if ($object->fetch($id) >= 0) if ($qualified) { $var = !$var; - print ''; + //print ''; +// print '
'; if ($allowaddtarget) { - print ''; + print ''; print ''; } + else + { + print '
'; + } - print '
'; - + print img_object($langs->trans("Module").': '.get_class($obj),$obj->picto); + print ' '; + print $obj->getDesc(); + //print ''; + print ''; + try { $nbofrecipient=$obj->getNbOfRecipients(''); } @@ -324,7 +341,8 @@ if ($object->fetch($id) >= 0) dol_syslog($e->getMessage(), LOG_ERR); } - print ''; - - print ''; - - print ''; + print ''; + + //print ''; + print ''; + + //print ''; - + //print ''; + print ''; + if ($allowaddtarget) print ''; - - print "\n"; + else print ''; + + //print "\n"; +// print ''."\n"; } } } // End foreach dir - print '
'.$langs->trans("RecipientSelectionModules").''.$langs->trans("NbOfUniqueEMails").''.$langs->trans("Filter").' 
'; + //print ''; + print '
'; if (empty($obj->picto)) $obj->picto='generic'; - print img_object($langs->trans("Module").': '.get_class($obj),$obj->picto).' '.$obj->getDesc(); - print '
'; + //print ''; + print '
'; if ($nbofrecipient >= 0) { print $nbofrecipient; @@ -333,41 +351,54 @@ if ($object->fetch($id) >= 0) { print $langs->trans("Error").' '.img_error($obj->error); } - print '
'; - try { - $filter=$obj->formFilter(); - } - catch(Exception $e) - { - dol_syslog($e->getMessage(), LOG_ERR); - } - if ($filter) print $filter; - else print $langs->trans("None"); - print ''; + //print ''; + print '
'; if ($allowaddtarget) { - print ''; + try { + $filter=$obj->formFilter(); + } + catch(Exception $e) + { + dol_syslog($e->getMessage(), LOG_ERR); + } + if ($filter) print $filter; + else print $langs->trans("None"); + } + //print '
'; + print '
'; + if ($allowaddtarget) + { + print ''; } else { + print ''; //print $langs->trans("MailNoChangePossible"); print " "; } - print '
'; - print '
'; + //print ''; + print ''; + + print '

'; } // List of selected targets diff --git a/htdocs/core/modules/mailings/modules_mailings.php b/htdocs/core/modules/mailings/modules_mailings.php index c75e22ed334..16b930e8907 100644 --- a/htdocs/core/modules/mailings/modules_mailings.php +++ b/htdocs/core/modules/mailings/modules_mailings.php @@ -33,7 +33,8 @@ class MailingTargets // This can't be abstract as it is used for some method { var $db; var $error; - + var $tooltip=''; + /** * Constructor @@ -52,11 +53,16 @@ class MailingTargets // This can't be abstract as it is used for some method */ function getDesc() { - global $langs; + global $langs, $form; + $langs->load("mails"); $transstring="MailingModuleDesc".$this->name; - if ($langs->trans($transstring) != $transstring) return $langs->trans($transstring); - else return $this->desc; + $s=''; + if ($langs->trans($transstring) != $transstring) $s=$langs->trans($transstring); + else $s=$this->desc; + + if ($this->tooltip && is_object($form)) $s .= ' '.$form->textwithpicto('', $langs->trans($this->tooltip), 1, 1); + return $s; } /** diff --git a/htdocs/core/modules/mailings/xinputfile.modules.php b/htdocs/core/modules/mailings/xinputfile.modules.php index 7b6f8361d24..04c4be3ce2e 100644 --- a/htdocs/core/modules/mailings/xinputfile.modules.php +++ b/htdocs/core/modules/mailings/xinputfile.modules.php @@ -31,12 +31,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; class mailing_xinputfile extends MailingTargets { var $name='EmailsFromFile'; // Identifiant du module mailing - var $desc='EMails issus d\'un fichier'; // Libelle utilise si aucune traduction pour MailingModuleDescXXX ou XXX=name trouv�e + var $desc='EMails from a file'; // Libelle utilise si aucune traduction pour MailingModuleDescXXX ou XXX=name trouv�e var $require_module=array(); // Module mailing actif si modules require_module actifs var $require_admin=0; // Module mailing actif pour user admin ou non var $picto='generic'; - - var $db; + var $tooltip='UseFormatFileEmailToTarget'; /** diff --git a/htdocs/core/modules/mailings/xinputuser.modules.php b/htdocs/core/modules/mailings/xinputuser.modules.php index 7832d1f6a93..4c5567f574d 100644 --- a/htdocs/core/modules/mailings/xinputuser.modules.php +++ b/htdocs/core/modules/mailings/xinputuser.modules.php @@ -35,9 +35,8 @@ class mailing_xinputuser extends MailingTargets var $require_module=array(); // Module mailing actif si modules require_module actifs var $require_admin=0; // Module mailing actif pour user admin ou non var $picto='generic'; - - var $db; - + var $tooltip='UseFormatInputEmailToTarget'; + /** * Constructor @@ -104,7 +103,7 @@ class mailing_xinputuser extends MailingTargets global $langs; $s=''; - $s.=''; + $s.=''; return $s; } diff --git a/htdocs/langs/en_US/mails.lang b/htdocs/langs/en_US/mails.lang index 072bbdd9750..d036a72186b 100644 --- a/htdocs/langs/en_US/mails.lang +++ b/htdocs/langs/en_US/mails.lang @@ -118,6 +118,8 @@ MailSendSetupIs2=You must first go, with an admin account, into menu %sHome - Se MailSendSetupIs3=If you have any questions on how to setup your SMTP server, you can ask to %s. YouCanAlsoUseSupervisorKeyword=You can also add the keyword __SUPERVISOREMAIL__ to have email being sent to the supervisor of user (works only if an email is defined for this supervisor) NbOfTargetedContacts=Current number of targeted contact emails +UseFormatFileEmailToTarget=Imported file must have format email;name;firstname;other +UseFormatInputEmailToTarget=Enter a string with format email;name;firstname;other MailAdvTargetRecipients=Recipients (advanced selection) AdvTgtTitle=Fill input fields to preselect the thirdparties or contacts/addresses to target AdvTgtSearchTextHelp=Use %% as magic caracters. For exemple to find all item like jean, joe, jim, you can input j%%, you can also use ; as separator for value, and use ! for except this value. For exemple jean;joe;jim%%;!jimo;!jima% will target all jean, joe, start with jim but not jimo and not everythnig taht start by jima diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 12ed77dd36e..3a9ef61d7ec 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -849,6 +849,7 @@ if (! defined('NOREQUIRETRAN')) $bc=array(0=>'class="impair"',1=>'class="pair"'); $bcdd=array(0=>'class="impair drag drop"',1=>'class="pair drag drop"'); $bcnd=array(0=>'class="impair nodrag nodrop nohover"',1=>'class="pair nodrag nodrop nohoverpair"'); // Used for tr to add new lines +$bctag=array(0=>'class="impair tagtr"',1=>'class="pair tagtr"'); // Define messages variables $mesg=''; $warning=''; $error=0; diff --git a/htdocs/public/test/test_arrays.php b/htdocs/public/test/test_arrays.php index 5eaa20003af..175352f404b 100644 --- a/htdocs/public/test/test_arrays.php +++ b/htdocs/public/test/test_arrays.php @@ -242,8 +242,8 @@ if (! empty($moreforfilter))
- -


Example 2 : Table using tags: table/thead/tbody/tr/th-td + dataTable => Use this for short result tables
+ -


Example 3 : Table using tags: div.tagtable+div.tagtr+div or div.tagtable+div.tagtr+div.tagtd => Use this for tables that need to have a different form for each line, but AVOID IT if possible (drag and drop of lines does not work for this case, also height of title can't be forced to a minimum)

+


Example 2 : Table using tags: div.tagtable+(div|form).tagtr+div[.tagtd] => Use this for tables that need to have a different form for each line, but AVOID IT if possible (drag and drop of lines does not work for this case, also height of title can't be forced to a minimum)

use_javascript_ajax)) include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; ?> -
+
Title A
title B
From e539842c281da09430dc6ddff74431a2e9b96ae9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 26 Nov 2016 15:46:41 +0100 Subject: [PATCH 08/18] Fix eatdate and selldate not correctly set. --- htdocs/product/stock/mouvement.php | 4 ++-- htdocs/product/stock/product.php | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/product/stock/mouvement.php b/htdocs/product/stock/mouvement.php index 48b8d089375..ba257721746 100644 --- a/htdocs/product/stock/mouvement.php +++ b/htdocs/product/stock/mouvement.php @@ -115,8 +115,8 @@ if ($action == "correct_stock") //$eatby=GETPOST('eatby'); //$sellby=GETPOST('sellby'); - $eatby=dol_mktime(12, 0, 0, GETPOST('eatbymonth'), GETPOST('eatbyday'), GETPOST('eatbyyear')); - $sellby=dol_mktime(12, 0, 0, GETPOST('sellbymonth'), GETPOST('sellbyday'), GETPOST('sellbyyear')); + $eatby=dol_mktime(0, 0, 0, GETPOST('eatbymonth'), GETPOST('eatbyday'), GETPOST('eatbyyear')); + $sellby=dol_mktime(0, 0, 0, GETPOST('sellbymonth'), GETPOST('sellbyday'), GETPOST('sellbyyear')); $result=$product->correct_stock_batch( $user, diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 3170f329ea7..d37219db898 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -54,8 +54,8 @@ $stocklimit = GETPOST('seuil_stock_alerte'); $desiredstock = GETPOST('desiredstock'); $cancel = GETPOST('cancel'); $fieldid = isset($_GET["ref"])?'ref':'rowid'; -$d_eatby=dol_mktime(12, 0, 0, $_POST['eatbymonth'], $_POST['eatbyday'], $_POST['eatbyyear']); -$d_sellby=dol_mktime(12, 0, 0, $_POST['sellbymonth'], $_POST['sellbyday'], $_POST['sellbyyear']); +$d_eatby=dol_mktime(0, 0, 0, $_POST['eatbymonth'], $_POST['eatbyday'], $_POST['eatbyyear']); +$d_sellby=dol_mktime(0, 0, 0, $_POST['sellbymonth'], $_POST['sellbyday'], $_POST['sellbyyear']); $pdluoid=GETPOST('pdluoid','int'); // Security check @@ -352,8 +352,8 @@ if ($action == 'updateline' && GETPOST('save') == $langs->trans('Save')) } else { - $d_eatby=dol_mktime(12, 0, 0, $_POST['eatbymonth'], $_POST['eatbyday'], $_POST['eatbyyear']); - $d_sellby=dol_mktime(12, 0, 0, $_POST['sellbymonth'], $_POST['sellbyday'], $_POST['sellbyyear']); + $d_eatby=dol_mktime(0, 0, 0, $_POST['eatbymonth'], $_POST['eatbyday'], $_POST['eatbyyear']); + $d_sellby=dol_mktime(0, 0, 0, $_POST['sellbymonth'], $_POST['sellbyday'], $_POST['sellbyyear']); $pdluo->batch=GETPOST("batch_number",'san_alpha'); $pdluo->eatby=$d_eatby; $pdluo->sellby=$d_sellby; From 60c494fd5fdcde2207ce062bc9a374ba4037ba35 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 26 Nov 2016 17:48:06 +0100 Subject: [PATCH 09/18] Missing dolibarr version in dump file --- htdocs/admin/tools/export.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/admin/tools/export.php b/htdocs/admin/tools/export.php index 12b41110ac2..ebc4061fe6d 100644 --- a/htdocs/admin/tools/export.php +++ b/htdocs/admin/tools/export.php @@ -289,7 +289,7 @@ function backup_tables($outputfile, $tables='*') // Print headers and global mysql config vars $sqlhead = ''; - $sqlhead .= "-- ".$db::LABEL." dump via php + $sqlhead .= "-- ".$db::LABEL." dump via php with Dolibarr ".DOL_VERSION." -- -- Host: ".$db->db->host_info." Database: ".$db->database_name." -- ------------------------------------------------------ From f7a07f2491eab282480b744efe3333e5b73ee51a Mon Sep 17 00:00:00 2001 From: Ion Agorria Date: Sat, 26 Nov 2016 22:13:31 +0100 Subject: [PATCH 10/18] Supplier order statut is not reverted on RECEIVE trigger fail --- htdocs/fourn/class/fournisseur.commande.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index e298ab43467..80445f6d55e 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -1961,6 +1961,7 @@ class CommandeFournisseur extends CommonOrder if ($resql) { $result = 0; + $old_statut = $this->statut; $this->statut = $statut; // Call trigger @@ -1974,6 +1975,7 @@ class CommandeFournisseur extends CommonOrder } else { + $this->statut = $old_statut; $this->db->rollback(); $this->error=$this->db->lasterror(); $result = -1; From e4a8342aefcfc29b18613697ddbdf052e1829eb6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 27 Nov 2016 11:41:10 +0100 Subject: [PATCH 11/18] Fix div-table-form balance on all lists (solve responsive design) --- dev/skeletons/skeleton_list.php | 2 + htdocs/accountancy/customer/lines.php | 21 +++++---- htdocs/accountancy/customer/list.php | 4 +- htdocs/accountancy/expensereport/lines.php | 18 ++++---- htdocs/accountancy/expensereport/list.php | 3 ++ htdocs/accountancy/supplier/lines.php | 16 ++++--- htdocs/accountancy/supplier/list.php | 5 ++- htdocs/adherents/list.php | 2 + htdocs/comm/propal/list.php | 2 + htdocs/commande/list.php | 8 ++-- htdocs/compta/bank/bankentries.php | 5 ++- htdocs/compta/bank/index.php | 4 ++ htdocs/compta/facture/list.php | 4 +- htdocs/contrat/list.php | 5 ++- htdocs/contrat/services.php | 6 ++- htdocs/core/class/html.formfile.class.php | 1 + htdocs/expedition/list.php | 5 ++- htdocs/expensereport/list.php | 4 +- htdocs/fichinter/card.php | 44 ------------------- htdocs/fourn/commande/list.php | 4 +- htdocs/fourn/facture/list.php | 5 ++- htdocs/product/reassort.php | 2 + htdocs/product/reassortlot.php | 4 +- htdocs/product/stats/commande.php | 5 ++- htdocs/product/stats/commande_fournisseur.php | 4 +- htdocs/product/stats/contrat.php | 25 +++++++++-- htdocs/product/stats/facture.php | 3 +- htdocs/product/stats/facture_fournisseur.php | 3 +- htdocs/product/stats/propal.php | 28 ++++++------ htdocs/product/stock/mouvement.php | 8 +++- htdocs/product/stock/productlot_list.php | 6 ++- htdocs/projet/tasks/time.php | 2 + htdocs/supplier_proposal/list.php | 4 +- htdocs/theme/eldy/style.css.php | 8 ++-- htdocs/theme/md/style.css.php | 4 ++ 35 files changed, 161 insertions(+), 113 deletions(-) diff --git a/dev/skeletons/skeleton_list.php b/dev/skeletons/skeleton_list.php index 065f2814f05..f571af9873e 100644 --- a/dev/skeletons/skeleton_list.php +++ b/dev/skeletons/skeleton_list.php @@ -333,6 +333,7 @@ if (! empty($moreforfilter)) $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields +print '
'; print ''."\n"; // Fields title @@ -535,6 +536,7 @@ $reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters); // N print $hookmanager->resPrint; print '
'."\n"; +print '
'."\n"; print ''."\n"; diff --git a/htdocs/accountancy/customer/lines.php b/htdocs/accountancy/customer/lines.php index ef125ecbbcc..b133e505d5c 100644 --- a/htdocs/accountancy/customer/lines.php +++ b/htdocs/accountancy/customer/lines.php @@ -123,6 +123,7 @@ if (is_array($changeaccount) && count($changeaccount) > 0) { $account_parent = ''; // Protection to avoid to mass apply it a second time } + /* * View */ @@ -252,6 +253,7 @@ if ($result) { $moreforfilter = ''; + print '
'; print ''."\n"; print ''; @@ -338,18 +340,19 @@ if ($result) { print ""; $i ++; } + + print "
"; + print "
"; + + if ($nbtotalofrecords > $limit) { + print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, '', 0, '', '', $limit, 1); + } + + print ''; } else { - print $db->error(); + print $db->lasterror(); } -print ""; - -if ($nbtotalofrecords > $limit) { - print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, '', 0, '', '', $limit, 1); -} - -print ''; - llxFooter(); $db->close(); diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php index 8d759de5e01..83a01abadc3 100644 --- a/htdocs/accountancy/customer/list.php +++ b/htdocs/accountancy/customer/list.php @@ -264,6 +264,7 @@ if ($result) { $moreforfilter = ''; + print '
'; print ''."\n"; print ''; print_liste_field_titre($langs->trans("LineId"), $_SERVER["PHP_SELF"], "l.rowid", "", $param, '', $sortfield, $sortorder); @@ -400,8 +401,9 @@ if ($result) { print ''; $i ++; } - print '
'; + print "
"; + print ''; } else { print $db->error(); diff --git a/htdocs/accountancy/expensereport/lines.php b/htdocs/accountancy/expensereport/lines.php index 29a8b167b87..5ac3f5b7a01 100644 --- a/htdocs/accountancy/expensereport/lines.php +++ b/htdocs/accountancy/expensereport/lines.php @@ -230,6 +230,7 @@ if ($result) { $moreforfilter = ''; + print '
'; print ''."\n"; print ''; @@ -304,18 +305,19 @@ if ($result) { print ""; $i ++; } + + print "
"; + print "
"; + + if ($nbtotalofrecords > $limit) { + print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, '', 0, '', '', $limit, 1); + } + + print ''; } else { print $db->error(); } -print ""; - -if ($nbtotalofrecords > $limit) { - print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, '', 0, '', '', $limit, 1); -} - -print ''; - llxFooter(); $db->close(); diff --git a/htdocs/accountancy/expensereport/list.php b/htdocs/accountancy/expensereport/list.php index d583ec38d42..0d058ffc402 100644 --- a/htdocs/accountancy/expensereport/list.php +++ b/htdocs/accountancy/expensereport/list.php @@ -257,6 +257,7 @@ if ($result) { $moreforfilter = ''; + print '
'; print ''."\n"; print ''; print_liste_field_titre($langs->trans("LineId"), $_SERVER["PHP_SELF"], "erd.rowid", "", $param, '', $sortfield, $sortorder); @@ -352,6 +353,8 @@ if ($result) { } print '
'; + print "
"; + print ''; } else { print $db->error(); diff --git a/htdocs/accountancy/supplier/lines.php b/htdocs/accountancy/supplier/lines.php index a2cdc7b42cc..41d62a60f22 100644 --- a/htdocs/accountancy/supplier/lines.php +++ b/htdocs/accountancy/supplier/lines.php @@ -236,6 +236,7 @@ if ($result) { $moreforfilter = ''; + print '
'; print ''."\n"; print ''; @@ -324,17 +325,18 @@ if ($result) { print ""; $i ++; } + print "
"; + print "
"; + + if ($nbtotalofrecords > $limit) { + print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, '', 0, '', '', $limit, 1); + } + + print ''; } else { print $db->error(); } -print ""; - -if ($nbtotalofrecords > $limit) { - print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, '', 0, '', '', $limit, 1); -} - -print ''; llxFooter(); diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index d5fcf2d011b..2bbc150428b 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -266,7 +266,8 @@ if ($result) { $moreforfilter = ''; - print ''."\n"; + print '
'; + print '
'."\n"; print ''; print_liste_field_titre($langs->trans("LineId"), $_SERVER["PHP_SELF"], "l.rowid", "", $param, '', $sortfield, $sortorder); print_liste_field_titre($langs->trans("Invoice"), $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder); @@ -414,6 +415,8 @@ if ($result) { } print '
'; + print "
"; + print ''; } else { print $db->error(); diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 0727002aa59..33925e8d130 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -375,6 +375,7 @@ if (! empty($moreforfilter)) $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields +print '
'; print ''."\n"; print ''; if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) @@ -842,6 +843,7 @@ $reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters); // N print $hookmanager->resPrint; print "
\n"; +print "
"; print ''; if ($num > $limit || $page) print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_generic.png', 0, '', '', $limit, 1); diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 7e759917604..bd52652d9c5 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -556,6 +556,7 @@ if ($resql) $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + print '
'; print ''."\n"; // Fields title @@ -1003,6 +1004,7 @@ if ($resql) print $hookmanager->resPrint; print '
'."\n"; + print '
'."\n"; print ''."\n"; diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 87a95062323..2fd7b4822ef 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -845,7 +845,8 @@ if ($resql) $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields - print ''."\n"; + print '
'; + print '
'."\n"; // Fields title print ''; @@ -1421,9 +1422,8 @@ if ($resql) print $hookmanager->resPrint; print '
'."\n"; - - print '
'; - + print '
'; + print ''."\n"; //print '
'.img_help(1,'').' '.$langs->trans("ToBillSeveralOrderSelectCustomer", $langs->transnoentitiesnoconv("CreateInvoiceForThisCustomer")).'
'; diff --git a/htdocs/compta/bank/bankentries.php b/htdocs/compta/bank/bankentries.php index 8141c906c8e..dc5f2d5fad0 100644 --- a/htdocs/compta/bank/bankentries.php +++ b/htdocs/compta/bank/bankentries.php @@ -757,7 +757,8 @@ if ($resql) $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields - print ''."\n"; + print '
'; + print '
'."\n"; // Fields title print ''; @@ -1295,6 +1296,8 @@ if ($resql) } print "
"; + print "
"; + print ''; $db->free($resql); } diff --git a/htdocs/compta/bank/index.php b/htdocs/compta/bank/index.php index ca1b2cfdaa1..51cb5c636fd 100644 --- a/htdocs/compta/bank/index.php +++ b/htdocs/compta/bank/index.php @@ -276,6 +276,7 @@ if (! empty($moreforfilter)) $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields +print '
'; print ''."\n"; // Fields title @@ -583,6 +584,9 @@ if (isset($totalarray['totalbalancefield'])) } print '
'; +print "
"; + +print ""; /* diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index c38c8060bd7..ea012cb3672 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -636,7 +636,8 @@ if ($resql) $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields - print ''."\n"; + print '
'; + print '
'."\n"; print ''; if (! empty($arrayfields['f.facnumber']['checked'])) print_liste_field_titre($arrayfields['f.facnumber']['label'],$_SERVER['PHP_SELF'],'f.facnumber','',$param,'',$sortfield,$sortorder); @@ -1135,6 +1136,7 @@ if ($resql) print $hookmanager->resPrint; print "
\n"; + print ""; print "\n"; diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index c003b638748..e0f465b5389 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -393,7 +393,8 @@ if ($resql) $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields - print ''."\n"; + print '
'; + print '
'."\n"; print ''; if (! empty($arrayfields['c.ref']['checked'])) print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], "c.ref","","$param",'',$sortfield,$sortorder); if (! empty($arrayfields['c.ref_customer']['checked'])) print_liste_field_titre($arrayfields['c.ref_customer']['label'], $_SERVER["PHP_SELF"], "c.ref_customer","","$param",'',$sortfield,$sortorder); @@ -723,6 +724,8 @@ if ($resql) $db->free($resql); print '
'; + print ''; + print ''; } else diff --git a/htdocs/contrat/services.php b/htdocs/contrat/services.php index 836e2fd82f6..e4a18e1599a 100644 --- a/htdocs/contrat/services.php +++ b/htdocs/contrat/services.php @@ -271,6 +271,7 @@ if ($resql) $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + print '
'; print ''."\n"; print ''; @@ -449,7 +450,10 @@ if ($resql) } $db->free($resql); - print '
'; + print ''; + print '
'; + + print ''; } else diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 28b9517fe0b..dadc470e273 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -549,6 +549,7 @@ class FormFile $buttonlabeltoshow=$buttonlabel; if (empty($buttonlabel)) $buttonlabel=$langs->trans('Generate'); + if ($conf->browser->layout == 'phone') $urlsource.='#'.$forname.'_form'; # So we switch to form after a generation if (empty($noform)) $out.= '
'; $out.= ''; $out.= ''; diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index dd1f0b6e703..8a093820f4c 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -305,7 +305,8 @@ if ($resql) $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields - print ''."\n"; + print '
'; + print '
'."\n"; print ''; @@ -635,6 +636,8 @@ if ($resql) } print "
"; + print ""; + print '
'; $db->free($resql); } else diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php index ab9f318ca89..6f71bd77ce6 100644 --- a/htdocs/expensereport/list.php +++ b/htdocs/expensereport/list.php @@ -352,6 +352,7 @@ if ($resql) $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + print '
'; print ''."\n"; print ""; if (! empty($arrayfields['d.ref']['checked'])) print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"d.ref","",$param,'',$sortfield,$sortorder); @@ -664,7 +665,8 @@ if ($resql) print $hookmanager->resPrint; print '
'."\n"; - + print '
'; + print ''."\n"; /* diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index cc2a5b83c6d..f943fa4784b 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -1241,16 +1241,6 @@ else if ($id > 0 || ! empty($ref)) print ''; - // Ref - /* - print ''; - - // Third party - print ""; - */ - if (! empty($conf->global->FICHINTER_USE_PLANNED_AND_DONE_DATES)) { // Date Start @@ -1283,37 +1273,6 @@ else if ($id > 0 || ! empty($ref)) print ''; print ''; - // Project - /* - if (! empty($conf->projet->enabled)) - { - $langs->load('projects'); - print ''; - print ''; - print ''; - }*/ - // Contrat if ($conf->contrat->enabled) { @@ -1355,9 +1314,6 @@ else if ($id > 0 || ! empty($ref)) print ''; } - // Statut - //print ''; - // Other attributes $cols = 2; include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index 843e8984a68..e9d8499364e 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -489,7 +489,8 @@ if ($resql) $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields - print '
'.$langs->trans("Ref").''; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); - print '
".$langs->trans("Company").''.$object->thirdparty->getNomUrl(1)."
'; - - print ''; - if ($action != 'classify') - { - print ''; - } - print '
'; - print $langs->trans('Project'); - print 'id.'">'; - print img_edit($langs->trans('SetProject'),1); - print '
'; - print '
'; - if ($action == 'classify') - { - $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project,'projectid', 0, 0, 1); - } - else - { - $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project,'none', 0, 0); - } - print '
'.$langs->trans("Status").''.$object->getLibStatut(4).'
'."\n"; + print '
'; + print '
'."\n"; print ''; if (! empty($arrayfields['cf.ref']['checked'])) print_liste_field_titre($arrayfields['cf.ref']['label'],$_SERVER["PHP_SELF"],"cf.ref","",$param,'',$sortfield,$sortorder); @@ -919,6 +920,7 @@ if ($resql) $i++; } print "
\n"; + print ''; print "\n"; if (! empty($conf->facture->enable)) print '
'.img_help(1,'').' '.$langs->trans("ToBillSeveralOrderSelectCustomer", $langs->transnoentitiesnoconv("CreateInvoiceForThisCustomer")).'
'; diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index ebe65f62122..2ebdb7fe7bb 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -486,7 +486,8 @@ if ($resql) $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields - print ''."\n"; + print '
'; + print '
'."\n"; print ''; if (! empty($arrayfields['f.ref']['checked'])) print_liste_field_titre($arrayfields['f.ref']['label'],$_SERVER['PHP_SELF'],'f.ref,f.rowid','',$param,'',$sortfield,$sortorder); if (! empty($arrayfields['f.ref_supplier']['checked'])) print_liste_field_titre($arrayfields['f.ref_supplier']['label'],$_SERVER["PHP_SELF"],'f.ref_supplier','',$param,'',$sortfield,$sortorder); @@ -984,7 +985,7 @@ if ($resql) print $hookmanager->resPrint; print "
\n"; - + print ''; print "\n"; } else diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php index b193e553b61..036f56acc2e 100644 --- a/htdocs/product/reassort.php +++ b/htdocs/product/reassort.php @@ -261,6 +261,7 @@ if ($resql) $colspan_warehouse = 1; if (! empty($conf->global->STOCK_DETAIL_ON_WAREHOUSE)) { $colspan_warehouse = $nb_warehouse > 1 ? $nb_warehouse+1 : 1; } + print '
'; print ''; // Lignes des titres @@ -381,6 +382,7 @@ if ($resql) } print "
"; + print '
'; print ''; if ($num > $conf->liste_limit) diff --git a/htdocs/product/reassortlot.php b/htdocs/product/reassortlot.php index c9619124389..e4ffad6cb52 100644 --- a/htdocs/product/reassortlot.php +++ b/htdocs/product/reassortlot.php @@ -249,7 +249,8 @@ if ($resql) /*if ($eatby) $param.="&eatby=".$eatby; if ($sellby) $param.="&sellby=".$sellby;*/ - print ''; + print '
'; + print '
'; // Lignes des titres print ""; @@ -381,6 +382,7 @@ if ($resql) } print "
"; + print ''; print ''; if ($num > $conf->liste_limit) diff --git a/htdocs/product/stats/commande.php b/htdocs/product/stats/commande.php index f9b9d14d794..192017af2a5 100644 --- a/htdocs/product/stats/commande.php +++ b/htdocs/product/stats/commande.php @@ -193,7 +193,8 @@ if ($id > 0 || ! empty($ref)) print ''; $i = 0; - print ''; + print '
'; + print '
'; print ''; print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"c.rowid","",$option,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$option,'',$sortfield,$sortorder); @@ -243,8 +244,8 @@ if ($id > 0 || ! empty($ref)) print ''; print ''; print "
'.price($total_ht).'
"; + print ""; print ''; - print '
'; } else { dol_print_error($db); } diff --git a/htdocs/product/stats/commande_fournisseur.php b/htdocs/product/stats/commande_fournisseur.php index 4bdfdcc5c81..bed3be1892f 100644 --- a/htdocs/product/stats/commande_fournisseur.php +++ b/htdocs/product/stats/commande_fournisseur.php @@ -72,6 +72,7 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) { $search_year = ''; } + /* * View */ @@ -203,6 +204,7 @@ if ($id > 0 || ! empty($ref)) { print ''; $i = 0; + print '
'; print ''; print ''; print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "c.rowid", "", $option, '', $sortfield, $sortorder); @@ -251,8 +253,8 @@ if ($id > 0 || ! empty($ref)) { print ''; print ''; print "
' . price($total_ht) . '
"; + print '
'; print ''; - print '
'; } else { dol_print_error($db); } diff --git a/htdocs/product/stats/contrat.php b/htdocs/product/stats/contrat.php index 34b38a7bbec..8c5f1a3ba86 100644 --- a/htdocs/product/stats/contrat.php +++ b/htdocs/product/stats/contrat.php @@ -135,10 +135,27 @@ if ($id > 0 || ! empty($ref)) if ($result) { $num = $db->num_rows($result); - + if (! empty($id)) + $option .= '&id=' . $product->id; + if (! empty($search_month)) + $option .= '&search_month=' . $search_month; + if (! empty($search_year)) + $option .= '&search_year=' . $search_year; + + print '
' . "\n"; + if (! empty($sortfield)) + print ''; + if (! empty($sortorder)) + print ''; + if (! empty($page)) { + print ''; + $option .= '&page=' . $page; + } + print_barre_liste($langs->trans("Contrats"),$page,$_SERVER["PHP_SELF"],"&id=$product->id",$sortfield,$sortorder,'',$num,0,''); $i = 0; + print '
'; print ''; print ''; @@ -180,13 +197,15 @@ if ($id > 0 || ! empty($ref)) $i++; } } + + print '
'; + print '
'; + print '
'; } else { dol_print_error($db); } - print ""; - print '
'; $db->free($result); } } diff --git a/htdocs/product/stats/facture.php b/htdocs/product/stats/facture.php index e9eb3d41859..53e5b0ab0a6 100644 --- a/htdocs/product/stats/facture.php +++ b/htdocs/product/stats/facture.php @@ -216,6 +216,7 @@ if ($id > 0 || ! empty($ref)) print ''; $i = 0; + print '
'; print ''; print ''; print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"s.rowid","",$option,'',$sortfield,$sortorder); @@ -265,8 +266,8 @@ if ($id > 0 || ! empty($ref)) print ''; print ''; print "
'.price($total_ht).'
"; + print '
'; print ''; - print '
'; } else { dol_print_error($db); } diff --git a/htdocs/product/stats/facture_fournisseur.php b/htdocs/product/stats/facture_fournisseur.php index 77bd4b73887..6fe189c7700 100644 --- a/htdocs/product/stats/facture_fournisseur.php +++ b/htdocs/product/stats/facture_fournisseur.php @@ -195,6 +195,7 @@ if ($id > 0 || ! empty($ref)) print ''; $i = 0; + print '
'; print ''; print ''; print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "s.rowid", "", $option, '', $sortfield, $sortorder); @@ -244,8 +245,8 @@ if ($id > 0 || ! empty($ref)) print ''; print ''; print "
' . price($total_ht) . '
"; + print '
'; print ''; - print '
'; } else { dol_print_error($db); } diff --git a/htdocs/product/stats/propal.php b/htdocs/product/stats/propal.php index d23853c174f..289cf3d3578 100644 --- a/htdocs/product/stats/propal.php +++ b/htdocs/product/stats/propal.php @@ -197,6 +197,7 @@ if ($id > 0 || ! empty($ref)) print ''; $i = 0; + print '
'; print ''; print ''; print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.rowid", "", $option, '', $sortfield, $sortorder); @@ -238,19 +239,20 @@ if ($id > 0 || ! empty($ref)) } } } - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print "
' . $langs->trans('Total') . '' . $total_qty . '' . price($total_ht) . '
"; - print ''; - print '
'; - } else { - dol_print_error($db); - } - $db->free($result); + + print ''; + print '' . $langs->trans('Total') . ''; + print ''; + print '' . $total_qty . ''; + print '' . price($total_ht) . ''; + print ''; + print ""; + print '
'; + print ''; + } else { + dol_print_error($db); + } + $db->free($result); } } } else { diff --git a/htdocs/product/stock/mouvement.php b/htdocs/product/stock/mouvement.php index b8e8c97bc5e..1a0710426f2 100644 --- a/htdocs/product/stock/mouvement.php +++ b/htdocs/product/stock/mouvement.php @@ -699,7 +699,8 @@ if ($resql) $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields - print ''."\n"; + print '
'; + print '
'."\n"; print ""; if (! empty($arrayfields['m.rowid']['checked'])) print_liste_field_titre($arrayfields['m.rowid']['label'],$_SERVER["PHP_SELF"],'m.rowid','',$param,'',$sortfield,$sortorder); if (! empty($arrayfields['m.datem']['checked'])) print_liste_field_titre($arrayfields['m.datem']['label'],$_SERVER["PHP_SELF"],'m.datem','',$param,'',$sortfield,$sortorder); @@ -1001,7 +1002,10 @@ if ($resql) } $db->free($resql); - print "

"; + print ""; + print ''; + print ""; + print "
"; // Add number of product when there is a filter on period if (count($arrayofuniqueproduct) == 1 && is_numeric($year)) diff --git a/htdocs/product/stock/productlot_list.php b/htdocs/product/stock/productlot_list.php index 60b719df10b..5aed199fd00 100644 --- a/htdocs/product/stock/productlot_list.php +++ b/htdocs/product/stock/productlot_list.php @@ -339,7 +339,8 @@ if ($resql) $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields - print ''."\n"; + print '
'; + print '
'."\n"; // Fields title print ''; @@ -587,7 +588,8 @@ if ($resql) print $hookmanager->resPrint; print '
'."\n"; - + print ''; + print ''."\n"; /* diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 276fc1cd722..5a9a6704566 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -704,6 +704,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + print '
'; print ''."\n"; print ''; @@ -975,6 +976,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) print ''; print "
"; + print '
'; print ""; } } diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php index a50e8509ba5..d2649a42a43 100644 --- a/htdocs/supplier_proposal/list.php +++ b/htdocs/supplier_proposal/list.php @@ -341,6 +341,7 @@ if ($result) } + print '
'; print ''; print ''; print_liste_field_titre($langs->trans('Ref'),$_SERVER["PHP_SELF"],'p.ref','',$param,'',$sortfield,$sortorder); @@ -514,7 +515,8 @@ if ($result) } print '
'; - + print '
'; + print ''; $db->free($result); diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index ab9c2f2b7d6..0082bbab20f 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -582,15 +582,18 @@ div.myavailability { } /* DOL_XXX for future usage (when left menu has been removed). If we do not use datatable */ -.table-responsive { +/*.table-responsive { width: calc(100% - 330px); margin-bottom: 15px; overflow-y: hidden; -ms-overflow-style: -ms-autohiding-scrollbar; +}*/ +.div-table-responsive { + overflow-x: auto; + min-height: 0.01%; } - /* ============================================================================== */ /* Styles to hide objects */ /* ============================================================================== */ @@ -2397,7 +2400,6 @@ td.border, div.tagtable div div.border { border-bottom: 1px solid #000000; border-left: 1px solid #000000; } - .table-key-border-col { /* width: 25%; */ vertical-align:top; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 6d8bc972ceb..6d4b8488350 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -593,6 +593,10 @@ div.myavailability { overflow-y: hidden; -ms-overflow-style: -ms-autohiding-scrollbar; } +.div-table-responsive { + overflow-x: auto; + min-height: 0.01%; +} /* ============================================================================== */ From 2c9edd4205973d7cc0d9038ce3d86aec86d56703 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 27 Nov 2016 13:49:46 +0100 Subject: [PATCH 12/18] Maxi debug on list. Fix responsive design. --- htdocs/adherents/subscription/list.php | 8 +- htdocs/adherents/type.php | 33 ++++--- htdocs/bookmarks/list.php | 9 +- htdocs/comm/action/listactions.php | 19 ++-- htdocs/comm/action/rapport/index.php | 10 +- htdocs/comm/mailing/list.php | 18 +++- htdocs/compta/bank/bankentries.php | 14 +-- htdocs/compta/bank/class/account.class.php | 3 +- htdocs/compta/facture/fiche-rec.php | 14 ++- htdocs/compta/paiement/cheque/list.php | 20 +++- htdocs/compta/paiement/list.php | 15 ++- htdocs/compta/salaries/index.php | 10 +- htdocs/compta/sociales/index.php | 6 +- htdocs/contact/list.php | 4 +- htdocs/don/list.php | 5 +- htdocs/expedition/list.php | 2 +- htdocs/fourn/facture/paiement.php | 15 ++- htdocs/holiday/define_holiday.php | 8 +- htdocs/holiday/list.php | 7 +- htdocs/holiday/view_log.php | 8 +- htdocs/langs/en_US/main.lang | 3 + htdocs/loan/index.php | 5 +- htdocs/margin/checkMargins.php | 7 +- htdocs/margin/productMargins.php | 6 +- htdocs/opensurvey/list.php | 14 +-- htdocs/product/list.php | 4 +- htdocs/product/reassort.php | 2 +- htdocs/product/reassortlot.php | 2 +- htdocs/product/stock/list.php | 6 +- htdocs/product/stock/mouvement.php | 10 +- htdocs/product/stock/productlot_list.php | 2 +- htdocs/projet/activity/perday.php | 12 ++- htdocs/projet/activity/perweek.php | 10 +- htdocs/projet/list.php | 4 +- htdocs/projet/tasks/list.php | 4 +- htdocs/resource/list.php | 104 +++++++++++---------- htdocs/societe/list.php | 4 +- htdocs/theme/eldy/style.css.php | 1 + htdocs/theme/md/style.css.php | 1 + htdocs/user/index.php | 8 +- 40 files changed, 280 insertions(+), 157 deletions(-) diff --git a/htdocs/adherents/subscription/list.php b/htdocs/adherents/subscription/list.php index 6062bb12567..5ab73082a96 100644 --- a/htdocs/adherents/subscription/list.php +++ b/htdocs/adherents/subscription/list.php @@ -61,7 +61,7 @@ $result=restrictedArea($user,'adherent','','','cotisation'); * Actions */ -if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search=""; $search_ref=""; @@ -154,7 +154,10 @@ if ($result) print $langs->trans("Filter")." (".$langs->trans("Ref").", ".$langs->trans("Lastname").", ".$langs->trans("Firstname").", ".$langs->trans("EMail").", ".$langs->trans("Address")." ".$langs->trans("or")." ".$langs->trans("Town")."): ".$sall; } - print ''; + $moreforfilter = ''; + + print '
'; + print '
'."\n"; print ''; print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"c.rowid",$param,"","",$sortfield,$sortorder); @@ -301,6 +304,7 @@ if ($result) print "\n"; print "
"; + print ''; print ''; } else diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index 4f75e2f5ef0..155656e92eb 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -68,7 +68,7 @@ $extrafields = new ExtraFields($db); // fetch optionals attributes and labels $extralabels=$extrafields->fetch_name_optionals_label('adherent_type'); -if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // All tests are required to be compatible with all browsers { $search_lastname=""; $search_login=""; @@ -181,8 +181,11 @@ if (! $rowid && $action != 'create' && $action != 'edit') $num = $db->num_rows($result); $i = 0; - print ''; - + $moreforfilter = ''; + + print '
'; + print '
'."\n"; + print ''; print ''; print ''; @@ -209,6 +212,7 @@ if (! $rowid && $action != 'create' && $action != 'edit') $i++; } print "
'.$langs->trans("Ref").''.$langs->trans("Label").'
"; + print ''; } else { @@ -299,13 +303,13 @@ if ($rowid > 0) $linkback = ''.$langs->trans("BackToList").''; // Ref - print ''.$langs->trans("Ref").''; + print ''.$langs->trans("Ref").''; print ''; print $form->showrefnav($object, 'rowid', $linkback); print ''; // Label - print ''.$langs->trans("Label").''.dol_escape_htmltag($object->libelle).''; + print ''.$langs->trans("Label").''.dol_escape_htmltag($object->libelle).''; print ''.$langs->trans("SubscriptionRequired").''; print yn($object->subscription); @@ -462,9 +466,16 @@ if ($rowid > 0) print $langs->trans("Filter")." (".$langs->trans("Lastname").", ".$langs->trans("Firstname").", ".$langs->trans("EMail").", ".$langs->trans("Address")." ".$langs->trans("or")." ".$langs->trans("Town")."): ".$sall; } - print '
'; + print '
'; + print ''; + + print '
'; print_barre_liste('',$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords); - print ''; + + $moreforfilter = ''; + + print '
'; + print '
'."\n"; print ''; print_liste_field_titre($langs->trans("Name")." / ".$langs->trans("Company"),$_SERVER["PHP_SELF"],"d.lastname",$param,"","",$sortfield,$sortorder); @@ -477,9 +488,6 @@ if ($rowid > 0) print "\n"; // Lignes des champs de filtre - print ''; - print ''; - print ''; print ''; print "\n"; - print ''; $var=True; while ($i < $num && $i < $conf->liste_limit) @@ -596,7 +603,9 @@ if ($rowid > 0) } print "
'; @@ -502,7 +510,6 @@ if ($rowid > 0) print '
\n"; - + print ''; + print ''; + if ($num > $conf->liste_limit) { print_barre_liste('',$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords,''); diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php index 66b94896424..d72fb19a6e5 100644 --- a/htdocs/bookmarks/list.php +++ b/htdocs/bookmarks/list.php @@ -92,8 +92,11 @@ if ($resql) $param = ""; if ($optioncss != '') $param ='&optioncss='.$optioncss; - print ""; - + $moreforfilter=''; + + print '
'; + print '
'."\n"; + print ""; //print ""; print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"bid","", $param,'align="left"',$sortfield,$sortorder); @@ -200,6 +203,8 @@ if ($resql) $i++; } print "
 
"; + print ''; + $db->free($resql); } else diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php index d583d56074e..e0ccf854b89 100644 --- a/htdocs/comm/action/listactions.php +++ b/htdocs/comm/action/listactions.php @@ -132,7 +132,7 @@ $reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); // Purge search criteria -if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All test are required to be compatible with all browsers +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All tests are required to be compatible with all browsers { $actioncode=''; $search_title=''; @@ -335,9 +335,13 @@ if ($resql) print_barre_liste($s, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $link, $num, -1 * $nbtotalofrecords, '', 0, $nav, '', $limit); + $moreforfilter=''; + $i = 0; - print ''; - print ''; + print '
'; + print '
'."\n"; + + print ''; print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"a.id",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Title"),$_SERVER["PHP_SELF"],"a.label",$param,"","",$sortfield,$sortorder); //if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) @@ -354,11 +358,7 @@ if ($resql) print ''; print ''; print ''; - //if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) - //{ - print ''; - //print ''; - //} + print ''; print ''; @@ -367,7 +367,6 @@ if ($resql) print ''; print ''; print ''; - //print ''; print ''; print ''; // Action column @@ -499,7 +498,7 @@ if ($resql) $i++; } print "
'; print $form->select_date($datestart, 'datestart', 0, 0, 1, '', 1, 0, 1); print '
"; - + print ''; print ''; $db->free($resql); diff --git a/htdocs/comm/action/rapport/index.php b/htdocs/comm/action/rapport/index.php index a65a9153078..95c2874150a 100644 --- a/htdocs/comm/action/rapport/index.php +++ b/htdocs/comm/action/rapport/index.php @@ -114,9 +114,13 @@ if ($resql) print_barre_liste($langs->trans("Actions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_agenda', 0, '', '', $limit); + $moreforfilter=''; + $i = 0; - print ''; - print ''; + print '
'; + print '
'."\n"; + + print ''; print ''; print ''; print ''; @@ -162,7 +166,7 @@ if ($resql) $i++; } print "
'.$langs->trans("Date").''.$langs->trans("EventsNb").''.$langs->trans("Action").'
"; - + print ''; print ''; $db->free($resql); diff --git a/htdocs/comm/mailing/list.php b/htdocs/comm/mailing/list.php index bd94dd83f5c..b0801c817aa 100644 --- a/htdocs/comm/mailing/list.php +++ b/htdocs/comm/mailing/list.php @@ -111,8 +111,18 @@ if ($result) if ($filteremail) $param.='&filteremail='.urlencode($filteremail); print '
'; - print ''; - print ''; + if ($optioncss != '') print ''; + print ''; + print ''; + print ''; + print ''; + + $moreforfilter = ''; + + print '
'; + print '
'."\n"; + + print ''; print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"m.rowid",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Title"),$_SERVER["PHP_SELF"],"m.titre",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"m.date_creat",$param,"",'align="center"',$sortfield,$sortorder); @@ -193,7 +203,9 @@ if ($result) print "\n"; $i++; } - print '
'; + print ''; + print ''; + print ''; $db->free($result); } else diff --git a/htdocs/compta/bank/bankentries.php b/htdocs/compta/bank/bankentries.php index dc5f2d5fad0..49113ed7d58 100644 --- a/htdocs/compta/bank/bankentries.php +++ b/htdocs/compta/bank/bankentries.php @@ -728,18 +728,18 @@ if ($resql) $moreforfilter.='
'; $moreforfilter .= $langs->trans('DateOperationShort').' : '; - $moreforfilter .= '
'.$langs->trans('From') . ' '; + $moreforfilter .= '
'.$langs->trans('From') . ' '; $moreforfilter .= $form->select_date($search_dt_start, 'search_start_dt', 0, 0, 1, "search_form", 1, 0, 1).'
'; - $moreforfilter .= ' - '; - $moreforfilter .= '
'.$langs->trans('to') . ' ' . $form->select_date($search_dt_end, 'search_end_dt', 0, 0, 1, "search_form", 1, 0, 1).'
'; + //$moreforfilter .= ' - '; + $moreforfilter .= '
'.$langs->trans('to') . ' ' . $form->select_date($search_dt_end, 'search_end_dt', 0, 0, 1, "search_form", 1, 0, 1).'
'; $moreforfilter .= '
'; $moreforfilter.='
'; $moreforfilter .= $langs->trans('DateValueShort').' : '; - $moreforfilter .= '
'.$langs->trans('From') . ' '; + $moreforfilter .= '
'.$langs->trans('From') . ' '; $moreforfilter .= $form->select_date($search_dv_start, 'search_start_dv', 0, 0, 1, "search_form", 1, 0, 1).'
'; - $moreforfilter .= ' - '; - $moreforfilter .= '
'.$langs->trans('to') . ' ' . $form->select_date($search_dv_end, 'search_end_dv', 0, 0, 1, "search_form", 1, 0, 1).'
'; + //$moreforfilter .= ' - '; + $moreforfilter .= '
'.$langs->trans('to') . ' ' . $form->select_date($search_dv_end, 'search_end_dv', 0, 0, 1, "search_form", 1, 0, 1).'
'; $moreforfilter .= '
'; $parameters=array(); @@ -1090,7 +1090,7 @@ if ($resql) print ''; print ''.dol_print_date($db->jdate($objp->dv),"day").""; print ' '; - print ''; + print ''; print ''; print img_edit_remove() . " "; print ''; diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index b0437ee9e1b..d4a69d13a5b 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -1224,8 +1224,9 @@ class Account extends CommonObject $label .= '
' . $langs->trans('AccountNumber') . ': ' . $this->number; if (! empty($conf->accounting->enabled)) { + include_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; $langs->load("accountancy"); - $label .= '
' . $langs->trans('AccountAccounting') . ': ' . $this->account_number; + $label .= '
' . $langs->trans('AccountAccounting') . ': ' . length_accountg($this->account_number); $label .= '
' . $langs->trans('AccountancyJournal') . ': ' . $this->accountancy_journal; } $linkclose = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">'; diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index c1381be0ea5..51295cd0cf1 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -712,11 +712,11 @@ if (empty($reshook)) $array_options = $extrafieldsline->getOptionalsFromPost($extralabelsline); // Unset extrafield if (is_array($extralabelsline)) - { + { // Get extra fields foreach ($extralabelsline as $key => $value) - { - unset($_POST["options_" . $key]); + { + unset($_POST["options_" . $key]); } } @@ -1610,7 +1610,10 @@ else print $langs->trans("ToCreateAPredefinedInvoice", $langs->transnoentitiesnoconv("ChangeIntoRepeatableInvoice")).'

'; $i = 0; - print ''; + + print '
'; + print '
'."\n"; + print ''; print_liste_field_titre($langs->trans("Ref"),$_SERVER['PHP_SELF'],"f.titre","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("ThirdParty"),$_SERVER['PHP_SELF'],"s.nom","",$param,"",$sortfield,$sortorder); @@ -1780,6 +1783,9 @@ else else print ''; print "
'.$langs->trans("NoneF").'
"; + print "
"; + print ""; + $db->free($resql); } else diff --git a/htdocs/compta/paiement/cheque/list.php b/htdocs/compta/paiement/cheque/list.php index df02264badc..df507490aec 100644 --- a/htdocs/compta/paiement/cheque/list.php +++ b/htdocs/compta/paiement/cheque/list.php @@ -1,6 +1,6 @@ - * Copyright (C) 2007-2009 Laurent Destailleur + * Copyright (C) 2007-2016 Laurent Destailleur * Copyright (C) 2009-2012 Regis Houssin * Copyright (C) 2014 Alexandre Spangaro * Copyright (C) 2016 Juanjo Menent @@ -62,8 +62,13 @@ $formother = new FormOther($db); $checkdepositstatic=new RemiseCheque($db); $accountstatic=new Account($db); + +/* + * Actions + */ + // If click on purge search criteria ? -if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All tests are required to be compatible with all browsers { $search_ref=''; $search_amount=''; @@ -72,6 +77,8 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both $month=''; } + + /* * View */ @@ -134,8 +141,12 @@ if ($resql) print_barre_liste($langs->trans("MenuChequeDeposits"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_bank.png', '', '', $limit); - print ''; - print ''; + $moreforfilter=''; + + print '
'; + print '
'."\n"; + + print ''; print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"bc.ref","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"dp","",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Account"),$_SERVER["PHP_SELF"],"ba.label","",$param,"",$sortfield,$sortorder); @@ -219,6 +230,7 @@ if ($resql) print ''; } print "
"; + print "
"; print "\n"; } else diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php index 17882e76a6a..9495b56e90b 100644 --- a/htdocs/compta/paiement/list.php +++ b/htdocs/compta/paiement/list.php @@ -129,7 +129,7 @@ else $sql = "SELECT DISTINCT p.rowid, p.ref, p.datep as dp, p.amount,"; // DISTINCT is to avoid duplicate when there is a link to sales representatives $sql.= " p.statut, p.num_paiement,"; $sql.= " c.code as paiement_code,"; - $sql.= " ba.rowid as bid, ba.label,"; + $sql.= " ba.rowid as bid, ba.ref as bref, ba.label as blabel, ba.number, ba.account_number as account_number, ba.accountancy_journal as accountancy_journal,"; $sql.= " s.rowid as socid, s.nom as name"; // Add fields for extrafields foreach ($extrafields->attribute_list as $key => $val) $sql.=",ef.".$key.' as options_'.$key; @@ -222,7 +222,9 @@ if ($resql) print_barre_liste($langs->trans("ReceivedCustomersPayments"), $page, $_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num, $nbtotalofrecords,'title_accountancy.png', 0, '', '', $limit); - print ''; + print '
'; + print '
'."\n"; + print ''; print_liste_field_titre($langs->trans("RefPayment"),$_SERVER["PHP_SELF"],"p.rowid","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"dp","",$param,'align="center"',$sortfield,$sortorder); @@ -320,10 +322,14 @@ if ($resql) if (! empty($conf->banque->enabled)) { print '
'; - if ($objp->bid) + if ($objp->bid > 0) { $accountstatic->id=$objp->bid; - $accountstatic->label=$objp->label; + $accountstatic->ref=$objp->bref; + $accountstatic->label=$objp->blabel; + $accountstatic->number=$objp->number; + $accountstatic->account_number=$objp->account_number; + $accountstatic->accountancy_journal=$objp->accountancy_journal; print $accountstatic->getNomUrl(1); } else print ' '; @@ -347,6 +353,7 @@ if ($resql) $i++; } print "
\n"; + print ""; print "\n"; } else diff --git a/htdocs/compta/salaries/index.php b/htdocs/compta/salaries/index.php index 6355fc03fab..37d55522749 100644 --- a/htdocs/compta/salaries/index.php +++ b/htdocs/compta/salaries/index.php @@ -151,8 +151,10 @@ if ($result) print_barre_liste($langs->trans("SalariesPayments"),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num, $totalnboflines, 'title_accountancy.png', 0, '', '', $limit); - print ''; - print ''; + print '
'; + print '
'."\n"; + + print ''; print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"s.rowid","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Employee"),$_SERVER["PHP_SELF"],"u.rowid","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"s.label","",$param,'align="left"',$sortfield,$sortorder); @@ -257,7 +259,7 @@ if ($result) print ""; print "
"; - + print ''; print ''; $db->free($result); @@ -268,7 +270,5 @@ else } - llxFooter(); - $db->close(); diff --git a/htdocs/compta/sociales/index.php b/htdocs/compta/sociales/index.php index 6a4f7f836e7..66d6a65dd56 100644 --- a/htdocs/compta/sociales/index.php +++ b/htdocs/compta/sociales/index.php @@ -174,8 +174,9 @@ if ($resql) } else { - - print ''; + print '
'; + print '
'."\n"; + print ''; print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"id","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"cs.libelle","",$param,'align="left"',$sortfield,$sortorder); @@ -286,6 +287,7 @@ if ($resql) } print '
'; + print ''; } print ''; } diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 7b2e5528eb6..04b73ccbb6d 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -483,7 +483,8 @@ if ($moreforfilter) $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields -print ''; +print '
'; +print '
'."\n"; // Ligne des titres print ''; @@ -795,6 +796,7 @@ while ($i < min($num,$limit)) } print "
"; +print ""; if ($num > $limit || $page) print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_companies.png', 0, '', '', $limit, 1); diff --git a/htdocs/don/list.php b/htdocs/don/list.php index f5ce8b0350b..a6a60dc79c3 100644 --- a/htdocs/don/list.php +++ b/htdocs/don/list.php @@ -157,7 +157,9 @@ if ($resql) print $langs->trans("FilterOnInto", $search_all) . join(', ',$fieldstosearchall); } - print ""; + print '
'; + print '
'."\n"; + print ''; print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"d.rowid","", $param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"d.societe","", $param,"",$sortfield,$sortorder); @@ -237,6 +239,7 @@ if ($resql) $i++; } print "
"; + print ''; print "\n"; $db->free($resql); } diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index 8a093820f4c..d7624e146b1 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -127,7 +127,7 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; // Purge search criteria -if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All tests are required to be compatible with all browsers { $search_ref_exp=''; $search_ref_liv=''; diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index 764a875019d..16aca2068b7 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -414,8 +414,11 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print ' });'."\n"; print ' '."\n"; } - print ''; - print ''; + + print '
'; + print '
'."\n"; + + print ''; print ''; print ''; print ''; @@ -539,6 +542,8 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print "\n"; } print "
'.$langs->trans('Invoice').''.$langs->trans('RefSupplier').''.$langs->trans('Date').'
\n"; + + print ""; } $db->free($resql); } @@ -642,7 +647,10 @@ if (empty($action)) print '
'; if ($optioncss != '') print ''; - print ''; + + print '
'; + print '
'."\n"; + print ''; print_liste_field_titre($langs->trans('RefPayment'),$_SERVER["PHP_SELF"],'p.rowid','',$paramlist,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans('Date'),$_SERVER["PHP_SELF"],'dp','',$paramlist,'align="center"',$sortfield,$sortorder); @@ -726,6 +734,7 @@ if (empty($action)) $i++; } print "
"; + print ""; print "
\n"; } else diff --git a/htdocs/holiday/define_holiday.php b/htdocs/holiday/define_holiday.php index 92a93a0d357..51f3a70a409 100644 --- a/htdocs/holiday/define_holiday.php +++ b/htdocs/holiday/define_holiday.php @@ -170,7 +170,11 @@ else print '
'."\n"; print ''; - print ''; + $moreforfilter=''; + + print '
'; + print '
'."\n"; + print ""; print ''; if (count($typeleaves)) @@ -244,7 +248,7 @@ else } print '
'.$langs->trans('Employee').'
'; - + print ''; print '
'; } diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index c105e588c15..cbd4aa54e14 100644 --- a/htdocs/holiday/list.php +++ b/htdocs/holiday/list.php @@ -289,8 +289,10 @@ if ($sall) print $langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall); } -print ''; -print ""; +print '
'; +print '
'."\n"; + +print ''; print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"cp.rowid","",'','',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateCreateCP"),$_SERVER["PHP_SELF"],"cp.date_create","",'','align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Employee"),$_SERVER["PHP_SELF"],"cp.fk_user","",'','',$sortfield,$sortorder); @@ -453,6 +455,7 @@ if($holiday_payes == '2') } print '
'; +print ''; print ''; /*if ($user_id == $user->id) diff --git a/htdocs/holiday/view_log.php b/htdocs/holiday/view_log.php index 8ee69dc54ad..a04ef05c69b 100644 --- a/htdocs/holiday/view_log.php +++ b/htdocs/holiday/view_log.php @@ -71,7 +71,11 @@ if ($lastUpdate) else print $langs->trans('None'); print "
\n"; -print ''; +$moreforfilter=''; + +print '
'; +print '
'."\n"; + print ''; print ''; @@ -122,7 +126,7 @@ if ($log_holiday == '2') print ''."\n"; print '
'."\n"; - +print ''; llxFooter(); diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 357cda28610..c83afdb2333 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -322,6 +322,9 @@ AmountTTCShort=Amount (inc. tax) AmountHT=Amount (net of tax) AmountTTC=Amount (inc. tax) AmountVAT=Amount tax +MulticurrencyAlreadyPaid=Already payed, original currency +MulticurrencyRemainderToPay=Remain to pay, original currency +MulticurrencyPaymentAmount=Payment amount, original currency MulticurrencyAmountHT=Amount (net of tax), original currency MulticurrencyAmountTTC=Amount (inc. of tax), original currency MulticurrencyAmountVAT=Amount tax, original currency diff --git a/htdocs/loan/index.php b/htdocs/loan/index.php index b0c65b90cbf..0d79913f10e 100644 --- a/htdocs/loan/index.php +++ b/htdocs/loan/index.php @@ -121,7 +121,9 @@ if ($resql) print_barre_liste($langs->trans("Loans"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy.png', 0, '', '', $limit); - print ''; + print '
'; + print '
'."\n"; + print ''; print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"l.rowid","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"l.label","",$param,'align="left"',$sortfield,$sortorder); @@ -176,6 +178,7 @@ if ($resql) } print "
"; + print ''; print "\n"; $db->free($resql); } diff --git a/htdocs/margin/checkMargins.php b/htdocs/margin/checkMargins.php index 66ade35e09e..24451e39d77 100644 --- a/htdocs/margin/checkMargins.php +++ b/htdocs/margin/checkMargins.php @@ -179,7 +179,10 @@ if ($result) { print '
'; print_barre_liste($langs->trans("MarginDetails"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num, $nbtotalofrecords, ''); - print ""; + $moreforfilter=''; + + print '
'; + print '
'."\n"; print ''; @@ -244,6 +247,8 @@ if ($result) { } } print "
"; + + print ""; } else { dol_print_error($db); } diff --git a/htdocs/margin/productMargins.php b/htdocs/margin/productMargins.php index 24150a1050c..88570d1c1d4 100644 --- a/htdocs/margin/productMargins.php +++ b/htdocs/margin/productMargins.php @@ -203,8 +203,11 @@ if ($result) print '
'; print_barre_liste($langs->trans("MarginDetails"),$page,$_SERVER["PHP_SELF"],"&id=".$id,$sortfield,$sortorder,'',0,0,''); + $moreforfilter=''; + $i = 0; - print ""; + print '
'; + print '
'."\n"; print ''; if ($id > 0) { @@ -324,6 +327,7 @@ if ($result) print "\n"; print "
"; + print ''; } else { diff --git a/htdocs/opensurvey/list.php b/htdocs/opensurvey/list.php index aed5610bee0..584685ead51 100644 --- a/htdocs/opensurvey/list.php +++ b/htdocs/opensurvey/list.php @@ -78,8 +78,6 @@ llxHeader(); $param=''; $fieldtosortuser=empty($conf->global->MAIN_FIRSTNAME_NAME_POSITION)?'firstname':'lastname'; -print '
'."\n"; - print load_fiche_titre($langs->trans("OpenSurveyArea")); // List of surveys into database @@ -90,7 +88,11 @@ print ''; print ''; print ''; -print ''."\n"; +$moreforfilter = ''; + +print '
'; +print '
'."\n"; + print ''; print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.id_sondage",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Title"), $_SERVER["PHP_SELF"], "p.titre",$param,"","",$sortfield,$sortorder); @@ -104,7 +106,7 @@ print ''."\n"; print ''; print ''; -print ''; +print ''; print ''; print ''; print ''; @@ -197,11 +199,9 @@ while ($i < min($num,$limit)) } print '
'."\n"; - +print '
'; print ''; -print ''."\n"; - llxFooter(); $db->close(); diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 3e2f21e4ecd..9b101907bda 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -439,7 +439,8 @@ else $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields - print ''; + print '
'; + print '
'."\n"; print ''; if (! empty($arrayfields['p.ref']['checked'])) print_liste_field_titre($arrayfields['p.ref']['label'], $_SERVER["PHP_SELF"],"p.ref","",$param,"",$sortfield,$sortorder); if (! empty($arrayfields['pfp.ref_fourn']['checked'])) print_liste_field_titre($arrayfields['pfp.ref_fourn']['label'], $_SERVER["PHP_SELF"],"pfp.ref_fourn","",$param,"",$sortfield,$sortorder); @@ -839,6 +840,7 @@ else $db->free($resql); print "
"; + print ""; } print ''; } diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php index 036f56acc2e..13bc0fef186 100644 --- a/htdocs/product/reassort.php +++ b/htdocs/product/reassort.php @@ -86,7 +86,7 @@ if (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) || ! empty($conf->global * Actions */ -if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All test are required to be compatible with all browsers +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All tests are required to be compatible with all browsers { $sref=""; $snom=""; diff --git a/htdocs/product/reassortlot.php b/htdocs/product/reassortlot.php index e4ffad6cb52..471aa7e3e6d 100644 --- a/htdocs/product/reassortlot.php +++ b/htdocs/product/reassortlot.php @@ -83,7 +83,7 @@ if (! empty($canvas)) * Actions */ -if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All test are required to be compatible with all browsers +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All tests are required to be compatible with all browsers { $sref=""; $snom=""; diff --git a/htdocs/product/stock/list.php b/htdocs/product/stock/list.php index 453f49f0c33..0bfd9048352 100644 --- a/htdocs/product/stock/list.php +++ b/htdocs/product/stock/list.php @@ -146,7 +146,8 @@ if ($result) $moreforfilter=''; - print ''; + print '
'; + print '
'."\n"; print ""; print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"], "e.label","",$param,"",$sortfield,$sortorder); @@ -250,7 +251,8 @@ if ($result) $db->free($result); print "
"; - + print ""; + print ''; } else diff --git a/htdocs/product/stock/mouvement.php b/htdocs/product/stock/mouvement.php index 1a0710426f2..21444984d65 100644 --- a/htdocs/product/stock/mouvement.php +++ b/htdocs/product/stock/mouvement.php @@ -701,6 +701,7 @@ if ($resql) print '
'; print ''."\n"; + print ""; if (! empty($arrayfields['m.rowid']['checked'])) print_liste_field_titre($arrayfields['m.rowid']['label'],$_SERVER["PHP_SELF"],'m.rowid','',$param,'',$sortfield,$sortorder); if (! empty($arrayfields['m.datem']['checked'])) print_liste_field_titre($arrayfields['m.datem']['label'],$_SERVER["PHP_SELF"],'m.datem','',$param,'',$sortfield,$sortorder); @@ -742,7 +743,7 @@ if ($resql) { // Ref print ''; } if (! empty($arrayfields['m.datem']['checked'])) @@ -1005,12 +1006,13 @@ if ($resql) print "
'; - print ''; + print ''; print '
"; print '
'; print ""; - print "
"; // Add number of product when there is a filter on period if (count($arrayofuniqueproduct) == 1 && is_numeric($year)) { - $productidselected=0; + print "
"; + + $productidselected=0; foreach ($arrayofuniqueproduct as $key => $val) { $productidselected=$key; @@ -1036,8 +1038,6 @@ if ($resql) print "
\n"; //print ''; } - - } else { diff --git a/htdocs/product/stock/productlot_list.php b/htdocs/product/stock/productlot_list.php index 5aed199fd00..dfcda620a8c 100644 --- a/htdocs/product/stock/productlot_list.php +++ b/htdocs/product/stock/productlot_list.php @@ -142,7 +142,7 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; // Purge search criteria -if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") ||GETPOST("button_removefilter")) // All test are required to be compatible with all browsers +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") ||GETPOST("button_removefilter")) // All tests are required to be compatible with all browsers { $search_entity=''; $search_product=''; diff --git a/htdocs/projet/activity/perday.php b/htdocs/projet/activity/perday.php index 1082e5cebad..d803b55c875 100644 --- a/htdocs/projet/activity/perday.php +++ b/htdocs/projet/activity/perday.php @@ -347,8 +347,9 @@ else { print $langs->trans("AllTaskVisibleButEditIfYouAreAssigned").'
'; } -print '
'; -print "\n"; + +dol_fiche_end(); + // Filter on user /* dol_fiche_head(''); @@ -393,7 +394,9 @@ print ''; print '
'; -print ''; +print '
'; +print '
'."\n"; + print ''; print ''; print ''; @@ -444,8 +447,7 @@ else print ''; } print "
'.$langs->trans("RefTask").''.$langs->trans("LabelTask").'
'.$langs->trans("NoTasks").'
"; - -dol_fiche_end(); +print ''; print '
'; print ''; diff --git a/htdocs/projet/activity/perweek.php b/htdocs/projet/activity/perweek.php index ef40d81b388..c64105bca62 100644 --- a/htdocs/projet/activity/perweek.php +++ b/htdocs/projet/activity/perweek.php @@ -342,8 +342,8 @@ else { print $langs->trans("AllTaskVisibleButEditIfYouAreAssigned").'
'; } -print '
'; -print "\n"; + +dol_fiche_end(); // Filter on user /* dol_fiche_head(''); @@ -388,7 +388,8 @@ print '
'; print '
'; -print ''; +print '
'; +print '
'."\n"; print ''; print ''; @@ -465,12 +466,11 @@ else print ''; } print "
'.$langs->trans("RefTask").'
'.$langs->trans("NoTasks").'
"; +print ''; print ''."\n"; print ''."\n"; -dol_fiche_end(); - print '
'; print ''; print '
'; diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index 8c2c8909a84..c6a44f32c9b 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -450,7 +450,8 @@ if (! empty($moreforfilter)) $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields -print ''; +print '
'; +print '
'."\n"; print ''; if (! empty($arrayfields['p.ref']['checked'])) print_liste_field_titre($arrayfields['p.ref']['label'],$_SERVER["PHP_SELF"],"p.ref","",$param,"",$sortfield,$sortorder); @@ -867,6 +868,7 @@ $reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters); // N print $hookmanager->resPrint; print "
\n"; +print ''; print "\n"; diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php index 1179ca7546e..5526aa91efb 100644 --- a/htdocs/projet/tasks/list.php +++ b/htdocs/projet/tasks/list.php @@ -424,7 +424,8 @@ if (! empty($moreforfilter)) $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields -print ''; +print '
'; +print '
'."\n"; print ''; if (! empty($arrayfields['t.ref']['checked'])) print_liste_field_titre($arrayfields['t.ref']['label'],$_SERVER["PHP_SELF"],"t.ref","",$param,"",$sortfield,$sortorder); @@ -826,6 +827,7 @@ $reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters); // N print $hookmanager->resPrint; print "
"; +print ''; print ''; diff --git a/htdocs/resource/list.php b/htdocs/resource/list.php index 3b6338f0fce..b2ef82cf8c1 100644 --- a/htdocs/resource/list.php +++ b/htdocs/resource/list.php @@ -186,7 +186,11 @@ print ''; print ''; print ''; -print ''."\n"; +$moreforfilter = ''; + +print '
'; +print '
'."\n"; + print ''; if (! empty($arrayfields['t.ref']['checked'])) print_liste_field_titre($arrayfields['t.ref']['label'],$_SERVER["PHP_SELF"],"t.ref","",$param,"",$sortfield,$sortorder); if (! empty($arrayfields['ty.label']['checked'])) print_liste_field_titre($arrayfields['ty.label']['label'],$_SERVER["PHP_SELF"],"t.code","",$param,"",$sortfield,$sortorder); @@ -250,62 +254,62 @@ print "\n"; if ($ret) { - foreach ($object->lines as $resource) - { - $var=!$var; + foreach ($object->lines as $resource) + { + $var=!$var; - $style=''; - if ($resource->id == GETPOST('lineid')) $style='style="background: orange;"'; + $style=''; + if ($resource->id == GETPOST('lineid')) $style='style="background: orange;"'; - print ''; + print ''; - if (! empty($arrayfields['t.ref']['checked'])) - { - print ''; - } + if (! empty($arrayfields['t.ref']['checked'])) + { + print ''; + } - if (! empty($arrayfields['ty.label']['checked'])) - { - print ''; - } - // Extra fields - if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) - { - foreach($extrafields->attribute_label as $key => $val) - { - if (! empty($arrayfields["ef.".$key]['checked'])) - { - print 'getAlignFlag($key); - if ($align) print ' align="'.$align.'"'; - print '>'; - $tmpkey='options_'.$key; - print $extrafields->showOutputField($key, $resource->array_options[$tmpkey], '', 1); - print ''; - } - } - if (! $i) $totalarray['nbfield']++; - } + if (! empty($arrayfields['ty.label']['checked'])) + { + print ''; + } + // Extra fields + if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) + { + foreach($extrafields->attribute_label as $key => $val) + { + if (! empty($arrayfields["ef.".$key]['checked'])) + { + print 'getAlignFlag($key); + if ($align) print ' align="'.$align.'"'; + print '>'; + $tmpkey='options_'.$key; + print $extrafields->showOutputField($key, $resource->array_options[$tmpkey], '', 1); + print ''; + } + } + if (! $i) $totalarray['nbfield']++; + } - print ''; + print ''; - print ''; - } + print ''; + } - print '
'; - print $resource->getNomUrl(5); - print ''; + print $resource->getNomUrl(5); + print ''; - print $resource->type_label; - print ''; + print $resource->type_label; + print ''; - print ''; - print img_edit(); - print ''; - print ' '; - print ''; - print img_delete(); - print ''; - print ''; + print ''; + print img_edit(); + print ''; + print ' '; + print ''; + print img_delete(); + print ''; + print '
'; - print "\n"; + print ''; + print "\n"; } else { diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 42a866b204a..032df5b45d8 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -588,7 +588,8 @@ $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfiel if (empty($arrayfields['customerorsupplier']['checked'])) print ''; -print ''; +print '
'; +print '
'."\n"; print ''; if (! empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"],"s.nom","",$param,"",$sortfield,$sortorder); @@ -1109,6 +1110,7 @@ $reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters); // N print $hookmanager->resPrint; print "
"; +print ""; print ''; diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 0082bbab20f..117f6718f42 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -616,6 +616,7 @@ div.myavailability { .minwidth400imp { min-width: 400px !important; } .minwidth500imp { min-width: 500px !important; } } +.maxwidth25 { max-width: 25px; } .maxwidth50 { max-width: 50px; } .maxwidth75 { max-width: 75px; } .maxwidth100 { max-width: 100px; } diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 6d4b8488350..21ff3a03442 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -621,6 +621,7 @@ div.myavailability { .minwidth400imp { min-width: 400px !important; } .minwidth500imp { min-width: 500px !important; } } +.maxwidth25 { max-width: 25px; } .maxwidth50 { max-width: 50px; } .maxwidth75 { max-width: 75px; } .maxwidth100 { max-width: 100px; } diff --git a/htdocs/user/index.php b/htdocs/user/index.php index f5d9407d2e3..b1aba55a73f 100644 --- a/htdocs/user/index.php +++ b/htdocs/user/index.php @@ -311,7 +311,10 @@ $moreforfilter=''; $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields -print ''; + +print '
'; +print '
'."\n"; + print ''; if (! empty($arrayfields['u.login']['checked'])) print_liste_field_titre($langs->trans("Login"),$_SERVER['PHP_SELF'],"u.login",$param,"","",$sortfield,$sortorder); if (! empty($arrayfields['u.lastname']['checked'])) print_liste_field_titre($langs->trans("Lastname"),$_SERVER['PHP_SELF'],"u.lastname",$param,"","",$sortfield,$sortorder); @@ -655,9 +658,10 @@ $reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters); // N print $hookmanager->resPrint; print "
"; +print ''; print "\n"; -$db->free($result); +$db->free($result); llxFooter(); $db->close(); From 2e5634e60f813eb04eb8fc784d055f7348ff16d7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 27 Nov 2016 14:21:23 +0100 Subject: [PATCH 13/18] Fix responsive design --- htdocs/admin/modules.php | 50 +++++++++---------- .../core/tpl/admin_extrafields_view.tpl.php | 5 +- htdocs/theme/eldy/style.css.php | 6 ++- htdocs/theme/md/style.css.php | 8 ++- 4 files changed, 38 insertions(+), 31 deletions(-) diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 93dd8ea8969..a7b3065658d 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -286,23 +286,10 @@ if ($mode==='expdev') print $langs->trans("ModuleFamilyExperimental")."
$h = 0; $categidx='common'; // Main -//if (! empty($categ[$categidx])) -//{ - $head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx; - $head[$h][1] = $langs->trans("AvailableModules"); - $head[$h][2] = 'common'; - $h++; -//} - -/*$categidx='expdev'; -if (! empty($categ[$categidx])) -{ - $categidx='expdev'; - $head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx; - $head[$h][1] = $form->textwithpicto($langs->trans("ModuleFamilyExperimental"), $langs->trans('DoNotUseInProduction'), 1, 'warning', '', 0, 3); - $head[$h][2] = 'expdev'; - $h++; -}*/ +$head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx; +$head[$h][1] = $langs->trans("AvailableModules"); +$head[$h][2] = 'common'; +$h++; $categidx='marketplace'; $head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx; @@ -314,18 +301,19 @@ $h++; print "
\n"; -dol_fiche_head($head, $mode, ''); - $var=true; if ($mode != 'marketplace') { + print '
'; if ($optioncss != '') print ''; print ''; print ''; print ''; + dol_fiche_head($head, $mode, ''); + $moreforfilter = ''; $moreforfilter.='
'; $moreforfilter.= $langs->trans('Keyword') . ': '; @@ -362,12 +350,17 @@ if ($mode != 'marketplace') print $hookmanager->resPrint; //print '
'; } + + //dol_fiche_end(); + + print '

'; + //print '



'; - print '



'; - + $moreforfilter=''; + // Show list of modules - - print ''."\n"; + print '
'; + print '
'."\n"; $oldfamily=''; @@ -766,9 +759,12 @@ if ($mode != 'marketplace') } print "
\n"; + print ''; } else { + dol_fiche_head($head, $mode, ''); + // Marketplace print "\n"; print "\n"; @@ -780,7 +776,7 @@ else $var=!$var; print "\n"; $url='https://www.dolistore.com'; - print ''; + print ''; print ''; print ''; print ''; @@ -788,18 +784,18 @@ else $var=!$var; print "\n"; $url='https://partners.dolibarr.org'; - print ''; + print ''; print ''; print ''; print ''; print "
'.$langs->trans("DoliStoreDesc").''.$url.'
'.$langs->trans("DoliPartnersDesc").''.$url.'
\n"; + + //dol_fiche_end(); } - dol_fiche_end(); - // Show warning about external users if ($mode != 'marketplace') print info_admin(showModulesExludedForExternal($modules))."\n"; diff --git a/htdocs/core/tpl/admin_extrafields_view.tpl.php b/htdocs/core/tpl/admin_extrafields_view.tpl.php index 6acc81f009f..d20184c70b4 100644 --- a/htdocs/core/tpl/admin_extrafields_view.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_view.tpl.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2010-2016 Laurent Destailleur * Copyright (C) 2012 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -33,6 +33,7 @@ print '
'; // Load attribute_label $extrafields->fetch_name_optionals_label($elementtype); +print '
'; print ""; print ''; @@ -68,6 +69,6 @@ foreach($extrafields->attribute_type as $key => $value) } print "
"; - +print '
'; ?> diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 117f6718f42..6685b0cc745 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -631,6 +631,7 @@ div.myavailability { .titlefieldcreate { width: 20%; } .titlefield { width: 25%; } .titlefieldmiddle { width: 50%; } +.imgmaxwidth180 { max-width: 180px; } /* Force values for small screen 1400 */ @media only screen and (max-width: 1400px) @@ -990,6 +991,9 @@ img.photoref, div.photoref { width: 80px; object-fit: contain; } +img.fitcontain { + object-fit: contain; +} div.photoref { display:table-cell; vertical-align:middle; @@ -4514,7 +4518,7 @@ img.demothumb { } @media only screen and (max-width: 767px) { - .imgopensurveywizard { width:95%; height: auto; } + .imgopensurveywizard, .imgautosize { width:95%; height: auto; } #tooltip { position: absolute; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 21ff3a03442..43e5398b13e 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -636,6 +636,8 @@ div.myavailability { .titlefieldcreate { width: 20%; } .titlefield { width: 25%; } .titlefieldmiddle { width: 50%; } +.imgmaxwidth180 { max-width: 180px; } + /* Force values for small screen 1400 */ @media only screen and (max-width: 1400px) @@ -1038,6 +1040,9 @@ img.photoref, div.photoref { width: 80px; object-fit: contain; } +img.fitcontain { + object-fit: contain; +} div.photoref { display:table-cell; vertical-align:middle; @@ -1051,6 +1056,7 @@ img.photorefnoborder { object-fit: contain; border: 1px solid #CCC; } + .underrefbanner { } .underbanner { @@ -4441,7 +4447,7 @@ img.demothumb { } @media only screen and (max-width: 767px) { - .imgopensurveywizard { width:95%; height: auto; } + .imgopensurveywizard, .imgautosize { width:95%; height: auto; } #tooltip { position: absolute; From 017b18d5c6d5941ad49443bfa8b25dc99fbf21b8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 27 Nov 2016 15:53:47 +0100 Subject: [PATCH 14/18] Fix #6037 #6041 --- htdocs/commande/class/commande.class.php | 104 ++++++++++-------- htdocs/compta/facture/class/facture.class.php | 74 ++++++------- htdocs/contrat/class/contrat.class.php | 104 ++++++++++-------- htdocs/langs/en_US/bills.lang | 2 +- 4 files changed, 158 insertions(+), 126 deletions(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 177e58caef9..10ca4018ff5 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -875,54 +875,70 @@ class Commande extends CommonOrder $this->ref = $initialref; // Add object linked - if (is_array($this->linked_objects) && ! empty($this->linked_objects)) + if (! $error && $this->id && is_array($this->linked_objects) && ! empty($this->linked_objects)) { - foreach($this->linked_objects as $origin => $origin_id) + foreach($this->linked_objects as $origin => $tmp_origin_id) { - $ret = $this->add_object_linked($origin, $origin_id); - if (! $ret) - { - dol_print_error($this->db); - $error++; - } - - if (! empty($conf->global->MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN)) - { - $originforcontact = $origin; - $originidforcontact = $origin_id; - if ($originforcontact == 'shipping') // shipment and order share the same contacts. If creating from shipment we take data of order - { - require_once DOL_DOCUMENT_ROOT . '/expedition/class/expedition.class.php'; - $exp = new Expedition($db); - $exp->fetch($origin_id); - $exp->fetchObjectLinked(); - if (count($exp->linkedObjectsIds['commande']) > 0) - { - foreach ($exp->linkedObjectsIds['commande'] as $key => $value) - { - $originforcontact = 'commande'; - $originidforcontact = $value->id; - break; // We take first one - } - } - } - - $sqlcontact = "SELECT ctc.code, ctc.source, ec.fk_socpeople FROM ".MAIN_DB_PREFIX."element_contact as ec, ".MAIN_DB_PREFIX."c_type_contact as ctc"; - $sqlcontact.= " WHERE element_id = ".$originidforcontact." AND ec.fk_c_type_contact = ctc.rowid AND ctc.element = '".$originforcontact."'"; - - $resqlcontact = $this->db->query($sqlcontact); - if ($resqlcontact) - { - while($objcontact = $this->db->fetch_object($resqlcontact)) - { - //print $objcontact->code.'-'.$objcontact->source.'-'.$objcontact->fk_socpeople."\n"; - $this->add_contact($objcontact->fk_socpeople, $objcontact->code, $objcontact->source); // May failed because of duplicate key or because code of contact type does not exists for new object - } - } - else dol_print_error($resqlcontact); - } + if (is_array($tmp_origin_id)) // New behaviour, if linked_object can have several links per type, so is something like array('contract'=>array(id1, id2, ...)) + { + foreach($tmp_origin_id as $origin_id) + { + $ret = $this->add_object_linked($origin, $origin_id); + if (! $ret) + { + dol_print_error($this->db); + $error++; + } + } + } + else // Old behaviour, if linked_object has only one link per type, so is something like array('contract'=>id1)) + { + $origin_id = $tmp_origin_id; + $ret = $this->add_object_linked($origin, $origin_id); + if (! $ret) + { + dol_print_error($this->db); + $error++; + } + } } } + + if (! $error && $this->id && ! empty($conf->global->MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN) && ! empty($this->origin) && ! empty($this->origin_id)) // Get contact from origin object + { + $originforcontact = $this->origin; + $originidforcontact = $this->origin_id; + if ($originforcontact == 'shipping') // shipment and order share the same contacts. If creating from shipment we take data of order + { + require_once DOL_DOCUMENT_ROOT . '/expedition/class/expedition.class.php'; + $exp = new Expedition($db); + $exp->fetch($this->origin_id); + $exp->fetchObjectLinked(); + if (count($exp->linkedObjectsIds['commande']) > 0) + { + foreach ($exp->linkedObjectsIds['commande'] as $key => $value) + { + $originforcontact = 'commande'; + $originidforcontact = $value->id; + break; // We take first one + } + } + } + + $sqlcontact = "SELECT ctc.code, ctc.source, ec.fk_socpeople FROM ".MAIN_DB_PREFIX."element_contact as ec, ".MAIN_DB_PREFIX."c_type_contact as ctc"; + $sqlcontact.= " WHERE element_id = ".$originidforcontact." AND ec.fk_c_type_contact = ctc.rowid AND ctc.element = '".$originforcontact."'"; + + $resqlcontact = $this->db->query($sqlcontact); + if ($resqlcontact) + { + while($objcontact = $this->db->fetch_object($resqlcontact)) + { + //print $objcontact->code.'-'.$objcontact->source.'-'.$objcontact->fk_socpeople."\n"; + $this->add_contact($objcontact->fk_socpeople, $objcontact->code, $objcontact->source); // May failed because of duplicate key or because code of contact type does not exists for new object + } + } + else dol_print_error($resqlcontact); + } } if (! $error) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 61f51b19436..e02ec4541ef 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -409,7 +409,7 @@ class Facture extends CommonInvoice { foreach($this->linked_objects as $origin => $tmp_origin_id) { - if (is_array($tmp_origin_id)) // New baheviour, if linked_object can have several links per type, so is something like array('contract'=>array(id1, id2, ...)) + if (is_array($tmp_origin_id)) // New behaviour, if linked_object can have several links per type, so is something like array('contract'=>array(id1, id2, ...)) { foreach($tmp_origin_id as $origin_id) { @@ -431,44 +431,44 @@ class Facture extends CommonInvoice $error++; } } - - if (! empty($conf->global->MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN)) - { - $originforcontact = $origin; - $originidforcontact = $origin_id; - if ($originforcontact == 'shipping') // shipment and order share the same contacts. If creating from shipment we take data of order - { - require_once DOL_DOCUMENT_ROOT . '/expedition/class/expedition.class.php'; - $exp = new Expedition($this->db); - $exp->fetch($origin_id); - $exp->fetchObjectLinked(); - if (count($exp->linkedObjectsIds['commande']) > 0) - { - foreach ($exp->linkedObjectsIds['commande'] as $key => $value) - { - $originforcontact = 'commande'; - $originidforcontact = $value->id; - break; // We take first one - } - } - } - - $sqlcontact = "SELECT ctc.code, ctc.source, ec.fk_socpeople FROM ".MAIN_DB_PREFIX."element_contact as ec, ".MAIN_DB_PREFIX."c_type_contact as ctc"; - $sqlcontact.= " WHERE element_id = ".$originidforcontact." AND ec.fk_c_type_contact = ctc.rowid AND ctc.element = '".$originforcontact."'"; - - $resqlcontact = $this->db->query($sqlcontact); - if ($resqlcontact) - { - while($objcontact = $this->db->fetch_object($resqlcontact)) - { - //print $objcontact->code.'-'.$objcontact->source.'-'.$objcontact->fk_socpeople."\n"; - $this->add_contact($objcontact->fk_socpeople, $objcontact->code, $objcontact->source); // May failed because of duplicate key or because code of contact type does not exists for new object - } - } - else dol_print_error($resqlcontact); - } } } + + if (! $error && $this->id && ! empty($conf->global->MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN) && ! empty($this->origin) && ! empty($this->origin_id)) // Get contact from origin object + { + $originforcontact = $this->origin; + $originidforcontact = $this->origin_id; + if ($originforcontact == 'shipping') // shipment and order share the same contacts. If creating from shipment we take data of order + { + require_once DOL_DOCUMENT_ROOT . '/expedition/class/expedition.class.php'; + $exp = new Expedition($this->db); + $exp->fetch($this->origin_id); + $exp->fetchObjectLinked(); + if (count($exp->linkedObjectsIds['commande']) > 0) + { + foreach ($exp->linkedObjectsIds['commande'] as $key => $value) + { + $originforcontact = 'commande'; + $originidforcontact = $value->id; + break; // We take first one + } + } + } + + $sqlcontact = "SELECT ctc.code, ctc.source, ec.fk_socpeople FROM ".MAIN_DB_PREFIX."element_contact as ec, ".MAIN_DB_PREFIX."c_type_contact as ctc"; + $sqlcontact.= " WHERE element_id = ".$originidforcontact." AND ec.fk_c_type_contact = ctc.rowid AND ctc.element = '".$originforcontact."'"; + + $resqlcontact = $this->db->query($sqlcontact); + if ($resqlcontact) + { + while($objcontact = $this->db->fetch_object($resqlcontact)) + { + //print $objcontact->code.'-'.$objcontact->source.'-'.$objcontact->fk_socpeople."\n"; + $this->add_contact($objcontact->fk_socpeople, $objcontact->code, $objcontact->source); // May failed because of duplicate key or because code of contact type does not exists for new object + } + } + else dol_print_error($resqlcontact); + } /* * Insert lines of invoices into database diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 75100aae9e6..a8f84731650 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -934,56 +934,72 @@ class Contrat extends CommonObject if (! $error) { // Add object linked - if (is_array($this->linked_objects) && ! empty($this->linked_objects)) + if (! $error && $this->id && is_array($this->linked_objects) && ! empty($this->linked_objects)) { - foreach($this->linked_objects as $origin => $origin_id) + foreach($this->linked_objects as $origin => $tmp_origin_id) { - $ret = $this->add_object_linked($origin, $origin_id); - if (! $ret) + if (is_array($tmp_origin_id)) // New behaviour, if linked_object can have several links per type, so is something like array('contract'=>array(id1, id2, ...)) { - dol_print_error($this->db); - $error++; + foreach($tmp_origin_id as $origin_id) + { + $ret = $this->add_object_linked($origin, $origin_id); + if (! $ret) + { + dol_print_error($this->db); + $error++; + } + } + } + else // Old behaviour, if linked_object has only one link per type, so is something like array('contract'=>id1)) + { + $origin_id = $tmp_origin_id; + $ret = $this->add_object_linked($origin, $origin_id); + if (! $ret) + { + dol_print_error($this->db); + $error++; + } } - - if (! empty($conf->global->MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN)) - { - $originforcontact = $origin; - $originidforcontact = $origin_id; - if ($originforcontact == 'shipping') // shipment and order share the same contacts. If creating from shipment we take data of order - { - require_once DOL_DOCUMENT_ROOT . '/expedition/class/expedition.class.php'; - $exp = new Expedition($db); - $exp->fetch($origin_id); - $exp->fetchObjectLinked(); - if (count($exp->linkedObjectsIds['commande']) > 0) - { - foreach ($exp->linkedObjectsIds['commande'] as $key => $value) - { - $originforcontact = 'commande'; - $originidforcontact = $value->id; - break; // We take first one - } - } - } - - $sqlcontact = "SELECT ctc.code, ctc.source, ec.fk_socpeople FROM ".MAIN_DB_PREFIX."element_contact as ec, ".MAIN_DB_PREFIX."c_type_contact as ctc"; - $sqlcontact.= " WHERE element_id = ".$originidforcontact." AND ec.fk_c_type_contact = ctc.rowid AND ctc.element = '".$originforcontact."'"; - - $resqlcontact = $this->db->query($sqlcontact); - if ($resqlcontact) - { - while($objcontact = $this->db->fetch_object($resqlcontact)) - { - if ($objcontact->source == 'internal' && in_array($objcontact->code, array('SALESREPSIGN', 'SALESREPFOLL'))) continue; // ignore this, already forced previously - - //print $objcontact->code.'-'.$objcontact->source.'-'.$objcontact->fk_socpeople."\n"; - $this->add_contact($objcontact->fk_socpeople, $objcontact->code, $objcontact->source); // May failed because of duplicate key or because code of contact type does not exists for new object - } - } - else dol_print_error($resqlcontact); - } } } + + if (! $error && $this->id && ! empty($conf->global->MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN) && ! empty($this->origin) && ! empty($this->origin_id)) // Get contact from origin object + { + $originforcontact = $this->origin; + $originidforcontact = $this->origin_id; + if ($originforcontact == 'shipping') // shipment and order share the same contacts. If creating from shipment we take data of order + { + require_once DOL_DOCUMENT_ROOT . '/expedition/class/expedition.class.php'; + $exp = new Expedition($db); + $exp->fetch($this->origin_id); + $exp->fetchObjectLinked(); + if (count($exp->linkedObjectsIds['commande']) > 0) + { + foreach ($exp->linkedObjectsIds['commande'] as $key => $value) + { + $originforcontact = 'commande'; + $originidforcontact = $value->id; + break; // We take first one + } + } + } + + $sqlcontact = "SELECT ctc.code, ctc.source, ec.fk_socpeople FROM ".MAIN_DB_PREFIX."element_contact as ec, ".MAIN_DB_PREFIX."c_type_contact as ctc"; + $sqlcontact.= " WHERE element_id = ".$originidforcontact." AND ec.fk_c_type_contact = ctc.rowid AND ctc.element = '".$originforcontact."'"; + + $resqlcontact = $this->db->query($sqlcontact); + if ($resqlcontact) + { + while($objcontact = $this->db->fetch_object($resqlcontact)) + { + if ($objcontact->source == 'internal' && in_array($objcontact->code, array('SALESREPSIGN', 'SALESREPFOLL'))) continue; // ignore this, already forced previously + + //print $objcontact->code.'-'.$objcontact->source.'-'.$objcontact->fk_socpeople."\n"; + $this->add_contact($objcontact->fk_socpeople, $objcontact->code, $objcontact->source); // May failed because of duplicate key or because code of contact type does not exists for new object + } + } + else dol_print_error($resqlcontact); + } } if (! $error) diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index ca1468b3b09..9ee5510f983 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -487,5 +487,5 @@ ToCreateARecurringInvoiceGene=To generate future invoices regularly and manually ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated automatically, ask you administrator to enable and setup module %s. Note that both method (manual and automatic) can be used together with no risk of duplication. DeleteRepeatableInvoice=Delete template invoice ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? -CreateOneBillByThird=Create one invoice per third (otherwise, one invoice per order) +CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) BillCreated=%s bill(s) created From 663f7938f83343bbd172005ab7328a97666b5690 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 27 Nov 2016 20:02:57 +0100 Subject: [PATCH 15/18] Fxi responsive design --- .../class/html.formventilation.class.php | 4 +- htdocs/compta/bank/card.php | 6 +- htdocs/compta/bank/treso.php | 11 ++-- htdocs/margin/tabs/productMargins.php | 4 +- htdocs/product/card.php | 62 +++++++++---------- htdocs/product/fournisseurs.php | 4 +- htdocs/product/price.php | 4 +- htdocs/product/stock/product.php | 7 ++- 8 files changed, 55 insertions(+), 47 deletions(-) diff --git a/htdocs/accountancy/class/html.formventilation.class.php b/htdocs/accountancy/class/html.formventilation.class.php index 069e0ea3df3..2c538e7a627 100644 --- a/htdocs/accountancy/class/html.formventilation.class.php +++ b/htdocs/accountancy/class/html.formventilation.class.php @@ -71,8 +71,8 @@ class FormVentilation extends Form * @param string $htmlname Name of field in html form * @param int $showempty Add an empty field * @param array $event Event options - * @param int $select_in selectid value is a aa.rowid (0 default) or aa.account_number (1) - * @param int $select_out set value returned by select 0=rowid (default), 1=account_number + * @param int $select_in 0=selectid value is a aa.rowid (default) or 1=selectid is aa.account_number + * @param int $select_out Set value returned by select. 0=rowid (default), 1=account_number * @param string $morecss More css non HTML object * @param string $usecache Key to use to store result into a cache. Next call with same key will reuse the cache. * @return string String with HTML select diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index 7b44bb5b6b4..d2b3c167872 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -603,7 +603,7 @@ else print ''.$object->label.'';*/ // Type - print ''.$langs->trans("AccountType").''; + print ''.$langs->trans("AccountType").''; print ''.$object->type_lib[$object->type].''; // Currency @@ -683,12 +683,12 @@ else // Categories if ($conf->categorie->enabled) { - print ''.$langs->trans("Categories").''; + print ''.$langs->trans("Categories").''; print $form->showCategories($object->id,'account',1); print ""; } - print ''.$langs->trans("Comment").''; + print ''.$langs->trans("Comment").''; print ''.dol_htmlentitiesbr($object->comment).''; print ''; diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php index 3de977f29cf..7cc31e576f6 100644 --- a/htdocs/compta/bank/treso.php +++ b/htdocs/compta/bank/treso.php @@ -104,10 +104,9 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) $solde = $object->solde(0); - /* - * Affiche tableau des echeances a venir - */ - print ''; + // Show next coming entries + print '
'; + print '
'; // Ligne de titre tableau des ecritures print ''; @@ -121,7 +120,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) $var=true; - // Solde actuel + // Current balance $var=!$var; print ''; print ''; @@ -327,7 +326,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) print ''; print "
'.$langs->trans("CurrentBalance").'
"; - + print ""; } else { diff --git a/htdocs/margin/tabs/productMargins.php b/htdocs/margin/tabs/productMargins.php index f6d94fb8135..7550b672007 100644 --- a/htdocs/margin/tabs/productMargins.php +++ b/htdocs/margin/tabs/productMargins.php @@ -167,6 +167,8 @@ if ($id > 0 || ! empty($ref)) print_barre_liste($langs->trans("MarginDetails"),$page,$_SERVER["PHP_SELF"],"&id=$object->id",$sortfield,$sortorder,'',0,0,''); $i = 0; + + print '
'; print ''; print ''; @@ -252,7 +254,7 @@ if ($id > 0 || ! empty($ref)) print ''; print "\n"; print "
 
"; - print '
'; + print '
'; } else { dol_print_error($db); } diff --git a/htdocs/product/card.php b/htdocs/product/card.php index a564818f9e7..c31c8885454 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -144,7 +144,6 @@ if (empty($reshook)) */ else if ($action == 'builddoc' && $user->rights->produit->creer) { - // Save last template used to generate document if (GETPOST('model')) $object->setDocModel($user, GETPOST('model','alpha')); @@ -749,7 +748,7 @@ if (empty($reshook)) { $buyprice = $result; } - + $result = $facture->addline( $desc, $pu_ht, @@ -790,7 +789,6 @@ if (empty($reshook)) else { $action=""; setEventMessages($langs->trans("WarningSelectOneDocument"), null, 'warnings'); - } } } @@ -891,11 +889,12 @@ else dol_fiche_head(''); - print ''; + print '
'; + print ''; $tmpcode=''; if (! empty($modCodeProduct->code_auto)) $tmpcode=$modCodeProduct->getNextValue($object,$type); - print ''; // Label - print ''; + print ''; // On sell print ''; } // Description (used in invoice, propal...) print '"; @@ -967,11 +966,11 @@ else if ($type != 1 && ! empty($conf->stock->enabled)) { print ''; // Stock desired level print ''; } else @@ -1043,7 +1042,7 @@ else // Custom code if (empty($conf->global->PRODUCT_DISABLE_CUSTOM_INFO) && empty($type)) { - print ''; + print ''; // Origin country print '"; @@ -1093,18 +1092,18 @@ else print '
'.$langs->trans("Ref").''; + print ''.$langs->trans("Ref").''; if ($refalreadyexists) { print $langs->trans("RefAlreadyExists"); @@ -903,7 +902,7 @@ else print '
'.$langs->trans("Label").'
'.$langs->trans("Label").'
'.$langs->trans("Status").' ('.$langs->trans("Sell").')'; @@ -946,14 +945,14 @@ else print ''.$langs->trans("BarcodeValue").''; $tmpcode=isset($_POST['barcode'])?GETPOST('barcode'):$object->barcode; if (empty($tmpcode) && ! empty($modBarCodeProduct->code_auto)) $tmpcode=$modBarCodeProduct->getNextValue($object,$type); - print ''; + print ''; print '
'.$langs->trans("Description").''; - $doleditor = new DolEditor('desc', GETPOST('desc'), '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_4, '80%'); + $doleditor = new DolEditor('desc', GETPOST('desc'), '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_4, '90%'); $doleditor->Create(); print "
'.$langs->trans("StockLimit").''; - print ''; + print ''; print ''.$langs->trans("DesiredStock").''; - print ''; + print ''; print '
'.$langs->trans("CustomCode").'
'.$langs->trans("CustomCode").''.$langs->trans("CountryOrigin").''; print $form->select_country(GETPOST('country_id','int'),'country_id'); @@ -1065,7 +1064,7 @@ else print '
'.$langs->trans("NoteNotVisibleOnBill").''; // We use dolibarr_details as type of DolEditor here, because we must not accept images as description is included into PDF and not accepted by TCPDF. - $doleditor = new DolEditor('note_private', GETPOST('note_private'), '', 140, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_8, '80%'); + $doleditor = new DolEditor('note_private', GETPOST('note_private'), '', 140, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_8, '90%'); $doleditor->Create(); print "
'; // Price - print ''; - print ''; + print ''; // Min price print ''; - print ''; // VAT - print ''; @@ -1113,32 +1112,33 @@ else print '
'; } + // Accountancy codes print '
'.$langs->trans("SellingPrice").''; + print '
'.$langs->trans("SellingPrice").''; print $form->selectPriceBaseType($object->price_base_type, "price_base_type"); print '
'.$langs->trans("MinPrice").''; + print ''; print '
'.$langs->trans("VATRate").''; + print '
'.$langs->trans("VATRate").''; print $form->load_tva("tva_tx",-1,$mysoc,''); print '
'; if (! empty($conf->accounting->enabled)) { // Accountancy_code_sell print ''; - print ''; // Accountancy_code_buy print ''; - print ''; } else // For external software { // Accountancy_code_sell print ''; - print ''; // Accountancy_code_buy print ''; - print ''; } print '
'.$langs->trans("ProductAccountancySellCode").''; - print $formaccountancy->select_account($object->accountancy_code_sell, 'accountancy_code_sell', 1, '', 0, 1); + print ''; + print $formaccountancy->select_account(GETPOST('accountancy_code_sell'), 'accountancy_code_sell', 1, null, 1, 1, ''); print '
'.$langs->trans("ProductAccountancyBuyCode").''; - print $formaccountancy->select_account($object->accountancy_code_buy, 'accountancy_code_buy', 1, '', 0, 1); + print ''; + print $formaccountancy->select_account(GETPOST('accountancy_code_buy'), 'accountancy_code_buy', 1, null, 1, 1, ''); print '
'.$langs->trans("ProductAccountancySellCode").''; + print ''; print '
'.$langs->trans("ProductAccountancyBuyCode").''; + print ''; print '
'; @@ -1185,10 +1185,10 @@ else print ''; // Ref - print ''; + print ''; // Label - print ''; + print ''; // Status To sell print ''; + print ''; // Origin country print ''; + print ''; print ''; // Accountancy_code_buy - print ''; + print ''; print ''; @@ -1420,13 +1420,13 @@ else else // For external software { // Accountancy_code_sell - print ''; - print ''; + print ''; // Accountancy_code_buy - print ''; - print ''; + print ''; } print '
'.$langs->trans("Ref").'
'.$langs->trans("Ref").'
'.$langs->trans("Label").'
'.$langs->trans("Label").'
'.$langs->trans("Status").' ('.$langs->trans("Sell").')'; @@ -1356,7 +1356,7 @@ else // Custom code if (! $object->isService() && empty($conf->global->PRODUCT_DISABLE_CUSTOM_INFO)) { - print '
'.$langs->trans("CustomCode").'
'.$langs->trans("CustomCode").''.$langs->trans("CountryOrigin").''; print $form->select_country($object->country_id, 'country_id', '', 0, 'minwidth100 maxwidthonsmartphone'); @@ -1406,13 +1406,13 @@ else if (! empty($conf->accounting->enabled)) { // Accountancy_code_sell - print '
'.$langs->trans("ProductAccountancySellCode").'
'.$langs->trans("ProductAccountancySellCode").''; print $formaccountancy->select_account($object->accountancy_code_sell, 'accountancy_code_sell', 1, '', 1, 1); print '
'.$langs->trans("ProductAccountancyBuyCode").'
'.$langs->trans("ProductAccountancyBuyCode").''; print $formaccountancy->select_account($object->accountancy_code_buy, 'accountancy_code_buy', 1, '', 1, 1); print '
'.$langs->trans("ProductAccountancySellCode").''; + print '
'.$langs->trans("ProductAccountancySellCode").''; print '
'.$langs->trans("ProductAccountancyBuyCode").''; + print '
'.$langs->trans("ProductAccountancyBuyCode").''; print '
'; diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 05d70e7eb26..a71db876dd0 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -587,7 +587,8 @@ if ($id > 0 || $ref) if ($user->rights->fournisseur->lire) { // Suppliers list title - print ''; + print '
'; + print '
'; if ($object->isProduct()) $nblignefour=4; else $nblignefour=4; @@ -713,6 +714,7 @@ if ($id > 0 || $ref) } print '
'; + print ''; } } } diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 4e04a4c626a..f74a637d270 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -959,7 +959,7 @@ else } } if ($action != 'edit_price_by_qty') { - print ''; + print ''; // FIXME a form into a table is not allowed print ''; print ''; print ''; @@ -1345,6 +1345,7 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action=='showlog_default_ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print_barre_liste($langs->trans("DefaultPrice"),'','','','','',$backbutton, 0, 0, 'title_accountancy.png'); else print_barre_liste($langs->trans("PriceByCustomerLog"),'','','','','','', 0, 0, 'title_accountancy.png'); + print '
'; print ''; print ''; @@ -1450,6 +1451,7 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action=='showlog_default_ $db->free($result); print "
"; + print '
'; print "
"; } } else { diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 4c00a2b9675..7a0068fdda8 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -785,8 +785,10 @@ if (empty($reshook)) * Stock detail (by warehouse). May go down into batch details. */ +print '
'; print ''; -print ''; +print ''; +print ''; print ''; print ''; print ''; @@ -918,10 +920,11 @@ else print $langs->trans("Variable"); print ''; print ""; print "
'.$langs->trans("Warehouse").'
'.$langs->trans("Warehouse").''.$langs->trans("NumberOfUnit").''.$langs->trans("AverageUnitPricePMPShort").''.$langs->trans("EstimatedStockValueShort").'
"; +print '
'; if(!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE)) { - print '

'; + print '

'; print_titre($langs->trans('AddNewProductStockWarehouse')); //print '
'; From e52e17eec2d37eef8b378d2e0c3ab583feb7ac8d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 27 Nov 2016 20:11:39 +0100 Subject: [PATCH 16/18] Fix Responsive design --- htdocs/comm/action/peruser.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index 5651bca338b..f5de3fa6ca3 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -590,6 +590,7 @@ echo ''; //print "begin_d=".$begin_d." end_d=".$end_d; +echo '
'; echo ''; echo ''; @@ -766,7 +767,7 @@ foreach ($usernames as $username) } echo "
\n"; - +echo '
'; if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) { From ccba3876910ee4869735762c8c2936d337172fc0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 27 Nov 2016 20:18:10 +0100 Subject: [PATCH 17/18] Fix Responsive design --- htdocs/holiday/list.php | 2 +- htdocs/user/agenda_extsites.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index cbd4aa54e14..60da780370d 100644 --- a/htdocs/holiday/list.php +++ b/htdocs/holiday/list.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013-2015 Laurent Destailleur + * Copyright (C) 2013-2016 Laurent Destailleur * Copyright (C) 2012-2016 Regis Houssin * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/user/agenda_extsites.php b/htdocs/user/agenda_extsites.php index ef7ffd9f70b..62efff2f88f 100644 --- a/htdocs/user/agenda_extsites.php +++ b/htdocs/user/agenda_extsites.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2008-2016 Laurent Destailleur * Copyright (C) 2011-2014 Juanjo Menent * * This program is free software; you can redistribute it and/or modify @@ -164,6 +164,7 @@ $selectedvalue=$conf->global->AGENDA_DISABLE_EXT; if ($selectedvalue==1) $selectedvalue=0; else $selectedvalue=1; $var=true; +print '
'; print ""; print ""; @@ -204,7 +205,7 @@ while ($i <= $MAXAGENDA) } print '
'; - +print '
'; dol_fiche_end(); From e59edca855e8c47e8abb0db606005a48cfea3776 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 27 Nov 2016 20:55:59 +0100 Subject: [PATCH 18/18] Fix Responsive design --- htdocs/comm/propal/card.php | 4 +++- htdocs/comm/propal/info.php | 2 ++ htdocs/commande/card.php | 4 +++- htdocs/compta/facture.php | 4 +++- htdocs/contrat/card.php | 6 ++++-- htdocs/core/tpl/ajaxrow.tpl.php | 4 ++-- htdocs/core/tpl/contacts.tpl.php | 2 ++ htdocs/fourn/commande/card.php | 3 ++- htdocs/fourn/facture/card.php | 4 ++-- htdocs/supplier_proposal/card.php | 3 ++- 10 files changed, 25 insertions(+), 11 deletions(-) diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 69891ca5ad4..71e687e2168 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -2209,6 +2209,7 @@ if ($action == 'create') include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php'; } + print '
'; print ''; if (! empty($object->lines)) @@ -2230,7 +2231,8 @@ if ($action == 'create') } print '
'; - + print '
'; + print "\n"; dol_fiche_end(); diff --git a/htdocs/comm/propal/info.php b/htdocs/comm/propal/info.php index 8415cb8618f..c4f3a3e4f4e 100644 --- a/htdocs/comm/propal/info.php +++ b/htdocs/comm/propal/info.php @@ -43,6 +43,8 @@ $result = restrictedArea($user, 'propal', $id); * View */ +$form = new Form($db); + llxHeader('',$langs->trans('Proposal'),'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos'); $object = new Propal($db); diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 51c77e2632f..a7bd3acbbb8 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -2409,6 +2409,7 @@ if ($action == 'create' && $user->rights->commande->creer) include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php'; } + print '
'; print ''; // Show object lines @@ -2434,7 +2435,8 @@ if ($action == 'create' && $user->rights->commande->creer) } } print '
'; - + print '
'; + print "\n"; dol_fiche_end(); diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 2bf69038e78..07cb56b830b 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -3726,6 +3726,7 @@ else if ($id > 0 || ! empty($ref)) include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php'; } + print '
'; print ''; // Show global modifiers @@ -3797,7 +3798,8 @@ else if ($id > 0 || ! empty($ref)) } print "
\n"; - + print "
"; + print "\n"; dol_fiche_end(); diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 588d6282140..c6e9a12e338 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1928,7 +1928,9 @@ else '; print '
'; - print ''; // Array with (n*2)+1 lines + + print '
'; + print '
'; // Array with (n*2)+1 lines // Trick to not show product entries $savproductenabled=$conf->product->enabled; @@ -1950,7 +1952,7 @@ else $conf->product->enabled = $savproductenabled; print '
'; - + print ''; print ''; } diff --git a/htdocs/core/tpl/ajaxrow.tpl.php b/htdocs/core/tpl/ajaxrow.tpl.php index 4b8d82bce40..123fcef662c 100644 --- a/htdocs/core/tpl/ajaxrow.tpl.php +++ b/htdocs/core/tpl/ajaxrow.tpl.php @@ -1,6 +1,6 @@ - * Copyright (C) 2010-2012 Laurent Destailleur + * Copyright (C) 2010-2016 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,7 +17,7 @@ * * Javascript code to activate drag and drop on lines * You can use this if you want to be abale to drag and drop rows of a table. - * You must add id="tablelines" ont table level tag and have count($object->lines) or count($taskarray) > 0 + * You must add id="tablelines" on table level tag and have count($object->lines) or count($taskarray) > 0 */ ?> diff --git a/htdocs/core/tpl/contacts.tpl.php b/htdocs/core/tpl/contacts.tpl.php index 845bc30ce13..3a00ca2c060 100644 --- a/htdocs/core/tpl/contacts.tpl.php +++ b/htdocs/core/tpl/contacts.tpl.php @@ -52,6 +52,7 @@ $userstatic=new User($db); ?> +
+
id)) include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php'; } + print '
'; print ''; // Add free products/services form @@ -2104,7 +2105,7 @@ elseif (! empty($object->id)) } } print '
'; - + print '
'; print ''; dol_fiche_end(); diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 3d44d79189f..f404f5c3029 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -2560,6 +2560,7 @@ else include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php'; } + print '
'; print ''; global $forceall, $senderissupplier, $dateSelector, $inputalsopricewithtax; @@ -2587,8 +2588,7 @@ else } print '
'; - - + print '
'; print ''; dol_fiche_end(); diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index 3ab1c159545..8717e64fe38 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -1649,6 +1649,7 @@ if ($action == 'create') include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php'; } + print '
'; print ''; // Add free products/services form @@ -1674,7 +1675,7 @@ if ($action == 'create') } print '
'; - + print '
'; print "\n"; dol_fiche_end();