Fix ident

This commit is contained in:
Laurent Destailleur 2020-01-01 22:45:47 +01:00
parent e7ac01e1bd
commit b90dbb585a

View File

@ -434,14 +434,12 @@ if ($nolinesbefore) {
if (is_object($objectline)) { if (is_object($objectline)) {
print $objectline->showOptionals($extrafields, 'edit', array('colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD) ? 0 : 1); print $objectline->showOptionals($extrafields, 'edit', array('colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD) ? 0 : 1);
} }
if ((!empty($conf->service->enabled) || ($object->element == 'contrat')) && $dateSelector && GETPOST('type') != '0') // We show date field if required if ((!empty($conf->service->enabled) || ($object->element == 'contrat')) && $dateSelector && GETPOST('type') != '0') // We show date field if required
{ {
?> print '<tr id="trlinefordates" class="oddeven">'."\n";
if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { print '<td></td>'; }
<tr id="trlinefordates" <?php echo $bcnd[$var]; ?>> print '<td colspan="'.($coldisplay - (empty($conf->global->MAIN_VIEW_LINE_NUMBER) ? 0 : 1)).'">';
<?php if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { print '<td></td>'; } ?>
<td colspan="<?php echo $coldisplay - (empty($conf->global->MAIN_VIEW_LINE_NUMBER) ? 0 : 1); ?>">
<?php
$date_start = dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), 0, GETPOST('date_startmonth'), GETPOST('date_startday'), GETPOST('date_startyear')); $date_start = dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), 0, GETPOST('date_startmonth'), GETPOST('date_startday'), GETPOST('date_startyear'));
$date_end = dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), 0, GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear')); $date_end = dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), 0, GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear'));
if (!empty($object->element) && $object->element == 'contrat') if (!empty($object->element) && $object->element == 'contrat')
@ -453,9 +451,9 @@ if ((!empty($conf->service->enabled) || ($object->element == 'contrat')) && $dat
} }
else else
{ {
echo $langs->trans('ServiceLimitedDuration').' '.$langs->trans('From').' '; print $langs->trans('ServiceLimitedDuration').' '.$langs->trans('From').' ';
print $form->selectDate($date_start, 'date_start', 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 $form->selectDate($date_start, 'date_start', 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);
echo ' '.$langs->trans('to').' '; print ' '.$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 $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 '<script>'; print '<script>';
@ -476,16 +474,15 @@ if ((!empty($conf->service->enabled) || ($object->element == 'contrat')) && $dat
} }
} }
print '</script>'; print '</script>';
?> print '</td>';
</td> print '</tr>'."\n";
</tr>
<?php
} }
print "<script>\n"; print "<script>\n";
if (!empty($usemargins) && $user->rights->margins->creer) if (!empty($usemargins) && $user->rights->margins->creer)
{ {
?> ?>
/* Some js test when we click on button "Add" */ /* Some js test when we click on button "Add" */
jQuery(document).ready(function() { jQuery(document).ready(function() {
<?php <?php
@ -817,6 +814,8 @@ if ((!empty($conf->service->enabled) || ($object->element == 'contrat')) && $dat
jQuery('#trlinefordates, .divlinefordates').show(); jQuery('#trlinefordates, .divlinefordates').show();
} }
</script>
<?php <?php
print '</script>';
print "<!-- END PHP TEMPLATE objectline_create.tpl.php -->\n"; print "<!-- END PHP TEMPLATE objectline_create.tpl.php -->\n";