From e122fa2308773b2ac186854d20a6b6e89d8ce570 Mon Sep 17 00:00:00 2001 From: torvista Date: Sun, 20 Jan 2019 17:52:21 +0100 Subject: [PATCH 1/6] Change of aligns to CSS for HTML5. But a bug exists that I cannot fix: https://github.com/Dolibarr/dolibarr/issues/9577 --- htdocs/core/tpl/objectline_create.tpl.php | 86 +++++++++++------------ 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index 4f04861f844..e65578c7d45 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -35,7 +35,7 @@ // Protection to avoid direct call of template if (empty($object) || ! is_object($object)) { - print "Error, template page can't be called as URL"; + print "Error: this template page cannot be called directly as an URL"; exit; } @@ -100,7 +100,7 @@ if ($nolinesbefore) { ?> global->MAIN_VIEW_LINE_NUMBER)) { ?> - +
trans('AddNewLine'); ?>trans("FreeZone"); ?> @@ -111,34 +111,34 @@ if ($nolinesbefore) { ?> trans('SupplierRef'); ?> - trans('VAT'); ?> - trans('PriceUHT'); ?> + trans('VAT'); ?> + trans('PriceUHT'); ?> multicurrency->enabled) && $this->multicurrency_code != $conf->currency) { $colspan++;?> - trans('PriceUHTCurrency'); ?> + trans('PriceUHTCurrency'); ?> - trans('PriceUTTC'); ?> + trans('PriceUTTC'); ?> - trans('Qty'); ?> + trans('Qty'); ?> global->PRODUCT_USE_UNITS) { - print ''; + print ''; print ''; print $langs->trans('Unit'); print ''; } ?> - trans('ReductionShort'); ?> + trans('ReductionShort'); ?> situation_cycle_ref) { - print '' . $langs->trans('Progress') . ''; + print '' . $langs->trans('Progress') . ''; } if (! empty($usemargins)) { if (!empty($user->rights->margins->creer)) { ?> - + rights->margins->creer && ! empty($conf->global->DISPLAY_MARGIN_RATES)) echo ''.$langs->trans('MarginRate').''; - if ($user->rights->margins->creer && ! empty($conf->global->DISPLAY_MARK_RATES)) echo ''.$langs->trans('MarkRate').''; + if ($user->rights->margins->creer && ! empty($conf->global->DISPLAY_MARGIN_RATES)) echo ''.$langs->trans('MarginRate').''; + if ($user->rights->margins->creer && ! empty($conf->global->DISPLAY_MARK_RATES)) echo ''.$langs->trans('MarkRate').''; } ?>   @@ -165,7 +165,7 @@ if ($nolinesbefore) { if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { $coldisplay=2; ?> - + array('qty'=>'qty','remise_percent' => 'discount','idprod' => 'idprod'), // html id tags that will be edited with which ajax json response key 'option_disabled' => 'idthatdoesnotexists', // html id to disable once select is done - 'warning' => $langs->trans("NoPriceDefinedForThisSupplier") // translation of an error saved into var 'warning' (for exemple shown we select a disabled option into combo) + 'warning' => $langs->trans("NoPriceDefinedForThisSupplier") // translation of an error saved into var 'warning' (for example shown we select a disabled option into combo) ); $alsoproductwithnosupplierprice=0; } @@ -318,7 +318,7 @@ else { $doleditor=new DolEditor('dp_desc',GETPOST('dp_desc'),'',100,$toolbarname,'',false,true,$enabled,$nbrows,'98%'); $doleditor->Create(); - // Show autofill date for recuring invoices + // Show autofill date for recurring invoices if (! empty($conf->service->enabled) && $object->element == 'facturerec') { echo '

'; @@ -336,35 +336,35 @@ else { if ($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier') // We must have same test in printObjectLines { ?> - "> + "> - tva_assuj == "0") echo ''.vatrate(0, true); else echo $form->load_tva('tva_tx', (isset($_POST["tva_tx"])?GETPOST("tva_tx",'alpha',2):-1), $seller, $buyer, 0, 0, '', false, 1); ?> - + "> multicurrency->enabled) && $this->multicurrency_code != $conf->currency) { $colspan++;?> - + "> - + "> - "> + "> global->PRODUCT_USE_UNITS) { - print ''; + print ''; print $form->selectUnits($line->fk_unit, "units"); print ''; } @@ -373,17 +373,17 @@ else { $remise_percent = $seller->remise_supplier_percent; } ?> - ">% + ">% situation_cycle_ref) { $coldisplay++; - print '%'; + print '%'; } if (! empty($usemargins)) { if (!empty($user->rights->margins->creer)) { ?> - + product->enabled) || ! empty($conf->service->enabled)) { ?> @@ -399,23 +399,23 @@ else { { if (! empty($conf->global->DISPLAY_MARGIN_RATES)) { - echo '%'; + echo '%'; $coldisplay++; } if (! empty($conf->global->DISPLAY_MARK_RATES)) { - echo '%'; + echo '%'; $coldisplay++; } } else { if (! empty($conf->global->DISPLAY_MARGIN_RATES)) $coldisplay++; - if (! empty($conf->global->DISPLAY_MARK_RATES)) $coldisplay++; + if (! empty($conf->global->DISPLAY_MARK_RATES)) $coldisplay++; } } ?> - + @@ -495,7 +495,7 @@ if ((! empty($conf->service->enabled) || ($object->element == 'contrat')) && $da echo ' '.$langs->trans('to').' '; print $form->selectDate($date_end, 'date_end', empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1, empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1, 1, "addproduct", 1, 0); }; - print ''; + print ''; print ''; } @@ -4120,15 +4121,15 @@ abstract class CommonObject print ''; print ''.$langs->trans('Ref').''; print ''.$langs->trans('Description').''; - print ''.$langs->trans('VATRate').''; - print ''.$langs->trans('PriceUHT').''; - if (!empty($conf->multicurrency->enabled)) print ''.$langs->trans('PriceUHTCurrency').''; - print ''.$langs->trans('Qty').''; + print ''.$langs->trans('VATRate').''; + print ''.$langs->trans('PriceUHT').''; + if (!empty($conf->multicurrency->enabled)) print ''.$langs->trans('PriceUHTCurrency').''; + print ''.$langs->trans('Qty').''; if($conf->global->PRODUCT_USE_UNITS) { - print ''.$langs->trans('Unit').''; + print ''.$langs->trans('Unit').''; } - print ''.$langs->trans('ReductionShort').''; + print ''.$langs->trans('ReductionShort').''; $var = true; $i = 0; @@ -5869,7 +5870,7 @@ abstract class CommonObject if(! empty($conf->use_javascript_ajax)) { $out.= ' - '."\n"; + print ''."\n"; } @@ -7641,7 +7641,7 @@ function getAdvancedPreviewUrl($modulepart, $relativepath, $alldata=0, $param='' function ajax_autoselect($htmlname, $addlink='') { global $langs; - $out = ''."\n"; - else print ''."\n"; + if (defined('JS_JQUERY') && constant('JS_JQUERY')) print ''."\n"; + else print ''."\n"; if (! empty($conf->global->MAIN_FEATURES_LEVEL) && ! defined('JS_JQUERY_MIGRATE_DISABLED')) { - if (defined('JS_JQUERY_MIGRATE') && constant('JS_JQUERY_MIGRATE')) print ''."\n"; - else print ''."\n"; + if (defined('JS_JQUERY_MIGRATE') && constant('JS_JQUERY_MIGRATE')) print ''."\n"; + else print ''."\n"; } - if (defined('JS_JQUERY_UI') && constant('JS_JQUERY_UI')) print ''."\n"; - else print ''."\n"; - if (! defined('DISABLE_JQUERY_TABLEDND')) print ''."\n"; + if (defined('JS_JQUERY_UI') && constant('JS_JQUERY_UI')) print ''."\n"; + else print ''."\n"; + if (! defined('DISABLE_JQUERY_TABLEDND')) print ''."\n"; // jQuery jnotify if (empty($conf->global->MAIN_DISABLE_JQUERY_JNOTIFY) && ! defined('DISABLE_JQUERY_JNOTIFY')) { - print ''."\n"; + print ''."\n"; } // Flot if (empty($conf->global->MAIN_DISABLE_JQUERY_FLOT) && ! defined('DISABLE_JQUERY_FLOT')) { if (constant('JS_JQUERY_FLOT')) { - print ''."\n"; - print ''."\n"; - print ''."\n"; + print ''."\n"; + print ''."\n"; + print ''."\n"; } else { - print ''."\n"; - print ''."\n"; - print ''."\n"; + print ''."\n"; + print ''."\n"; + print ''."\n"; } } // jQuery jeditable if (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE) && ! defined('DISABLE_JQUERY_JEDITABLE')) { print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; + print ''."\n"; + print ''."\n"; + print ''."\n"; - print ''."\n"; - print ''."\n"; + print ''."\n"; + print ''."\n"; } // jQuery Timepicker if (! empty($conf->global->MAIN_USE_JQUERY_TIMEPICKER) || defined('REQUIRE_JQUERY_TIMEPICKER')) { - print ''."\n"; - print ''."\n"; + print ''."\n"; + print ''."\n"; } if (! defined('DISABLE_SELECT2') && (! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) || defined('REQUIRE_JQUERY_MULTISELECT'))) // jQuery plugin "mutiselect", "multiple-select", "select2", ... { $tmpplugin=empty($conf->global->MAIN_USE_JQUERY_MULTISELECT)?constant('REQUIRE_JQUERY_MULTISELECT'):$conf->global->MAIN_USE_JQUERY_MULTISELECT; - print ''."\n"; // We include full because we need the support of containerCssClass + print ''."\n"; // We include full because we need the support of containerCssClass } if (! defined('DISABLE_MULTISELECT')) // jQuery plugin "mutiselect" to select with checkboxes { - print ''."\n"; + print ''."\n"; } } @@ -1413,13 +1413,13 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs { $pathckeditor=constant('JS_CKEDITOR'); } - print ''."\n"; - print ''."\n"; + print ''."\n"; } // Browser notifications @@ -1431,13 +1431,13 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs if ($enablebrowsernotif) { print ''."\n"; - print ''."\n"; + print ''."\n"; } } // Global js function print ''."\n"; - print ''."\n"; + print ''."\n"; // JS forced by modules (relative url starting with /) if (! empty($conf->modules_parts['js'])) // $conf->modules_parts['js'] is array('module'=>array('file1','file2')) @@ -1449,7 +1449,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs foreach($filesjs as $jsfile) { // jsfile is a relative path - print ''."\n".''."\n"; + print ''."\n".''."\n"; } } } @@ -1461,11 +1461,11 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs { if (preg_match('/^http/i',$jsfile)) { - print ''."\n"; + print ''."\n"; } else { - print ''."\n"; + print ''."\n"; } } } @@ -1764,7 +1764,7 @@ function left_menu($menu_array_before, $helppagename='', $notused='', $menu_arra elseif ($conf->use_javascript_ajax && ! empty($conf->global->MAIN_USE_OLD_SEARCH_FORM)) { $searchform='
'; - $searchform.=''."\n"; + print ''."\n"; } // Wrapper to add log when clicking on download or preview @@ -2092,7 +2092,7 @@ if (! function_exists("llxFooter")) { print "\n\n"; ?> -