mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 01:28:19 +01:00
wip
This commit is contained in:
@@ -534,7 +534,7 @@ if ($id)
|
|||||||
if ($valuetoshow != '') {
|
if ($valuetoshow != '') {
|
||||||
print '<td align="'.$align.'">';
|
print '<td align="'.$align.'">';
|
||||||
if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i', $tabhelp[$id][$value])) {
|
if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i', $tabhelp[$id][$value])) {
|
||||||
print '<a href="'.$tabhelp[$id][$value].'" target="_blank">'.$valuetoshow.' '.img_help(1,$valuetoshow).'</a>';
|
print '<a href="'.$tabhelp[$id][$value].'" target="_blank">'.$valuetoshow.' '.img_help(1, $valuetoshow).'</a>';
|
||||||
} elseif (! empty($tabhelp[$id][$value])) {
|
} elseif (! empty($tabhelp[$id][$value])) {
|
||||||
print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value]);
|
print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value]);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -768,7 +768,7 @@ if ($mode == 'common')
|
|||||||
}
|
}
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
}
|
}
|
||||||
elseif (preg_match('/^([^@]+)@([^@]+)$/i', $objMod->config_page_url,$regs))
|
elseif (preg_match('/^([^@]+)@([^@]+)$/i', $objMod->config_page_url, $regs))
|
||||||
{
|
{
|
||||||
print '<td class="tdsetuppicto right valignmiddle" width="60px"><a href="'.dol_buildpath('/'.$regs[2].'/admin/'.$regs[1], 1).'?save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"').'</a></td>';
|
print '<td class="tdsetuppicto right valignmiddle" width="60px"><a href="'.dol_buildpath('/'.$regs[2].'/admin/'.$regs[1], 1).'?save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"').'</a></td>';
|
||||||
}
|
}
|
||||||
@@ -1061,7 +1061,7 @@ if ($mode == 'deploy')
|
|||||||
{
|
{
|
||||||
$langs->load('other');
|
$langs->load('other');
|
||||||
print ' ';
|
print ' ';
|
||||||
print info_admin($langs->trans("ThisLimitIsDefinedInSetup",$max,$maxphp),1);
|
print info_admin($langs->trans("ThisLimitIsDefinedInSetup", $max, $maxphp), 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ foreach($configfileparameters as $key)
|
|||||||
print '<td>'.$newkey.'</td>';
|
print '<td>'.$newkey.'</td>';
|
||||||
// Value
|
// Value
|
||||||
print "<td>";
|
print "<td>";
|
||||||
if ($newkey == 'dolibarr_main_db_pass') print preg_replace('/./i','*', ${$newkey});
|
if ($newkey == 'dolibarr_main_db_pass') print preg_replace('/./i', '*', ${$newkey});
|
||||||
elseif ($newkey == 'dolibarr_main_url_root' && preg_match('/__auto__/', ${$newkey})) print ${$newkey}.' => '.constant('DOL_MAIN_URL_ROOT');
|
elseif ($newkey == 'dolibarr_main_url_root' && preg_match('/__auto__/', ${$newkey})) print ${$newkey}.' => '.constant('DOL_MAIN_URL_ROOT');
|
||||||
else print ${$newkey};
|
else print ${$newkey};
|
||||||
if ($newkey == 'dolibarr_main_url_root' && ${$newkey} != DOL_MAIN_URL_ROOT) print ' (currently overwritten by autodetected value: '.DOL_MAIN_URL_ROOT.')';
|
if ($newkey == 'dolibarr_main_url_root' && ${$newkey} != DOL_MAIN_URL_ROOT) print ' (currently overwritten by autodetected value: '.DOL_MAIN_URL_ROOT.')';
|
||||||
|
|||||||
@@ -530,9 +530,9 @@ if (empty($reshook))
|
|||||||
elseif ($action == 'setemail_errorsto') {
|
elseif ($action == 'setemail_errorsto') {
|
||||||
$object->email_errorsto = trim(GETPOST('email_errorsto', 'alpha'));
|
$object->email_errorsto = trim(GETPOST('email_errorsto', 'alpha'));
|
||||||
} elseif ($action == 'settitre' && empty($object->titre)) {
|
} elseif ($action == 'settitre' && empty($object->titre)) {
|
||||||
$mesg = $langs->trans("ErrorFieldRequired",$langs->transnoentities("MailTitle"));
|
$mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentities("MailTitle"));
|
||||||
} elseif ($action == 'setfrom' && empty($object->email_from)) {
|
} elseif ($action == 'setfrom' && empty($object->email_from)) {
|
||||||
$mesg = $langs->trans("ErrorFieldRequired",$langs->transnoentities("MailFrom"));
|
$mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentities("MailFrom"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $mesg)
|
if (! $mesg)
|
||||||
|
|||||||
@@ -2020,22 +2020,14 @@ class ExtraFields
|
|||||||
// Clean parameters
|
// Clean parameters
|
||||||
$value_key=dol_mktime($_POST[$keysuffix."options_".$key.$keyprefix."hour"], $_POST[$keysuffix."options_".$key.$keyprefix."min"], 0, $_POST[$keysuffix."options_".$key.$keyprefix."month"], $_POST[$keysuffix."options_".$key.$keyprefix."day"], $_POST[$keysuffix."options_".$key.$keyprefix."year"]);
|
$value_key=dol_mktime($_POST[$keysuffix."options_".$key.$keyprefix."hour"], $_POST[$keysuffix."options_".$key.$keyprefix."min"], 0, $_POST[$keysuffix."options_".$key.$keyprefix."month"], $_POST[$keysuffix."options_".$key.$keyprefix."day"], $_POST[$keysuffix."options_".$key.$keyprefix."year"]);
|
||||||
}
|
}
|
||||||
<<<<<<< HEAD
|
elseif (in_array($key_type, array('checkbox', 'chkbxlst')))
|
||||||
else if (in_array($key_type, array('checkbox', 'chkbxlst')))
|
|
||||||
=======
|
|
||||||
elseif (in_array($key_type,array('checkbox', 'chkbxlst')))
|
|
||||||
>>>>>>> upstream/develop
|
|
||||||
{
|
{
|
||||||
$value_arr=GETPOST($keysuffix."options_".$key.$keyprefix);
|
$value_arr=GETPOST($keysuffix."options_".$key.$keyprefix);
|
||||||
// Make sure we get an array even if there's only one checkbox
|
// Make sure we get an array even if there's only one checkbox
|
||||||
$value_arr=(array) $value_arr;
|
$value_arr=(array) $value_arr;
|
||||||
$value_key=implode(',', $value_arr);
|
$value_key=implode(',', $value_arr);
|
||||||
}
|
}
|
||||||
<<<<<<< HEAD
|
elseif (in_array($key_type, array('price','double')))
|
||||||
else if (in_array($key_type, array('price','double')))
|
|
||||||
=======
|
|
||||||
elseif (in_array($key_type,array('price','double')))
|
|
||||||
>>>>>>> upstream/develop
|
|
||||||
{
|
{
|
||||||
$value_arr=GETPOST($keysuffix."options_".$key.$keyprefix);
|
$value_arr=GETPOST($keysuffix."options_".$key.$keyprefix);
|
||||||
$value_key=price2num($value_arr);
|
$value_key=price2num($value_arr);
|
||||||
|
|||||||
@@ -535,8 +535,8 @@ function GETPOST($paramname, $check = 'none', $method = 0, $filter = null, $opti
|
|||||||
$out=trim($out);
|
$out=trim($out);
|
||||||
// '"' is dangerous because param in url can close the href= or src= and add javascript functions.
|
// '"' is dangerous because param in url can close the href= or src= and add javascript functions.
|
||||||
// '../' is dangerous because it allows dir transversals
|
// '../' is dangerous because it allows dir transversals
|
||||||
if (preg_match('/"/',$out)) $out='';
|
if (preg_match('/"/', $out)) $out='';
|
||||||
elseif (preg_match('/\.\.\//',$out)) $out='';
|
elseif (preg_match('/\.\.\//', $out)) $out='';
|
||||||
$out=dol_string_nohtmltag($out);
|
$out=dol_string_nohtmltag($out);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -3089,7 +3089,8 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
|||||||
|
|
||||||
$fa='fa';
|
$fa='fa';
|
||||||
if (! empty($conf->global->MAIN_USE_FONT_AWESOME_5)) $fa='fas';
|
if (! empty($conf->global->MAIN_USE_FONT_AWESOME_5)) $fa='fas';
|
||||||
$enabledisablehtml = '<span class="' . $fa . ' ' . $fakey . ' ' . ($marginleftonlyshort ? ($marginleftonlyshort == 1 ? 'marginleftonlyshort' : 'marginleftonly') : '') . ' valignmiddle' . ($morecss ? ' ' . $morecss : '') . '" style="' . ($fasize ? ('font-size: ' . $fasize . ';') : '') . ($facolor ? (' color: ' . $facolor . ';') : '') . ($morestyle ? ' ' . $morestyle : '') . '"' . (($notitle || empty($titlealt)) ? '' : ' title="' . dol_escape_htmltag($titlealt) . '"') . ($moreatt ? ' ' . $moreatt : '') . '>';
|
$enabledisablehtml = '<span class="' . $fa . ' ' . $fakey . ' ' . ($marginleftonlyshort ? ($marginleftonlyshort == 1 ? 'marginleftonlyshort' : 'marginleftonly') : '');
|
||||||
|
$enabledisablehtml .= ' valignmiddle' . ($morecss ? ' ' . $morecss : '') . '" style="' . ($fasize ? ('font-size: ' . $fasize . ';') : '') . ($facolor ? (' color: ' . $facolor . ';') : '') . ($morestyle ? ' ' . $morestyle : '') . '"' . (($notitle || empty($titlealt)) ? '' : ' title="' . dol_escape_htmltag($titlealt) . '"') . ($moreatt ? ' ' . $moreatt : '') . '>';
|
||||||
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
|
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
|
||||||
$enabledisablehtml.= $titlealt;
|
$enabledisablehtml.= $titlealt;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1355,12 +1355,12 @@ function numero_semaine($time)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Definition du Jeudi de la semaine
|
// Definition du Jeudi de la semaine
|
||||||
if (date("w",mktime(12, 0, 0, $mois, $jour, $annee))==0) // Dimanche
|
if (date("w", mktime(12, 0, 0, $mois, $jour, $annee))==0) // Dimanche
|
||||||
$jeudiSemaine = mktime(12, 0, 0, $mois, $jour, $annee)-3*24*60*60;
|
$jeudiSemaine = mktime(12, 0, 0, $mois, $jour, $annee)-3*24*60*60;
|
||||||
elseif (date("w", mktime(12, 0, 0, $mois, $jour, $annee))<4) // du Lundi au Mercredi
|
elseif (date("w", mktime(12, 0, 0, $mois, $jour, $annee))<4) // du Lundi au Mercredi
|
||||||
$jeudiSemaine = mktime(12, 0, 0, $mois, $jour, $annee)+(4-date("w", mktime(12, 0, 0, $mois, $jour, $annee)))*24*60*60;
|
$jeudiSemaine = mktime(12, 0, 0, $mois, $jour, $annee)+(4-date("w", mktime(12, 0, 0, $mois, $jour, $annee)))*24*60*60;
|
||||||
elseif (date("w", mktime(12, 0, 0, $mois, $jour, $annee))>4) // du Vendredi au Samedi
|
elseif (date("w", mktime(12, 0, 0, $mois, $jour, $annee))>4) // du Vendredi au Samedi
|
||||||
$jeudiSemaine = mktime(12, 0, 0, $mois, $jour, $annee)-(date("w",mktime(12,0,0,$mois,$jour,$annee))-4)*24*60*60;
|
$jeudiSemaine = mktime(12, 0, 0, $mois, $jour, $annee)-(date("w", mktime(12, 0, 0, $mois, $jour, $annee))-4)*24*60*60;
|
||||||
else // Jeudi
|
else // Jeudi
|
||||||
$jeudiSemaine = mktime(12, 0, 0, $mois, $jour, $annee);
|
$jeudiSemaine = mktime(12, 0, 0, $mois, $jour, $annee);
|
||||||
|
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test whether the numbers already in force in the base do not cause conflicts
|
* Test whether the numbers already in force in the base do not cause conflicts
|
||||||
* that would prevent this numbering from working.
|
* that would prevent this numbering from working.
|
||||||
*
|
*
|
||||||
* @return boolean false si conflit, true si ok
|
* @return boolean false si conflit, true si ok
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ class pdf_standardlabel extends CommonStickerGenerator
|
|||||||
elseif ($textright == '%LOGO%' || $textright == '%PHOTO%')
|
elseif ($textright == '%LOGO%' || $textright == '%PHOTO%')
|
||||||
{
|
{
|
||||||
if ($textright == '%LOGO%' && $logo) $pdf->Image($logo, $_PosX+$this->_Width-$widthtouse-$xleft, $_PosY+$ytop, $widthtouse, $heighttouse);
|
if ($textright == '%LOGO%' && $logo) $pdf->Image($logo, $_PosX+$this->_Width-$widthtouse-$xleft, $_PosY+$ytop, $widthtouse, $heighttouse);
|
||||||
elseif ($textright == '%PHOTO%' && $photo) $pdf->Image($photo, $_PosX+$this->_Width-$widthtouse-$xleft,$_PosY+$ytop, $widthtouse, $heighttouse);
|
elseif ($textright == '%PHOTO%' && $photo) $pdf->Image($photo, $_PosX+$this->_Width-$widthtouse-$xleft, $_PosY+$ytop, $widthtouse, $heighttouse);
|
||||||
$pdf->SetXY($_PosX+$xleft, $_PosY+$ytop);
|
$pdf->SetXY($_PosX+$xleft, $_PosY+$ytop);
|
||||||
$pdf->MultiCell($this->_Width-$widthtouse-$xleft-$xleft-1, $this->_Line_Height, $outputlangs->convToOutputCharset($textleft), 0, 'L');
|
$pdf->MultiCell($this->_Width-$widthtouse-$xleft-$xleft-1, $this->_Line_Height, $outputlangs->convToOutputCharset($textleft), 0, 'L');
|
||||||
}
|
}
|
||||||
@@ -187,7 +187,7 @@ class pdf_standardlabel extends CommonStickerGenerator
|
|||||||
{
|
{
|
||||||
// Output right area
|
// Output right area
|
||||||
if ($textright == '%LOGO%' && $logo) $pdf->Image($logo, $_PosX+$this->_Width-$widthtouse-$xleft, $_PosY+$ytop, $widthtouse, $heighttouse);
|
if ($textright == '%LOGO%' && $logo) $pdf->Image($logo, $_PosX+$this->_Width-$widthtouse-$xleft, $_PosY+$ytop, $widthtouse, $heighttouse);
|
||||||
elseif ($textright == '%PHOTO%' && $photo) $pdf->Image($photo, $_PosX+$this->_Width-$widthtouse-$xleft,$_PosY+$ytop, $widthtouse, $heighttouse);
|
elseif ($textright == '%PHOTO%' && $photo) $pdf->Image($photo, $_PosX+$this->_Width-$widthtouse-$xleft, $_PosY+$ytop, $widthtouse, $heighttouse);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$pdf->SetXY($_PosX+$xleft, $_PosY+$ytop);
|
$pdf->SetXY($_PosX+$xleft, $_PosY+$ytop);
|
||||||
|
|||||||
@@ -120,8 +120,8 @@ function LoadProducts(position){
|
|||||||
ishow=0; //product to show counter
|
ishow=0; //product to show counter
|
||||||
while (idata < 30) {
|
while (idata < 30) {
|
||||||
if (typeof (data[idata]) == "undefined") {
|
if (typeof (data[idata]) == "undefined") {
|
||||||
$("#prodesc"+ishow).text("");
|
$("#prodesc"+ishow).text("");
|
||||||
$("#proimg"+ishow).attr("src","");
|
$("#proimg"+ishow).attr("src","");
|
||||||
$("#prodiv"+ishow).data("rowid","");
|
$("#prodiv"+ishow).data("rowid","");
|
||||||
ishow++; //Next product to show after print data product
|
ishow++; //Next product to show after print data product
|
||||||
}
|
}
|
||||||
@@ -158,8 +158,8 @@ function MoreProducts(moreorless){
|
|||||||
ishow=0; //product to show counter
|
ishow=0; //product to show counter
|
||||||
while (idata < 30) {
|
while (idata < 30) {
|
||||||
if (typeof (data[idata]) == "undefined") {
|
if (typeof (data[idata]) == "undefined") {
|
||||||
$("#prodesc"+ishow).text("");
|
$("#prodesc"+ishow).text("");
|
||||||
$("#proimg"+ishow).attr("src","");
|
$("#proimg"+ishow).attr("src","");
|
||||||
$("#prodiv"+ishow).data("rowid","");
|
$("#prodiv"+ishow).data("rowid","");
|
||||||
ishow++; //Next product to show after print data product
|
ishow++; //Next product to show after print data product
|
||||||
}
|
}
|
||||||
@@ -337,11 +337,11 @@ function MoreActions(totalactions){
|
|||||||
}
|
}
|
||||||
else if (pageactions==1){
|
else if (pageactions==1){
|
||||||
pageactions=0;
|
pageactions=0;
|
||||||
for (i = 0; i <= totalactions; i++){
|
for (i = 0; i <= totalactions; i++){
|
||||||
if (i<9) $("#action"+i).show();
|
if (i<9) $("#action"+i).show();
|
||||||
else $("#action"+i).hide();
|
else $("#action"+i).hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$( document ).ready(function() {
|
$( document ).ready(function() {
|
||||||
@@ -411,16 +411,17 @@ if($conf->global->TAKEPOS_BAR_RESTAURANT){
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->global->TAKEPOSCONNECTOR){
|
if ($conf->global->TAKEPOSCONNECTOR){
|
||||||
$menus[$r++]=array('title'=>$langs->trans("DOL_OPEN_DRAWER"),
|
$menus[$r++]=array(
|
||||||
'action'=>'OpenDrawer();');
|
'title'=>$langs->trans("DOL_OPEN_DRAWER"),
|
||||||
|
'action'=>'OpenDrawer();'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$hookmanager->initHooks(array('takeposfrontend'));
|
$hookmanager->initHooks(array('takeposfrontend'));
|
||||||
$reshook=$hookmanager->executeHooks('ActionButtons');
|
$reshook=$hookmanager->executeHooks('ActionButtons');
|
||||||
if (!empty($reshook))
|
if (!empty($reshook)) {
|
||||||
{
|
$menus[$r++]=$reshook;
|
||||||
$menus[$r++]=$reshook;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<div class="div3">
|
<div class="div3">
|
||||||
@@ -446,7 +447,7 @@ foreach($menus as $menu) {
|
|||||||
while ($count<16)
|
while ($count<16)
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<div class='wrapper' <?php if ($count==14) echo 'onclick="MoreCategories(\'less\');"'; else if ($count==15) echo 'onclick="MoreCategories(\'more\');"'; else echo 'onclick="LoadProducts('.$count.');"';?> id='catdiv<?php echo $count;?>'>
|
<div class='wrapper' <?php if ($count==14) echo 'onclick="MoreCategories(\'less\');"'; elseif ($count==15) echo 'onclick="MoreCategories(\'more\');"'; else echo 'onclick="LoadProducts('.$count.');"';?> id='catdiv<?php echo $count;?>'>
|
||||||
<img class='imgwrapper' <?php if ($count==14) echo 'src="img/arrow-prev-top.png"'; if ($count==15) echo 'src="img/arrow-next-top.png"';?> width="98%" id='catimg<?php echo $count;?>'/>
|
<img class='imgwrapper' <?php if ($count==14) echo 'src="img/arrow-prev-top.png"'; if ($count==15) echo 'src="img/arrow-next-top.png"';?> width="98%" id='catimg<?php echo $count;?>'/>
|
||||||
<div class='description'>
|
<div class='description'>
|
||||||
<div class='description_content' id='catdesc<?php echo $count;?>'></div>
|
<div class='description_content' id='catdesc<?php echo $count;?>'></div>
|
||||||
|
|||||||
Reference in New Issue
Block a user