replace select_date by selectDate

This commit is contained in:
Frédéric FRANCE 2018-09-08 13:00:39 +02:00
parent ac8f568604
commit 80880d8fb9
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
6 changed files with 29 additions and 19 deletions

View File

@ -467,7 +467,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
print '<tr><td><span class="fieldrequired">'.$langs->trans('Date').'</span></td><td>';
$datepayment = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']);
$datepayment= ($datepayment == '' ? (empty($conf->global->MAIN_AUTOFILL_DATE)?-1:'') : $datepayment);
$form->select_date($datepayment,'','','',0,"add_paiement",1,1,0,0,'','',$facture->date);
print $form->selectDate($datepayment, '', '', '', 0, "add_paiement", 1, 1, 0, '', '', $facture->date);
print '</td></tr>';
// Payment mode

View File

@ -226,7 +226,7 @@ if ($action == 'create')
print '<tr><td class="fieldrequired">'.$langs->trans("Date").'</td><td>';
$datepaye = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]);
$datepayment=empty($conf->global->MAIN_AUTOFILL_DATE)?(empty($_POST["remonth"])?-1:$datepaye):0;
$form->select_date($datepayment,'','','','',"add_payment",1,1);
print $form->selectDate($datepayment, '', '', '', '', "add_payment", 1, 1);
print "</td>";
print '</tr>';

View File

@ -328,7 +328,7 @@ if ($action == 'create')
// Date
print '<tr><td class="fieldrequired titlefieldcreate">'.$langs->trans("Date").'</td><td>';
$form->select_date($donation_date?$donation_date:-1,'','','','',"add",1,1);
print $form->selectDate($donation_date?$donation_date:-1, '', '', '', '', "add", 1, 1);
print '</td>';
// Amount
@ -455,7 +455,7 @@ if (! empty($id) && $action == 'edit')
// Date
print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans("Date").'</td><td>';
$form->select_date($object->date,'','','','',"update");
print $form->selectDate($object->date,'','','','',"update");
print '</td>';
// Amount

View File

@ -1490,8 +1490,11 @@ else if ($id > 0 || ! empty($ref))
// Date d'intervention
print '<td align="center" class="nowrap">';
if (!empty($conf->global->FICHINTER_DATE_WITHOUT_HOUR)) $form->select_date($db->jdate($objp->date_intervention),'di',0,0,0,"date_intervention");
else $form->select_date($db->jdate($objp->date_intervention),'di',1,1,0,"date_intervention");
if (!empty($conf->global->FICHINTER_DATE_WITHOUT_HOUR)) {
print $form->selectDate($db->jdate($objp->date_intervention),'di',0,0,0,"date_intervention");
} else {
print $form->selectDate($db->jdate($objp->date_intervention),'di',1,1,0,"date_intervention");
}
print '</td>';
// Duration
@ -1556,18 +1559,25 @@ else if ($id > 0 || ! empty($ref))
print '<td align="center" class="nowrap">';
$now=dol_now();
$timearray=dol_getdate($now);
if (! GETPOST('diday','int')) $timewithnohour=dol_mktime(0,0,0,$timearray['mon'],$timearray['mday'],$timearray['year']);
else $timewithnohour=dol_mktime(GETPOST('dihour','int'),GETPOST('dimin','int'), 0,GETPOST('dimonth','int'),GETPOST('diday','int'),GETPOST('diyear','int'));
if (!empty($conf->global->FICHINTER_DATE_WITHOUT_HOUR)) $form->select_date($timewithnohour,'di',0,0,0,"addinter");
else $form->select_date($timewithnohour,'di',1,1,0,"addinter");
if (! GETPOST('diday','int')) {
$timewithnohour=dol_mktime(0,0,0,$timearray['mon'],$timearray['mday'],$timearray['year']);
} else {
$timewithnohour=dol_mktime(GETPOST('dihour','int'),GETPOST('dimin','int'), 0,GETPOST('dimonth','int'),GETPOST('diday','int'),GETPOST('diyear','int'));
}
if (!empty($conf->global->FICHINTER_DATE_WITHOUT_HOUR)) {
print $form->selectDate($timewithnohour,'di',0,0,0,"addinter");
} else {
print $form->selectDate($timewithnohour,'di',1,1,0,"addinter");
}
print '</td>';
// Duration
print '<td align="right">';
if (empty($conf->global->FICHINTER_WITHOUT_DURATION)) {
$selectmode = 'select';
if (!empty($conf->global->INTERVENTION_ADDLINE_FREEDUREATION))
if (!empty($conf->global->INTERVENTION_ADDLINE_FREEDUREATION)) {
$selectmode = 'text';
}
$form->select_duration('duration', (!GETPOST('durationhour', 'int') && !GETPOST('durationmin', 'int')) ? 3600 : (60 * 60 * GETPOST('durationhour', 'int') + 60 * GETPOST('durationmin', 'int')), 0, $selectmode);
}
print '</td>';

View File

@ -286,13 +286,13 @@ if ($action == 'create')
// Date Start
print "<tr>";
print '<td class="fieldrequired">'.$langs->trans("DateStart").'</td><td>';
print $form->select_date($datestart?$datestart:-1,'start','','','','add',1,1,1);
print $form->selectDate($datestart?$datestart:-1,'start','','','','add',1,1);
print '</td></tr>';
// Date End
print "<tr>";
print '<td class="fieldrequired">'.$langs->trans("DateEnd").'</td><td>';
print $form->select_date($dateend?$dateend:-1,'end','','','','add',1,1,1);
print $form->selectDate($dateend?$dateend:-1,'end','','','','add',1,1);
print '</td></tr>';
// Number of terms
@ -501,7 +501,7 @@ if ($id > 0)
print "<td>";
if ($action == 'edit')
{
print $form->select_date($object->datestart, 'start', 0, 0, 0, 'update', 1, 0, 1);
print $form->selectDate($object->datestart, 'start', 0, 0, 0, 'update', 1, 0);
}
else
{
@ -514,7 +514,7 @@ if ($id > 0)
print "<td>";
if ($action == 'edit')
{
print $form->select_date($object->dateend, 'end', 0, 0, 0, 'update', 1, 0, 1);
print $form->selectDate($object->dateend, 'end', 0, 0, 0, 'update', 1, 0);
}
else
{

View File

@ -569,12 +569,12 @@ if ($action == 'create' && $user->rights->projet->creer)
// Date start
print '<tr><td>'.$langs->trans("DateStart").'</td><td>';
print $form->select_date(($date_start?$date_start:''),'projectstart',0,0,0,'',1,0,1);
print $form->selectDate(($date_start?$date_start:''), 'projectstart', 0, 0, 0, '', 1, 0);
print '</td></tr>';
// Date end
print '<tr><td>'.$langs->trans("DateEnd").'</td><td>';
print $form->select_date(($date_end?$date_end:-1),'projectend',0,0,0,'',1,0,1);
print $form->selectDate(($date_end?$date_end:-1), 'projectend', 0, 0, 0, '', 1, 0);
print '</td></tr>';
if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
@ -822,7 +822,7 @@ elseif ($object->id > 0)
// Date start
print '<tr><td>'.$langs->trans("DateStart").'</td><td>';
print $form->select_date($object->date_start?$object->date_start:-1,'projectstart',0,0,0,'',1,0,1);
print $form->selectDate($object->date_start?$object->date_start:-1, 'projectstart', 0, 0, 0, '', 1, 0);
print ' &nbsp; &nbsp; <input type="checkbox" class="valignmiddle" name="reportdate" value="yes" ';
if ($comefromclone){print ' checked ';}
print '/> '. $langs->trans("ProjectReportDate");
@ -830,7 +830,7 @@ elseif ($object->id > 0)
// Date end
print '<tr><td>'.$langs->trans("DateEnd").'</td><td>';
print $form->select_date($object->date_end?$object->date_end:-1,'projectend',0,0,0,'',1,0,1);
print $form->selectDate($object->date_end?$object->date_end:-1, 'projectend', 0, 0, 0, '', 1, 0);
print '</td></tr>';
// Budget