From 4566595d44c62c0d45e4059fbff63800ddb9c395 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 15 Sep 2012 13:44:40 +0200 Subject: [PATCH] Fix: W3C when module margin is on --- .../core/tpl/freeproductline_create.tpl.php | 175 ++++++++++-------- .../tpl/predefinedproductline_create.tpl.php | 1 + 2 files changed, 95 insertions(+), 81 deletions(-) diff --git a/htdocs/core/tpl/freeproductline_create.tpl.php b/htdocs/core/tpl/freeproductline_create.tpl.php index 013d6adb8c3..2e59d99ce28 100644 --- a/htdocs/core/tpl/freeproductline_create.tpl.php +++ b/htdocs/core/tpl/freeproductline_create.tpl.php @@ -16,7 +16,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * - * * Need to have following variables defined: * $conf * $langs @@ -28,100 +27,114 @@ - global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="2"' : ''); ?>>
trans('AddNewLine').' - '.$langs->trans("FreeZone"); ?> + global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="2"' : ''); ?>>
trans('AddNewLine').' - '.$langs->trans("FreeZone"); ?> + trans('VAT'); ?> trans('PriceUHT'); ?> trans('Qty'); ?> trans('ReductionShort'); ?> -margin->enabled)) { -?> + margin->enabled)) { + ?> trans('BuyingPrice'); ?> -global->DISPLAY_MARGIN_RATES) - $colspan++; - if($conf->global->DISPLAY_MARK_RATES) - $colspan++; -} -?> + global->DISPLAY_MARGIN_RATES) + $colspan++; + if($conf->global->DISPLAY_MARK_RATES) + $colspan++; + } + ?>   -
" /> - - +" /> -> - global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="2"' : ''); ?>> - select_type_of_lines(isset($_POST["type"])?$_POST["type"]:-1,'type',1); - if (($conf->product->enabled && $conf->service->enabled) || (empty($conf->product->enabled) && empty($conf->service->enabled))) echo '
'; + > + global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="2"' : ''); ?>> + select_type_of_lines(isset($_POST["type"])?$_POST["type"]:-1,'type',1); + if (($conf->product->enabled && $conf->service->enabled) || (empty($conf->product->enabled) && empty($conf->service->enabled))) echo '
'; - if (is_object($hookmanager)) - { - $parameters=array(); - $reshook=$hookmanager->executeHooks('formCreateProductOptions',$parameters,$object,$action); - } + if (is_object($hookmanager)) + { + $parameters=array(); + $reshook=$hookmanager->executeHooks('formCreateProductOptions',$parameters,$object,$action); + } - // Editor wysiwyg - require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - $nbrows=ROWS_2; - if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT; - $doleditor=new DolEditor('dp_desc',$_POST["dp_desc"],'',100,'dolibarr_details','',false,true,$conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70); - $doleditor->Create(); - ?> - + // Editor wysiwyg + require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; + $nbrows=ROWS_2; + if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT; + $doleditor=new DolEditor('dp_desc',$_POST["dp_desc"],'',100,'dolibarr_details','',false,true,$conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70); + $doleditor->Create(); + ?> + - - tva_assuj == "0") echo '0'; - else echo $form->load_tva('tva_tx', (isset($_POST["tva_tx"])?$_POST["tva_tx"]:-1), $seller, $buyer); - ?> - - "> - "> - % -margin->enabled)) { -?> - "> -global->DISPLAY_MARGIN_RATES) - $colspan++; - if($conf->global->DISPLAY_MARK_RATES) - $colspan++; -} -?> - - + tva_assuj == "0") echo '0'; + else echo $form->load_tva('tva_tx', (isset($_POST["tva_tx"])?$_POST["tva_tx"]:-1), $seller, $buyer); + ?> + + "> + + "> + % + margin->enabled)) { + ?> + "> + + global->DISPLAY_MARGIN_RATES) + $colspan++; + if($conf->global->DISPLAY_MARK_RATES) + $colspan++; + } + ?> + + -service->enabled && $dateSelector) { -if(! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) - $colspan = 10; -else - $colspan = 9; -if (! empty($conf->margin->enabled)) { - if($conf->global->DISPLAY_MARGIN_RATES) - $colspan++; - if($conf->global->DISPLAY_MARK_RATES) - $colspan++; -} -?> -> - - trans('ServiceLimitedDuration').' '.$langs->trans('From').' '; - echo $form->select_date('','date_start',$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,1,"addproduct"); - echo ' '.$langs->trans('to').' '; - echo $form->select_date('','date_end',$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,1,"addproduct"); - ?> - - - + service->enabled && $dateSelector) { + if(! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) + $colspan = 10; + else + $colspan = 9; + if (! empty($conf->margin->enabled)) { + $colspan++; // For the buying price + if($conf->global->DISPLAY_MARGIN_RATES) + $colspan++; + if($conf->global->DISPLAY_MARK_RATES) + $colspan++; + } + ?> + > + trans('ServiceLimitedDuration').' '.$langs->trans('From').' '; + echo $form->select_date('','date_start',$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,1,"addproduct"); + echo ' '.$langs->trans('to').' '; + echo $form->select_date('','date_end',$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,1,"addproduct"); + ?> + + + diff --git a/htdocs/core/tpl/predefinedproductline_create.tpl.php b/htdocs/core/tpl/predefinedproductline_create.tpl.php index f0c11c07f87..2acf77a5360 100644 --- a/htdocs/core/tpl/predefinedproductline_create.tpl.php +++ b/htdocs/core/tpl/predefinedproductline_create.tpl.php @@ -115,6 +115,7 @@ if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) else $colspan = 9; if (! empty($conf->margin->enabled)) { + $colspan++; // For the buying price if($conf->global->DISPLAY_MARGIN_RATES) $colspan++; if($conf->global->DISPLAY_MARK_RATES)