diff --git a/htdocs/admin/ticketsup.php b/htdocs/admin/ticketsup.php
index 7a3ddf7826b..4040964d2fe 100644
--- a/htdocs/admin/ticketsup.php
+++ b/htdocs/admin/ticketsup.php
@@ -71,7 +71,7 @@ if ($action == 'updateMask') {
if (!empty($notification_email)) {
$res = dolibarr_set_const($db, 'TICKETS_NOTIFICATION_EMAIL_FROM', $notification_email, 'chaine', 0, '', $conf->entity);
} else {
- $res = dolibarr_set_const($db, 'TICKETS_NOTIFICATION_EMAIL_FROM', '000000', 'chaine', 0, '', $conf->entity);
+ $res = dolibarr_set_const($db, 'TICKETS_NOTIFICATION_EMAIL_FROM', '', 'chaine', 0, '', $conf->entity);
}
if (!$res > 0) {
$error++;
@@ -82,7 +82,7 @@ if ($action == 'updateMask') {
if (!empty($notification_email_to)) {
$res = dolibarr_set_const($db, 'TICKETS_NOTIFICATION_EMAIL_TO', $notification_email_to, 'chaine', 0, '', $conf->entity);
} else {
- $res = dolibarr_set_const($db, 'TICKETS_NOTIFICATION_EMAIL_TO', '000000', 'chaine', 0, '', $conf->entity);
+ $res = dolibarr_set_const($db, 'TICKETS_NOTIFICATION_EMAIL_TO', '', 'chaine', 0, '', $conf->entity);
}
if (!$res > 0) {
$error++;
@@ -184,16 +184,22 @@ if ($action == 'setvarother') {
$error++;
}
- $param_show_module_logo = GETPOST('TICKETS_SHOW_MODULE_LOGO', 'alpha');
- $res = dolibarr_set_const($db, 'TICKETS_SHOW_MODULE_LOGO', $param_show_module_logo, 'chaine', 0, '', $conf->entity);
- if (!$res > 0) {
- $error++;
+ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
+ {
+ $param_show_module_logo = GETPOST('TICKETS_SHOW_MODULE_LOGO', 'alpha');
+ $res = dolibarr_set_const($db, 'TICKETS_SHOW_MODULE_LOGO', $param_show_module_logo, 'chaine', 0, '', $conf->entity);
+ if (!$res > 0) {
+ $error++;
+ }
}
- $param_notification_also_main_addressemail = GETPOST('TICKETS_NOTIFICATION_ALSO_MAIN_ADDRESS', 'alpha');
- $res = dolibarr_set_const($db, 'TICKETS_NOTIFICATION_ALSO_MAIN_ADDRESS', $param_notification_also_main_addressemail, 'chaine', 0, '', $conf->entity);
- if (!$res > 0) {
- $error++;
+ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
+ {
+ $param_notification_also_main_addressemail = GETPOST('TICKETS_NOTIFICATION_ALSO_MAIN_ADDRESS', 'alpha');
+ $res = dolibarr_set_const($db, 'TICKETS_NOTIFICATION_ALSO_MAIN_ADDRESS', $param_notification_also_main_addressemail, 'chaine', 0, '', $conf->entity);
+ if (!$res > 0) {
+ $error++;
+ }
}
$param_limit_view = GETPOST('TICKETS_LIMIT_VIEW_ASSIGNED_ONLY', 'alpha');
@@ -380,20 +386,23 @@ print $form->textwithpicto('', $langs->trans("TicketsEmailMustExistHelp"), 1, 'h
print '';
print '';
-// Show logo for module
-print '
| ' . $langs->trans("TicketsShowModuleLogo") . ' | ';
-print '';
-if ($conf->use_javascript_ajax) {
- print ajax_constantonoff('TICKETS_SHOW_MODULE_LOGO');
-} else {
- $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
- print $form->selectarray("TICKETS_SHOW_MODULE_LOGO", $arrval, $conf->global->TICKETS_SHOW_MODULE_LOGO);
+if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
+{
+ // Show logo for module
+ print ' |
| ' . $langs->trans("TicketsShowModuleLogo") . ' | ';
+ print '';
+ if ($conf->use_javascript_ajax) {
+ print ajax_constantonoff('TICKETS_SHOW_MODULE_LOGO');
+ } else {
+ $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
+ print $form->selectarray("TICKETS_SHOW_MODULE_LOGO", $arrval, $conf->global->TICKETS_SHOW_MODULE_LOGO);
+ }
+ print ' | ';
+ print '';
+ print $form->textwithpicto('', $langs->trans("TicketsShowModuleLogoHelp"), 1, 'help');
+ print ' | ';
+ print '
';
}
-print '';
-print '';
-print $form->textwithpicto('', $langs->trans("TicketsShowModuleLogoHelp"), 1, 'help');
-print ' | ';
-print '';
// Show logo for company
print '| ' . $langs->trans("TicketsShowCompanyLogo") . ' | ';
@@ -446,19 +455,22 @@ print '';
print '
';
// Also send to main email address
-print '| ' . $langs->trans("TicketsEmailAlsoSendToMainAddress") . ' | ';
-print '';
-if ($conf->use_javascript_ajax) {
- print ajax_constantonoff('TICKETS_NOTIFICATION_ALSO_MAIN_ADDRESS');
-} else {
- $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
- print $form->selectarray("TICKETS_NOTIFICATION_ALSO_MAIN_ADDRESS", $arrval, $conf->global->TICKETS_NOTIFICATION_ALSO_MAIN_ADDRESS);
+if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
+{
+ print ' |
| ' . $langs->trans("TicketsEmailAlsoSendToMainAddress") . ' | ';
+ print '';
+ if ($conf->use_javascript_ajax) {
+ print ajax_constantonoff('TICKETS_NOTIFICATION_ALSO_MAIN_ADDRESS');
+ } else {
+ $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
+ print $form->selectarray("TICKETS_NOTIFICATION_ALSO_MAIN_ADDRESS", $arrval, $conf->global->TICKETS_NOTIFICATION_ALSO_MAIN_ADDRESS);
+ }
+ print ' | ';
+ print '';
+ print $form->textwithpicto('', $langs->trans("TicketsEmailAlsoSendToMainAddressHelp"), 1, 'help');
+ print ' | ';
+ print '
';
}
-print '';
-print '';
-print $form->textwithpicto('', $langs->trans("TicketsEmailAlsoSendToMainAddressHelp"), 1, 'help');
-print ' | ';
-print '';
// Limiter la vue des tickets à ceux assignés à l'utilisateur
print '| ' . $langs->trans("TicketsLimitViewAssignedOnly") . ' | ';
diff --git a/htdocs/core/class/html.formticketsup.class.php b/htdocs/core/class/html.formticketsup.class.php
index 7248e2b9a8e..732d495efb2 100644
--- a/htdocs/core/class/html.formticketsup.class.php
+++ b/htdocs/core/class/html.formticketsup.class.php
@@ -113,10 +113,10 @@ class FormTicketsup
/**
* Show the form to input ticket
*
- * @param string $width Width of form
+ * @param int $withdolfichehead With dol_fiche_head
* @return void
*/
- public function showForm($width = '100%')
+ public function showForm($withdolfichehead=0)
{
global $conf, $langs, $user, $hookmanager;
@@ -140,7 +140,9 @@ class FormTicketsup
print "\n\n";
- print '