Debug module ticket. Add error if sender email is not defined.
This commit is contained in:
parent
49a8b4544e
commit
d979f6f0f4
@ -434,21 +434,21 @@ print '</tr>';
|
||||
|
||||
// @todo Use module notification instead...
|
||||
|
||||
// Email de réception des notifications
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("TicketEmailNotificationTo").'</td>';
|
||||
// Email d'envoi des notifications
|
||||
print '<tr class="oddeven"><td class="fieldrequired">'.$langs->trans("TicketEmailNotificationFrom").'</td>';
|
||||
print '<td class="left">';
|
||||
print '<input type="text" name="TICKET_NOTIFICATION_EMAIL_TO" value="'.(!empty($conf->global->TICKET_NOTIFICATION_EMAIL_TO) ? $conf->global->TICKET_NOTIFICATION_EMAIL_TO : $conf->global->TICKET_NOTIFICATION_EMAIL_FROM).'" size="20" ></td>';
|
||||
print '<input type="text" class="minwidth200" name="TICKET_NOTIFICATION_EMAIL_FROM" value="'.$conf->global->TICKET_NOTIFICATION_EMAIL_FROM.'"></td>';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $langs->trans("TicketEmailNotificationToHelp"), 1, 'help');
|
||||
print $form->textwithpicto('', $langs->trans("TicketEmailNotificationFromHelp"), 1, 'help');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Email d'envoi des notifications
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("TicketEmailNotificationFrom").'</td>';
|
||||
// Email de réception des notifications
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("TicketEmailNotificationTo").'</td>';
|
||||
print '<td class="left">';
|
||||
print '<input type="text" name="TICKET_NOTIFICATION_EMAIL_FROM" value="'.$conf->global->TICKET_NOTIFICATION_EMAIL_FROM.'" size="20" ></td>';
|
||||
print '<input type="text" name="TICKET_NOTIFICATION_EMAIL_TO" value="'.(!empty($conf->global->TICKET_NOTIFICATION_EMAIL_TO) ? $conf->global->TICKET_NOTIFICATION_EMAIL_TO : $conf->global->TICKET_NOTIFICATION_EMAIL_FROM).'" size="20" ></td>';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $langs->trans("TicketEmailNotificationFromHelp"), 1, 'help');
|
||||
print $form->textwithpicto('', $langs->trans("TicketEmailNotificationToHelp"), 1, 'help');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
@ -218,6 +218,8 @@ if ($action == 'create_ticket' && GETPOST('add', 'alpha')) {
|
||||
|
||||
$from = $conf->global->MAIN_INFO_SOCIETE_NOM . '<' . $conf->global->TICKET_NOTIFICATION_EMAIL_FROM . '>';
|
||||
$replyto = $from;
|
||||
$sendtocc = '';
|
||||
$deliveryreceipt = 0;
|
||||
|
||||
$message = dol_nl2br($message);
|
||||
|
||||
@ -359,14 +361,19 @@ if ($action != "infos_success") {
|
||||
|
||||
$formticket->param = array('returnurl' => $_SERVER['PHP_SELF'].($conf->entity > 1 ? '?entity='.$conf->entity : ''));
|
||||
|
||||
if (empty($defaultref)) {
|
||||
$defaultref = '';
|
||||
}
|
||||
|
||||
print load_fiche_titre($langs->trans('NewTicket'), '', '', 0, 0, 'marginleftonly');
|
||||
|
||||
print '<div class="info marginleftonly marginrightonly">' . $langs->trans('TicketPublicInfoCreateTicket') . '</div>';
|
||||
$formticket->showForm();
|
||||
if (empty($conf->global->TICKET_NOTIFICATION_EMAIL_FROM)) {
|
||||
$langs->load("errors");
|
||||
print '<div class="error">';
|
||||
print $langs->trans("ErrorFieldRequired", $langs->transnoentities("TicketEmailNotificationFrom")).'<br>';
|
||||
print $langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentities("Ticket"));
|
||||
print '<div>';
|
||||
}
|
||||
else {
|
||||
print '<div class="info marginleftonly marginrightonly">' . $langs->trans('TicketPublicInfoCreateTicket') . '</div>';
|
||||
$formticket->showForm();
|
||||
}
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
|
||||
@ -144,11 +144,7 @@ div.ticketform .blue:hover {
|
||||
border:solid 1px rgba(168,168,168,.4);
|
||||
border-top:solid 1px f8f8f8;
|
||||
background-color: #f8f8f8;
|
||||
background-image: -o-linear-gradient(top, rgba(250,250,250,.6) 0%, rgba(192,192,192,.3) 100%);
|
||||
background-image: -moz-linear-gradient(top, rgba(250,250,250,.6) 0%, rgba(192,192,192,.3) 100%);
|
||||
background-image: -webkit-linear-gradient(top, rgba(250,250,250,.6) 0%, rgba(192,192,192,.3) 100%);
|
||||
background-image: -ms-linear-gradient(top, rgba(250,250,250,.6) 0%, rgba(192,192,192,.3) 100%);
|
||||
background-image: linear-gradient(top, rgba(250,250,250,.6) 0%, rgba(192,192,192,.3) 100%);
|
||||
}
|
||||
|
||||
#form_create_ticket input.text,
|
||||
#form_create_ticket textarea { width:450px;}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user