';
print ''.$form->editfieldkey('CustomerCode', 'customer_code', '', $object, 0).' ';
print '';
@@ -1914,15 +1881,18 @@ else
|| (!empty($conf->supplier_proposal->enabled) && !empty($user->rights->supplier_proposal->lire)))
{
print ' ';
- print ''.$form->editfieldkey('Supplier', 'fournisseur', '', $object, 0, 'string', '', 1).' ';
+ print ' '.$form->editfieldkey('Supplier', 'fournisseur', '', $object, 0, 'string', '', 1).' ';
+ print '';
print $form->selectyesno("fournisseur", $object->fournisseur, 1);
print ' ';
+ if ($conf->browser->layout == 'phone') print ' ';
print '';
if (!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->lire))
{
print $form->editfieldkey('SupplierCode', 'supplier_code', '', $object, 0);
}
- print ' ';
+ print ' ';
+ print '';
print '';
if ((!$object->code_fournisseur || $object->code_fournisseur == -1) && $modCodeFournisseur->code_auto)
{
@@ -1971,7 +1941,9 @@ else
// Zip / Town
print ' '.$form->editfieldkey('Zip', 'zipcode', '', $object, 0).' ';
print $formcompany->select_ziptown($object->zip, 'zipcode', array('town', 'selectcountry_id', 'state_id'), 0, 0, '', 'maxwidth50onsmartphone');
- print ' '.$form->editfieldkey('Town', 'town', '', $object, 0).' ';
+ print ' ';
+ if ($conf->browser->layout == 'phone') print '';
+ print ''.$form->editfieldkey('Town', 'town', '', $object, 0).' ';
print $formcompany->select_ziptown($object->town, 'town', array('zipcode', 'selectcountry_id', 'state_id'));
print $form->widgetForTranslation("town", $object, $permissiontoadd, 'string', 'alphanohtml', 'maxwidth100 quatrevingtpercent');
print ' ';
@@ -1979,7 +1951,7 @@ else
// Country
print ''.$form->editfieldkey('Country', 'selectcounty_id', '', $object, 0).' ';
print img_picto('', 'globe-americas', 'class="paddingrightonly"');
- print $form->select_country((GETPOSTISSET('country_id') ? GETPOST('country_id') : $object->country_id), 'country_id');
+ print $form->select_country((GETPOSTISSET('country_id') ? GETPOST('country_id') : $object->country_id), 'country_id', '', 0, 'minwidth300 widthcentpercentminusx');
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
print ' ';
@@ -2001,15 +1973,16 @@ else
// Phone / Fax
print ''.$form->editfieldkey('Phone', 'phone', GETPOST('phone', 'alpha'), $object, 0).' ';
- print ''.img_picto('', 'object_phoning').' ';
+ print ''.img_picto('', 'object_phoning').' ';
+ if ($conf->browser->layout == 'phone') print '';
print ''.$form->editfieldkey('Fax', 'fax', GETPOST('fax', 'alpha'), $object, 0).' ';
- print ''.img_picto('', 'object_phoning_fax').' ';
+ print ''.img_picto('', 'object_phoning_fax').' ';
// EMail / Web
print ''.$form->editfieldkey('EMail', 'email', GETPOST('email', 'alpha'), $object, 0, 'string', '', (!empty($conf->global->SOCIETE_EMAIL_MANDATORY))).' ';
- print ''.img_picto('', 'object_email').' ';
+ print ''.img_picto('', 'object_email').' ';
print ''.$form->editfieldkey('Web', 'url', GETPOST('url', 'alpha'), $object, 0).' ';
- print ''.img_picto('', 'globe').' ';
+ print ''.img_picto('', 'globe').' ';
if (!empty($conf->socialnetworks->enabled)) {
foreach ($socialnetworks as $key => $value) {
@@ -2025,36 +1998,9 @@ else
}
}
}
- // if (! empty($conf->socialnetworks->enabled))
- // {
- // // Skype
- // if (! empty($conf->global->SOCIALNETWORKS_SKYPE))
- // {
- // print ''.$form->editfieldkey('Skype', 'skype', '', $object, 0).' ';
- // print ' ';
- // }
- // // Twitter
- // if (! empty($conf->global->SOCIALNETWORKS_TWITTER))
- // {
- // print ''.$form->editfieldkey('Twitter', 'twitter', '', $object, 0).' ';
- // print ' ';
- // }
- // // Facebook
- // if (! empty($conf->global->SOCIALNETWORKS_FACEBOOK))
- // {
- // print ''.$form->editfieldkey('Facebook', 'facebook', '', $object, 0).' ';
- // print ' ';
- // }
- // // LinkedIn
- // if (! empty($conf->global->SOCIALNETWORKS_LINKEDIN))
- // {
- // print ''.$form->editfieldkey('LinkedIn', 'linkedin', '', $object, 0).' ';
- // print ' ';
- // }
- // }
// Prof ids
- $i = 1; $j = 0;
+ $i = 1; $j = 0; $NBCOLS = ($conf->browser->layout == 'phone' ? 1 : 2);
while ($i <= 6)
{
$idprof = $langs->transcountry('ProfId'.$i, $object->country_code);
@@ -2062,18 +2008,18 @@ else
{
$key = 'idprof'.$i;
- if (($j % 2) == 0) print '';
+ if (($j % $NBCOLS) == 0) print ' ';
$idprof_mandatory = 'SOCIETE_IDPROF'.($i).'_MANDATORY';
print ''.$form->editfieldkey($idprof, $key, '', $object, 0, 'string', '', !(empty($conf->global->$idprof_mandatory) || !$object->isACompany())).' ';
print $formcompany->get_input_id_prof($i, $key, $object->$key, $object->country_code);
print ' ';
- if (($j % 2) == 1) print ' ';
+ if (($j % $NBCOLS) == ($NBCOLS - 1)) print '';
$j++;
}
$i++;
}
- if ($j % 2 == 1) print ' ';
+ if ($NBCOLS > 0 && $j % 2 == 1) print ' ';
// VAT is used
print ''.$form->editfieldkey('VATIsUsed', 'assujtva_value', '', $object, 0).' ';
@@ -2093,7 +2039,7 @@ else
print '';
}
print ' ';
-
+ if ($conf->browser->layout == 'phone') print '';
print ''.$form->editfieldkey($langs->transcountry("LocalTax2IsUsed", $mysoc->country_code), 'localtax2assuj_value', '', $object, 0).' ';
print $form->selectyesno('localtax2assuj_value', $object->localtax2_assuj, 1);
if (!isOnlyOneLocalTax(2))
@@ -2167,6 +2113,7 @@ else
print $form->selectarray("typent_id", $formcompany->typent_array(0), $object->typent_id, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT));
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
print ' ';
+ if ($conf->browser->layout == 'phone') print ' ';
print ''.$form->editfieldkey('Staff', 'effectif_id', '', $object, 0).' ';
print $form->selectarray("effectif_id", $formcompany->effectif_array(0), $object->effectif_id);
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
diff --git a/htdocs/societe/checkvat/checkVatPopup.php b/htdocs/societe/checkvat/checkVatPopup.php
index 91f24bbb915..91d0fe9bb1a 100644
--- a/htdocs/societe/checkvat/checkVatPopup.php
+++ b/htdocs/societe/checkvat/checkVatPopup.php
@@ -34,7 +34,6 @@ $WS_DOL_URL_WSDL = 'https://ec.europa.eu/taxation_customs/vies/checkVatService.w
$WS_METHOD = 'checkVat';
-
$conf->dol_hide_topmenu = 1;
$conf->dol_hide_leftmenu = 1;
diff --git a/htdocs/takepos/css/phone.css b/htdocs/takepos/css/phone.css
index 49d833ade17..0f3606071f0 100644
--- a/htdocs/takepos/css/phone.css
+++ b/htdocs/takepos/css/phone.css
@@ -79,3 +79,31 @@ button.phonebutton {
height:90%;
font-weight: bold;
}
+
+button.publicphonebutton {
+ display: inline-block;
+ position: relative;
+ padding: 0;
+ line-height: normal;
+ cursor: pointer;
+ vertical-align: middle;
+ text-align: center;
+ overflow: visible; /* removes extra width in IE */
+ width:33%;
+ height:90%;
+ font-weight: bold;
+}
+
+button.publicphonebutton2 {
+ display: inline-block;
+ position: relative;
+ padding: 0;
+ line-height: normal;
+ cursor: pointer;
+ vertical-align: middle;
+ text-align: center;
+ overflow: visible; /* removes extra width in IE */
+ width:33%;
+ font-weight: bold;
+ padding: 8px 16px;
+}
diff --git a/htdocs/takepos/genimg/index.php b/htdocs/takepos/genimg/index.php
index a5686054193..e668b01aacb 100644
--- a/htdocs/takepos/genimg/index.php
+++ b/htdocs/takepos/genimg/index.php
@@ -25,7 +25,7 @@ if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1');
if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1');
if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1');
-require '../../main.inc.php'; // Load $user and permissions
+if (!defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) require '../../main.inc.php'; // Load $user and permissions
$id = GETPOST('id', 'int');
$w = GETPOST('w', 'int');
@@ -72,12 +72,12 @@ elseif ($query == "pro")
$objProd = new Product($db);
$objProd->fetch($id);
- $image = $objProd->show_photos('product', $conf->product->multidir_output[$entity], 'small', 1);
+ $image = $objProd->show_photos('product', $conf->product->multidir_output[$objProd->entity], 'small', 1);
preg_match('@src="([^"]+)"@', $image, $match);
$file = array_pop($match);
if ($file == "") header('Location: ../../public/theme/common/nophoto.png');
- else header('Location: '.$file.'&cache=1');
+ else header('Location: '.$file.'&cache=1&publictakepos=1&modulepart=product');
}
else
{
diff --git a/htdocs/takepos/genimg/qr.php b/htdocs/takepos/genimg/qr.php
index c4d60a52c1b..3aca3b22ebf 100644
--- a/htdocs/takepos/genimg/qr.php
+++ b/htdocs/takepos/genimg/qr.php
@@ -29,5 +29,8 @@ require '../../core/modules/barcode/doc/tcpdfbarcode.modules.php';
$key = GETPOST('key');
+$urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));
+$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
+
$module = new modTcpdfbarcode();
-$result = $module->buildBarCode("http://www.takepos.com", 'QRCODE', 'Y');
+$result = $module->buildBarCode($urlwithroot."/takepos/public/auto_order.php?key=".dol_encode($key), 'QRCODE', 'Y');
diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php
index 9f0e6649cf6..16012022dc9 100644
--- a/htdocs/takepos/invoice.php
+++ b/htdocs/takepos/invoice.php
@@ -32,7 +32,7 @@ if (!defined('NOREQUIREMENU')) { define('NOREQUIREMENU', '1'); }
if (!defined('NOREQUIREHTML')) { define('NOREQUIREHTML', '1'); }
if (!defined('NOREQUIREAJAX')) { define('NOREQUIREAJAX', '1'); }
-require '../main.inc.php';
+if (!defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
@@ -47,16 +47,11 @@ $idproduct = GETPOST('idproduct', 'int');
$place = (GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : 0); // $place is id of table for Bar or Restaurant
$placeid = 0; // $placeid is ID of invoice
-if ($_SESSION["publicterminal"]) {
- $_SESSION["takeposterminal"] = 1; // Use Terminal 1 for public customers
-}
-elseif (empty($user->rights->takepos->run)) {
+if (empty($user->rights->takepos->run) && !defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) {
accessforbidden();
}
-
-
-if (($conf->global->TAKEPOS_PHONE_BASIC_LAYOUT == 1 && $conf->browser->layout == 'phone') || $_SESSION["publicterminal"])
+if (($conf->global->TAKEPOS_PHONE_BASIC_LAYOUT == 1 && $conf->browser->layout == 'phone') || defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE'))
{
// DIRECT LINK TO THIS PAGE FROM MOBILE AND NO TERMINAL SELECTED
if ($_SESSION["takeposterminal"] == "")
@@ -629,6 +624,12 @@ $(document).ready(function() {
if (selectedline==this.id) return; // If is already selected
else selectedline=this.id;
selectedtext=$('#'+selectedline).find("td:first").html();
+
});
/* Autoselect the line */
@@ -913,7 +914,7 @@ if ($_SESSION["basiclayout"] == 1)
$htmlforlines .= '" onclick="AddProduct(\''.$place.'\', '.$row->id.')">';
$htmlforlines .= ' ';
$htmlforlines .= $row->label;
- $htmlforlines .= ' ';
+ $htmlforlines .= ''.price($row->price_ttc, 1, $langs, 1, -1, -1, $conf->currency).'
';
$htmlforlines .= ' '."\n";
}
$htmlforlines .= '
';
@@ -990,6 +991,7 @@ if ($placeid > 0)
}
$htmlforlines .= '" id="'.$line->id.'">';
$htmlforlines .= ' ';
+ if ($_SESSION["basiclayout"] == 1) $htmlforlines .= $line->qty." x ";
//if ($line->product_label) $htmlforlines.= ''.$line->product_label.' ';
if (isset($line->product_type))
{
diff --git a/htdocs/takepos/phone.php b/htdocs/takepos/phone.php
index eac1f40bfd1..90f0aa363dc 100644
--- a/htdocs/takepos/phone.php
+++ b/htdocs/takepos/phone.php
@@ -40,11 +40,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) {
// Decode place if it is an order from customer phone
$key = GETPOST('key');
- $place=dol_decode($key);
+ $place = dol_decode($key);
}
else $place = (GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : 0); // $place is id of table for Ba or Restaurant
$action = GETPOST('action', 'alpha');
$setterminal = GETPOST('setterminal', 'int');
+$idproduct = GETPOST('idproduct', 'int');
if ($setterminal > 0)
{
@@ -53,14 +54,10 @@ if ($setterminal > 0)
$langs->loadLangs(array("bills", "orders", "commercial", "cashdesk", "receiptprinter"));
-if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) {
- $_SESSION["takeposterminal"] = 1; // Use Terminal 1 for public customers
-}
-elseif (empty($user->rights->takepos->run)) {
+if (empty($user->rights->takepos->run) && !defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) {
accessforbidden();
}
-
/*
* View
*/
@@ -74,48 +71,82 @@ $head = '
';
top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
-?>
-
-
-global->TAKEPOS_NUM_TERMINALS != "1" && $_SESSION["takeposterminal"] == "") print ''.$langs->trans('TerminalSelect').'
';
-?>
+ global->TAKEPOS_NUM_TERMINALS != "1" && $_SESSION["takeposterminal"] == "") print ''.$langs->trans('TerminalSelect').'
';
+ ?>
'.strtoupper(substr($langs->trans('Floors'), 0, 3)).'';
- print ''.strtoupper(substr($langs->trans('Categories'), 0, 3)).' ';
- print ''.strtoupper(substr($langs->trans('Order'), 0, 3)).' ';
- print ''.strtoupper(substr($langs->trans('Logout'), 0, 3)).' ';
- if ($_SESSION["publicterminal"]) print ''.strtoupper(substr($langs->trans('Payment'), 0, 3)).' ';
+ if (!defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) {
+ print ''.strtoupper(substr($langs->trans('Floors'), 0, 3)).' ';
+ print ''.strtoupper(substr($langs->trans('Categories'), 0, 3)).' ';
+ print ''.strtoupper(substr($langs->trans('Order'), 0, 3)).' ';
+ print ''.strtoupper(substr($langs->trans('Logout'), 0, 3)).' ';
+ }
+ else {
+ print ''.strtoupper(substr($langs->trans('Categories'), 0, 5)).' ';
+ print ''.strtoupper(substr($langs->trans('Order'), 0, 5)).' ';
+ print ''.strtoupper(substr($langs->trans('Payment'), 0, 5)).' ';
+ }
?>
@@ -207,7 +315,8 @@ if ($conf->global->TAKEPOS_NUM_TERMINALS != "1" && $_SESSION["takeposterminal"]
-global->TAKEPOS_AUTO_ORDER) accessforbidden(); // If Auto Order is disabled never allow NO LOGIN access
+
$_SESSION["basiclayout"] = 1;
-$_SESSION["publicterminal"] = true; // Is a public customer
+$_SESSION["takeposterminal"] = 1;
define('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE', 1);
-include '../phone.php';
+if (GETPOSTISSET("mobilepage")) require '../invoice.php';
+elseif (GETPOSTISSET("genimg")) require DOL_DOCUMENT_ROOT.'/takepos/genimg/index.php';
+else require '../phone.php';
diff --git a/htdocs/theme/dolibarr_logo.png b/htdocs/theme/dolibarr_logo.png
index 77c21461910..c15f03c821b 100644
Binary files a/htdocs/theme/dolibarr_logo.png and b/htdocs/theme/dolibarr_logo.png differ
diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php
index afb154408c5..3e213c3d8e2 100644
--- a/htdocs/theme/eldy/global.inc.php
+++ b/htdocs/theme/eldy/global.inc.php
@@ -17,6 +17,7 @@
--colorbacklinepair2: rgb();
--colorbacklinepairhover: rgb();
--colorbacklinepairchecked: rgb();
+ --colorbacklinebreak: rgb();
--colorbackbody: rgb();
--colortexttitlenotab: rgb();
--colortexttitle: rgb();
@@ -3289,7 +3290,7 @@ td.evenodd, tr.nohoverpair td, #trlinefordates td {
.trforbreak td {
font-weight: 500;
border-bottom: 1pt solid black !important;
- /* background-color: # !important; */
+ background-color: var(--colorbacklinebreak) !important; !important;
}
.trforbreak.nobold td a, .trforbreak.nobold span.secondary {
font-weight: normal !important;
diff --git a/htdocs/theme/eldy/info-box.inc.php b/htdocs/theme/eldy/info-box.inc.php
index 3138cd8bfd9..3d9c392f32b 100644
--- a/htdocs/theme/eldy/info-box.inc.php
+++ b/htdocs/theme/eldy/info-box.inc.php
@@ -8,7 +8,7 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?>
*/
.info-box-module-external span.info-box-icon-version {
- background: #999;
+ background: #bbb;
}
.info-box {
@@ -74,7 +74,7 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?>
height: 80px;
width: 80px;
font-size: 25px;
- line-height: 80px;
+ line-height: 100px;
}
.info-box-module .info-box-icon {
height: 106px;
diff --git a/htdocs/theme/eldy/theme_vars.inc.php b/htdocs/theme/eldy/theme_vars.inc.php
index 823b8168b4c..d2a11725ecf 100644
--- a/htdocs/theme/eldy/theme_vars.inc.php
+++ b/htdocs/theme/eldy/theme_vars.inc.php
@@ -65,7 +65,7 @@ $colorbacklinepair1 = '251,251,251'; // line pair
$colorbacklinepair2 = '251,251,251'; // line pair
$colorbacklinepairhover = '230,237,244'; // line hover
$colorbacklinepairchecked = '230,237,244'; // line checked
-$colorbacklinebreak = '233,228,230'; // line break
+$colorbacklinebreak = '253,251,250'; // line break
$colorbackbody = '255,255,255';
$colortexttitlenotab = '0,113,120'; // 150,90,121 140,80,10 or 10,140,80 #875a7b green=0,113,120, violet: 0,50,120
$colortexttitle = '0,0,0';
diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php
index da2df5eb788..36fb265c42a 100644
--- a/htdocs/theme/md/style.css.php
+++ b/htdocs/theme/md/style.css.php
@@ -242,6 +242,7 @@ print '*/'."\n";
--colorbacklinepair2: rgb();
--colorbacklinepairhover: rgb();
--colorbacklinepairchecked: rgb();
+ --colorbacklinebreak: rgb();
--colorbackbody: rgb();
--colortexttitlenotab: rgb();
--colortexttitle: rgb();
@@ -3284,10 +3285,10 @@ ul.noborder li:nth-child(odd):not(.liste_titre) {
}
.impair, .nohover .impair:hover, tr.impair td.nohover
{
- background: #;
+ background: var(--colorbacklineimpair1);
}
#GanttChartDIV {
- background-color: #;
+ background-color: var(--colorbacklineimpair1);
}
.oddeven, .evenodd, .pair, .nohover .pair:hover, tr.pair td.nohover, .tagtr.oddeven {
@@ -3296,25 +3297,26 @@ ul.noborder li:nth-child(odd):not(.liste_titre) {
color: #202020;
}
.pair, .nohover .pair:hover, tr.pair td.nohover {
- background-color: #;
+ background-color: var(--colorbacklinepair1);
}
+
table.dataTable tr.oddeven {
- background-color: # !important;
+ background-color: var(--colorbacklinepair1) !important;
}
/* For no hover style */
td.oddeven, table.nohover tr.impair, table.nohover tr.pair, table.nohover tr.impair td, table.nohover tr.pair td, tr.nohover td, form.nohover, form.nohover:hover {
- background-color: # !important;
- background: # !important;
+ background-color: var(--colorbacklineimpair1) !important; !important;
+ background: var(--colorbacklineimpair1) !important; !important;
}
td.evenodd, tr.nohoverpair td, #trlinefordates td {
- background-color: # !important;
- background: # !important;
+ background-color: var(--colorbacklinepair1) !important; !important;
+ background: var(--colorbacklinepair1) !important; !important;
}
.trforbreak td {
font-weight: bold;
border-bottom: 1pt solid black !important;
- /* background-color: # !important; */
+ background-color: var(--colorbacklinebreak) !important;
}
table.dataTable td {
diff --git a/htdocs/theme/md/theme_vars.inc.php b/htdocs/theme/md/theme_vars.inc.php
index 6cdd37fe913..ffad2cc66b5 100644
--- a/htdocs/theme/md/theme_vars.inc.php
+++ b/htdocs/theme/md/theme_vars.inc.php
@@ -61,7 +61,7 @@ $colorbacklinepair1 = '248,248,248'; // line pair
$colorbacklinepair2 = '246,246,246'; // line pair
$colorbacklinepairhover = '230,237,244'; // line hover
$colorbacklinepairchecked = '230,237,244'; // line checked
-$colorbacklinebreak = '214,218,220';
+$colorbacklinebreak = '250,246,251';
$colorbackbody = '248,248,248';
$colortexttitlenotab = '80,71,5';
$colortexttitle = '20,20,20';
diff --git a/htdocs/user/passwordforgotten.php b/htdocs/user/passwordforgotten.php
index b0f3a5aab6c..83289521538 100644
--- a/htdocs/user/passwordforgotten.php
+++ b/htdocs/user/passwordforgotten.php
@@ -192,13 +192,13 @@ elseif (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'
$urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/'.$mysoc->logo);
$width = 128;
}
-elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/img/dolibarr_logo.png'))
+elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/img/dolibarr_logo.svg'))
{
- $urllogo = DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/dolibarr_logo.png';
+ $urllogo = DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/dolibarr_logo.svg';
}
-elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.png'))
+elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.svg'))
{
- $urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.png';
+ $urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.svg';
}
// Security graphical code
diff --git a/htdocs/viewimage.php b/htdocs/viewimage.php
index 3cb23b36fbc..b2534ee92dd 100644
--- a/htdocs/viewimage.php
+++ b/htdocs/viewimage.php
@@ -52,7 +52,15 @@ if (isset($_GET["hashp"]) && !defined("NOLOGIN"))
if (!defined("NOIPCHECK")) define("NOIPCHECK", 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip
}
// Some value of modulepart can be used to get resources that are public so no login are required.
-if ((isset($_GET["modulepart"]) && $_GET["modulepart"] == 'medias'))
+if (isset($_GET["modulepart"]) && $_GET["modulepart"] == 'medias')
+{
+ if (!defined("NOLOGIN")) define("NOLOGIN", 1);
+ if (!defined("NOCSRFCHECK")) define("NOCSRFCHECK", 1); // We accept to go on this page from external web site.
+ if (!defined("NOIPCHECK")) define("NOIPCHECK", 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip
+}
+
+// Used by TakePOS Auto Order
+if (isset($_GET["modulepart"]) && $_GET["modulepart"] == 'product' && isset($_GET["publictakepos"]))
{
if (!defined("NOLOGIN")) define("NOLOGIN", 1);
if (!defined("NOCSRFCHECK")) define("NOCSRFCHECK", 1); // We accept to go on this page from external web site.
@@ -195,6 +203,12 @@ if (!empty($hashp))
$accessallowed = 1; // When using hashp, link is public so we force $accessallowed
$sqlprotectagainstexternals = '';
}
+elseif (isset($_GET["publictakepos"]))
+{
+ if (! empty($conf->global->TAKEPOS_AUTO_ORDER)) {
+ $accessallowed = 1; // Only if TakePOS Public Auto Order is enabled and received publictakepos variable
+ }
+}
else
{
// Basic protection (against external users only)
diff --git a/htdocs/website/class/websitepage.class.php b/htdocs/website/class/websitepage.class.php
index 84eaf0efb27..2a72a222265 100644
--- a/htdocs/website/class/websitepage.class.php
+++ b/htdocs/website/class/websitepage.class.php
@@ -108,6 +108,29 @@ class WebsitePage extends CommonObject
const STATUS_VALIDATED = 1;
+ /**
+ * 'type' if the field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password')
+ * Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)"
+ * 'label' the translation key.
+ * 'enabled' is a condition when the field must be managed (Example: 1 or '$conf->global->MY_SETUP_PARAM)
+ * 'position' is the sort order of field.
+ * 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty ('' or 0).
+ * 'visible' says if field is visible in list (Examples: 0=Not visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). 5=Visible on list and view only (not create/not update). Using a negative value means field is not shown by default on list but can be selected for viewing)
+ * 'noteditable' says if field is not editable (1 or 0)
+ * 'default' is a default value for creation (can still be overwrote by the Setup of Default Values if field is editable in creation form). Note: If default is set to '(PROV)' and field is 'ref', the default value will be set to '(PROVid)' where id is rowid when a new record is created.
+ * 'index' if we want an index in database.
+ * 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommanded to name the field fk_...).
+ * 'searchall' is 1 if we want to search in this field when making a search from the quick search button.
+ * 'isameasure' must be set to 1 if you want to have a total on list for this field. Field type must be summable like integer or double(24,8).
+ * 'css' is the CSS style to use on field. For example: 'maxwidth200'
+ * 'help' is a string visible as a tooltip on field
+ * 'showoncombobox' if value of the field must be visible into the label of the combobox that list record
+ * 'disabled' is 1 if we want to have the field locked by a 'disabled' attribute. In most cases, this is never set into the definition of $fields into class, but is set dynamically by some part of code.
+ * 'arraykeyval' to set list of value if type is a list of predefined values. For example: array("0"=>"Draft","1"=>"Active","-1"=>"Cancel")
+ * 'comment' is not used. You can store here any text of your choice. It is not used by application.
+ *
+ * Note: To have value dynamic, you can set value to 0 in definition and edit the value on the fly into the constructor.
+ */
// BEGIN MODULEBUILDER PROPERTIES
/**
@@ -122,7 +145,7 @@ class WebsitePage extends CommonObject
'description' =>array('type'=>'varchar(255)', 'label'=>'Description', 'enabled'=>1, 'visible'=>1, 'position'=>30, 'searchall'=>1),
'image' =>array('type'=>'varchar(255)', 'label'=>'Image', 'enabled'=>1, 'visible'=>1, 'position'=>32, 'searchall'=>0, 'help'=>'Relative path of media. Used if Type is "blogpost"'),
'keywords' =>array('type'=>'varchar(255)', 'label'=>'Keywords', 'enabled'=>1, 'visible'=>1, 'position'=>45, 'searchall'=>0),
- 'lang' =>array('type'=>'varchar(6)', 'label'=>'Lang', 'enabled'=>1, 'visible'=>1, 'position'=>45, 'searchall'=>0),
+ 'lang' =>array('type'=>'varchar(6)', 'label'=>'Lang', 'enabled'=>1, 'notnull'=>-1, 'visible'=>1, 'position'=>45, 'searchall'=>0),
//'status' =>array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'index'=>true, 'position'=>1000),
'fk_website' =>array('type'=>'integer', 'label'=>'WebsiteId', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'position'=>40, 'searchall'=>0, 'foreignkey'=>'websitepage.rowid'),
'fk_page' =>array('type'=>'integer', 'label'=>'ParentPageId', 'enabled'=>1, 'visible'=>1, 'notnull'=>-1, 'position'=>45, 'searchall'=>0, 'foreignkey'=>'website.rowid'),
@@ -329,10 +352,23 @@ class WebsitePage extends CommonObject
$sqlwhere = array();
if (count($filter) > 0) {
foreach ($filter as $key => $value) {
- if ($key == 't.rowid' || $key == 't.fk_website') {
+ if ($key == 't.rowid' || $key == 't.fk_website' || $key == 'status') {
$sqlwhere[] = $key.'='.$value;
+ } elseif ($key == 'type_container') {
+ $sqlwhere[] = $key."='".$value."'";
} elseif ($key == 'lang' || $key == 't.lang') {
- $sqlwhere[] = $key." = '".$this->db->escape(substr($value, 0, 2))."'";
+ $listoflang = array();
+ $foundnull = 0;
+ foreach(explode(',', $value) as $tmpvalue) {
+ if ($tmpvalue == 'null') {
+ $foundnull++;
+ continue;
+ }
+ $listoflang[] = "'".$this->db->escape(substr(str_replace("'", '', $tmpvalue), 0, 2))."'";
+ }
+ $stringtouse = $key." IN (".join(',', $listoflang).")";
+ if ($foundnull) $stringtouse = '('.$stringtouse.' OR '.$key.' IS NULL)';
+ $sqlwhere[] = $stringtouse;
} else {
$sqlwhere[] = $key.' LIKE \'%'.$this->db->escape($value).'%\'';
}
diff --git a/htdocs/website/index.php b/htdocs/website/index.php
index 690dc0efe3b..ac26f2ee7bb 100644
--- a/htdocs/website/index.php
+++ b/htdocs/website/index.php
@@ -3170,6 +3170,7 @@ if ($action == 'editmeta' || $action == 'createcontainer')
$pageauthorid = $objectpage->fk_user_creat;
$pageusermodifid = $objectpage->fk_user_modif;
$pageauthoralias = $objectpage->author_alias;
+ $pagestatus = $objectpage->status;
}
else
{
@@ -3178,6 +3179,7 @@ if ($action == 'editmeta' || $action == 'createcontainer')
$pageauthorid = $user->id;
$pageusermodifid = 0;
$pageauthoralias = '';
+ $pagestatus = 1;
}
if (GETPOST('WEBSITE_TITLE', 'alpha')) $pagetitle = GETPOST('WEBSITE_TITLE', 'alpha');
if (GETPOST('WEBSITE_PAGENAME', 'alpha')) $pageurl = GETPOST('WEBSITE_PAGENAME', 'alpha');
@@ -3186,7 +3188,7 @@ if ($action == 'editmeta' || $action == 'createcontainer')
if (GETPOST('WEBSITE_IMAGE', 'alpha')) $pageimage = GETPOST('WEBSITE_IMAGE', 'alpha');
if (GETPOST('WEBSITE_KEYWORDS', 'alpha')) $pagekeywords = GETPOST('WEBSITE_KEYWORDS', 'alpha');
if (GETPOST('WEBSITE_LANG', 'aZ09')) $pagelang = GETPOST('WEBSITE_LANG', 'aZ09');
- if (GETPOST('htmlheader', 'none')) $pagehtmlheader = GETPOST('htmlheader', 'none');
+ if (GETPOST('htmlheader', 'none')) $pagehtmlheader = GETPOST('htmlheader', 'none');
// Title
print ' ';
@@ -3381,6 +3383,16 @@ if ($action == 'editmeta' || $action == 'createcontainer')
print $doleditor->Create(1, '', true, 'HTML Header', 'html');
print ' ';
+ if ($action != 'createcontainer')
+ {
+ print '';
+ print $langs->trans('Status');
+ print ' ';
+ print ajax_object_onoff($objectpage, 'status', 'status', 'Enabled', 'Disabled');
+ //print dol_print_date($pagedatecreation, 'dayhour');
+ print ' ';
+ }
+
print '
';
if ($action == 'createcontainer')
{