forked from Wavyzz/dolibarr
Merge remote-tracking branch 'origin/3.5' into develop
Conflicts: htdocs/comm/action/fiche.php htdocs/core/class/conf.class.php htdocs/core/class/html.form.class.php htdocs/core/lib/company.lib.php htdocs/core/modules/commande/doc/pdf_einstein.modules.php htdocs/fourn/facture/fiche.php htdocs/langs/en_US/admin.lang htdocs/margin/agentMargins.php htdocs/margin/customerMargins.php htdocs/margin/productMargins.php htdocs/projet/tasks/task.php
This commit is contained in:
@@ -50,7 +50,7 @@ if (! $user->admin)
|
||||
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$file=$conf->admin->dir_output.'/backup/'.GETPOST('urlfile');
|
||||
$file=$conf->admin->dir_output.'/'.GETPOST('urlfile');
|
||||
$ret=dol_delete_file($file, 1);
|
||||
if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile')));
|
||||
else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors');
|
||||
|
||||
@@ -58,7 +58,7 @@ if ($file && ! $what)
|
||||
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$file=$conf->admin->dir_output.'/backup/'.GETPOST('urlfile');
|
||||
$file=$conf->admin->dir_output.'/'.GETPOST('urlfile');
|
||||
$ret=dol_delete_file($file, 1);
|
||||
if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile')));
|
||||
else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors');
|
||||
@@ -451,10 +451,15 @@ function backup_tables($outputfile, $tables='*')
|
||||
//fwrite($handle,"/*!40101 SET character_set_client = utf8 */;\n");
|
||||
$resqldrop=$db->query('SHOW CREATE TABLE '.$table);
|
||||
$row2 = $db->fetch_row($resqldrop);
|
||||
if (empty($row2[1]))
|
||||
{
|
||||
fwrite($handle, "\n-- WARNING: Show create table ".$table." return empy string when it should not.\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
fwrite($handle,$row2[1].";\n");
|
||||
//fwrite($handle,"/*!40101 SET character_set_client = @saved_cs_client */;\n\n");
|
||||
|
||||
|
||||
// Dumping the data (locking the table and disabling the keys check while doing the process)
|
||||
fwrite($handle, "\n--\n-- Dumping data for table `".$table."`\n--\n");
|
||||
if (!GETPOST("nobin_nolocks")) fwrite($handle, "LOCK TABLES `".$table."` WRITE;\n"); // Lock the table before inserting data (when the data will be imported back)
|
||||
@@ -463,7 +468,8 @@ function backup_tables($outputfile, $tables='*')
|
||||
$sql='SELECT * FROM '.$table;
|
||||
$result = $db->query($sql);
|
||||
$num_fields = $db->num_rows($result);
|
||||
while($row = $db->fetch_row($result)) {
|
||||
while($row = $db->fetch_row($result))
|
||||
{
|
||||
// For each row of data we print a line of INSERT
|
||||
fwrite($handle,'INSERT '.$delayed.$ignore.'INTO `'.$table.'` VALUES (');
|
||||
$columns = count($row);
|
||||
@@ -490,6 +496,7 @@ function backup_tables($outputfile, $tables='*')
|
||||
if (!GETPOST("nobin_nolocks")) fwrite($handle, "UNLOCK TABLES;\n"); // Unlocking the table
|
||||
fwrite($handle,"\n\n\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* Backup Procedure structure*/
|
||||
/*
|
||||
|
||||
@@ -538,7 +538,7 @@ if ($action == 'create')
|
||||
|
||||
// Busy
|
||||
print '<tr><td width="30%" class="nowrap">'.$langs->trans("Busy").'</td><td>';
|
||||
print '<input id="transparency" type="checkbox" name="transparency" value="'.$object->transparency.'">';
|
||||
print '<input id="transparency" type="checkbox" name="transparency"'.($actioncomm->transparency?' checked="checked"':'').'>';
|
||||
print '</td></tr>';
|
||||
|
||||
// Realised by
|
||||
|
||||
@@ -53,7 +53,7 @@ $confirm=GETPOST('confirm','alpha');
|
||||
$fieldvalue = (! empty($id) ? $id : (! empty($ref) ? $ref :''));
|
||||
$fieldtype = (! empty($ref) ? 'ref' :'rowid');
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result=restrictedArea($user,'banque',$fieldvalue,'bank_account','','',$fieldtype);
|
||||
$result=restrictedArea($user,'banque',$fieldvalue,'bank_account&bank_account','','',$fieldtype);
|
||||
|
||||
$paiementtype=GETPOST('paiementtype','alpha',3);
|
||||
$req_nb=GETPOST("req_nb",'',3);
|
||||
|
||||
@@ -43,7 +43,7 @@ if (isset($_GET["id"]) || isset($_GET["ref"]))
|
||||
}
|
||||
$fieldid = isset($_GET["ref"])?'ref':'rowid';
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result=restrictedArea($user,'banque',$id,'bank_account','','',$fieldid);
|
||||
$result=restrictedArea($user,'banque',$id,'bank_account&bank_account','','',$fieldid);
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -44,7 +44,7 @@ if (isset($_GET["id"]) || isset($_GET["ref"]))
|
||||
}
|
||||
$fieldid = isset($_GET["ref"])?'ref':'rowid';
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result=restrictedArea($user,'banque',$id,'bank_account','','',$fieldid);
|
||||
$result=restrictedArea($user,'banque',$id,'bank_account&bank_account','','',$fieldid);
|
||||
|
||||
|
||||
/*
|
||||
@@ -325,7 +325,7 @@ if ($action == 'create')
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans("Date").'</td>';
|
||||
print '<td colspan="3">';
|
||||
$form->select_date(time(), 're', 0, 0, 0, 'formsoc');
|
||||
$form->select_date('', 're', 0, 0, 0, 'formsoc');
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans("BalanceMinimalAllowed").'</td>';
|
||||
|
||||
@@ -41,7 +41,7 @@ if (isset($_GET["account"]) || isset($_GET["ref"]))
|
||||
}
|
||||
$fieldid = isset($_GET["ref"])?'ref':'rowid';
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result=restrictedArea($user,'banque',$id,'bank_account','','',$fieldid);
|
||||
$result=restrictedArea($user,'banque',$id,'bank_account&bank_account','','',$fieldid);
|
||||
|
||||
$account=$_GET["account"];
|
||||
$mode='standard';
|
||||
|
||||
@@ -42,7 +42,7 @@ if (isset($_GET["account"]) || isset($_GET["ref"]))
|
||||
}
|
||||
$fieldid = isset($_GET["ref"])?'ref':'rowid';
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result=restrictedArea($user,'banque',$id,'bank_account','','',$fieldid);
|
||||
$result=restrictedArea($user,'banque',$id,'bank_account&bank_account','','',$fieldid);
|
||||
|
||||
|
||||
$vline=isset($_GET["vline"])?$_GET["vline"]:$_POST["vline"];
|
||||
|
||||
@@ -52,6 +52,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
|
||||
|
||||
$langs->load('bills');
|
||||
$langs->load('companies');
|
||||
$langs->load('compta');
|
||||
$langs->load('products');
|
||||
$langs->load('banks');
|
||||
$langs->load('main');
|
||||
|
||||
@@ -1271,6 +1271,16 @@ class Facture extends CommonInvoice
|
||||
// Fin appel triggers
|
||||
}
|
||||
|
||||
// Removed extrafields
|
||||
if (! $error) {
|
||||
$result=$this->deleteExtraFields();
|
||||
if ($result < 0)
|
||||
{
|
||||
$error++;
|
||||
dol_syslog(get_class($this)."::delete error deleteExtraFields ".$this->error, LOG_ERR);
|
||||
}
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
// Delete linked object
|
||||
|
||||
@@ -2964,14 +2964,15 @@ class Form
|
||||
}
|
||||
|
||||
/**
|
||||
* Show a form to select a date
|
||||
* Show a form + html select a date
|
||||
*
|
||||
* @param string $page Page
|
||||
* @param string $selected Date preselected
|
||||
* @param string $htmlname Name of input html field
|
||||
* @param string $htmlname Html name of date input fields or 'none'
|
||||
* @param int $displayhour Display hour selector
|
||||
* @param int $displaymin Display minutes selector
|
||||
* @return void
|
||||
* @see select_date
|
||||
*/
|
||||
function form_date($page, $selected, $htmlname, $displayhour=0, $displaymin=0)
|
||||
{
|
||||
@@ -3486,13 +3487,13 @@ class Form
|
||||
|
||||
|
||||
/**
|
||||
* Show a HTML widget to input a date or combo list for day, month, years and optionaly hours and minutes
|
||||
* Show a HTML widget to input a date or combo list for day, month, years and optionaly hours and minutes.
|
||||
* Fields are preselected with :
|
||||
* - set_time date (Local PHP server timestamps or date format YYYY-MM-DD or YYYY-MM-DD HH:MM)
|
||||
* - local date of PHP server if set_time is ''
|
||||
* - Empty (fields empty) if set_time is -1 (in this case, parameter empty must also have value 1)
|
||||
* - set_time date (must be a local PHP server timestamp or string date with format 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM')
|
||||
* - local date in user area, if set_time is '' (so if set_time is '', output may differs when done from two different location)
|
||||
* - Empty (fields empty), if set_time is -1 (in this case, parameter empty must also have value 1)
|
||||
*
|
||||
* @param timestamp $set_time Pre-selected date (must be a local PHP server timestamp)
|
||||
* @param timestamp $set_time Pre-selected date (must be a local PHP server timestamp), -1 to keep date not preselected, '' to use current date.
|
||||
* @param string $prefix Prefix for fields name
|
||||
* @param int $h 1=Show also hours
|
||||
* @param int $m 1=Show also minutes
|
||||
@@ -3504,6 +3505,7 @@ class Form
|
||||
* @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
|
||||
* @return mixed Nothing or string if nooutput is 1
|
||||
* @see form_date
|
||||
*/
|
||||
function select_date($set_time='', $prefix='re', $h=0, $m=0, $empty=0, $form_name="", $d=1, $addnowbutton=0, $nooutput=0, $disabled=0, $fullday='')
|
||||
{
|
||||
@@ -3516,7 +3518,11 @@ class Form
|
||||
if($m == '') $m=0;
|
||||
if($empty == '') $empty=0;
|
||||
|
||||
if (! $set_time && $empty == 0) $set_time = dol_now('tzuser');
|
||||
if ($set_time === '' && $empty == 0)
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
$set_time = dol_now('tzuser')-(getServerTimeZoneInt('now')*3600); // set_time must be relative to PHP server timezone
|
||||
}
|
||||
|
||||
// Analysis of the pre-selection date
|
||||
if (preg_match('/^([0-9]+)\-([0-9]+)\-([0-9]+)\s?([0-9]+)?:?([0-9]+)?/',$set_time,$reg))
|
||||
|
||||
@@ -721,7 +721,15 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
||||
if (!empty($obj->town)) $coords .= $obj->town;
|
||||
if (!empty($obj->country_id)) $coords .= "<br>".$country_code['label'];
|
||||
}
|
||||
print '<a href="#" onclick="return copyToClipboard(\''.dol_escape_js($coords).'\',\''.dol_escape_js($langs->trans("HelpCopyToClipboard")).'\');">';
|
||||
else if (!empty($object->address))
|
||||
{
|
||||
$coords .= dol_nl2br($object->address,1,true)."<br>";
|
||||
if (!empty($object->zip)) $coords .= $object->zip.' ';
|
||||
if (!empty($object->town)) $coords .= $object->town;
|
||||
if (!empty($object->country_id)) $coords .= "<br>".$country_code['label'];
|
||||
}
|
||||
// hideonsmatphone because copyToClipboard call jquery dialog that does not work with jmobile
|
||||
print '<a href="#" class="hideonsmartphone" onclick="return copyToClipboard(\''.dol_escape_js($coords).'\',\''.dol_escape_js($langs->trans("HelpCopyToClipboard")).'\');">';
|
||||
print img_picto($langs->trans("Address"), 'object_address.png');
|
||||
print '</a>';
|
||||
}
|
||||
@@ -733,7 +741,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
||||
print '<td align="center">';
|
||||
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
|
||||
{
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&actioncode=AC_RDV&contactid='.$obj->rowid.'&socid='.$object->id.'&backtopage='.urlencode($backtopage).'">';
|
||||
print '<a class="hideonsmartphone" href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&actioncode=AC_RDV&contactid='.$obj->rowid.'&socid='.$object->id.'&backtopage='.urlencode($backtopage).'">';
|
||||
print img_object($langs->trans("Rendez-Vous"),"action_rdv");
|
||||
print '</a> ';
|
||||
}
|
||||
@@ -768,8 +776,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
||||
|
||||
print "<br>\n";
|
||||
?>
|
||||
<div id="dialog" title="<?php echo dol_escape_htmltag($langs->trans('Address')); ?>" style="display: none;">
|
||||
</div>
|
||||
<div id="dialog" title="<?php echo dol_escape_htmltag($langs->trans('Address')); ?>" style="display: none;"></div>
|
||||
<?php
|
||||
|
||||
return $i;
|
||||
|
||||
@@ -1063,7 +1063,7 @@ function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$check=1)
|
||||
|
||||
|
||||
/**
|
||||
* Return date for now. We should always use this function without parameters (that means GMT time)
|
||||
* Return date for now. In mot cases, we use this function without parameters (that means GMT time).
|
||||
*
|
||||
* @param string $mode 'gmt' => we return GMT timestamp,
|
||||
* 'tzserver' => we add the PHP server timezone
|
||||
@@ -1073,7 +1073,7 @@ function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$check=1)
|
||||
*/
|
||||
function dol_now($mode='gmt')
|
||||
{
|
||||
// Note that gmmktime and mktime return same value (GMT) whithout parameters
|
||||
// Note that gmmktime and mktime return same value (GMT) when used without parameters
|
||||
//if ($mode == 'gmt') $ret=gmmktime(); // Strict Standards: gmmktime(): You should be using the time() function instead
|
||||
if ($mode == 'gmt') $ret=time(); // Time for now at greenwich.
|
||||
else if ($mode == 'tzserver') // Time for now with PHP server timezone added
|
||||
@@ -1088,7 +1088,7 @@ function dol_now($mode='gmt')
|
||||
$tzsecond=getParentCompanyTimeZoneInt(); // Contains tz+dayling saving time
|
||||
$ret=dol_now('gmt')+($tzsecond*3600);
|
||||
}*/
|
||||
else if ($mode == 'tzuser') // Time for now with user timezone is added
|
||||
else if ($mode == 'tzuser') // Time for now with user timezone added
|
||||
{
|
||||
//print 'eeee'.time().'-'.mktime().'-'.gmmktime();
|
||||
$offsettz=(empty($_SESSION['dol_tz'])?0:$_SESSION['dol_tz'])*60*60;
|
||||
|
||||
@@ -222,7 +222,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
||||
if (! is_dir($tmpdir)) $texttitle.=img_warning($langs->trans("ErrorDirNotFound",$tmpdir),0);
|
||||
else
|
||||
{
|
||||
$tmpfiles=dol_dir_list($tmpdir,'files',0,'\.odt');
|
||||
$tmpfiles=dol_dir_list($tmpdir,'files',0,'\.(ods|odt)');
|
||||
if (count($tmpfiles)) $listoffiles=array_merge($listoffiles,$tmpfiles);
|
||||
}
|
||||
}
|
||||
@@ -232,34 +232,24 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
||||
$texthelp.=$langs->transnoentitiesnoconv("FullListOnOnlineDocumentation"); // This contains an url, we don't modify it
|
||||
|
||||
$texte.= $form->textwithpicto($texttitle,$texthelp,1,'help','',1);
|
||||
$texte.= '<table><tr><td>';
|
||||
$texte.= '<div><div style="display: inline-block; min-width: 100px; vertical-align: middle;">';
|
||||
$texte.= '<textarea class="flat" cols="60" name="value1">';
|
||||
$texte.=$conf->global->COMMANDE_ADDON_PDF_ODT_PATH;
|
||||
$texte.= '</textarea>';
|
||||
$texte.= '</td>';
|
||||
$texte.= '<td align="center"> ';
|
||||
$texte.= '</div><div style="display: inline-block; vertical-align: middle;">';
|
||||
$texte.= '<input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button">';
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';
|
||||
$texte.= '</table>';
|
||||
$texte.= '<br></div></div>';
|
||||
|
||||
// Scan directories
|
||||
if (count($listofdir)) $texte.=$langs->trans("NumberOfModelFilesFound").': <b>'.count($listoffiles).'</b>';
|
||||
|
||||
$texte.= '</td>';
|
||||
|
||||
|
||||
$texte.= '<td valign="top" rowspan="2">';
|
||||
$texte.= '<td valign="top" rowspan="2" class="hideonsmartphone">';
|
||||
$texte.= $langs->trans("ExampleOfDirectoriesForModelGen");
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';
|
||||
|
||||
/*$texte.= '<tr>';
|
||||
$texte.= '<td align="center">';
|
||||
$texte.= '<input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button">';
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';*/
|
||||
|
||||
$texte.= '</table>';
|
||||
$texte.= '</form>';
|
||||
|
||||
|
||||
@@ -605,20 +605,6 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$posy=$pdf->GetY()+1;
|
||||
}
|
||||
*/
|
||||
/*if (! empty($object->date_livraison))
|
||||
{
|
||||
$pdf->SetXY($this->marge_gauche, $posy);
|
||||
$pdf->SetFont('','B', $default_font_size - 2);
|
||||
$text=$outputlangs->transnoentities("DeliveryDate").':';
|
||||
$pdf->MultiCell(80, 3, $text, 0, 'L', 0);
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 2);
|
||||
$pdf->SetXY($posxval, $posy);
|
||||
$text=dol_print_date($object->date_livraison,'day','',$outputlangs);
|
||||
$pdf->MultiCell(80, 3, $text, 0, 'L', 0);
|
||||
|
||||
$posy=$pdf->GetY()+1;
|
||||
}*/
|
||||
/* TODO
|
||||
else if (! empty($object->availability_code))
|
||||
{
|
||||
@@ -631,8 +617,8 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$posy=$pdf->GetY()+1;
|
||||
}*/
|
||||
|
||||
// Show shipping date
|
||||
if ($object->date_livraison)
|
||||
// Show planed date of delivery
|
||||
if (! empty($object->date_livraison))
|
||||
{
|
||||
$outputlangs->load("sendings");
|
||||
$pdf->SetFont('','B', $default_font_size - 2);
|
||||
|
||||
@@ -212,7 +212,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
||||
if (! is_dir($tmpdir)) $texttitle.=img_warning($langs->trans("ErrorDirNotFound",$tmpdir),0);
|
||||
else
|
||||
{
|
||||
$tmpfiles=dol_dir_list($tmpdir,'files',0,'\.odt');
|
||||
$tmpfiles=dol_dir_list($tmpdir,'files',0,'\.(ods|odt)');
|
||||
if (count($tmpfiles)) $listoffiles=array_merge($listoffiles,$tmpfiles);
|
||||
}
|
||||
}
|
||||
@@ -222,34 +222,24 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
||||
$texthelp.=$langs->transnoentitiesnoconv("FullListOnOnlineDocumentation"); // This contains an url, we don't modify it
|
||||
|
||||
$texte.= $form->textwithpicto($texttitle,$texthelp,1,'help','',1);
|
||||
$texte.= '<table><tr><td>';
|
||||
$texte.= '<div><div style="display: inline-block; min-width: 100px; vertical-align: middle;">';
|
||||
$texte.= '<textarea class="flat" cols="60" name="value1">';
|
||||
$texte.=$conf->global->EXPEDITION_ADDON_PDF_ODT_PATH;
|
||||
$texte.= '</textarea>';
|
||||
$texte.= '</td>';
|
||||
$texte.= '<td align="center"> ';
|
||||
$texte.= '</div><div style="display: inline-block; vertical-align: middle;">';
|
||||
$texte.= '<input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button">';
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';
|
||||
$texte.= '</table>';
|
||||
$texte.= '<br></div></div>';
|
||||
|
||||
// Scan directories
|
||||
if (count($listofdir)) $texte.=$langs->trans("NumberOfModelFilesFound").': <b>'.count($listoffiles).'</b>';
|
||||
|
||||
$texte.= '</td>';
|
||||
|
||||
|
||||
$texte.= '<td valign="top" rowspan="2">';
|
||||
$texte.= '<td valign="top" rowspan="2" class="hideonsmartphone">';
|
||||
$texte.= $langs->trans("ExampleOfDirectoriesForModelGen");
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';
|
||||
|
||||
/*$texte.= '<tr>';
|
||||
$texte.= '<td align="center">';
|
||||
$texte.= '<input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button">';
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';*/
|
||||
|
||||
$texte.= '</table>';
|
||||
$texte.= '</form>';
|
||||
|
||||
|
||||
@@ -223,7 +223,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
||||
$texte.= '<table class="nobordernopadding" width="100%">';
|
||||
|
||||
// List of directories area
|
||||
$texte.= '<tr><td>';
|
||||
$texte.= '<tr><td valign="middle">';
|
||||
$texttitle=$langs->trans("ListOfDirectories");
|
||||
$listofdir=explode(',',preg_replace('/[\r\n]+/',',',trim($conf->global->FACTURE_ADDON_PDF_ODT_PATH)));
|
||||
$listoffiles=array();
|
||||
@@ -247,34 +247,24 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
||||
$texthelp.=$langs->transnoentitiesnoconv("FullListOnOnlineDocumentation"); // This contains an url, we don't modify it
|
||||
|
||||
$texte.= $form->textwithpicto($texttitle,$texthelp,1,'help','',1);
|
||||
$texte.= '<table><tr><td>';
|
||||
$texte.= '<div><div style="display: inline-block; min-width: 100px; vertical-align: middle;">';
|
||||
$texte.= '<textarea class="flat" cols="60" name="value1">';
|
||||
$texte.=$conf->global->FACTURE_ADDON_PDF_ODT_PATH;
|
||||
$texte.= '</textarea>';
|
||||
$texte.= '</td>';
|
||||
$texte.= '<td align="center"> ';
|
||||
$texte.= '</div><div style="display: inline-block; vertical-align: middle;">';
|
||||
$texte.= '<input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button">';
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';
|
||||
$texte.= '</table>';
|
||||
$texte.= '<br></div></div>';
|
||||
|
||||
// Scan directories
|
||||
if (count($listofdir)) $texte.=$langs->trans("NumberOfModelFilesFound").': <b>'.count($listoffiles).'</b>';
|
||||
|
||||
$texte.= '</td>';
|
||||
|
||||
|
||||
$texte.= '<td valign="top" rowspan="2">';
|
||||
$texte.= '<td valign="top" rowspan="2" class="hideonsmartphone">';
|
||||
$texte.= $langs->trans("ExampleOfDirectoriesForModelGen");
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';
|
||||
|
||||
/*$texte.= '<tr>';
|
||||
$texte.= '<td align="center">';
|
||||
$texte.= '<input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button">';
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';*/
|
||||
|
||||
$texte.= '</table>';
|
||||
$texte.= '</form>';
|
||||
|
||||
|
||||
@@ -322,7 +322,7 @@ class doc_generic_project_odt extends ModelePDFProjects
|
||||
if (! is_dir($tmpdir)) $texttitle.=img_warning($langs->trans("ErrorDirNotFound",$tmpdir),0);
|
||||
else
|
||||
{
|
||||
$tmpfiles=dol_dir_list($tmpdir,'files',0,'\.odt');
|
||||
$tmpfiles=dol_dir_list($tmpdir,'files',0,'\.(ods|odt)');
|
||||
if (count($tmpfiles)) $listoffiles=array_merge($listoffiles,$tmpfiles);
|
||||
}
|
||||
}
|
||||
@@ -332,34 +332,24 @@ class doc_generic_project_odt extends ModelePDFProjects
|
||||
$texthelp.=$langs->transnoentitiesnoconv("FullListOnOnlineDocumentation"); // This contains an url, we don't modify it
|
||||
|
||||
$texte.= $form->textwithpicto($texttitle,$texthelp,1,'help','',1);
|
||||
$texte.= '<table><tr><td>';
|
||||
$texte.= '<div><div style="display: inline-block; min-width: 100px; vertical-align: middle;">';
|
||||
$texte.= '<textarea class="flat" cols="60" name="value1">';
|
||||
$texte.=$conf->global->PROJECT_ADDON_PDF_ODT_PATH;
|
||||
$texte.= '</textarea>';
|
||||
$texte.= '</td>';
|
||||
$texte.= '<td align="center"> ';
|
||||
$texte.= '</div><div style="display: inline-block; vertical-align: middle;">';
|
||||
$texte.= '<input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button">';
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';
|
||||
$texte.= '</table>';
|
||||
$texte.= '<br></div></div>';
|
||||
|
||||
// Scan directories
|
||||
if (count($listofdir)) $texte.=$langs->trans("NumberOfModelFilesFound").': <b>'.count($listoffiles).'</b>';
|
||||
|
||||
$texte.= '</td>';
|
||||
|
||||
|
||||
$texte.= '<td valign="top" rowspan="2">';
|
||||
$texte.= '<td valign="top" rowspan="2" class="hideonsmartphone">';
|
||||
$texte.= $langs->trans("ExampleOfDirectoriesForModelGen");
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';
|
||||
|
||||
/*$texte.= '<tr>';
|
||||
$texte.= '<td align="center">';
|
||||
$texte.= '<input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button">';
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';*/
|
||||
|
||||
$texte.= '</table>';
|
||||
$texte.= '</form>';
|
||||
|
||||
|
||||
@@ -323,7 +323,7 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
if (! is_dir($tmpdir)) $texttitle.=img_warning($langs->trans("ErrorDirNotFound",$tmpdir),0);
|
||||
else
|
||||
{
|
||||
$tmpfiles=dol_dir_list($tmpdir,'files',0,'\.odt');
|
||||
$tmpfiles=dol_dir_list($tmpdir,'files',0,'\.(ods|odt)');
|
||||
if (count($tmpfiles)) $listoffiles=array_merge($listoffiles,$tmpfiles);
|
||||
}
|
||||
}
|
||||
@@ -333,34 +333,24 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
$texthelp.=$langs->transnoentitiesnoconv("FullListOnOnlineDocumentation"); // This contains an url, we don't modify it
|
||||
|
||||
$texte.= $form->textwithpicto($texttitle,$texthelp,1,'help','',1);
|
||||
$texte.= '<table><tr><td>';
|
||||
$texte.= '<div><div style="display: inline-block; min-width: 100px; vertical-align: middle;">';
|
||||
$texte.= '<textarea class="flat" cols="60" name="value1">';
|
||||
$texte.=$conf->global->PROJECT_TASK_ADDON_PDF_ODT_PATH;
|
||||
$texte.= '</textarea>';
|
||||
$texte.= '</td>';
|
||||
$texte.= '<td align="center"> ';
|
||||
$texte.= '</div><div style="display: inline-block; vertical-align: middle;">';
|
||||
$texte.= '<input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button">';
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';
|
||||
$texte.= '</table>';
|
||||
$texte.= '<br></div></div>';
|
||||
|
||||
// Scan directories
|
||||
if (count($listofdir)) $texte.=$langs->trans("NumberOfModelFilesFound").': <b>'.count($listoffiles).'</b>';
|
||||
|
||||
$texte.= '</td>';
|
||||
|
||||
|
||||
$texte.= '<td valign="top" rowspan="2">';
|
||||
$texte.= '<td valign="top" rowspan="2" class="hideonsmartphone">';
|
||||
$texte.= $langs->trans("ExampleOfDirectoriesForModelGen");
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';
|
||||
|
||||
/*$texte.= '<tr>';
|
||||
$texte.= '<td align="center">';
|
||||
$texte.= '<input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button">';
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';*/
|
||||
|
||||
$texte.= '</table>';
|
||||
$texte.= '</form>';
|
||||
|
||||
@@ -431,7 +421,7 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
{
|
||||
//print "srctemplatepath=".$srctemplatepath; // Src filename
|
||||
$newfile=basename($srctemplatepath);
|
||||
$newfiletmp=preg_replace('/\.odt/i','',$newfile);
|
||||
$newfiletmp=preg_replace('/\.(ods|odt)/i','',$newfile);
|
||||
$newfiletmp=preg_replace('/template_/i','',$newfiletmp);
|
||||
$newfiletmp=preg_replace('/modele_/i','',$newfiletmp);
|
||||
$newfiletmp=$objectref.'_'.$newfiletmp;
|
||||
|
||||
@@ -129,7 +129,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
||||
if (! is_dir($tmpdir)) $texttitle.=img_warning($langs->trans("ErrorDirNotFound",$tmpdir),0);
|
||||
else
|
||||
{
|
||||
$tmpfiles=dol_dir_list($tmpdir,'files',0,'\.odt');
|
||||
$tmpfiles=dol_dir_list($tmpdir,'files',0,'\.(ods|odt)');
|
||||
if (count($tmpfiles)) $listoffiles=array_merge($listoffiles,$tmpfiles);
|
||||
}
|
||||
}
|
||||
@@ -139,16 +139,13 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
||||
$texthelp.=$langs->transnoentitiesnoconv("FullListOnOnlineDocumentation"); // This contains an url, we don't modify it
|
||||
|
||||
$texte.= $form->textwithpicto($texttitle,$texthelp,1,'help','',1);
|
||||
$texte.= '<table><tr><td>';
|
||||
$texte.= '<div><div style="display: inline-block; min-width: 100px; vertical-align: middle;">';
|
||||
$texte.= '<textarea class="flat" cols="60" name="value1">';
|
||||
$texte.=$conf->global->PROPALE_ADDON_PDF_ODT_PATH;
|
||||
$texte.= '</textarea>';
|
||||
$texte.= '</td>';
|
||||
$texte.= '<td align="center"> ';
|
||||
$texte.= '</div><div style="display: inline-block; vertical-align: middle;">';
|
||||
$texte.= '<input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button">';
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';
|
||||
$texte.= '</table>';
|
||||
$texte.= '<br></div></div>';
|
||||
|
||||
// Scan directories
|
||||
if (count($listofdir))
|
||||
@@ -181,22 +178,13 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$texte.= '</td>';
|
||||
|
||||
|
||||
$texte.= '<td valign="top" rowspan="2">';
|
||||
$texte.= '<td valign="top" rowspan="2" class="hideonsmartphone">';
|
||||
$texte.= $langs->trans("ExampleOfDirectoriesForModelGen");
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';
|
||||
|
||||
/*$texte.= '<tr>';
|
||||
$texte.= '<td align="center">';
|
||||
$texte.= '<input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button">';
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';*/
|
||||
|
||||
$texte.= '</table>';
|
||||
$texte.= '</form>';
|
||||
|
||||
|
||||
@@ -135,17 +135,11 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
||||
|
||||
$texte.= '</td>';
|
||||
|
||||
|
||||
$texte.= '<td valign="top" rowspan="2">';
|
||||
$texte.= '<td valign="top" rowspan="2" class="hideonsmartphone">';
|
||||
$texte.= $langs->trans("ExampleOfDirectoriesForModelGen");
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';
|
||||
|
||||
/*$texte.= '<tr><td align="center">';
|
||||
$texte.= '<input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button">';
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';*/
|
||||
|
||||
$texte.= '</table>';
|
||||
$texte.= '</form>';
|
||||
|
||||
|
||||
@@ -303,11 +303,13 @@ if (($action=="create") || ($action=="edit"))
|
||||
|
||||
print "<tr><td>";
|
||||
print $langs->trans('CronHourStart')."</td><td>";
|
||||
if(!empty($object->datestart)){
|
||||
if(!empty($object->datestart))
|
||||
{
|
||||
$form->select_date($object->datestart,'datestart',1,1,'',"cronform");
|
||||
}
|
||||
else{
|
||||
$form->select_date(dol_now(),'datestart',1,1,'',"cronform");
|
||||
else
|
||||
{
|
||||
$form->select_date('','datestart',1,1,'',"cronform");
|
||||
}
|
||||
print "</td>";
|
||||
print "<td>";
|
||||
|
||||
@@ -233,7 +233,7 @@ else if ($action == 'addline' && $user->rights->fournisseur->commande->creer)
|
||||
// Ecrase $pu par celui du produit
|
||||
// Ecrase $desc par celui du produit
|
||||
// Ecrase $txtva par celui du produit
|
||||
if ((GETPOST('addline_predefined') || GETPOST('idprodfournprice')) && ( GETPOST('pu')!=='')) // With combolist idprodfournprice is > 0 or -1. With autocomplete, idprodfournprice is > 0 or ''
|
||||
if (GETPOST('addline_predefined') || GETPOST('idprodfournprice')) // With combolist idprodfournprice is > 0 or -1. With autocomplete, idprodfournprice is > 0 or ''
|
||||
{
|
||||
$idprod=0;
|
||||
$productsupplier = new ProductFournisseur($db);
|
||||
|
||||
@@ -1439,7 +1439,7 @@ AccountancyCodeBuy=Purchase account. code
|
||||
AgendaSetup=Events and agenda module setup
|
||||
PasswordTogetVCalExport=Key to authorize export link
|
||||
PastDelayVCalExport=Do not export event older than
|
||||
AGENDA_USE_EVENT_TYPE=Use events types (managed into Configuration->Dictionary->llx_c_actioncomm)
|
||||
AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events)
|
||||
##### ClickToDial #####
|
||||
ClickToDialDesc=This module allows to add an icon after phone numbers. A click on this icon will call a server with a particular URL you define below. This can be used to call a call center system from Dolibarr that can call the phone number on a SIP system for example.
|
||||
##### Point Of Sales (CashDesk) #####
|
||||
|
||||
@@ -105,7 +105,8 @@ print '</td></tr>';
|
||||
print "</table>";
|
||||
print '</form>';
|
||||
|
||||
$sql = "SELECT s.rowid as socid, s.nom, s.code_client, s.client, ";
|
||||
$sql = "SELECT";
|
||||
if ($agentid > 0) $sql.= " s.rowid as socid, s.nom, s.code_client, s.client,";
|
||||
$sql.= " u.rowid as agent, u.login, u.lastname, u.firstname,";
|
||||
$sql.= " sum(d.total_ht) as selling_price,";
|
||||
$sql.= " sum(".$db->ifsql('d.total_ht <=0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,";
|
||||
@@ -137,9 +138,9 @@ if (!empty($enddate))
|
||||
$sql.= " AND f.datef <= '".$db->idate($enddate)."'";
|
||||
$sql .= " AND d.buy_price_ht IS NOT NULL";
|
||||
if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1) $sql .= " AND d.buy_price_ht <> 0";
|
||||
if($agentid) $sql.= " GROUP BY s.rowid, s.nom, s.code_client, s.client, u.rowid, u.login, u.lastname, u.firstname";
|
||||
if ($agentid > 0) $sql.= " GROUP BY s.rowid, s.nom, s.code_client, s.client, u.rowid, u.login, u.lastname, u.firstname";
|
||||
else $sql.= " GROUP BY u.rowid, u.login, u.lastname, u.firstname";
|
||||
$sql.= " ORDER BY ".$sortfield." ".$sortorder;
|
||||
$sql.=$db->order($sortfield,$sortorder);
|
||||
// TODO: calculate total to display then restore pagination
|
||||
//$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
||||
|
||||
|
||||
@@ -160,9 +160,9 @@ if (! empty($conf->global->DISPLAY_MARK_RATES)) {
|
||||
print "</table>";
|
||||
print '</form>';
|
||||
|
||||
$sql = "SELECT s.rowid as socid, s.nom, s.code_client, s.client,";
|
||||
$sql.= " f.rowid as facid, f.facnumber, f.total as total_ht,";
|
||||
$sql.= " f.datef, f.paye, f.fk_statut as statut,";
|
||||
$sql = "SELECT";
|
||||
$sql.= " s.rowid as socid, s.nom, s.code_client, s.client,";
|
||||
if ($client) $sql.= " f.rowid as facid, f.facnumber, f.total as total_ht, f.datef, f.paye, f.fk_statut as statut,";
|
||||
$sql.= " sum(d.total_ht) as selling_price,";
|
||||
$sql.= " sum(".$db->ifsql('d.total_ht <=0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,";
|
||||
$sql.= " sum(".$db->ifsql('d.total_ht <=0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge";
|
||||
@@ -184,7 +184,7 @@ if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPr
|
||||
$sql .= " AND d.buy_price_ht <> 0";
|
||||
if ($client) $sql.= " GROUP BY s.rowid, s.nom, s.code_client, s.client, f.rowid, f.facnumber, f.total, f.datef, f.paye, f.fk_statut";
|
||||
else $sql.= " GROUP BY s.rowid, s.nom, s.code_client, s.client";
|
||||
$sql.= " ORDER BY $sortfield $sortorder ";
|
||||
$sql.=$db->order($sortfield,$sortorder);
|
||||
// TODO: calculate total to display then restore pagination
|
||||
//$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
||||
|
||||
|
||||
@@ -164,9 +164,8 @@ print "</table>";
|
||||
print '</form>';
|
||||
|
||||
$sql = "SELECT p.label, p.rowid, p.fk_product_type, p.ref,";
|
||||
$sql.= " d.fk_product,";
|
||||
$sql.= " f.rowid as facid, f.facnumber, f.total as total_ht,";
|
||||
$sql.= " f.datef, f.paye, f.fk_statut as statut,";
|
||||
if ($id > 0) $sql.= " d.fk_product,";
|
||||
if ($id > 0) $sql.= " f.rowid as facid, f.facnumber, f.total as total_ht, f.datef, f.paye, f.fk_statut as statut,";
|
||||
$sql.= " sum(d.total_ht) as selling_price,";
|
||||
$sql.= " sum(".$db->ifsql('d.total_ht <=0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,";
|
||||
$sql.= " sum(".$db->ifsql('d.total_ht <=0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge";
|
||||
@@ -188,11 +187,9 @@ if (!empty($enddate))
|
||||
$sql .= " AND d.buy_price_ht IS NOT NULL";
|
||||
if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1)
|
||||
$sql .= " AND d.buy_price_ht <> 0";
|
||||
if ($id > 0)
|
||||
$sql.= " GROUP BY p.label, p.rowid, p.fk_product_type, p.ref, d.fk_product, f.rowid, f.facnumber, f.total, f.datef, f.paye, f.fk_statut";
|
||||
else
|
||||
$sql.= " GROUP BY p.label, p.rowid, p.fk_product_type, p.ref";
|
||||
$sql.= " ORDER BY ".$sortfield." ".$sortorder;
|
||||
if ($id > 0) $sql.= " GROUP BY p.label, p.rowid, p.fk_product_type, p.ref, d.fk_product, f.rowid, f.facnumber, f.total, f.datef, f.paye, f.fk_statut";
|
||||
else $sql.= " GROUP BY p.label, p.rowid, p.fk_product_type, p.ref";
|
||||
$sql.=$db->order($sortfield,$sortorder);
|
||||
// TODO: calculate total to display then restore pagination
|
||||
//$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
||||
|
||||
|
||||
@@ -131,11 +131,8 @@ Example 1 : Table using tags: div.tagtable+div.tagtr+div or div.tagtable+div.tag
|
||||
Example 2 : Table using tags: table/thead/tbody/tr/td + dataTable<br>
|
||||
|
||||
<script type="text/javascript">
|
||||
/*$(document).ready(function(){
|
||||
$('#abc').dataTable();
|
||||
});*/
|
||||
$(document).ready(function(){
|
||||
$('#def').dataTable();
|
||||
$('#idtableexample2').dataTable();
|
||||
});
|
||||
|
||||
/*
|
||||
@@ -179,7 +176,7 @@ $('xxxth').replaceWith(
|
||||
*/
|
||||
</script>
|
||||
|
||||
<table id="def">
|
||||
<table id="idtableexample2">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>snake</th>
|
||||
|
||||
71
htdocs/public/test/test_forms.php
Normal file
71
htdocs/public/test/test_forms.php
Normal file
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
define("NOLOGIN",1); // This means this output page does not require to be logged.
|
||||
define("NOCSRFCHECK",1); // We accept to go on this page from external web site.
|
||||
|
||||
require '../../main.inc.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
|
||||
if (empty($conf->global->MAIN_FEATURES_LEVEL))
|
||||
{
|
||||
print "Page available onto dev environment only";
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="robots" content="noindex,nofollow" />
|
||||
<meta name="author" content="Dolibarr Development Team">
|
||||
<link rel="shortcut icon" type="image/x-icon" href="<?php echo DOL_URL_ROOT ?>/theme/eldy/img/favicon.ico"/>
|
||||
<title>Test page</title>
|
||||
<!-- Includes for JQuery (Ajax library) -->
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo DOL_URL_ROOT ?>/includes/jquery/css/smoothness/jquery-ui-latest.custom.css" />
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo DOL_URL_ROOT ?>/includes/jquery/plugins/datatables/css/jquery.dataTables.css" />
|
||||
<!-- <link rel="stylesheet" type="text/css" href="<?php echo DOL_URL_ROOT ?>/includes/jquery/plugins/mobile/jquery.mobile-latest.min.css" /> -->
|
||||
<!-- <link rel="stylesheet" type="text/css" title="default" href="<?php echo DOL_URL_ROOT ?>/theme/eldy/style.css.php?dol_use_jmobile=1" /> -->
|
||||
<link rel="stylesheet" type="text/css" title="default" href="<?php echo DOL_URL_ROOT ?>/theme/eldy/style.css.php?dol_use_jmobile=0" />
|
||||
<!-- Includes JS for JQuery -->
|
||||
<script type="text/javascript" src="<?php echo DOL_URL_ROOT ?>/includes/jquery/js/jquery-latest.min.js"></script>
|
||||
<script type="text/javascript" src="<?php echo DOL_URL_ROOT ?>/includes/jquery/plugins/tablednd/jquery.tablednd.0.6.min.js"></script>
|
||||
<script type="text/javascript" src="<?php echo DOL_URL_ROOT ?>/includes/jquery/plugins/datatables/js/jquery.dataTables.js"></script>
|
||||
<!-- <script type="text/javascript" src="<?php echo DOL_URL_ROOT ?>/includes/jquery/plugins/mobile/jquery.mobile-latest.min.js"></script> -->
|
||||
</head>
|
||||
|
||||
|
||||
|
||||
<body style="margin: 4px;">
|
||||
<div data-role="page">
|
||||
<br>
|
||||
This page is a sample of page using html methods.<br>
|
||||
<br>
|
||||
|
||||
<!-- Output to test html.form.class.php -->
|
||||
<?php
|
||||
$form=new Form($db);
|
||||
|
||||
// Test1: form->select_date using tzuser date
|
||||
print "Test 1: We must have here current hour for user (must match hour on browser). Note: Check your are logged so user TZ and DST are known.";
|
||||
$offsettz=(empty($_SESSION['dol_tz'])?0:$_SESSION['dol_tz'])*60*60;
|
||||
$offsetdst=(empty($_SESSION['dol_dst'])?0:$_SESSION['dol_dst'])*60*60;
|
||||
print " (dol_tz=".$offsettz." dol_dst=".$dol_dst.")<br>\n";
|
||||
$form->select_date('', 'test1', 1, 1, 0);
|
||||
|
||||
print '<br><br>'."\n";
|
||||
|
||||
// Test2: form->select_date using tzuser date
|
||||
print "Test 2: We must have here 1970-01-01 00:00:00 selected (fields can be empty)<br>\n";
|
||||
$form->select_date(dol_get_first_day(1970,1,false), 'test2', 1, 1, 1);
|
||||
|
||||
print '<br><br>'."\n";
|
||||
|
||||
// Test3: form->select_date for 1970-01-01 00:00:00
|
||||
print "Test 3: We must have here 1970-01-01 00:00:00 selected (fields are mandatory)<br>\n";
|
||||
$form->select_date(dol_get_first_day(1970,1,false), 'test3', 1, 1, 0);
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1517,6 +1517,8 @@ table.valid {
|
||||
/* Calendar */
|
||||
/* ============================================================================== */
|
||||
|
||||
img.datecallink { padding-left: 2px !important; padding-right: 2px !important; }
|
||||
|
||||
.ui-datepicker-title {
|
||||
margin:0 !important;
|
||||
line-height:28px;
|
||||
|
||||
@@ -1726,6 +1726,8 @@ opacity: 1;
|
||||
/* Calendar */
|
||||
/* ============================================================================== */
|
||||
|
||||
img.datecallink { padding-left: 2px !important; padding-right: 2px !important; }
|
||||
|
||||
.ui-datepicker-trigger {
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
|
||||
@@ -1816,6 +1816,8 @@ border-radius:6px;
|
||||
/* Calendar */
|
||||
/* ============================================================================== */
|
||||
|
||||
img.datecallink { padding-left: 2px !important; padding-right: 2px !important; }
|
||||
|
||||
.ui-datepicker-trigger {
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
|
||||
Reference in New Issue
Block a user