From 29fdad144dec696ab850ddff5f52511bfe39b7fd Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 19 Jan 2019 12:40:17 +0100 Subject: [PATCH] update with html5 compliant code --- htdocs/core/ajax/ajaxdirtree.php | 6 ++--- htdocs/core/class/commonobject.class.php | 4 ++-- htdocs/core/class/html.form.class.php | 24 +++++++++---------- htdocs/core/class/html.formbarcode.class.php | 2 +- htdocs/core/lib/sendings.lib.php | 6 ++--- .../core/tpl/admin_extrafields_view.tpl.php | 2 +- htdocs/core/tpl/objectline_edit.tpl.php | 2 +- htdocs/core/tpl/originproductline.tpl.php | 2 +- htdocs/don/stats/index.php | 6 ++--- htdocs/expedition/card.php | 22 ++++++++--------- htdocs/expedition/stats/index.php | 6 ++--- 11 files changed, 41 insertions(+), 41 deletions(-) diff --git a/htdocs/core/ajax/ajaxdirtree.php b/htdocs/core/ajax/ajaxdirtree.php index b44b8fd835f..d90a3f5f316 100644 --- a/htdocs/core/ajax/ajaxdirtree.php +++ b/htdocs/core/ajax/ajaxdirtree.php @@ -274,7 +274,7 @@ if (empty($conf->use_javascript_ajax) || ! empty($conf->global->MAIN_ECM_DISABLE print ''; - print ''; @@ -420,7 +420,7 @@ function treeOutputForAbsoluteDir($sqltree, $selecteddir, $fullpathselecteddir, print '
'; print $val['cachenbofdoc']; print ''; + print ''; if ($nbofsubdir && $nboffilesinsubdir) print '+'.$nboffilesinsubdir.' '; print '
'; - /*print '';*/ @@ -428,7 +428,7 @@ function treeOutputForAbsoluteDir($sqltree, $selecteddir, $fullpathselecteddir, print ''; - print ''; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index fd5deb31c36..627e67a38b7 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -3,7 +3,7 @@ * Copyright (C) 2005-2013 Regis Houssin * Copyright (C) 2010-2015 Juanjo Menent * Copyright (C) 2012-2013 Christophe Battarel - * Copyright (C) 2011-2018 Philippe Grand + * Copyright (C) 2011-2019 Philippe Grand * Copyright (C) 2012-2015 Marcos García * Copyright (C) 2012-2015 Raphaël Doursenaud * Copyright (C) 2012 Cedric Salvador @@ -4126,7 +4126,7 @@ abstract class CommonObject print ''; if($conf->global->PRODUCT_USE_UNITS) { - print ''; + print ''; } print ''; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 035d922e0c1..5cafb86cdc6 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -10,7 +10,7 @@ * Copyright (C) 2007 Franky Van Liedekerke * Copyright (C) 2007 Patrick Raguin * Copyright (C) 2010 Juanjo Menent - * Copyright (C) 2010-2014 Philippe Grand + * Copyright (C) 2010-2019 Philippe Grand * Copyright (C) 2011 Herve Prot * Copyright (C) 2012-2016 Marcos García * Copyright (C) 2012 Cedric Salvador @@ -244,7 +244,7 @@ class Form } if (empty($notabletag)) $ret.=''; - if (empty($notabletag)) $ret.=''.$input['label'].''."\n"; + $more.=''.$input['label'].''."\n"; } elseif ($input['type'] == 'password') { - $more.=''.$input['label'].''."\n"; + $more.=''.$input['label'].''."\n"; } elseif ($input['type'] == 'select') { @@ -3877,7 +3877,7 @@ class Form elseif ($input['type'] == 'checkbox') { $more.=''; - $more.=''.$input['label'].' '; - $more.=''."\n"; $formquestion[] = array('name'=>$input['name'].'day'); @@ -3916,14 +3916,14 @@ class Form elseif ($input['type'] == 'other') { $more.=''; - if (! empty($input['label'])) $more.=$input['label'].''."\n"; } elseif ($input['type'] == 'onecolumn') { - $more.=''."\n"; } @@ -4286,7 +4286,7 @@ class Form $ret.=''; - $ret.=''; + $ret.=''; $ret.='
'; + /*print ''; print dol_escape_htmltag($file); print ''; print (isset($val['cachenbofdoc']) && $val['cachenbofdoc'] >= 0)?$val['cachenbofdoc']:' '; print ''; + print ''; if ($nbofsubdir > 0 && $nboffilesinsubdir > 0) print '+'.$nboffilesinsubdir.' '; print ''.$langs->trans('Qty').''.$langs->trans('Unit').''.$langs->trans('Unit').''.$langs->trans('ReductionShort').'
'; + if (empty($notabletag)) $ret.=''; //else $ret.='
'; $ret.=''; if (preg_match('/ckeditor|textarea/',$typeofdata) && empty($notabletag)) $ret.='
'."\n"; @@ -3861,11 +3861,11 @@ class Form if ($input['type'] == 'text') { - $more.='
'; + $more.=''.$input['label'].' '; $more.=''.$input['label'].''; + $more.=''; $more.=$this->selectDate($input['value'],$input['name'],0,0,0,'',1,0); $more.='
'; + if (! empty($input['label'])) $more.=$input['label'].''; $more.=$input['value']; $more.='
'; + $more.='
'; $more.=$input['value']; $more.='
'; $ret.=$this->selectDate($selected,$htmlname,$displayhour,$displaymin,1,'form'.$htmlname,1,0); $ret.='
'; } else @@ -4575,7 +4575,7 @@ class Form print ''.$addcontact.''; } print ''; - print ''; + print ''; print ''; } else @@ -6543,9 +6543,9 @@ class Form print ''; print ''; print '' . $langs->trans("Ref") . ''; - print '' . $langs->trans("RefCustomer") . ''; + print '' . $langs->trans("RefCustomer") . ''; print '' . $langs->trans("AmountHTShort") . ''; - print '' . $langs->trans("Company") . ''; + print '' . $langs->trans("Company") . ''; print ''; while ($i < $num) { diff --git a/htdocs/core/class/html.formbarcode.class.php b/htdocs/core/class/html.formbarcode.class.php index 5a005e7de04..65a3213bad8 100644 --- a/htdocs/core/class/html.formbarcode.class.php +++ b/htdocs/core/class/html.formbarcode.class.php @@ -219,7 +219,7 @@ class FormBarCode $out .= ''; $out .= $this->selectBarcodeType($selected, $htmlname, 1); $out .= ''; - $out .= ''; + $out .= ''; $out .= ''; } return $out; diff --git a/htdocs/core/lib/sendings.lib.php b/htdocs/core/lib/sendings.lib.php index 1cafb6dc3d4..be8aeb890fc 100644 --- a/htdocs/core/lib/sendings.lib.php +++ b/htdocs/core/lib/sendings.lib.php @@ -217,9 +217,9 @@ function show_list_sending_receive($origin,$origin_id,$filter='') print ''; print ''; - //print ''; - print ''; - print ''; + //print ''; + print ''; + print ''; print ''; print ''; print ''; diff --git a/htdocs/core/tpl/admin_extrafields_view.tpl.php b/htdocs/core/tpl/admin_extrafields_view.tpl.php index 42f62d03ff7..79f5a0bad5c 100644 --- a/htdocs/core/tpl/admin_extrafields_view.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_view.tpl.php @@ -49,7 +49,7 @@ print '
'; print '
'.$langs->trans("QtyOrdered").''.$langs->trans("SendingSheet").''.$langs->trans("Description").''.$langs->trans("QtyOrdered").''.$langs->trans("SendingSheet").''.$langs->trans("Description").''.$langs->trans("DateCreation").''.$langs->trans("DateDeliveryPlanned").''.$langs->trans("QtyPreparedOrShipped").'
'; print ''; -print ''; } diff --git a/htdocs/core/tpl/originproductline.tpl.php b/htdocs/core/tpl/originproductline.tpl.php index 9274359eada..ed16cec17f1 100644 --- a/htdocs/core/tpl/originproductline.tpl.php +++ b/htdocs/core/tpl/originproductline.tpl.php @@ -37,7 +37,7 @@ if (!empty($conf->multicurrency->enabled)) print ''; if($conf->global->PRODUCT_USE_UNITS) - print ''; + print ''; print ''; print ''."\n"; diff --git a/htdocs/don/stats/index.php b/htdocs/don/stats/index.php index 5e7e08c0ee2..56657694f80 100644 --- a/htdocs/don/stats/index.php +++ b/htdocs/don/stats/index.php @@ -237,17 +237,17 @@ print '
'; print '
'.$langs->trans("Position"); +print ''.$langs->trans("Position"); print ''; print img_picto('A-Z', '1downarrow.png'); print ''; diff --git a/htdocs/core/tpl/objectline_edit.tpl.php b/htdocs/core/tpl/objectline_edit.tpl.php index ebb2863dbfa..c26298d65e5 100644 --- a/htdocs/core/tpl/objectline_edit.tpl.php +++ b/htdocs/core/tpl/objectline_edit.tpl.php @@ -178,7 +178,7 @@ $coldisplay=-1; // We remove first td global->PRODUCT_USE_UNITS) { - print ''; + print ''; print $form->selectUnits($line->fk_unit, "units"); print ''.$this->tpl['qty'].''.$langs->trans($this->tpl['unit']).''.$langs->trans($this->tpl['unit']).''.$this->tpl['remise_percent'].'
'; print ''; // Company - print ''; // User - print ''; // Year - print ''; + print ''; } else { - print ''; + print ''; } } print "\n"; @@ -1248,7 +1248,7 @@ if ($action == 'create') // Stock if (! empty($conf->stock->enabled)) { - print ''; print ''; - print ''; - print ''; } @@ -1412,7 +1412,7 @@ if ($action == 'create') // Stock if (! empty($conf->stock->enabled)) { - print ''; - print ''; - print ''; + print ''; } if (! empty($conf->productbatch->enabled)) { - print ''; + print ''; } } print ''; @@ -2313,7 +2313,7 @@ else if ($id || $ref) // Warehouse source if (! empty($conf->stock->enabled)) { - print '
'.$langs->trans("Filter").'
'.$langs->trans("ThirdParty").''; + print '
'.$langs->trans("ThirdParty").''; if ($mode == 'customer') $filter='s.client in (1,2,3)'; if ($mode == 'supplier') $filter='s.fournisseur = 1'; print $form->select_company($socid,'socid',$filter,1,0,0,array(),0,'','style="width: 95%"'); print '
'.$langs->trans("CreatedBy").''; + print '
'.$langs->trans("CreatedBy").''; print $form->select_dolusers($userid, 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); print '
'.$langs->trans("Year").''; + print '
'.$langs->trans("Year").''; if (! in_array($year,$arrayyears)) $arrayyears[$year]=$year; if (! in_array($nowyear,$arrayyears)) $arrayyears[$nowyear]=$nowyear; arsort($arrayyears); diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index ed2eb5239b3..e99f04415b3 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -1122,11 +1122,11 @@ if ($action == 'create') { if (empty($conf->productbatch->enabled)) { - print ''.$langs->trans("Warehouse").' ('.$langs->trans("Stock").')'.$langs->trans("Warehouse").' ('.$langs->trans("Stock").')'.$langs->trans("Warehouse").' / '.$langs->trans("Batch").' ('.$langs->trans("Stock").')'.$langs->trans("Warehouse").' / '.$langs->trans("Batch").' ('.$langs->trans("Stock").')
'; + print ''; if ($line->product_type == Product::TYPE_PRODUCT || ! empty($conf->global->STOCK_SUPPORTS_SERVICES)) // Type of product need stock change ? { // Show warehouse combo list @@ -1334,7 +1334,7 @@ if ($action == 'create') print ''; + print ''; print $staticwarehouse->getNomUrl(0).' / '; @@ -1364,7 +1364,7 @@ if ($action == 'create') print ' '; print ''; + print ''; print img_warning().' '.$langs->trans("NoProductToShipFoundIntoStock", $staticwarehouse->libelle); print '
'; + print ''; if ($line->product_type == Product::TYPE_PRODUCT || ! empty($conf->global->STOCK_SUPPORTS_SERVICES)) { print $tmpwarehouseObject->getNomUrl(0).' '; @@ -1495,7 +1495,7 @@ if ($action == 'create') print ''; print ''; + print ''; print $tmpwarehouseObject->getNomUrl(0).' / '; @@ -1539,7 +1539,7 @@ if ($action == 'create') } print ''; + print ''; if ($line->product_type == Product::TYPE_PRODUCT || ! empty($conf->global->STOCK_SUPPORTS_SERVICES)) { $warehouse_selected_id = GETPOST('entrepot_id','int'); @@ -2052,12 +2052,12 @@ else if ($id || $ref) } if (! empty($conf->stock->enabled)) { - print ''.$langs->trans("WarehouseSource").''.$langs->trans("WarehouseSource").''.$langs->trans("Batch").''.$langs->trans("Batch").''.$langs->trans("CalculatedWeight").''; + print ''; if ($lines[$i]->entrepot_id > 0) { $entrepot = new Entrepot($db); diff --git a/htdocs/expedition/stats/index.php b/htdocs/expedition/stats/index.php index e0b750e9797..95f93904c5f 100644 --- a/htdocs/expedition/stats/index.php +++ b/htdocs/expedition/stats/index.php @@ -237,17 +237,17 @@ print '
'; print ''; print ''; // Company - print ''; // User - print ''; // Year - print '
'.$langs->trans("Filter").'
'.$langs->trans("ThirdParty").''; + print '
'.$langs->trans("ThirdParty").''; if ($mode == 'customer') $filter='s.client in (1,2,3)'; if ($mode == 'supplier') $filter='s.fournisseur = 1'; print $form->select_company($socid,'socid',$filter,1,0,0,array(),0,'','style="width: 95%"'); print '
'.$langs->trans("CreatedBy").''; + print '
'.$langs->trans("CreatedBy").''; print $form->select_dolusers($userid, 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); print '
'.$langs->trans("Year").''; + print '
'.$langs->trans("Year").''; if (! in_array($year,$arrayyears)) $arrayyears[$year]=$year; if (! in_array($nowyear,$arrayyears)) $arrayyears[$nowyear]=$nowyear; arsort($arrayyears);