diff --git a/htdocs/admin/ticket_public.php b/htdocs/admin/ticket_public.php index 7d97b4f7dbe..98ce554c363 100644 --- a/htdocs/admin/ticket_public.php +++ b/htdocs/admin/ticket_public.php @@ -59,6 +59,38 @@ if ($action == 'setTICKET_ENABLE_PUBLIC_INTERFACE') { if ($action == 'setvar') { include_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"; + if (GETPOSTISSET('TICKET_ENABLE_PUBLIC_INTERFACE')) { // only for no js case + $param_enable_public_interface = GETPOST('TICKET_ENABLE_PUBLIC_INTERFACE', 'alpha'); + $res = dolibarr_set_const($db, 'TICKET_ENABLE_PUBLIC_INTERFACE', $param_enable_public_interface, 'chaine', 0, '', $conf->entity); + if (!($res > 0)) { + $error++; + } + } + + if (GETPOSTISSET('TICKET_EMAIL_MUST_EXISTS')) { // only for no js case + $param_must_exists = GETPOST('TICKET_EMAIL_MUST_EXISTS', 'alpha'); + $res = dolibarr_set_const($db, 'TICKET_EMAIL_MUST_EXISTS', $param_must_exists, 'chaine', 0, '', $conf->entity); + if (!($res > 0)) { + $error++; + } + } + + if (GETPOSTISSET('TICKET_DISABLE_CUSTOMER_MAILS')) { // only for no js case + $param_disable_email = GETPOST('TICKET_DISABLE_CUSTOMER_MAILS', 'alpha'); + $res = dolibarr_set_const($db, 'TICKET_DISABLE_CUSTOMER_MAILS', $param_disable_email, 'chaine', 0, '', $conf->entity); + if (!($res > 0)) { + $error++; + } + } + + if (GETPOSTISSET('TICKET_SHOW_COMPANY_LOGO')) { // only for no js case + $param_show_module_logo = GETPOST('TICKET_SHOW_COMPANY_LOGO', 'alpha'); + $res = dolibarr_set_const($db, 'TICKET_SHOW_COMPANY_LOGO', $param_show_module_logo, 'chaine', 0, '', $conf->entity); + if (!($res > 0)) { + $error++; + } + } + $topic_interface = GETPOST('TICKET_PUBLIC_INTERFACE_TOPIC', 'nohtml'); if (!empty($topic_interface)) { $res = dolibarr_set_const($db, 'TICKET_PUBLIC_INTERFACE_TOPIC', $topic_interface, 'chaine', 0, '', $conf->entity); @@ -114,32 +146,6 @@ if ($action == 'setvar') { if (!($res > 0)) { $error++; } -} - -if ($action == 'setvarother') { - $param_enable_public_interface = GETPOST('TICKET_ENABLE_PUBLIC_INTERFACE', 'alpha'); - $res = dolibarr_set_const($db, 'TICKET_ENABLE_PUBLIC_INTERFACE', $param_enable_public_interface, 'chaine', 0, '', $conf->entity); - if (!($res > 0)) { - $error++; - } - - $param_must_exists = GETPOST('TICKET_EMAIL_MUST_EXISTS', 'alpha'); - $res = dolibarr_set_const($db, 'TICKET_EMAIL_MUST_EXISTS', $param_must_exists, 'chaine', 0, '', $conf->entity); - if (!($res > 0)) { - $error++; - } - - $param_disable_email = GETPOST('TICKET_DISABLE_CUSTOMER_MAILS', 'alpha'); - $res = dolibarr_set_const($db, 'TICKET_DISABLE_CUSTOMER_MAILS', $param_disable_email, 'chaine', 0, '', $conf->entity); - if (!($res > 0)) { - $error++; - } - - $param_show_module_logo = GETPOST('TICKET_SHOW_COMPANY_LOGO', 'alpha'); - $res = dolibarr_set_const($db, 'TICKET_SHOW_COMPANY_LOGO', $param_show_module_logo, 'chaine', 0, '', $conf->entity); - if (!($res > 0)) { - $error++; - } if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { $param_notification_also_main_addressemail = GETPOST('TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS', 'alpha'); @@ -197,18 +203,16 @@ print ''; - print ''; - print ''; - } + print '
'; + print ''; + print ''; print '
'; print ''; print ''; print ''; - print ''; print ''; @@ -222,7 +226,7 @@ if (!empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE)) { print $form->selectarray("TICKET_EMAIL_MUST_EXISTS", $arrval, $conf->global->TICKET_EMAIL_MUST_EXISTS); } print ''; - print ''; print ''; @@ -255,7 +259,7 @@ if (!empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE)) { print $form->selectarray("TICKET_SHOW_COMPANY_LOGO", $arrval, $conf->global->TICKET_SHOW_COMPANY_LOGO); } print ''; - print ''; print ''; @@ -271,8 +275,8 @@ if (!empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE)) { print $form->selectarray("TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS", $arrval, $conf->global->TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS); } print ''; - print ''; print ''; } @@ -282,28 +286,6 @@ if (!empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE)) { print ''; } - print '
'.$langs->trans("Parameters").''; print ''; + print ''; print '
'; + print ''; print $form->textwithpicto('', $langs->trans("TicketsEmailMustExistHelp"), 1, 'help'); print '
'; + print ''; print $form->textwithpicto('', $langs->trans("TicketsShowCompanyLogoHelp"), 1, 'help'); print '
'; - print $form->textwithpicto('', $langs->trans("TicketsEmailAlsoSendToMainAddressHelp"), 1, 'help'); + print ''; + print $form->textwithpicto('', $langs->trans("TicketsEmailAlsoSendToMainAddressHelp", $langs->transnoentitiesnoconv("TicketEmailNotificationTo").' ('.$langs->transnoentitiesnoconv("Creation").')', $langs->trans("Settings")), 1, 'help'); print '
'; - print '
'; - print '
'; - - if (!$conf->use_javascript_ajax) { - print '
'; - } - - // Admin var of module - print load_fiche_titre($langs->trans("TicketParamMail")); - - print '
'; - print ''; - - print ''; - print ''; - print ''; - - print ''; - print ''; - print "\n"; - if (empty($conf->global->FCKEDITOR_ENABLE_MAIL)) { print ''; print ''; @@ -316,7 +298,7 @@ if (!empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE)) { print ''; print ''; - print ''; diff --git a/htdocs/langs/en_US/ticket.lang b/htdocs/langs/en_US/ticket.lang index c0d803a8b6e..50fa8c970ae 100644 --- a/htdocs/langs/en_US/ticket.lang +++ b/htdocs/langs/en_US/ticket.lang @@ -116,8 +116,8 @@ TicketsShowModuleLogo=Display the logo of the module in the public interface TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface TicketsShowCompanyLogo=Display the logo of the company in the public interface TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface -TicketsEmailAlsoSendToMainAddress=Also send notification to main email address -TicketsEmailAlsoSendToMainAddressHelp=Enable this option to send an email to "Notification email from" address (see setup below) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. TicketsActivatePublicInterface=Activate public interface @@ -128,10 +128,10 @@ TicketNumberingModules=Tickets numbering module TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Notify third party at creation TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket TicketsPublicNotificationNewMessageHelp=Send email(s) when a new message is added from public interface (to assigned user or the notifications email to (update) and/or the notifications email to) TicketPublicNotificationNewMessageDefaultEmail=Notifications email to (update) -TicketPublicNotificationNewMessageDefaultEmailHelp=Send email new message notifications to this address if the ticket don't have a user assigned or the user don't have a email. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # diff --git a/htdocs/public/ticket/index.php b/htdocs/public/ticket/index.php index 81d13832ca4..31ee838f6f5 100644 --- a/htdocs/public/ticket/index.php +++ b/htdocs/public/ticket/index.php @@ -82,9 +82,9 @@ llxHeaderTicket($langs->trans("Tickets"), "", 0, 0, $arrayofjs, $arrayofcss); print '
'; print '

'.($conf->global->TICKET_PUBLIC_TEXT_HOME ? $conf->global->TICKET_PUBLIC_TEXT_HOME : $langs->trans("TicketPublicDesc")).'

'; print ''; print '
'; diff --git a/htdocs/ticket/css/styles.css.php b/htdocs/ticket/css/styles.css.php index 8898dbce104..fb2a58f6fe0 100644 --- a/htdocs/ticket/css/styles.css.php +++ b/htdocs/ticket/css/styles.css.php @@ -75,18 +75,19 @@ if (!empty($conf->global->TICKET_SHOW_MODULE_LOGO)) { div.ticketform { font-family: arial; position: static; - padding: 2em 1em; +/* padding: 2em 1em; overflow-x: auto; border: 2px solid rgb(153, 153, 153); background-color: rgb(255, 255, 255); box-shadow: 2px 2px 2px rgb(245, 245, 245); border-radius: 10px 10px 10px 10px; margin: 1.5em; +*/ background : #ffffff; text-align: center; } -div.ticketform .index_create, .index_display { +div.ticketform .index_create, div.ticketform .index_display { display: inline-block; width: 200px; height: 45px;
'.$langs->trans("Parameter").'
'.$langs->trans("TicketCkEditorEmailNotActivated").'
'; print ''; + print ''; print $form->textwithpicto('', $langs->trans("TicketPublicInterfaceTopicHelp"), 1, 'help'); print '