forked from Wavyzz/dolibarr
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
@@ -38,24 +38,31 @@ $action = GETPOST('action','aZ09');
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Action
|
||||||
*/
|
*/
|
||||||
|
if (preg_match('/set_([a-z0-9_\-]+)/i',$action,$reg))
|
||||||
// Action activation d'un sous module du module adherent
|
|
||||||
if ($action == 'set')
|
|
||||||
{
|
{
|
||||||
$result=dolibarr_set_const($db, $_GET["name"], $_GET["value"], '', 0, '', $conf->entity);
|
$code=$reg[1];
|
||||||
if ($result < 0)
|
if (dolibarr_set_const($db, $code, 1, 'chaine', 0, '', $conf->entity) > 0)
|
||||||
|
{
|
||||||
|
header("Location: ".$_SERVER["PHP_SELF"]);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Action desactivation d'un sous module du module adherent
|
if (preg_match('/del_([a-z0-9_\-]+)/i',$action,$reg))
|
||||||
if ($action == 'unset')
|
|
||||||
{
|
{
|
||||||
$result=dolibarr_del_const($db, $_GET["name"], $conf->entity);
|
$code=$reg[1];
|
||||||
if ($result < 0)
|
if (dolibarr_del_const($db, $code, $conf->entity) > 0)
|
||||||
|
{
|
||||||
|
header("Location: ".$_SERVER["PHP_SELF"]);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
@@ -94,21 +101,13 @@ $arrayofsocialnetworks=array('jabber'=>'Jabber', 'skype'=>'Skype', 'twitter'=>'T
|
|||||||
foreach($arrayofsocialnetworks as $snkey => $snlabel)
|
foreach($arrayofsocialnetworks as $snkey => $snlabel)
|
||||||
{
|
{
|
||||||
$consttocheck = 'SOCIALNETWORKS_'.strtoupper($snkey);
|
$consttocheck = 'SOCIALNETWORKS_'.strtoupper($snkey);
|
||||||
if (! empty($conf->global->$consttocheck))
|
if ($conf->use_javascript_ajax) {
|
||||||
{
|
$link = ajax_constantonoff($consttocheck);
|
||||||
//$link=img_picto($langs->trans("Active"),'tick').' ';
|
} else {
|
||||||
$link='<a href="'.$_SERVER["PHP_SELF"].'?action=unset&value=0&name='.$consttocheck.'">';
|
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||||
//$link.=$langs->trans("Disable");
|
$link = $form->selectarray($consttocheck, $arrval, $conf->global->$consttocheck);
|
||||||
$link.=img_picto($langs->trans("Activated"),'switch_on');
|
}
|
||||||
$link.='</a>';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$link='<a href="'.$_SERVER["PHP_SELF"].'?action=set&value=1&name='.$consttocheck.'">';
|
|
||||||
//$link.=img_$langs->trans("Activate")
|
|
||||||
$link.=img_picto($langs->trans("Disabled"),'switch_off');
|
|
||||||
$link.='</a>';
|
|
||||||
}
|
|
||||||
print $langs->trans('EnableFeatureFor', $snlabel).' '.$link.'<br><br>';
|
print $langs->trans('EnableFeatureFor', $snlabel).' '.$link.'<br><br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
|
* Copyright (C) 2019 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -40,9 +41,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT. '/core/class/html.form.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('companies', 'users', 'other', 'commercial'));
|
$langs->loadLangs(array('companies', 'users', 'other', 'commercial'));
|
||||||
@@ -378,12 +379,6 @@ if (empty($reshook))
|
|||||||
|
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
// Categories association
|
// Categories association
|
||||||
// First we delete all categories association
|
|
||||||
$sql = 'DELETE FROM ' . MAIN_DB_PREFIX . 'categorie_contact';
|
|
||||||
$sql .= ' WHERE fk_socpeople = ' . $object->id;
|
|
||||||
$db->query($sql);
|
|
||||||
|
|
||||||
// Then we add the associated categories
|
|
||||||
$categories = GETPOST('contcats', 'array');
|
$categories = GETPOST('contcats', 'array');
|
||||||
$object->setCategories($categories);
|
$object->setCategories($categories);
|
||||||
|
|
||||||
|
|||||||
@@ -40,9 +40,38 @@ if (!$user->admin) accessforbidden();
|
|||||||
|
|
||||||
$langs->loadLangs(array("admin", "cashdesk"));
|
$langs->loadLangs(array("admin", "cashdesk"));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Action
|
||||||
*/
|
*/
|
||||||
|
if (preg_match('/set_([a-z0-9_\-]+)/i',$action,$reg))
|
||||||
|
{
|
||||||
|
$code=$reg[1];
|
||||||
|
if (dolibarr_set_const($db, $code, 1, 'chaine', 0, '', $conf->entity) > 0)
|
||||||
|
{
|
||||||
|
header("Location: ".$_SERVER["PHP_SELF"]);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dol_print_error($db);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (preg_match('/del_([a-z0-9_\-]+)/i',$action,$reg))
|
||||||
|
{
|
||||||
|
$code=$reg[1];
|
||||||
|
if (dolibarr_del_const($db, $code, $conf->entity) > 0)
|
||||||
|
{
|
||||||
|
header("Location: ".$_SERVER["PHP_SELF"]);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dol_print_error($db);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (GETPOST('action','alpha') == 'set')
|
if (GETPOST('action','alpha') == 'set')
|
||||||
{
|
{
|
||||||
$db->begin();
|
$db->begin();
|
||||||
@@ -92,32 +121,38 @@ $linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToM
|
|||||||
print load_fiche_titre($langs->trans("CashDeskSetup").' (TakePOS)',$linkback,'title_setup');
|
print load_fiche_titre($langs->trans("CashDeskSetup").' (TakePOS)',$linkback,'title_setup');
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
|
||||||
// Mode
|
// Mode
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
||||||
print '<input type="hidden" name="action" value="set">';
|
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Parameters").'</td><td>'.$langs->trans("Value").'</td>';
|
print '<td>'.$langs->trans("Parameters").'</td>'."\n";
|
||||||
|
print '<td align="center">'.$langs->trans("Status").'</td>'."\n";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
if (! empty($conf->service->enabled))
|
if (! empty($conf->service->enabled))
|
||||||
{
|
{
|
||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
print $langs->trans("CashdeskShowServices");
|
print $langs->trans("CashdeskShowServices");
|
||||||
print '<td colspan="2">';
|
print '<td align="center">';
|
||||||
print $form->selectyesno("CASHDESK_SERVICES",$conf->global->CASHDESK_SERVICES,1);
|
if ($conf->use_javascript_ajax) {
|
||||||
|
print ajax_constantonoff('CASHDESK_SERVICES');
|
||||||
|
} else {
|
||||||
|
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||||
|
print $form->selectarray("CASHDESK_SERVICES", $arrval, $conf->global->CASHDESK_SERVICES);
|
||||||
|
}
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use Takepos printing
|
// Use Takepos printing
|
||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
print $langs->trans("DolibarrReceiptPrinter").' (<a href="http://en.takepos.com/connector">'.$langs->trans("TakeposConnectorNecesary").'</a>)';
|
print $langs->trans("DolibarrReceiptPrinter").' (<a href="http://en.takepos.com/connector">'.$langs->trans("TakeposConnectorNecesary").'</a>)';
|
||||||
print '<td colspan="2">';
|
print '<td align="center">';
|
||||||
print $form->selectyesno("TAKEPOSCONNECTOR",$conf->global->TAKEPOSCONNECTOR,1);
|
if ($conf->use_javascript_ajax) {
|
||||||
|
print ajax_constantonoff('TAKEPOSCONNECTOR');
|
||||||
|
} else {
|
||||||
|
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||||
|
print $form->selectarray("TAKEPOSCONNECTOR", $arrval, $conf->global->TAKEPOSCONNECTOR);
|
||||||
|
}
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|
||||||
if ($conf->global->TAKEPOSCONNECTOR){
|
if ($conf->global->TAKEPOSCONNECTOR){
|
||||||
@@ -131,15 +166,25 @@ if ($conf->global->TAKEPOSCONNECTOR){
|
|||||||
// Bar Restaurant mode
|
// Bar Restaurant mode
|
||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
print 'Bar Restaurant';
|
print 'Bar Restaurant';
|
||||||
print '<td colspan="2">';
|
print '<td align="center">';
|
||||||
print $form->selectyesno("TAKEPOS_BAR_RESTAURANT",$conf->global->TAKEPOS_BAR_RESTAURANT,1);
|
if ($conf->use_javascript_ajax) {
|
||||||
|
print ajax_constantonoff('TAKEPOS_BAR_RESTAURANT');
|
||||||
|
} else {
|
||||||
|
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||||
|
print $form->selectarray("TAKEPOS_BAR_RESTAURANT", $arrval, $conf->global->TAKEPOS_BAR_RESTAURANT);
|
||||||
|
}
|
||||||
|
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|
||||||
if ($conf->global->TAKEPOS_BAR_RESTAURANT && $conf->global->TAKEPOSCONNECTOR){
|
if ($conf->global->TAKEPOS_BAR_RESTAURANT && $conf->global->TAKEPOSCONNECTOR){
|
||||||
print '<tr class="oddeven value"><td>';
|
print '<tr class="oddeven value"><td>';
|
||||||
print $langs->trans("OrderPrinters").' (<a href="orderprinters.php?leftmenu=setup">'.$langs->trans("Setup").'</a>)';
|
print $langs->trans("OrderPrinters").' (<a href="orderprinters.php?leftmenu=setup">'.$langs->trans("Setup").'</a>)';
|
||||||
print '<td colspan="2">';
|
if ($conf->use_javascript_ajax) {
|
||||||
print $form->selectyesno("TAKEPOS_ORDER_PRINTERS",$conf->global->TAKEPOS_ORDER_PRINTERS,1);
|
print ajax_constantonoff('TAKEPOS_ORDER_PRINTERS');
|
||||||
|
} else {
|
||||||
|
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||||
|
print $form->selectarray("TAKEPOS_ORDER_PRINTERS", $arrval, $conf->global->TAKEPOS_ORDER_PRINTERS);
|
||||||
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -185,6 +230,9 @@ print '</table>';
|
|||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||||
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
print '<input type="hidden" name="action" value="set">';
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
|
|||||||
Reference in New Issue
Block a user