NEW Rename Form::select_date to Form::selectDate and Form::form_date to Form::formDate

This commit is contained in:
Marcos García de La Fuente 2016-03-21 21:51:29 +01:00
parent fbe34e9efc
commit 89bd173c2f
103 changed files with 256 additions and 256 deletions

View File

@ -1463,10 +1463,10 @@ Fix: Dump using php not not include lock on tables that are deleted.
Fix: Fixed a problem with bank accounts sharing across entities.
Fix: fields into group by of sql requests for module margins must be
same than fields into select.
Fix: When select_date is called with '' as preselected date,
Fix: When selectDate is called with '' as preselected date,
automatic user date was not correctly et (We must set a date into PHP
server timezone area)
Fix: First param of select_date must always be forged with a dolibarr
Fix: First param of selectDate must always be forged with a dolibarr
date function and not time().
Fix: fix can't add line with product in supplier order
Fix: [bug #1309]

View File

@ -162,12 +162,12 @@ if ($action == 'create') {
// Date start
print '<tr><td class="fieldrequired">' . $langs->trans("DateStart") . '</td><td>';
print Form::select_date(($date_start ? $date_start : ''), 'fiscalyear');
print Form::selectDate(($date_start ? $date_start : ''), 'fiscalyear');
print '</td></tr>';
// Date end
print '<tr><td class="fieldrequired">' . $langs->trans("DateEnd") . '</td><td>';
print Form::select_date(($date_end ? $date_end : - 1), 'fiscalyearend');
print Form::selectDate(($date_end ? $date_end : - 1), 'fiscalyearend');
print '</td></tr>';
// Statut
@ -216,12 +216,12 @@ if ($action == 'create') {
// Date start
print '<tr><td class="fieldrequired">' . $langs->trans("DateStart") . '</td><td>';
print Form::select_date($object->date_start ? $object->date_start : - 1, 'fiscalyear');
print Form::selectDate($object->date_start ? $object->date_start : - 1, 'fiscalyear');
print '</td></tr>';
// Date end
print '<tr><td class="fieldrequired">' . $langs->trans("DateEnd") . '</td><td>';
print Form::select_date($object->date_end ? $object->date_end : - 1, 'fiscalyearend');
print Form::selectDate($object->date_end ? $object->date_end : - 1, 'fiscalyearend');
print '</td></tr>';
// Statut

View File

@ -161,9 +161,9 @@ else {
print '<div class="liste_titre">';
print $langs->trans('DateStart') . ': ';
print Form::select_date($search_date_start, 'date_start', 0, 0, 1);
print Form::selectDate($search_date_start, 'date_start', 0, 0, 1);
print $langs->trans('DateEnd') . ': ';
print Form::select_date($search_date_end, 'date_end', 0, 0, 1);
print Form::selectDate($search_date_end, 'date_end', 0, 0, 1);
print '</div>';
print '<table class="noborder" width="100%">';

View File

@ -248,7 +248,7 @@ if ($action == 'create') {
print '<tr>';
print '<td>' . $langs->trans("Docdate") . '</td>';
print '<td>';
print Form::select_date('', 'doc_date', '', '', '', "create_mvt", 1, 1);
print Form::selectDate('', 'doc_date', '', '', '', "create_mvt", 1, 1);
print '</td>';
print '</tr>';

View File

@ -394,10 +394,10 @@ else {
print '<td><input type="text" name="search_mvt_num" size="6" value="' . $search_mvt_num . '"></td>';
print '<td class="liste_titre">';
print $langs->trans('From') . ': ';
print Form::select_date($search_date_start, 'date_start', 0, 0, 1);
print Form::selectDate($search_date_start, 'date_start', 0, 0, 1);
print '<br>';
print $langs->trans('To') . ': ';
print Form::select_date($search_date_end, 'date_end', 0, 0, 1);
print Form::selectDate($search_date_end, 'date_end', 0, 0, 1);
print '</td>';
print '<td><input type="text" name="search_doc_ref" size="8" value="' . $search_doc_ref . '"></td>';
print '<td>';

View File

@ -176,9 +176,9 @@ print_barre_liste($langs->trans("Bookkeeping") . ' ' . dol_print_date($search_da
print '<form method="GET" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">';
print '<div class="liste_titre">';
print $langs->trans('DateStart') . ': ';
print Form::select_date($search_date_start, 'date_start');
print Form::selectDate($search_date_start, 'date_start');
print $langs->trans('DateEnd') . ': ';
print Form::select_date($search_date_end, 'date_end');
print Form::selectDate($search_date_end, 'date_end');
print '</div>';
print '<div class="liste_titre">';
print $langs->trans('From') . ' ' . $langs->trans('AccountAccounting') . ': ';
@ -220,7 +220,7 @@ print '<input type="text" size=7 class="flat" name="search_doc_type" value="' .
print '</td>';
print '<td class="liste_titre">';
print Form::select_date($search_doc_date, 'doc_date', 0, 0, 1);
print Form::selectDate($search_doc_date, 'doc_date', 0, 0, 1);
print '</td>';
print '<td class="liste_titre">';

View File

@ -541,7 +541,7 @@ else {
$nom = $langs->trans("FinanceJournal") . ' - ' . $bank_code_journal->getNomUrl(1);
$builddate = time();
$description = $langs->trans("DescFinanceJournal") . '<br>';
$period = Form::select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . Form::select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1);
$period = Form::selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . Form::selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1);
$varlink = 'id_account=' . $id_bank_account;
report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array (

View File

@ -403,7 +403,7 @@ if ($action == 'export_csv') {
$description .= $langs->trans("DepositsAreIncluded");
}
$period = Form::select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . Form::select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1);
$period = Form::selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . Form::selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1);
report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array (
'action' => ''
));

View File

@ -418,7 +418,7 @@ if ($action == 'export_csv') {
$description .= $langs->trans("DepositsAreNotIncluded");
else
$description .= $langs->trans("DepositsAreIncluded");
$period = Form::select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . Form::select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1);
$period = Form::selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . Form::selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1);
report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array (
'action' => ''
));

View File

@ -900,7 +900,7 @@ else
// Birthday
print "<tr><td>".$langs->trans("Birthday")."</td><td>\n";
Form::select_date(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc');
Form::selectDate(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc');
print "</td></tr>\n";
// Public profil
@ -1154,7 +1154,7 @@ else
// Birthday
print "<tr><td>".$langs->trans("Birthday")."</td><td>\n";
Form::select_date(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc');
Form::selectDate(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc');
print "</td></tr>\n";
// Public profil

View File

@ -974,7 +974,7 @@ if ($rowid > 0)
$datefrom=$object->datevalid;
}
}
print Form::select_date($datefrom,'','','','',"cotisation",1,1,1);
print Form::selectDate($datefrom,'','','','',"cotisation",1,1,1);
print "</td></tr>";
// Date end subscription
@ -987,7 +987,7 @@ if ($rowid > 0)
$dateto=-1; // By default, no date is suggested
}
print '<tr><td>'.$langs->trans("DateEndSubscription").'</td><td>';
print Form::select_date($dateto,'end','','','',"cotisation",1,0,1);
print Form::selectDate($dateto,'end','','','',"cotisation",1,0,1);
print "</td></tr>";
if ($adht->cotisation)
@ -1088,7 +1088,7 @@ if ($rowid > 0)
// Date of payment
print '<tr class="bankswitchclass"><td class="fieldrequired">'.$langs->trans("DatePayment").'</td><td>';
print Form::select_date(isset($paymentdate)?$paymentdate:-1,'payment',0,0,1,'cotisation',1,1,1);
print Form::selectDate(isset($paymentdate)?$paymentdate:-1,'payment',0,0,1,'cotisation',1,1,1);
print "</td></tr>\n";
print '<tr class="bankswitchclass2"><td>'.$langs->trans('Numero');

View File

@ -207,13 +207,13 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit')
// Date start subscription
print '<tr><td>'.$langs->trans("DateSubscription").'</td><td class="valeur" colspan="2">';
Form::select_date($subscription->dateh,'datesub',1,1,0,'update',1);
Form::selectDate($subscription->dateh,'datesub',1,1,0,'update',1);
print '</td>';
print '</tr>';
// Date end subscription
print '<tr><td>'.$langs->trans("DateEndSubscription").'</td><td class="valeur" colspan="2">';
Form::select_date($subscription->datef,'datesubend',0,0,0,'update',1);
Form::selectDate($subscription->datef,'datesubend',0,0,0,'update',1);
print '</td>';
print '</tr>';

View File

@ -198,7 +198,7 @@ if ($result)
// Lignes des champs de filtres
print '<tr class="liste_titre">';
print '<td class="liste_titre" width="15%">'.Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).Form::select_date($date_end,'date_end',0,0,0,'',1,0,1).'</td>';
print '<td class="liste_titre" width="15%">'.Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1).'</td>';
print '<td align="left" class="liste_titre">';
print '<input class="flat" type="text" size="10" name="search_code" value="'.$search_code.'">';

View File

@ -43,10 +43,10 @@ $langs->load("cashdesk");
<tr>
<!-- Affichage de la reference et de la designation -->
<td><input class="texte_ref" type="text" id ="txtRef" name="txtRef" value="<?php echo $obj_facturation->ref() ?>"
onchange="javascript: setSource('REF');"
onkeyup="javascript: verifResultat('resultats_dhtml', this.value, <?php echo (isset($conf->global->BARCODE_USE_SEARCH_TO_SELECT) ? (int) $conf->global->BARCODE_USE_SEARCH_TO_SELECT : 1) ?>);"
onfocus="javascript: this.select(); verifResultat('resultats_dhtml', this.value, <?php echo (isset($conf->global->BARCODE_USE_SEARCH_TO_SELECT) ? (int) $conf->global->BARCODE_USE_SEARCH_TO_SELECT : 1) ?>);"
onBlur="javascript: document.getElementById('resultats_dhtml').innerHTML = '';"/>
onchange="setSource('REF');"
onkeyup="verifResultat('resultats_dhtml', this.value, <?php echo (isset($conf->global->BARCODE_USE_SEARCH_TO_SELECT) ? (int) $conf->global->BARCODE_USE_SEARCH_TO_SELECT : 1) ?>);"
onfocus="this.select(); verifResultat('resultats_dhtml', this.value, <?php echo (isset($conf->global->BARCODE_USE_SEARCH_TO_SELECT) ? (int) $conf->global->BARCODE_USE_SEARCH_TO_SELECT : 1) ?>);"
onBlur="document.getElementById('resultats_dhtml').innerHTML = '';"/>
</td>
<td class="select_design">
<?php /*
@ -60,7 +60,7 @@ $langs->load("cashdesk");
*/
?>
<select id="selProduit" name="selProduit" onchange="javascript: setSource('LISTE');">
<select id="selProduit" name="selProduit" onchange="setSource('LISTE');">
<?php
print '<option value="0">'.$top_liste_produits.'</option>'."\n";
@ -93,7 +93,7 @@ $langs->load("cashdesk");
</table>
</form>
<form id="frmQte" class="formulaire1" method="post" action="facturation_verif.php?action=ajout_article" onsubmit ="javascript: return verifSaisie();">
<form id="frmQte" class="formulaire1" method="post" action="facturation_verif.php?action=ajout_article" onsubmit ="return verifSaisie();">
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>" />
<table>
<tr><th><?php echo $langs->trans("Qty"); ?></th>
@ -106,7 +106,7 @@ $langs->load("cashdesk");
<th><?php echo $langs->trans("VATRate"); ?></th>
</tr>
<tr>
<td><input class="texte1" type="text" id="txtQte" name="txtQte" value="1" onkeyup="javascript: modif();" onfocus="javascript: this.select();" />
<td><input class="texte1" type="text" id="txtQte" name="txtQte" value="1" onkeyup="modif();" onfocus="this.select();" />
<?php print genkeypad("txtQte", "frmQte");?>
</td>
<!-- Affichage du stock pour l'article courant -->
@ -115,10 +115,10 @@ $langs->load("cashdesk");
</td>
<!-- Show unit price -->
<?php // TODO Remove the disabled and use this value when adding product into cart ?>
<td><input class="texte1_off" type="text" name="txtPrixUnit" value="<?php echo price2num($obj_facturation->prix(), 'MU'); ?>" onchange="javascript: modif();" disabled /></td>
<td><input class="texte1_off" type="text" name="txtPrixUnit" value="<?php echo price2num($obj_facturation->prix(), 'MU'); ?>" onchange="modif();" disabled /></td>
<td></td>
<!-- Choix de la remise -->
<td><input class="texte1" type="text" id="txtRemise" name="txtRemise" value="0" onkeyup="javascript: modif();" onfocus="javascript: this.select();"/>
<td><input class="texte1" type="text" id="txtRemise" name="txtRemise" value="0" onkeyup="modif();" onfocus="this.select();"/>
<?php print genkeypad("txtRemise", "frmQte");?>
</td>
<!-- Affichage du total HT -->
@ -126,7 +126,7 @@ $langs->load("cashdesk");
<!-- Choix du taux de TVA -->
<td class="select_tva">
<?php //var_dump($tab_tva); ?>
<select name="selTva" onchange="javascript: modif();" >
<select name="selTva" onchange="modif();" >
<?php
$tva_tx = $obj_facturation->tva(); // Try to get a previously entered VAT rowid. First time, this will return empty.
@ -151,7 +151,7 @@ $langs->load("cashdesk");
</fieldset>
<!-- ========================= Cadre "Amount" ============================= -->
<form id="frmDifference" class="formulaire1" method="post" onsubmit="javascript: return verifReglement()" action="validation_verif.php?action=valide_achat">
<form id="frmDifference" class="formulaire1" method="post" onsubmit="return verifReglement()" action="validation_verif.php?action=valide_achat">
<input type="hidden" name="hdnChoix" value="" />
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>" />
<fieldset class="cadre_facturation"><legend class="titre1"><?php echo $langs->trans("Amount"); ?></legend>
@ -161,7 +161,7 @@ $langs->load("cashdesk");
<!-- Affichage du montant du -->
<td><input class="texte2_off" type="text" name="txtDu" value="<?php echo price2num($obj_facturation->prixTotalTtc(), 'MT'); ?>" disabled /></td>
<!-- Choix du montant encaisse -->
<td><input class="texte2" type="text" id="txtEncaisse" name="txtEncaisse" value="" onkeyup="javascript: verifDifference();" onfocus="javascript: this.select();" />
<td><input class="texte2" type="text" id="txtEncaisse" name="txtEncaisse" value="" onkeyup="verifDifference();" onfocus="this.select();" />
<?php print genkeypad("txtEncaisse", "frmDifference");?>
</td>
<!-- Affichage du montant rendu -->
@ -201,10 +201,10 @@ $langs->load("cashdesk");
print '<div class="clearboth">';
print '<div class="inline-block" style="margin: 6px;">';
?>
<input class="button bouton_mode_reglement" type="submit" name="btnModeReglement" value="<?php echo $langs->trans("Reported"); ?>" onclick="javascript: verifClic('DIF');" />
<input class="button bouton_mode_reglement" type="submit" name="btnModeReglement" value="<?php echo $langs->trans("Reported"); ?>" onclick="verifClic('DIF');" />
<?php
print $langs->trans("DateEcheance").' :';
print Form::select_date(-1,'txtDatePaiement',0,0,0,'paymentmode',1,0,1);
print Form::selectDate(-1,'txtDatePaiement',0,0,0,'paymentmode',1,0,1);
print '</div>';
?>
</div>

View File

@ -665,9 +665,9 @@ if ($action == 'create')
$datep=($datep?$datep:$object->datep);
if (GETPOST('datep','int',1)) $datep=dol_stringtotime(GETPOST('datep','int',1),0);
print '<tr><td width="30%" class="nowrap"><span class="fieldrequired">'.$langs->trans("DateActionStart").'</span></td><td>';
if (GETPOST("afaire") == 1) Form::select_date($datep,'ap',1,1,0,"action",1,1,0,0,'fulldayend');
else if (GETPOST("afaire") == 2) Form::select_date($datep,'ap',1,1,1,"action",1,1,0,0,'fulldayend');
else Form::select_date($datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart');
if (GETPOST("afaire") == 1) Form::selectDate($datep,'ap',1,1,0,"action",1,1,0,0,'fulldayend');
else if (GETPOST("afaire") == 2) Form::selectDate($datep,'ap',1,1,1,"action",1,1,0,0,'fulldayend');
else Form::selectDate($datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart');
print '</td></tr>';
// Date end
@ -678,9 +678,9 @@ if ($action == 'create')
$datef=dol_time_plus_duree($datep, $conf->global->AGENDA_AUTOSET_END_DATE_WITH_DELTA_HOURS, 'h');
}
print '<tr><td><span id="dateend"'.(GETPOST("actioncode") == 'AC_RDV'?' class="fieldrequired"':'').'>'.$langs->trans("DateActionEnd").'</span></td><td>';
if (GETPOST("afaire") == 1) Form::select_date($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend');
else if (GETPOST("afaire") == 2) Form::select_date($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend');
else Form::select_date($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend');
if (GETPOST("afaire") == 1) Form::selectDate($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend');
else if (GETPOST("afaire") == 2) Form::selectDate($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend');
else Form::selectDate($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend');
print '</td></tr>';
// Status
@ -955,16 +955,16 @@ if ($id > 0)
// Date start
print '<tr><td class="nowrap"><span class="fieldrequired">'.$langs->trans("DateActionStart").'</span></td><td colspan="3">';
if (GETPOST("afaire") == 1) Form::select_date($datep?$datep:$object->datep,'ap',1,1,0,"action",1,1,0,0,'fulldaystart');
else if (GETPOST("afaire") == 2) Form::select_date($datep?$datep:$object->datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart');
else Form::select_date($datep?$datep:$object->datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart');
if (GETPOST("afaire") == 1) Form::selectDate($datep?$datep:$object->datep,'ap',1,1,0,"action",1,1,0,0,'fulldaystart');
else if (GETPOST("afaire") == 2) Form::selectDate($datep?$datep:$object->datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart');
else Form::selectDate($datep?$datep:$object->datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart');
print '</td></tr>';
// Date end
print '<tr><td>'.$langs->trans("DateActionEnd").'</td><td colspan="3">';
if (GETPOST("afaire") == 1) Form::select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend');
else if (GETPOST("afaire") == 2) Form::select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend');
//else Form::select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend','ap');
else Form::select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend');
if (GETPOST("afaire") == 1) Form::selectDate($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend');
else if (GETPOST("afaire") == 2) Form::selectDate($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend');
//else Form::selectDate($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend','ap');
else Form::selectDate($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend');
print '</td></tr>';
$userepeatevent=0; // Dev in progress

View File

@ -142,7 +142,7 @@ $form=new Form($db);
$userstatic=new User($db);
$nav='';
$nav.=Form::select_date($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1);
$nav.=Form::selectDate($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1);
$nav.=' <input type="submit" name="submitdateselect" class="button" value="'.$langs->trans("Refresh").'">';
$now=dol_now();
@ -320,10 +320,10 @@ if ($resql)
//print '<td class="liste_titre"><input type="text" name="search_type" value="'.$search_type.'"></td>';
}
print '<td class="liste_titre" align="center">';
print Form::select_date($datestart, 'datestart', 0, 0, 1, '', 1, 0, 1);
print Form::selectDate($datestart, 'datestart', 0, 0, 1, '', 1, 0, 1);
print '</td>';
print '<td class="liste_titre" align="center">';
print Form::select_date($dateend, 'dateend', 0, 0, 1, '', 1, 0, 1);
print Form::selectDate($dateend, 'dateend', 0, 0, 1, '', 1, 0, 1);
print '</td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';

View File

@ -261,7 +261,7 @@ $nav.='<input type="hidden" name="begin_d" value="' . $begin_d . '">';
$nav.='<input type="hidden" name="end_d" value="' . $end_d . '">';
$nav.='<input type="hidden" name="showbirthday" value="' . $showbirthday . '">';
$nav.=Form::select_date($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1);
$nav.=Form::selectDate($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1);
$nav.=' <input type="submit" name="submitdateselect" class="button" value="'.$langs->trans("Refresh").'">';
$nav.='</form>';

View File

@ -264,7 +264,7 @@ $nav.='<input type="hidden" name="begin_d" value="' . $begin_d . '">';
$nav.='<input type="hidden" name="end_d" value="' . $end_d . '">';
$nav.='<input type="hidden" name="showbirthday" value="' . $showbirthday . '">';
$nav.=Form::select_date($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1);
$nav.=Form::selectDate($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1);
$nav.=' <input type="submit" name="submitdateselect" class="button" value="'.$langs->trans("Refresh").'">';
$nav.='</form>';

View File

@ -1368,7 +1368,7 @@ if ($action == 'create')
// Date
print '<tr><td class="fieldrequired">' . $langs->trans('Date') . '</td><td colspan="2">';
Form::select_date('', '', '', '', '', "addprop", 1, 1);
Form::selectDate('', '', '', '', '', "addprop", 1, 1);
print '</td></tr>';
// Validaty duration
@ -1416,9 +1416,9 @@ if ($action == 'create')
$syear = date("Y", $tmpdte);
$smonth = date("m", $tmpdte);
$sday = date("d", $tmpdte);
Form::select_date($syear."-".$smonth."-".$sday, 'date_livraison', '', '', '', "addprop");
Form::selectDate($syear."-".$smonth."-".$sday, 'date_livraison', '', '', '', "addprop");
} else {
Form::select_date(-1, 'date_livraison', '', '', '', "addprop", 1, 1);
Form::selectDate(-1, 'date_livraison', '', '', '', "addprop", 1, 1);
}
print '</td></tr>';
@ -1804,7 +1804,7 @@ if ($action == 'create')
print '<form name="editdate" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print '<input type="hidden" name="action" value="setdate">';
Form::select_date($object->date, 're', '', '', 0, "editdate");
Form::selectDate($object->date, 're', '', '', 0, "editdate");
print '<input type="submit" class="button" value="' . $langs->trans('Modify') . '">';
print '</form>';
} else {
@ -1830,7 +1830,7 @@ if ($action == 'create')
print '<form name="editecheance" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print '<input type="hidden" name="action" value="setecheance">';
Form::select_date($object->fin_validite, 'ech', '', '', '', "editecheance");
Form::selectDate($object->fin_validite, 'ech', '', '', '', "editecheance");
print '<input type="submit" class="button" value="' . $langs->trans('Modify') . '">';
print '</form>';
} else {

View File

@ -1505,7 +1505,7 @@ if ($action == 'create' && $user->rights->commande->creer)
}
// Date
print '<tr><td class="fieldrequired">' . $langs->trans('Date') . '</td><td colspan="2">';
Form::select_date('', 're', '', '', '', "crea_commande", 1, 1); // Always autofill date with current date
Form::selectDate('', 're', '', '', '', "crea_commande", 1, 1); // Always autofill date with current date
print '</td></tr>';
// Delivery date planed
@ -1515,7 +1515,7 @@ if ($action == 'create' && $user->rights->commande->creer)
if (! empty($conf->global->DATE_LIVRAISON_WEEK_DELAY)) $datedelivery = time() + ((7*$conf->global->DATE_LIVRAISON_WEEK_DELAY) * 24 * 60 * 60);
else $datedelivery=empty($conf->global->MAIN_AUTOFILL_DATE_DELIVERY)?-1:'';
}
Form::select_date($datedelivery, 'liv_', '', '', '', "crea_commande", 1, 1);
Form::selectDate($datedelivery, 'liv_', '', '', '', "crea_commande", 1, 1);
print "</td></tr>";
// Conditions de reglement
@ -2047,7 +2047,7 @@ if ($action == 'create' && $user->rights->commande->creer)
print '<form name="setdate" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print '<input type="hidden" name="action" value="setdate">';
Form::select_date($object->date, 'order_', '', '', '', "setdate");
Form::selectDate($object->date, 'order_', '', '', '', "setdate");
print '<input type="submit" class="button" value="' . $langs->trans('Modify') . '">';
print '</form>';
} else {
@ -2072,7 +2072,7 @@ if ($action == 'create' && $user->rights->commande->creer)
print '<form name="setdate_livraison" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print '<input type="hidden" name="action" value="setdate_livraison">';
Form::select_date($object->date_livraison ? $object->date_livraison : - 1, 'liv_', '', '', '', "setdate_livraison");
Form::selectDate($object->date_livraison ? $object->date_livraison : - 1, 'liv_', '', '', '', "setdate_livraison");
print '<input type="submit" class="button" value="' . $langs->trans('Modify') . '">';
print '</form>';
} else {

View File

@ -427,7 +427,7 @@ if ($action == 'create' && !$error)
// Date invoice
print '<tr><td class="fieldrequired">'.$langs->trans('Date').'</td><td colspan="2">';
Form::select_date('','','','','',"add",1,1);
Form::selectDate('','','','','',"add",1,1);
print '</td></tr>';
// Payment term
print '<tr><td class="nowrap">'.$langs->trans('PaymentConditionsShort').'</td><td colspan="2">';
@ -575,8 +575,8 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error)
$num = $db->num_rows($resql);
print load_fiche_titre($title);
$i = 0;
$period=Form::select_date($date_start,'date_start',0,0,1,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,1,'',1,0,1);
$periodely=Form::select_date($date_starty,'date_start_dely',0,0,1,'',1,0,1).' - '.Form::select_date($date_endy,'date_end_dely',0,0,1,'',1,0,1);
$period=Form::selectDate($date_start,'date_start',0,0,1,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,1,'',1,0,1);
$periodely=Form::selectDate($date_starty,'date_start_dely',0,0,1,'',1,0,1).' - '.Form::selectDate($date_endy,'date_end_dely',0,0,1,'',1,0,1);
if (! empty($socid))
{

View File

@ -466,7 +466,7 @@ if ($id > 0 || ! empty($ref))
print '<tr '.$bc[false].'>';
print '<td class="nowrap" colspan="2">';
Form::select_date($dateop,'op',0,0,0,'transaction');
Form::selectDate($dateop,'op',0,0,0,'transaction');
print '</td>';
print '<td class="nowrap">';
$form->select_types_paiements((GETPOST('operation')?GETPOST('operation'):($object->courant == Account::TYPE_CASH ? 'LIQ' : '')),'operation','1,2',2,1);
@ -521,9 +521,9 @@ if ($id > 0 || ! empty($ref))
print '<input type="hidden" name="action" value="search">';
print '<input type="hidden" name="id" value="'.$object->id.'">';
$period_filter .= $langs->trans('From').'&nbsp;'.Form::select_date($req_stdt,'req_stdt',0,0,1,null,1,1,1);
$period_filter .= $langs->trans('From').'&nbsp;'.Form::selectDate($req_stdt,'req_stdt',0,0,1,null,1,1,1);
$period_filter .= '&nbsp;';
$period_filter .= $langs->trans('to').'&nbsp;'.Form::select_date($req_enddt,'req_enddt',0,0,1,null,1,1,1);
$period_filter .= $langs->trans('to').'&nbsp;'.Form::selectDate($req_enddt,'req_enddt',0,0,1,null,1,1,1);
print '<tr class="liste_titre">';
print '<td colspan="2">'.$period_filter.'</td>';

View File

@ -365,7 +365,7 @@ if ($action == 'create')
print '<tr><td>'.$langs->trans("Date").'</td>';
print '<td colspan="3">';
Form::select_date('', 're', 0, 0, 0, 'formsoc');
Form::selectDate('', 're', 0, 0, 0, 'formsoc');
print '</td></tr>';
print '<tr><td>'.$langs->trans("BalanceMinimalAllowed").'</td>';

View File

@ -451,7 +451,7 @@ if ($result)
if ($user->rights->banque->modifier || $user->rights->banque->consolidate)
{
print '<td colspan="3">';
print Form::select_date($db->jdate($objp->do),'dateo','','','','update',1,0,1,$objp->rappro);
print Form::selectDate($db->jdate($objp->do),'dateo','','','','update',1,0,1,$objp->rappro);
print '</td>';
}
else
@ -467,7 +467,7 @@ if ($result)
if ($user->rights->banque->modifier || $user->rights->banque->consolidate)
{
print '<td colspan="3">';
print Form::select_date($db->jdate($objp->dv),'datev','','','','update',1,0,1,$objp->rappro);
print Form::selectDate($db->jdate($objp->dv),'datev','','','','update',1,0,1,$objp->rappro);
if (! $objp->rappro)
{
print ' &nbsp; ';

View File

@ -191,9 +191,9 @@ if ($resql)
$moreforfilter = '';
$moreforfilter.='<div class="divsearchfield">';
$moreforfilter .= $langs->trans('Period') . ' ('.$langs->trans('DateOperationShort').') : ' . $langs->trans('StartDate') . ' ';
$moreforfilter .= Form::select_date($search_dt_start, 'search_start_dt', 0, 0, 1, "search_form", 1, 0, 1);
$moreforfilter .= Form::selectDate($search_dt_start, 'search_start_dt', 0, 0, 1, "search_form", 1, 0, 1);
$moreforfilter .= ' - ';
$moreforfilter .= $langs->trans('EndDate') . ' ' . Form::select_date($search_dt_end, 'search_end_dt', 0, 0, 1, "search_form", 1, 0, 1);
$moreforfilter .= $langs->trans('EndDate') . ' ' . Form::selectDate($search_dt_end, 'search_end_dt', 0, 0, 1, "search_form", 1, 0, 1);
$moreforfilter .= '</div>';
if ($moreforfilter)

View File

@ -177,7 +177,7 @@ $form->select_comptes($account_to,'account_to',0,'',1);
print "</td>\n";
print "<td>";
Form::select_date((! empty($dateo)?$dateo:''),'','','','','add');
Form::selectDate((! empty($dateo)?$dateo:''),'','','','','add');
print "</td>\n";
print '<td><input name="label" class="flat" type="text" size="40" value="'.$label.'"></td>';
print '<td><input name="amount" class="flat" type="text" size="8" value="'.$amount.'"></td>';

View File

@ -262,7 +262,7 @@ if ($action == 'create')
print "<tr>";
print '<td class="fieldrequired">'.$langs->trans("Date").'</td><td>';
print Form::select_date($datec?$datec:-1,'','','','','add',1,1,1);
print Form::selectDate($datec?$datec:-1,'','','','','add',1,1,1);
print '</td></tr>';
// Km
@ -358,7 +358,7 @@ else if ($id)
// Date
print '<tr><td class="fieldrequired">'.$langs->trans("Date").'</td><td>';
print Form::select_date($object->date,'',0,0,0,'update',1,0,1);
print Form::selectDate($object->date,'',0,0,0,'update',1,0,1);
print '</td></tr>';
// Km

View File

@ -2354,7 +2354,7 @@ if ($action == 'create')
// Date invoice
print '<tr><td class="fieldrequired">' . $langs->trans('Date') . '</td><td colspan="2">';
$datefacture = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']);
print Form::select_date($datefacture?$datefacture:$dateinvoice, '', '', '', '', "add", 1, 1, 1);
print Form::selectDate($datefacture?$datefacture:$dateinvoice, '', '', '', '', "add", 1, 1, 1);
print '</td></tr>';
// Payment term
@ -2548,12 +2548,12 @@ if ($action == 'create')
print '<td class="nobordernopadding nowrap">';
print $langs->trans('From') . ' ';
print '</td><td class="nobordernopadding nowrap">';
print Form::select_date('', 'date_start' . $i, $usehm, $usehm, 1, "add", 1, 0, 1);
print Form::selectDate('', 'date_start' . $i, $usehm, $usehm, 1, "add", 1, 0, 1);
print '</td></tr>';
print '<td class="nobordernopadding nowrap">';
print $langs->trans('to') . ' ';
print '</td><td class="nobordernopadding nowrap">';
print Form::select_date('', 'date_end' . $i, $usehm, $usehm, 1, "add", 1, 0, 1);
print Form::selectDate('', 'date_end' . $i, $usehm, $usehm, 1, "add", 1, 0, 1);
print '</td></tr></table>';
print '</td>';
}
@ -3091,7 +3091,7 @@ else if ($id > 0 || ! empty($ref))
if ($object->type != Facture::TYPE_CREDIT_NOTE) {
if ($action == 'editinvoicedate') {
Form::form_date($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->date, 'invoicedate');
Form::formDate($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->date, 'invoicedate');
} else {
print dol_print_date($object->date, 'daytext');
}
@ -3454,7 +3454,7 @@ else if ($id > 0 || ! empty($ref))
if ($object->type != Facture::TYPE_CREDIT_NOTE)
{
if ($action == 'editpaymentterm') {
Form::form_date($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->date_lim_reglement, 'paymentterm');
Form::formDate($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->date_lim_reglement, 'paymentterm');
} else {
print dol_print_date($object->date_lim_reglement, 'daytext');
if ($object->hasDelay()) {

View File

@ -349,7 +349,7 @@ if ($action == 'create')
// First date of execution for cron
print "<tr><td>".$langs->trans('NextDateToExecution')."</td><td>";
$date_next_execution = isset($date_next_execution) ? $date_next_execution : (GETPOST('remonth') ? dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')) : -1);
print Form::select_date($date_next_execution, '', 1, 1, '', "add", 1, 1, 1);
print Form::selectDate($date_next_execution, '', 1, 1, '', "add", 1, 1, 1);
print "</td></tr>";
// Number max of generation

View File

@ -300,7 +300,7 @@ if ($object->id > 0)
{
if ($action == 'editinvoicedate')
{
Form::form_date($_SERVER['PHP_SELF'].'?id='.$object->id,$object->date,'invoicedate');
Form::formDate($_SERVER['PHP_SELF'].'?id='.$object->id,$object->date,'invoicedate');
}
else
{
@ -351,7 +351,7 @@ if ($object->id > 0)
{
if ($action == 'editpaymentterm')
{
Form::form_date($_SERVER['PHP_SELF'].'?id='.$object->id,$object->date_lim_reglement,'paymentterm');
Form::formDate($_SERVER['PHP_SELF'].'?id='.$object->id,$object->date_lim_reglement,'paymentterm');
}
else
{

View File

@ -92,7 +92,7 @@ $builddate=time();
$description=$langs->trans("DescPurchasesJournal").'<br>';
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded");
else $description.= $langs->trans("DepositsAreIncluded");
$period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
$period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1);
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink);
$p = explode(":", $conf->global->MAIN_INFO_SOCIETE_COUNTRY);

View File

@ -96,7 +96,7 @@ $builddate=time();
$description=$langs->trans("DescSellsJournal").'<br>';
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded");
else $description.= $langs->trans("DepositsAreIncluded");
$period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
$period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1);
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink);
$p = explode(":", $conf->global->MAIN_INFO_SOCIETE_COUNTRY);

View File

@ -164,11 +164,11 @@ if ($_GET["action"] == 'create')
print "<tr>";
print '<td class="fieldrequired">'.$langs->trans("DatePayment").'</td><td>';
print Form::select_date($datep,"datep",'','','','add');
print Form::selectDate($datep,"datep",'','','','add');
print '</td></tr>';
print '<tr><td class="fieldrequired">'.$langs->trans("DateValue").'</td><td>';
print Form::select_date($datev,"datev",'','','','add');
print Form::selectDate($datev,"datev",'','','','add');
print '</td></tr>';
// Label

View File

@ -111,7 +111,7 @@ if ($conf->global->$calc==0 || $conf->global->$calc==1) // Calculate on invoice
$nom=$langs->transcountry($local==1?"LT1ReportByCustomersInInputOutputMode":"LT2ReportByCustomersInInputOutputMode",$mysoc->country_code);
$calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT".$local."Rec");
$calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')';
$period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
$period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1);
if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='<br>'.$langs->trans("WarningDepositsNotIncluded");
$description.=$fsearch;
$description.='<br>('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')';
@ -129,7 +129,7 @@ if ($conf->global->$calc==2) // Invoice for goods, payment for services
$nom=$langs->transcountry($local==1?"LT1ReportByCustomersInInputOutputMode":"LT2ReportByCustomersInInputOutputMode",$mysoc->country_code);
$calcmode=$langs->trans("CalcModeLT2Debt");
$calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')';
$period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
$period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1);
if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='<br>'.$langs->trans("WarningDepositsNotIncluded");
$description.=$fsearch;
$description.='<br>('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')';

View File

@ -131,7 +131,7 @@ if ($conf->global->$calc==0 || $conf->global->$calc==1) // Calculate on invoice
$nom=$langs->trans($local==1?"LT1ReportByQuartersInDueDebtMode":"LT2ReportByQuartersInDueDebtMode");
$calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT".$local."Rec");
$calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')';
$period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
$period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1);
$prevyear=$year_start; $prevquarter=$q;
if ($prevquarter > 1) $prevquarter--;
else { $prevquarter=4; $prevyear--; }
@ -163,7 +163,7 @@ if ($conf->global->$calc==2) // Invoice for goods, payment for services
$nom=$langs->trans($local==1?"LT1ReportByQuartersInInputOutputMode":"LT2ReportByQuartersInInputOutputMode");
$calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT".$local."Rec");
$calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')';
$period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
$period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1);
$prevyear=$year_start; $prevquarter=$q;
if ($prevquarter > 1) $prevquarter--;
else { $prevquarter=4; $prevyear--; }

View File

@ -462,7 +462,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);
Form::selectDate($datepayment,'','','',0,"add_paiement",1,1,0,0,'','',$facture->date);
print '</td>';
print '<td>'.$langs->trans('Comments').'</td></tr>';

View File

@ -387,7 +387,7 @@ if ($action == 'new')
//print '<tr><td width="30%">'.$langs->trans('Date').'</td><td width="70%">'.dol_print_date($now,'day').'</td></tr>';
// Filter
print '<tr><td width="200">'.$langs->trans("DateChequeReceived").'</td><td>';
print Form::select_date($filterdate,'fd',0,0,1,'',1,1,1);
print Form::selectDate($filterdate,'fd',0,0,1,'',1,1,1);
print '</td></tr>';
print '<tr><td>'.$langs->trans("BankAccount").'</td><td>';
$form->select_comptes($filteraccountid,'accountid',0,'courant <> 2',1);
@ -601,7 +601,7 @@ else
print '<form name="setdate" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="setdate">';
Form::select_date($object->date_bordereau,'datecreate_','','','',"setdate");
Form::selectDate($object->date_bordereau,'datecreate_','','','',"setdate");
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
print '</form>';
}

View File

@ -209,7 +209,7 @@ if ($_GET["action"] == 'create')
print '<tr><td class="fieldrequired">'.$langs->trans("Date").'</td><td colspan="2">';
$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);
Form::selectDate($datepayment,'','','','',"add_payment",1,1);
print "</td>";
print '</tr>';

View File

@ -214,7 +214,7 @@ if ($id > 0)
print '<tr class="liste_titre">';
print '<td colspan="3">'.$langs->trans("NotifyTransmision").'</td></tr>';
print '<tr '.$bc[false].'><td width="20%">'.$langs->trans("TransData").'</td><td>';
print Form::select_date('','','','','',"userfile",1,1);
print Form::selectDate('','','','','',"userfile",1,1);
print '</td></tr>';
print '<tr '.$bc[false].'><td width="20%">'.$langs->trans("TransMetod").'</td><td>';
print Form::selectarray("methode",$bon->methodes_trans);
@ -237,7 +237,7 @@ if ($id > 0)
print '<tr class="liste_titre">';
print '<td colspan="3">'.$langs->trans("NotifyCredit").'</td></tr>';
print '<tr '.$bc[false].'><td width="20%">'.$langs->trans('CreditDate').'</td><td>';
print Form::select_date('','','','','',"infocredit",1,1);
print Form::selectDate('','','','','',"infocredit",1,1);
print '</td></tr>';
print '</table>';
print '<br>'.$langs->trans("ThisWillAlsoAddPaymentOnInvoice");

View File

@ -199,7 +199,7 @@ if ($id)
//Date
print '<tr><td class="fieldrequired valid">'.$langs->trans("RefusedData").'</td>';
print '<td colspan="2" class="valid">';
print Form::select_date('','','','','',"confirm_rejet");
print Form::selectDate('','','','','',"confirm_rejet");
print '</td></tr>';
//Reason

View File

@ -125,7 +125,7 @@ if ($modecompta=="CREANCES-DETTES")
$name=$langs->trans("AnnualByCompaniesDueDebtMode");
$calcmode=$langs->trans("CalcModeDebt");
$calcmode.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.(GETPOST("month")>0?'&month='.GETPOST("month"):'').'&modecompta=RECETTES-DEPENSES">','</a>').')';
$period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
$period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1);
//$periodlink='<a href="'.$_SERVER["PHP_SELF"].'?year='.($year-1).'&modecompta='.$modecompta.'">'.img_previous().'</a> <a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'&modecompta='.$modecompta.'">'.img_next().'</a>';
$description=$langs->trans("RulesResultDue");
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded");
@ -137,8 +137,8 @@ else {
$name=$langs->trans("AnnualByCompaniesInputOutputMode");
$calcmode=$langs->trans("CalcModeEngagement");
$calcmode.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.(GETPOST("month")>0?'&month='.GETPOST("month"):'').'&modecompta=CREANCES-DETTES">','</a>').')';
//$period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',1,1,0,'',1,0,1);
$period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
//$period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',1,1,0,'',1,0,1);
$period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1);
//$periodlink='<a href="'.$_SERVER["PHP_SELF"].'?year='.($year-1).'&modecompta='.$modecompta.'">'.img_previous().'</a> <a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'&modecompta='.$modecompta.'">'.img_next().'</a>';
$description=$langs->trans("RulesResultInOut");
$builddate=time();

View File

@ -239,13 +239,13 @@ if ($action == 'create')
// Date payment
print '<tr><td>';
print fieldLabel('DatePayment','datep',1).'</td><td>';
print Form::select_date((empty($datep)?-1:$datep),"datep",'','','','add',1,1);
print Form::selectDate((empty($datep)?-1:$datep),"datep",'','','','add',1,1);
print '</td></tr>';
// Date value for bank
print '<tr><td>';
print fieldLabel('DateValue','datev',0).'</td><td>';
print Form::select_date((empty($datev)?-1:$datev),"datev",'','','','add',1,1);
print Form::selectDate((empty($datev)?-1:$datev),"datev",'','','','add',1,1);
print '</td></tr>';
// Employee
@ -263,13 +263,13 @@ if ($action == 'create')
// Date start period
print '<tr><td>';
print fieldLabel('DateStartPeriod','datesp',1).'</td><td>';
print Form::select_date($datesp,"datesp",'','','','add');
print Form::selectDate($datesp,"datesp",'','','','add');
print '</td></tr>';
// Date end period
print '<tr><td>';
print fieldLabel('DateEndPeriod','dateep',1).'</td><td>';
print Form::select_date($dateep,"dateep",'','','','add');
print Form::selectDate($dateep,"dateep",'','','','add');
print '</td></tr>';
// Amount

View File

@ -270,7 +270,7 @@ if ($action == 'create')
print $langs->trans("PeriodEndDate");
print '</td>';
print '<td>';
print Form::select_date(! empty($dateperiod)?$dateperiod:'-1', 'period', 0, 0, 0, 'charge', 1);
print Form::selectDate(! empty($dateperiod)?$dateperiod:'-1', 'period', 0, 0, 0, 'charge', 1);
print '</td>';
print '</tr>';
// Amount
@ -286,7 +286,7 @@ if ($action == 'create')
print $langs->trans("DateDue");
print '</td>';
print '<td>';
print Form::select_date(! empty($dateech)?$dateech:'-1', 'ech', 0, 0, 0, 'charge', 1);
print Form::selectDate(! empty($dateech)?$dateech:'-1', 'ech', 0, 0, 0, 'charge', 1);
print '</td>';
print "</tr>\n";
@ -443,7 +443,7 @@ if ($id > 0)
print "<td>";
if ($action == 'edit')
{
print Form::select_date($object->periode, 'period', 0, 0, 0, 'charge', 1);
print Form::selectDate($object->periode, 'period', 0, 0, 0, 'charge', 1);
}
else
{
@ -455,7 +455,7 @@ if ($id > 0)
if ($action == 'edit')
{
print '<tr><td>'.$langs->trans("DateDue")."</td><td>";
print Form::select_date($object->date_ech, 'ech', 0, 0, 0, 'charge', 1);
print Form::selectDate($object->date_ech, 'ech', 0, 0, 0, 'charge', 1);
print "</td></tr>";
}
else {

View File

@ -130,7 +130,7 @@ if ($object->id)
print "<td>";
if ($action == 'edit')
{
print Form::select_date($object->periode, 'period', 0, 0, 0, 'charge', 1);
print Form::selectDate($object->periode, 'period', 0, 0, 0, 'charge', 1);
}
else
{
@ -143,7 +143,7 @@ if ($object->id)
if ($action == 'edit')
{
print '<tr><td>'.$langs->trans("DateDue")."</td><td>";
print Form::select_date($object->date_ech, 'ech', 0, 0, 0, 'charge', 1);
print Form::selectDate($object->date_ech, 'ech', 0, 0, 0, 'charge', 1);
print "</td></tr>";
}
else {

View File

@ -150,7 +150,7 @@ if ($modecompta=="CREANCES-DETTES") {
$calcmode=$langs->trans("CalcModeDebt");
$calcmode.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=RECETTES-DEPENSES">','</a>').')';
$period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
$period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1);
$description=$langs->trans("RulesCADue");
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
@ -164,7 +164,7 @@ if ($modecompta=="CREANCES-DETTES") {
$calcmode=$langs->trans("CalcModeEngagement");
$calcmode.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=CREANCES-DETTES">','</a>').')';
$period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
$period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1);
$description=$langs->trans("RulesCAIn");
$description.= $langs->trans("DepositsAreIncluded");

View File

@ -139,7 +139,7 @@ if ($modecompta=="CREANCES-DETTES") {
$nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByUserAuthorOfInvoice");
$calcmode=$langs->trans("CalcModeDebt");
$calcmode.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=RECETTES-DEPENSES">','</a>').')';
$period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
$period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1);
//$periodlink="<a href='".$_SERVER["PHP_SELF"]."?year=".($year-1)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($year+1)."&modecompta=".$modecompta."'>".img_next()."</a>";
$description=$langs->trans("RulesCADue");
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded");
@ -150,7 +150,7 @@ if ($modecompta=="CREANCES-DETTES") {
$nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByUserAuthorOfInvoice");
$calcmode=$langs->trans("CalcModeEngagement");
$calcmode.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=CREANCES-DETTES">','</a>').')';
$period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
$period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1);
//$periodlink="<a href='".$_SERVER["PHP_SELF"]."?year=".($year-1)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($year+1)."&modecompta=".$modecompta."'>".img_next()."</a>";
$description=$langs->trans("RulesCAIn");
$description.= $langs->trans("DepositsAreIncluded");

View File

@ -155,7 +155,7 @@ if ($modecompta=="CREANCES-DETTES")
$nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByThirdParties");
$calcmode=$langs->trans("CalcModeDebt");
$calcmode.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=RECETTES-DEPENSES">','</a>').')';
$period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
$period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1);
//$periodlink='<a href="'.$_SERVER["PHP_SELF"].'?year='.($year-1).'&modecompta='.$modecompta.'">'.img_previous().'</a> <a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'&modecompta='.$modecompta.'">'.img_next().'</a>';
$description=$langs->trans("RulesCADue");
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded");
@ -166,7 +166,7 @@ if ($modecompta=="CREANCES-DETTES")
$nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByThirdParties");
$calcmode=$langs->trans("CalcModeEngagement");
$calcmode.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=CREANCES-DETTES">','</a>').')';
$period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
$period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1);
//$periodlink='<a href="'.$_SERVER["PHP_SELF"].'?year='.($year-1).'&modecompta='.$modecompta.'">'.img_previous().'</a> <a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'&modecompta='.$modecompta.'">'.img_next().'</a>';
$description=$langs->trans("RulesCAIn");
$description.= $langs->trans("DepositsAreIncluded");

View File

@ -234,11 +234,11 @@ if ($action == 'create')
print "<tr>";
print '<td class="fieldrequired">'.$langs->trans("DatePayment").'</td><td>';
print Form::select_date($datep,"datep",'','','','add',1,1);
print Form::selectDate($datep,"datep",'','','','add',1,1);
print '</td></tr>';
print '<tr><td class="fieldrequired">'.$langs->trans("DateValue").'</td><td>';
print Form::select_date($datev,"datev",'','','','add',1,1);
print Form::selectDate($datev,"datev",'','','','add',1,1);
print '</td></tr>';
// Label

View File

@ -140,7 +140,7 @@ if ($modetax==1) { // Calculate on invoice for goods and services
$calcmode=$langs->trans("CalcModeVATDebt");
$calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
//$name.='<br>('.$langs->trans("SeeVATReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year_start.'&modetax=0">','</a>').')';
$period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
$period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1);
//$periodlink=($year_start?"<a href='".$_SERVER["PHP_SELF"]."?year=".($year_start-1)."&modetax=".$modetax."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($year_start+1)."&modetax=".$modetax."'>".img_next()."</a>":"");
$description=$langs->trans("RulesVATDueServices");
$description.='<br>';
@ -183,7 +183,7 @@ if ($modetax==0) { // Invoice for goods, payment for services
$calcmode=$langs->trans("CalcModeVATEngagement");
$calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
//$name.='<br>('.$langs->trans("SeeVATReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year_start.'&modetax=1">','</a>').')';
$period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
$period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1);
//$periodlink=($year_start?"<a href='".$_SERVER["PHP_SELF"]."?year=".($year_start-1)."&modetax=".$modetax."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($year_start+1)."&modetax=".$modetax."'>".img_next()."</a>":"");
$description=$langs->trans("RulesVATInServices");
$description.=' '.$langs->trans("DepositsAreIncluded");

View File

@ -130,7 +130,7 @@ if ($modetax==1) // Calculate on invoice for goods and services
$nom=$langs->trans("VATReportByQuartersInDueDebtMode");
$calcmode=$langs->trans("CalcModeVATDebt");
$calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
$period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
$period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1);
$prevyear=$year_start; $prevquarter=$q;
if ($prevquarter > 1) $prevquarter--;
else { $prevquarter=4; $prevyear--; }
@ -165,7 +165,7 @@ if ($modetax==0) // Invoice for goods, payment for services
$nom=$langs->trans("VATReportByQuartersInInputOutputMode");
$calcmode=$langs->trans("CalcModeVATEngagement");
$calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
$period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
$period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1);
$prevyear=$year_start; $prevquarter=$q;
if ($prevquarter > 1) $prevquarter--;
else { $prevquarter=4; $prevyear--; }

View File

@ -149,7 +149,7 @@ if ($modetax==1) { // Calculate on invoice for goods and services
$nom=$langs->trans("VATReportByQuartersInDueDebtMode");
$calcmode=$langs->trans("CalcModeVATDebt");
$calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
$period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
$period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1);
$prevyear=$year_start; $prevquarter=$q;
if ($prevquarter > 1) {
$prevquarter--;
@ -198,7 +198,7 @@ if ($modetax==0) { // Invoice for goods, payment for services
$nom=$langs->trans("VATReportByQuartersInInputOutputMode");
$calcmode=$langs->trans("CalcModeVATEngagement");
$calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
$period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
$period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1);
$prevyear=$year_start; $prevquarter=$q;
if ($prevquarter > 1) {
$prevquarter--;

View File

@ -688,11 +688,11 @@ else
$form=new Form($db);
if ($object->birthday)
{
print Form::select_date($object->birthday,'birthday',0,0,0,"perso", 1, 0, 1);
print Form::selectDate($object->birthday,'birthday',0,0,0,"perso", 1, 0, 1);
}
else
{
print Form::select_date('','birthday',0,0,1,"perso", 1, 0, 1);
print Form::selectDate('','birthday',0,0,1,"perso", 1, 0, 1);
}
print '</td>';

View File

@ -130,7 +130,7 @@ if ($action == 'edit')
// Date To Birth
print '<tr><td>'.$langs->trans("DateToBirth").'</td><td>';
$form=new Form($db);
print Form::select_date($object->birthday,'birthday',0,0,1,"perso", 1,0,1);
print Form::selectDate($object->birthday,'birthday',0,0,1,"perso", 1,0,1);
print '</td>';
print '<td colspan="2">'.$langs->trans("Alert").': ';

View File

@ -1148,7 +1148,7 @@ if ($action == 'create')
print '</td></tr>';
print '<tr><td><span class="fieldrequired">'.$langs->trans("Date").'</span></td><td>';
Form::select_date($datecontrat,'',0,0,'',"contrat");
Form::selectDate($datecontrat,'',0,0,'',"contrat");
print "</td></tr>";
// Project
@ -1651,9 +1651,9 @@ else
print "<tr ".$bc[$var].">";
print '<td colspan="'.$colspan.'">';
print $langs->trans("DateStartPlanned").' ';
Form::select_date($db->jdate($objp->date_debut),"date_start_update",$usehm,$usehm,($db->jdate($objp->date_debut)>0?0:1),"update");
Form::selectDate($db->jdate($objp->date_debut),"date_start_update",$usehm,$usehm,($db->jdate($objp->date_debut)>0?0:1),"update");
print ' &nbsp;&nbsp;'.$langs->trans("DateEndPlanned").' ';
Form::select_date($db->jdate($objp->date_fin),"date_end_update",$usehm,$usehm,($db->jdate($objp->date_fin)>0?0:1),"update");
Form::selectDate($db->jdate($objp->date_fin),"date_end_update",$usehm,$usehm,($db->jdate($objp->date_fin)>0?0:1),"update");
print '</td>';
if (is_array($extralabelslines) && count($extralabelslines)>0) {
@ -1824,11 +1824,11 @@ else
print '<tr '.$bc[$var].'>';
print '<td class="nohover">'.$langs->trans("DateServiceActivate").'</td><td class="nohover">';
print Form::select_date($dateactstart,'',$usehm,$usehm,'',"active",1,0,1);
print Form::selectDate($dateactstart,'',$usehm,$usehm,'',"active",1,0,1);
print '</td>';
print '<td class="nohover">'.$langs->trans("DateEndPlanned").'</td><td class="nohover">';
print Form::select_date($dateactend,"end",$usehm,$usehm,'',"active",1,0,1);
print Form::selectDate($dateactend,"end",$usehm,$usehm,'',"active",1,0,1);
print '</td>';
print '<td align="center nohover" rowspan="2" valign="middle" class="nohover">';
@ -1881,7 +1881,7 @@ else
if ($objp->statut == 4)
{
print $langs->trans("DateEndReal").' ';
print Form::select_date($dateactend,"end",$usehm,$usehm,($objp->date_fin_reelle>0?0:1),"closeline",1,1,1);
print Form::selectDate($dateactend,"end",$usehm,$usehm,($objp->date_fin_reelle>0?0:1),"closeline",1,1,1);
}
}
print '</td>';

View File

@ -219,14 +219,14 @@ if ($resql)
print Form::selectarray('filter_op1',$arrayofoperators,$filter_op1,1);
print ' ';
$filter_date1=dol_mktime(0,0,0,$op1month,$op1day,$op1year);
print Form::select_date($filter_date1,'op1',0,0,1,'',1,0,1);
print Form::selectDate($filter_date1,'op1',0,0,1,'',1,0,1);
print '</td>';
print '<td class="liste_titre" align="center">';
$arrayofoperators=array('<'=>'<','>'=>'>');
print Form::selectarray('filter_op2',$arrayofoperators,$filter_op2,1);
print ' ';
$filter_date2=dol_mktime(0,0,0,$op2month,$op2day,$op2year);
print Form::select_date($filter_date2,'op2',0,0,1,'',1,0,1);
print Form::selectDate($filter_date2,'op2',0,0,1,'',1,0,1);
print '</td>';
print '<td align="right">';
$arrayofstatus=array(

View File

@ -694,7 +694,7 @@ class ExtraFields
$showtime = in_array($type,array('datetime')) ? 1 : 0;
// Do not show current date when field not required (see select_date() method)
// Do not show current date when field not required (see selectDate() method)
if (!$required && $value == '') $value = '-1';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
@ -702,7 +702,7 @@ class ExtraFields
if (! is_object($form)) $form=new Form($this->db);
// TODO Must also support $moreparam
$out = Form::select_date($value, $keysuffix.'options_'.$key.$keyprefix, $showtime, $showtime, $required, '', 1, 1, 1, 0, 1);
$out = Form::selectDate($value, $keysuffix.'options_'.$key.$keyprefix, $showtime, $showtime, $required, '', 1, 1, 1, 0, 1);
}
elseif (in_array($type,array('int')))
{

View File

@ -171,11 +171,11 @@ class Form
}
else if ($typeofdata == 'day' || $typeofdata == 'datepicker')
{
$ret.=self::select_date($value,$htmlname,0,0,1,'form'.$htmlname,1,0,1);
$ret.=self::selectDate($value,$htmlname,0,0,1,'form'.$htmlname,1,0,1);
}
else if ($typeofdata == 'dayhour' || $typeofdata == 'datehourpicker')
{
$ret.=self::select_date($value,$htmlname,1,1,1,'form'.$htmlname,1,0,1);
$ret.=self::selectDate($value,$htmlname,1,1,1,'form'.$htmlname,1,0,1);
}
else if (preg_match('/^select;/',$typeofdata))
{
@ -3264,7 +3264,7 @@ class Form
{
$more.='<tr><td>'.$input['label'].'</td>';
$more.='<td colspan="2" align="left">';
$more.=self::select_date($input['value'],$input['name'],0,0,0,'',1,0,1);
$more.=self::selectDate($input['value'],$input['name'],0,0,0,'',1,0,1);
$more.='</td></tr>'."\n";
$formquestion[] = array('name'=>$input['name'].'day');
$formquestion[] = array('name'=>$input['name'].'month');
@ -3614,9 +3614,9 @@ class Form
* @param int $displaymin Display minutes selector
* @param int $nooutput 1=No print output, return string
* @return void
* @see select_date
* @see selectDate
*/
public static function form_date($page, $selected, $htmlname, $displayhour=0, $displaymin=0, $nooutput=0)
public static function formDate($page, $selected, $htmlname, $displayhour=0, $displaymin=0, $nooutput=0)
{
global $langs;
@ -3629,7 +3629,7 @@ class Form
$ret.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
$ret.='<table class="nobordernopadding" cellpadding="0" cellspacing="0">';
$ret.='<tr><td>';
$ret.=self::select_date($selected,$htmlname,$displayhour,$displaymin,1,'form'.$htmlname,1,0,1);
$ret.=self::selectDate($selected,$htmlname,$displayhour,$displaymin,1,'form'.$htmlname,1,0,1);
$ret.='</td>';
$ret.='<td align="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
$ret.='</tr></table></form>';
@ -4252,12 +4252,12 @@ class Form
* @param int $nooutput Do not output html string but return it
* @param int $disabled Disable input fields
* @param int $fullday When a checkbox with this html name is on, hour and day are set with 00:00 or 23:59
* @param string $addplusone Add a link "+1 hour". Value must be name of another select_date field.
* @param string $addplusone Add a link "+1 hour". Value must be name of another selectDate field.
* @param datetime $adddateof Add a link "Date of invoice" using the following date.
* @return mixed Nothing or string if nooutput is 1
* @see form_date
* @see formDate
*/
public static function select_date($set_time='', $prefix='re', $h=0, $m=0, $empty=0, $form_name="", $d=1, $addnowlink=0, $nooutput=0, $disabled=0, $fullday='', $addplusone='', $adddateof='')
public static function selectDate($set_time='', $prefix='re', $h=0, $m=0, $empty=0, $form_name="", $d=1, $addnowlink=0, $nooutput=0, $disabled=0, $fullday='', $addplusone='', $adddateof='')
{
global $conf,$langs;

View File

@ -636,7 +636,7 @@ function projectLinesPerDay(&$inc, $parent, $lines, &$level, &$projectsrole, &$t
// Form to add new time
print '<td class="nowrap" align="center">';
$tableCell=Form::select_date($preselectedday,$lines[$i]->id,1,1,2,"addtime",0,0,1,$disabledtask);
$tableCell=Form::selectDate($preselectedday,$lines[$i]->id,1,1,2,"addtime",0,0,1,$disabledtask);
print $tableCell;
print '</td><td align="right">';

View File

@ -154,9 +154,9 @@ class mailing_fraise extends MailingTargets
$s.='</select>';
$s.='<br>';
$s.=$langs->trans("DateEndSubscription").': &nbsp;';
$s.=$langs->trans("After").' > '.Form::select_date(-1,'subscriptionafter',0,0,1,'fraise',1,0,1,0);
$s.=$langs->trans("After").' > '.Form::selectDate(-1,'subscriptionafter',0,0,1,'fraise',1,0,1,0);
$s.=' &nbsp; ';
$s.=$langs->trans("Before").' < '.Form::select_date(-1,'subscriptionbefore',0,0,1,'fraise',1,0,1,0);
$s.=$langs->trans("Before").' < '.Form::selectDate(-1,'subscriptionbefore',0,0,1,'fraise',1,0,1,0);
return $s;
}

View File

@ -382,16 +382,16 @@ if ((! empty($conf->service->enabled) || ($object->element == 'contrat')) && $da
if (! empty($object->element) && $object->element == 'contrat')
{
print $langs->trans("DateStartPlanned").' ';
Form::select_date($date_start,"date_start",$usehm,$usehm,1,"addproduct");
Form::selectDate($date_start,"date_start",$usehm,$usehm,1,"addproduct");
print ' &nbsp; '.$langs->trans("DateEndPlanned").' ';
Form::select_date($date_end,"date_end",$usehm,$usehm,1,"addproduct");
Form::selectDate($date_end,"date_end",$usehm,$usehm,1,"addproduct");
}
else
{
echo $langs->trans('ServiceLimitedDuration').' '.$langs->trans('From').' ';
echo Form::select_date($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,1);
echo 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,1);
echo ' '.$langs->trans('to').' ';
echo Form::select_date($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,1);
echo 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,1);
};
print '<script type="text/javascript">';
if (!$date_start) {

View File

@ -226,9 +226,9 @@ $coldisplay=-1; // We remove first td
<td colspan="11"><?php echo $langs->trans('ServiceLimitedDuration').' '.$langs->trans('From').' '; ?>
<?php
$hourmin=(isset($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE:'');
echo Form::select_date($line->date_start,'date_start',$hourmin,$hourmin,$line->date_start?0:1,"updateligne",1,0,1);
echo Form::selectDate($line->date_start,'date_start',$hourmin,$hourmin,$line->date_start?0:1,"updateligne",1,0,1);
echo ' '.$langs->trans('to').' ';
echo Form::select_date($line->date_end,'date_end',$hourmin,$hourmin,$line->date_end?0:1,"updateligne",1,0,1);
echo Form::selectDate($line->date_end,'date_end',$hourmin,$hourmin,$line->date_end?0:1,"updateligne",1,0,1);
print '<script type="text/javascript">';
if (!$line->date_start) {
if (isset($conf->global->MAIN_DEFAULT_DATE_START_HOUR)) {

View File

@ -460,11 +460,11 @@ if (($action=="create") || ($action=="edit"))
print $langs->trans('CronDtStart')."</td><td>";
if(!empty($object->datestart))
{
Form::select_date($object->datestart,'datestart',1,1,'',"cronform");
Form::selectDate($object->datestart,'datestart',1,1,'',"cronform");
}
else
{
Form::select_date('','datestart',1,1,'',"cronform");
Form::selectDate('','datestart',1,1,'',"cronform");
}
print "</td>";
print "<td>";
@ -474,10 +474,10 @@ if (($action=="create") || ($action=="edit"))
print "<tr><td>";
print $langs->trans('CronDtEnd')."</td><td>";
if(!empty($object->dateend)){
Form::select_date($object->dateend,'dateend',1,1,'',"cronform");
Form::selectDate($object->dateend,'dateend',1,1,'',"cronform");
}
else{
Form::select_date(-1,'dateend',1,1,1,"cronform");
Form::selectDate(-1,'dateend',1,1,1,"cronform");
}
print "</td>";
print "<td>";
@ -514,11 +514,11 @@ if (($action=="create") || ($action=="edit"))
print "</td><td>";
if(!empty($object->datenextrun))
{
Form::select_date($object->datenextrun,'datenextrun',1,1,'',"cronform");
Form::selectDate($object->datenextrun,'datenextrun',1,1,'',"cronform");
}
else
{
Form::select_date(-1,'datenextrun',1,1,'',"cronform");
Form::selectDate(-1,'datenextrun',1,1,'',"cronform");
}
print "</td>";
print "<td>";

View File

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

View File

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

View File

@ -638,7 +638,7 @@ if ($action == 'create')
print '<td colspan="3">';
//print dol_print_date($object->date_livraison,"day"); // date_livraison come from order and will be stored into date_delivery planed.
$date_delivery = ($date_delivery?$date_delivery:$object->date_livraison); // $date_delivery comes from GETPOST
print Form::select_date($date_delivery?$date_delivery:-1,'date_delivery',1,1,1);
print Form::selectDate($date_delivery?$date_delivery:-1,'date_delivery',1,1,1);
print "</td>\n";
print '</tr>';
@ -1321,7 +1321,7 @@ else if ($id || $ref)
print '<form name="setdate_livraison" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="setdate_livraison">';
print Form::select_date($object->date_delivery?$object->date_delivery:-1,'liv_',1,1,'',"setdate_livraison",1,0,1);
print Form::selectDate($object->date_delivery?$object->date_delivery:-1,'liv_',1,1,'',"setdate_livraison",1,0,1);
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
print '</form>';
}

View File

@ -287,7 +287,7 @@ if ($id > 0 || ! empty($ref))
print '<form name="setdate_livraison" action="'.$_SERVER["PHP_SELF"].'?id='.$commande->id.'" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="setdatedelivery">';
Form::select_date($commande->date_livraison>0?$commande->date_livraison:-1,'liv_','','','',"setdatedelivery");
Form::selectDate($commande->date_livraison>0?$commande->date_livraison:-1,'liv_','','','',"setdatedelivery");
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
print '</form>';
}

View File

@ -1117,13 +1117,13 @@ if ($action == 'create')
print '<tr>';
print '<td class="fieldrequired">'.$langs->trans("DateStart").'</td>';
print '<td>';
Form::select_date($date_start?$date_start:-1,'date_debut',0,0,0,'',1,1);
Form::selectDate($date_start?$date_start:-1,'date_debut',0,0,0,'',1,1);
print '</td>';
print '</tr>';
print '<tr>';
print '<td class="fieldrequired">'.$langs->trans("DateEnd").'</td>';
print '<td>';
Form::select_date($date_end?$date_end:-1,'date_fin',0,0,0,'',1,1);
Form::selectDate($date_end?$date_end:-1,'date_fin',0,0,0,'',1,1);
print '</td>';
print '</tr>';
print '<tr>';
@ -1237,13 +1237,13 @@ else
print '<tr>';
print '<td>'.$langs->trans("DateStart").'</td>';
print '<td>';
Form::select_date($object->date_debut,'date_debut');
Form::selectDate($object->date_debut,'date_debut');
print '</td>';
print '</tr>';
print '<tr>';
print '<td>'.$langs->trans("DateEnd").'</td>';
print '<td>';
Form::select_date($object->date_fin,'date_fin');
Form::selectDate($object->date_fin,'date_fin');
print '</td>';
print '</tr>';
@ -1728,7 +1728,7 @@ else
// Select date
print '<td style="text-align:center;">';
Form::select_date($objp->date,'date');
Form::selectDate($objp->date,'date');
print '</td>';
// Select project
@ -1812,7 +1812,7 @@ else
// Select date
print '<td style="text-align:center;">';
Form::select_date($date?$date:-1,'date');
Form::selectDate($date?$date:-1,'date');
print '</td>';
// Select project

View File

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

View File

@ -1549,7 +1549,7 @@ else if ($id > 0 || ! empty($ref))
// Date d'intervention
print '<td align="center" class="nowrap">';
Form::select_date($db->jdate($objp->date_intervention),'di',1,1,0,"date_intervention");
Form::selectDate($db->jdate($objp->date_intervention),'di',1,1,0,"date_intervention");
print '</td>';
// Duration
@ -1616,7 +1616,7 @@ else if ($id > 0 || ! empty($ref))
$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'));
Form::select_date($timewithnohour,'di',1,1,0,"addinter");
Form::selectDate($timewithnohour,'di',1,1,0,"addinter");
print '</td>';
// Duration

View File

@ -1596,7 +1596,7 @@ if ($action=='create')
print '<td>';
$usehourmin=0;
if (! empty($conf->global->SUPPLIER_ORDER_USE_HOUR_FOR_DELIVERY_DATE)) $usehourmin=1;
Form::select_date($datelivraison?$datelivraison:-1,'liv_',$usehourmin,$usehourmin,'',"set");
Form::selectDate($datelivraison?$datelivraison:-1,'liv_',$usehourmin,$usehourmin,'',"set");
print '</td></tr>';
// Bank Account
@ -2042,7 +2042,7 @@ elseif (! empty($object->id))
print '<input type="hidden" name="action" value="setdate_livraison">';
$usehourmin=0;
if (! empty($conf->global->SUPPLIER_ORDER_USE_HOUR_FOR_DELIVERY_DATE)) $usehourmin=1;
Form::select_date($object->date_livraison?$object->date_livraison:-1,'liv_',$usehourmin,$usehourmin,'',"setdate_livraison");
Form::selectDate($object->date_livraison?$object->date_livraison:-1,'liv_',$usehourmin,$usehourmin,'',"setdate_livraison");
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
print '</form>';
}
@ -2364,9 +2364,9 @@ elseif (! empty($object->id))
print '<br>';
print $langs->trans('ServiceLimitedDuration').' '.$langs->trans('From').' ';
print Form::select_date($date_start,'date_start'.$date_pf,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,1,'',1,0,1);
print Form::selectDate($date_start,'date_start'.$date_pf,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,1,'',1,0,1);
print ' '.$langs->trans('to').' ';
print Form::select_date($date_end,'date_end'.$date_pf,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,1,'',1,0,1);
print Form::selectDate($date_end,'date_end'.$date_pf,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,1,'',1,0,1);
print '</td>';
print '<td>';
@ -2978,7 +2978,7 @@ elseif (! empty($object->id))
//print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("ToOrder").'</td></tr>';
print '<tr><td>'.$langs->trans("OrderDate").'</td><td>';
$date_com = dol_mktime(0, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear'));
print Form::select_date($date_com,'',1,1,'',"commande",1,0,1);
print Form::selectDate($date_com,'',1,1,'',"commande",1,0,1);
print '</td></tr>';
print '<tr><td>'.$langs->trans("OrderMode").'</td><td>';
@ -3005,7 +3005,7 @@ elseif (! empty($object->id))
print '<table class="border" width="100%">';
//print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Receive").'</td></tr>';
print '<tr><td>'.$langs->trans("DeliveryDate").'</td><td>';
print Form::select_date('','',1,1,'',"commande",1,0,1);
print Form::selectDate('','',1,1,'',"commande",1,0,1);
print "</td></tr>\n";
print "<tr><td>".$langs->trans("Delivery")."</td><td>\n";

View File

@ -510,11 +510,11 @@ if ($id > 0 || ! empty($ref))
print '</td>';
print '<td>';
$dlcdatesuffix=dol_mktime(0, 0, 0, GETPOST('dlc'.$suffix.'month'), GETPOST('dlc'.$suffix.'day'), GETPOST('dlc'.$suffix.'year'));
Form::select_date($dlcdatesuffix,'dlc'.$suffix,'','',1,"");
Form::selectDate($dlcdatesuffix,'dlc'.$suffix,'','',1,"");
print '</td>';
print '<td>';
$dluodatesuffix=dol_mktime(0, 0, 0, GETPOST('dluo'.$suffix.'month'), GETPOST('dluo'.$suffix.'day'), GETPOST('dluo'.$suffix.'year'));
Form::select_date($dluodatesuffix,'dluo'.$suffix,'','',1,"");
Form::selectDate($dluodatesuffix,'dluo'.$suffix,'','',1,"");
print '</td>';
print '<td colspan="2">&nbsp</td>'; // Qty ordered + qty already dispatached
}

View File

@ -323,7 +323,7 @@ if ($action == 'create' && !$error) {
// Date invoice
print '<tr><td class="fieldrequired">' . $langs->trans('Date') . '</td><td colspan="2">';
Form::select_date('', '', '', '', '', "add", 1, 1);
Form::selectDate('', '', '', '', '', "add", 1, 1);
print '</td></tr>';
// Payment term
print '<tr><td class="nowrap">' . $langs->trans('PaymentConditionsShort') . '</td><td colspan="2">';
@ -469,8 +469,8 @@ if (($action != 'create' && $action != 'add') && !$error) {
$num = $db->num_rows($resql);
print load_fiche_titre($title);
$i = 0;
$period = Form::select_date($date_start, 'date_start', 0, 0, 1, '', 1, 0, 1) . ' - ' . Form::select_date($date_end, 'date_end', 0, 0, 1, '', 1, 0, 1);
$periodely = Form::select_date($date_starty, 'date_start_dely', 0, 0, 1, '', 1, 0, 1) . ' - ' . Form::select_date($date_endy, 'date_end_dely', 0, 0, 1, '', 1, 0, 1);
$period = Form::selectDate($date_start, 'date_start', 0, 0, 1, '', 1, 0, 1) . ' - ' . Form::selectDate($date_end, 'date_end', 0, 0, 1, '', 1, 0, 1);
$periodely = Form::selectDate($date_starty, 'date_start_dely', 0, 0, 1, '', 1, 0, 1) . ' - ' . Form::selectDate($date_endy, 'date_end_dely', 0, 0, 1, '', 1, 0, 1);
if (! empty($socid)) {
// Company

View File

@ -1483,12 +1483,12 @@ if ($action == 'create')
// Date invoice
print '<tr><td class="fieldrequired">'.$langs->trans('DateInvoice').'</td><td>';
Form::select_date($dateinvoice,'','','','',"add",1,1);
Form::selectDate($dateinvoice,'','','','',"add",1,1);
print '</td></tr>';
// Due date
print '<tr><td>'.$langs->trans('DateMaxPayment').'</td><td>';
Form::select_date($datedue,'ech','','','',"add",1,1);
Form::selectDate($datedue,'ech','','','',"add",1,1);
print '</td></tr>';
// Payment term

View File

@ -355,7 +355,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
print $supplierstatic->getNomUrl(1,'supplier');
print '</td></tr>';
print '<tr><td class="fieldrequired">'.$langs->trans('Date').'</td><td>';
Form::select_date($dateinvoice,'','','','',"addpaiement",1,1,0,0,'','',$object->date);
Form::selectDate($dateinvoice,'','','','',"addpaiement",1,1,0,0,'','',$object->date);
print '</td>';
print '<td>'.$langs->trans('Comments').'</td></tr>';
print '<tr><td class="fieldrequired">'.$langs->trans('PaymentMode').'</td><td>';

View File

@ -823,10 +823,10 @@ if (empty($id) || $action == 'add' || $action == 'request' || $action == 'create
print '<td>';
// Si la demande ne vient pas de l'agenda
if (! GETPOST('date_debut_')) {
Form::select_date(-1,'date_debut_');
Form::selectDate(-1,'date_debut_');
} else {
$tmpdate = dol_mktime(0, 0, 0, GETPOST('date_debut_month'), GETPOST('date_debut_day'), GETPOST('date_debut_year'));
Form::select_date($tmpdate,'date_debut_');
Form::selectDate($tmpdate,'date_debut_');
}
print ' &nbsp; &nbsp; ';
print Form::selectarray('starthalfday', $listhalfday, (GETPOST('starthalfday')?GETPOST('starthalfday'):'morning'));
@ -839,10 +839,10 @@ if (empty($id) || $action == 'add' || $action == 'request' || $action == 'create
print '<td>';
// Si la demande ne vient pas de l'agenda
if (! GETPOST('date_fin_')) {
Form::select_date(-1,'date_fin_');
Form::selectDate(-1,'date_fin_');
} else {
$tmpdate = dol_mktime(0, 0, 0, GETPOST('date_fin_month'), GETPOST('date_fin_day'), GETPOST('date_fin_year'));
Form::select_date($tmpdate,'date_fin_');
Form::selectDate($tmpdate,'date_fin_');
}
print ' &nbsp; &nbsp; ';
print Form::selectarray('endhalfday', $listhalfday, (GETPOST('endhalfday')?GETPOST('endhalfday'):'afternoon'));
@ -1035,7 +1035,7 @@ else
print '<tr>';
print '<td>'.$langs->trans('DateDebCP').' ('.$langs->trans("FirstDayOfHoliday").')</td>';
print '<td>';
Form::select_date($cp->date_debut,'date_debut_');
Form::selectDate($cp->date_debut,'date_debut_');
print ' &nbsp; &nbsp; ';
print Form::selectarray('starthalfday', $listhalfday, (GETPOST('starthalfday')?GETPOST('starthalfday'):$starthalfday));
print '</td>';
@ -1057,7 +1057,7 @@ else
print '<tr>';
print '<td>'.$langs->trans('DateFinCP').' ('.$langs->trans("LastDayOfHoliday").')</td>';
print '<td>';
Form::select_date($cp->date_fin,'date_fin_');
Form::selectDate($cp->date_fin,'date_fin_');
print ' &nbsp; &nbsp; ';
print Form::selectarray('endhalfday', $listhalfday, (GETPOST('endhalfday')?GETPOST('endhalfday'):$endhalfday));
print '</td>';

View File

@ -151,7 +151,7 @@ if ($object->id)
print '<tr>';
print '<td>'.$langs->trans('DateDebCP').' ('.$langs->trans("FirstDayOfHoliday").')</td>';
print '<td>';
Form::select_date($object->date_debut,'date_debut_');
Form::selectDate($object->date_debut,'date_debut_');
print ' &nbsp; &nbsp; ';
print Form::selectarray('starthalfday', $listhalfday, (GETPOST('starthalfday')?GETPOST('starthalfday'):$starthalfday));
print '</td>';
@ -173,7 +173,7 @@ if ($object->id)
print '<tr>';
print '<td>'.$langs->trans('DateFinCP').' ('.$langs->trans("LastDayOfHoliday").')</td>';
print '<td>';
Form::select_date($object->date_fin,'date_fin_');
Form::selectDate($object->date_fin,'date_fin_');
print ' &nbsp; &nbsp; ';
print Form::selectarray('endhalfday', $listhalfday, (GETPOST('endhalfday')?GETPOST('endhalfday'):$endhalfday));
print '</td>';

View File

@ -647,7 +647,7 @@ else
print '<form name="setdate_livraison" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="setdate_livraison">';
Form::select_date($object->date_delivery?$object->date_delivery:-1,'liv_',1,1,'',"setdate_livraison");
Form::selectDate($object->date_delivery?$object->date_delivery:-1,'liv_',1,1,'',"setdate_livraison");
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
print '</form>';
}

View File

@ -218,13 +218,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,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,1);
print '</td></tr>';
// Number of terms
@ -356,7 +356,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, 1);
}
else
{
@ -369,7 +369,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, 1);
}
else
{

View File

@ -123,7 +123,7 @@ if ($object->id)
print "<td>";
if ($action == 'edit')
{
print Form::select_date($object->datestart, 'start', 0, 0, 0, 'loan', 1, 0, 1);
print Form::selectDate($object->datestart, 'start', 0, 0, 0, 'loan', 1, 0, 1);
}
else
{
@ -137,7 +137,7 @@ if ($object->id)
print "<td>";
if ($action == 'edit')
{
print Form::select_date($object->dateend, 'end', 0, 0, 0, 'loan', 1, 0, 1);
print Form::selectDate($object->dateend, 'end', 0, 0, 0, 'loan', 1, 0, 1);
}
else
{

View File

@ -200,7 +200,7 @@ if ($_GET["action"] == 'create')
print '<tr><td width="25%" class="fieldrequired">'.$langs->trans("Date").'</td><td colspan="2">';
$datepaid = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
$datepayment = empty($conf->global->MAIN_AUTOFILL_DATE)?(empty($_POST["remonth"])?-1:$datepaye):0;
Form::select_date($datepayment, '', '', '', '', "add_payment", 1, 1);
Form::selectDate($datepayment, '', '', '', '', "add_payment", 1, 1);
print "</td>";
print '</tr>';

View File

@ -101,11 +101,11 @@ if ($user->rights->margins->read->all) {
// Start date
print '<td>'.$langs->trans('StartDate').' ('.$langs->trans("DateValidation").')</td>';
print '<td width="20%">';
Form::select_date($startdate,'startdate','','',1,"sel",1,1);
Form::selectDate($startdate,'startdate','','',1,"sel",1,1);
print '</td>';
print '<td width="20%">'.$langs->trans('EndDate').' ('.$langs->trans("DateValidation").')</td>';
print '<td width="20%">';
Form::select_date($enddate,'enddate','','',1,"sel",1,1);
Form::selectDate($enddate,'enddate','','',1,"sel",1,1);
print '</td>';
print '<td style="text-align: center;">';
print '<input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans('Launch')).'" />';

View File

@ -126,11 +126,11 @@ print '<table class="border" width="100%">';
// Start date
print '<td>' . $langs->trans('StartDate') . ' (' . $langs->trans("DateValidation") . ')</td>';
print '<td width="20%">';
Form::select_date($startdate, 'startdate', '', '', 1, "sel", 1, 1);
Form::selectDate($startdate, 'startdate', '', '', 1, "sel", 1, 1);
print '</td>';
print '<td width="20%">' . $langs->trans('EndDate') . ' (' . $langs->trans("DateValidation") . ')</td>';
print '<td width="20%">';
Form::select_date($enddate, 'enddate', '', '', 1, "sel", 1, 1);
Form::selectDate($enddate, 'enddate', '', '', 1, "sel", 1, 1);
print '</td>';
print '<td style="text-align: center;">';
print '<input type="submit" class="button" value="' . dol_escape_htmltag($langs->trans('Launch')) . '" name="button_search" />';

View File

@ -122,11 +122,11 @@ if (! $sortfield)
// Start date
print '<td>'.$langs->trans('StartDate').' ('.$langs->trans("DateValidation").')</td>';
print '<td width="20%">';
Form::select_date($startdate,'startdate','','',1,"sel",1,1);
Form::selectDate($startdate,'startdate','','',1,"sel",1,1);
print '</td>';
print '<td width="20%">'.$langs->trans('EndDate').' ('.$langs->trans("DateValidation").')</td>';
print '<td width="20%">';
Form::select_date($enddate,'enddate','','',1,"sel",1,1);
Form::selectDate($enddate,'enddate','','',1,"sel",1,1);
print '</td>';
print '<td style="text-align: center;">';
print '<input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans('Launch')).'" />';

View File

@ -124,11 +124,11 @@ else {
// Start date
print '<td>'.$langs->trans('StartDate').' ('.$langs->trans("DateValidation").')</td>';
print '<td width="20%">';
Form::select_date($startdate,'startdate','','',1,"sel",1,1);
Form::selectDate($startdate,'startdate','','',1,"sel",1,1);
print '</td>';
print '<td width="20%">'.$langs->trans('EndDate').' ('.$langs->trans("DateValidation").')</td>';
print '<td width="20%">';
Form::select_date($enddate,'enddate','','',1,"sel",1,1);
Form::selectDate($enddate,'enddate','','',1,"sel",1,1);
print '</td>';
print '<td style="text-align: center;">';
print '<input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans('Launch')).'" />';

View File

@ -282,7 +282,7 @@ print '</td></tr>';
// Expire date
print '<tr><td>'.$langs->trans('ExpireDate').'</td><td colspan="2">';
if ($action == 'edit') print Form::select_date($expiredate?$expiredate:$object->date_fin,'expire',0,0,0,'',1,0,1);
if ($action == 'edit') print Form::selectDate($expiredate?$expiredate:$object->date_fin,'expire',0,0,0,'',1,0,1);
else print dol_print_date($object->date_fin,'day');
print '</td></tr>';

View File

@ -457,7 +457,7 @@ print '</td></tr>';
// Expire date
print '<tr><td>'.$langs->trans('ExpireDate').'</td><td colspan="2">';
if ($action == 'edit') print Form::select_date($expiredate?$expiredate:$object->date_fin,'expire',0,0,0,'',1,0,1);
if ($action == 'edit') print Form::selectDate($expiredate?$expiredate:$object->date_fin,'expire',0,0,0,'',1,0,1);
else print dol_print_date($object->date_fin,'day');
print '</td></tr>';

View File

@ -156,7 +156,7 @@ print '</tr>'."\n";
print '<tr><td class="fieldrequired">'. $langs->trans("ExpireDate") .'</td><td>';
print Form::select_date($champdatefin?$champdatefin:-1,'champdatefin','','','',"add",1,0,1);
print Form::selectDate($champdatefin?$champdatefin:-1,'champdatefin','','','',"add",1,0,1);
print '</tr>'."\n";
print '</table>'."\n";

View File

@ -737,10 +737,10 @@ if ($resql)
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST"><input type="hidden" name="pdluoid" value="'.$pdluo->id.'"><input type="hidden" name="action" value="updateline"><input type="hidden" name="id" value="'.$id.'"><table class="noborder" width="100%"><tr><td width="10%"></td>';
print '<td align="right" width="10%"><input type="text" name="batch_number" value="'.$pdluo->batch.'"></td>';
print '<td align="center" width="10%">';
Form::select_date($pdluo->eatby,'eatby','','',1,'',1,0,1);
Form::selectDate($pdluo->eatby,'eatby','','',1,'',1,0,1);
print '</td>';
print '<td align="center" width="10%">';
Form::select_date($pdluo->sellby,'sellby','','',1,'',1,0,1);
Form::selectDate($pdluo->sellby,'sellby','','',1,'',1,0,1);
print '</td>';
print '<td align="right" width="10%">'.$pdluo->qty.($pdluo->qty<0?' '.img_warning():'').'</td>';
print '<td colspan="4"><input type="submit" class="button" id="savelinebutton" name="save" value="'.$langs->trans("Save").'">';

View File

@ -239,7 +239,7 @@ if ($resql)
'<input type="text" class="flat" name="search_ttc" value="' . $sttc . '">'.
'</td>'.
'<td class="liste_titre">'.
Form::select_date('', 'search_date', 0, 0, 1, '', 1, 0, 1, 0, '').
Form::selectDate('', 'search_date', 0, 0, 1, '', 1, 0, 1, 0, '').
'</td>'.
'<td class="liste_titre" align="right">';
$src = DOL_URL_ROOT . '/theme/' . $conf->theme . '/img/search.png';

View File

@ -93,12 +93,12 @@
print '</tr><tr>';
print '<td colspan="2">'.$langs->trans("l_eatby").'</td><td>';
$eatbyselected=dol_mktime(0, 0, 0, GETPOST('eatbymonth'), GETPOST('eatbyday'), GETPOST('eatbyyear'));
Form::select_date($eatbyselected,'eatby','','',1,"");
Form::selectDate($eatbyselected,'eatby','','',1,"");
print '</td>';
print '<td></td>';
print '<td>'.$langs->trans("l_sellby").'</td><td>';
$sellbyselected=dol_mktime(0, 0, 0, GETPOST('sellbymonth'), GETPOST('sellbyday'), GETPOST('sellbyyear'));
Form::select_date($sellbyselected,'sellby','','',1,"");
Form::selectDate($sellbyselected,'sellby','','',1,"");
print '</td>';
print '</tr>';
}

View File

@ -92,10 +92,10 @@
print '</td>';
print '</tr><tr>';
print '<td>'.$langs->trans("l_eatby").'</td><td>';
print Form::select_date(($d_eatby?$d_eatby:$pdluo->eatby),'eatby','','',1,"", 1, 0, 1, ($pdluoid > 0 ? 1 : 0)); // If form was opened for a specific pdluoid, field is disabled
print Form::selectDate(($d_eatby?$d_eatby:$pdluo->eatby),'eatby','','',1,"", 1, 0, 1, ($pdluoid > 0 ? 1 : 0)); // If form was opened for a specific pdluoid, field is disabled
print '</td>';
print '<td>'.$langs->trans("l_sellby").'</td><td>';
print Form::select_date(($d_sellby?$d_sellby:$pdluo->sellby),'sellby','','',1,"", 1, 0, 1, ($pdluoid > 0 ? 1 : 0)); // If form was opened for a specific pdluoid, field is disabled
print Form::selectDate(($d_sellby?$d_sellby:$pdluo->sellby),'sellby','','',1,"", 1, 0, 1, ($pdluoid > 0 ? 1 : 0)); // If form was opened for a specific pdluoid, field is disabled
print '</td>';
print '<td colspan="2"></td>';
print '</tr>';

View File

@ -296,7 +296,7 @@ $nav ="<a href=\"?year=".$prev_year."&amp;month=".$prev_month."&amp;day=".$prev_
$nav.=" <span id=\"month_name\">".dol_print_date(dol_mktime(0,0,0,$month,$day,$year),"day")." </span>\n";
$nav.="<a href=\"?year=".$next_year."&amp;month=".$next_month."&amp;day=".$next_day.$param."\">".img_next($langs->trans("Next"))."</a>\n";
$nav.=" &nbsp; (<a href=\"?year=".$nowyear."&amp;month=".$nowmonth."&amp;day=".$nowday.$param."\">".$langs->trans("Today")."</a>)";
$nav.='<br>'.Form::select_date(-1,'',0,0,2,"addtime",1,0,1).' ';
$nav.='<br>'.Form::selectDate(-1,'',0,0,2,"addtime",1,0,1).' ';
$nav.=' <input type="submit" name="submitdateselect" class="button" value="'.$langs->trans("Refresh").'">';
$picto='calendarweek';

View File

@ -274,7 +274,7 @@ $nav ="<a href=\"?year=".$prev_year."&amp;month=".$prev_month."&amp;day=".$prev_
$nav.=" <span id=\"month_name\">".dol_print_date(dol_mktime(0,0,0,$first_month,$first_day,$first_year),"%Y").", ".$langs->trans("Week")." ".$week." </span>\n";
$nav.="<a href=\"?year=".$next_year."&amp;month=".$next_month."&amp;day=".$next_day.$param."\">".img_next($langs->trans("Next"))."</a>\n";
$nav.=" &nbsp; (<a href=\"?year=".$nowyear."&amp;month=".$nowmonth."&amp;day=".$nowday.$param."\">".$langs->trans("Today")."</a>)";
$nav.='<br>'.Form::select_date(-1,'',0,0,2,"addtime",1,0,1).' ';
$nav.='<br>'.Form::selectDate(-1,'',0,0,2,"addtime",1,0,1).' ';
$nav.=' <input type="submit" name="submitdateselect" class="button" value="'.$langs->trans("Refresh").'">';
$picto='calendarweek';

View File

@ -492,12 +492,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,1);
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,1);
print '</td></tr>';
if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
@ -676,7 +676,7 @@ else
// 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,1);
print ' &nbsp; &nbsp; <input type="checkbox" name="reportdate" value="yes" ';
if ($comefromclone){print ' checked ';}
print '/> '. $langs->trans("ProjectReportDate");
@ -684,7 +684,7 @@ else
// 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,1);
print '</td></tr>';
if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))

View File

@ -324,10 +324,10 @@ if (! $showdatefilter)
print '<input type="hidden" name="action" value="view">';
print '<table><tr>';
print '<td>'.$langs->trans("From").' ';
print Form::select_date($dates,'dates',0,0,1,'',1,0,1);
print Form::selectDate($dates,'dates',0,0,1,'',1,0,1);
print '</td>';
print '<td>'.$langs->trans("to").' ';
print Form::select_date($datee,'datee',0,0,1,'',1,0,1);
print Form::selectDate($datee,'datee',0,0,1,'',1,0,1);
print '</td>';
print '<td>';
print '<input type="submit" name="refresh" value="'.$langs->trans("Refresh").'" class="button">';

View File

@ -317,12 +317,12 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third
// Date start
print '<tr><td>'.$langs->trans("DateStart").'</td><td>';
print Form::select_date(($date_start?$date_start:''),'dateo',1,1,0,'',1,1,1);
print Form::selectDate(($date_start?$date_start:''),'dateo',1,1,0,'',1,1,1);
print '</td></tr>';
// Date end
print '<tr><td>'.$langs->trans("DateEnd").'</td><td>';
print Form::select_date(($date_end?$date_end:-1),'datee',1,1,0,'',1,1,1);
print Form::selectDate(($date_end?$date_end:-1),'datee',1,1,0,'',1,1,1);
print '</td></tr>';
// planned workload

View File

@ -338,12 +338,12 @@ if ($id > 0 || ! empty($ref))
// Date start
print '<tr><td>'.$langs->trans("DateStart").'</td><td>';
print Form::select_date($object->date_start,'dateo',1,1,0,'',1,0,1);
print Form::selectDate($object->date_start,'dateo',1,1,0,'',1,0,1);
print '</td></tr>';
// Date end
print '<tr><td>'.$langs->trans("DateEnd").'</td><td>';
print Form::select_date($object->date_end?$object->date_end:-1,'datee',1,1,0,'',1,0,1);
print Form::selectDate($object->date_end?$object->date_end:-1,'datee',1,1,0,'',1,0,1);
print '</td></tr>';
// Planned workload

View File

@ -431,7 +431,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
print '<td class="nowrap">';
//$newdate=dol_mktime(12,0,0,$_POST["timemonth"],$_POST["timeday"],$_POST["timeyear"]);
$newdate='';
print Form::select_date($newdate,'time',1,1,2,"timespent_date",1,0,1);
print Form::selectDate($newdate,'time',1,1,2,"timespent_date",1,0,1);
print '</td>';
// Contributor
@ -551,7 +551,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
print '<td class="nowrap">';
if ($_GET['action'] == 'editline' && $_GET['lineid'] == $task_time->rowid)
{
print Form::select_date(($date2?$date2:$date1),'timeline',1,1,2,"timespent_date",1,0,1);
print Form::selectDate(($date2?$date2:$date1),'timeline',1,1,2,"timespent_date",1,0,1);
}
else
{

View File

@ -504,7 +504,7 @@ if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
}
// Birthday
print '<tr id="trbirth" class="trbirth"><td>'.$langs->trans("DateToBirth").'</td><td>';
print Form::select_date($birthday,'birth',0,0,1,"newmember",1,0,1);
print Form::selectDate($birthday,'birth',0,0,1,"newmember",1,0,1);
print '</td></tr>'."\n";
// Photo
print '<tr><td>'.$langs->trans("URLPhoto").'</td><td><input type="text" name="photo" size="40" value="'.dol_escape_htmltag(GETPOST('photo')).'"></td></tr>'."\n";

View File

@ -140,7 +140,7 @@ if ($showbirthday) $nav.='<input type="hidden" name="showbirthday" value="1">';
if ($pid) $nav.='<input type="hidden" name="projectid" value="'.$pid.'">';
if ($type) $nav.='<input type="hidden" name="type" value="'.$type.'">';
if ($usergroup) $nav.='<input type="hidden" name="usergroup" value="'.$usergroup.'">';
$nav.=Form::select_date($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1);
$nav.=Form::selectDate($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1);
$nav.=' <input type="submit" name="submitdateselect" class="button" value="'.$langs->trans("Refresh").'">';
$nav.='</form>';

Some files were not shown because too many files have changed in this diff Show More