NEW Add hidden option MAIN_EMAIL_SUPPORT_ACK
This commit is contained in:
parent
8929c663fd
commit
51c299ffbb
@ -2855,11 +2855,7 @@ if ($action == 'create') {
|
||||
// Send
|
||||
if (empty($user->socid)) {
|
||||
if ($object->statut == Propal::STATUS_VALIDATED || $object->statut == Propal::STATUS_SIGNED || !empty($conf->global->PROPOSAL_SENDBYEMAIL_FOR_ALL_STATUS)) {
|
||||
if ($usercansend) {
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&token='.newToken().'&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a>';
|
||||
} else {
|
||||
print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotEnoughPermissions").'">'.$langs->trans('SendMail').'</a>';
|
||||
}
|
||||
print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?action=presend&token='.newToken().'&id='.$object->id.'&mode=init#formmailbeforetitle', '', $usercansend);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1385,6 +1385,7 @@ if (empty($reshook)) {
|
||||
$object->note_public = trim(GETPOST('note_public', 'restricthtml'));
|
||||
$object->note_private = trim(GETPOST('note_private', 'restricthtml'));
|
||||
$object->ref_client = GETPOST('ref_client');
|
||||
$object->ref_customer = GETPOST('ref_client');
|
||||
$object->model_pdf = GETPOST('model');
|
||||
$object->fk_project = GETPOST('projectid', 'int');
|
||||
$object->cond_reglement_id = (GETPOST('type') == 3 ? 1 : GETPOST('cond_reglement_id'));
|
||||
|
||||
@ -521,7 +521,8 @@ class FormMail extends Form
|
||||
))) {
|
||||
// If list of template is empty
|
||||
$out .= '<div class="center" style="padding: 0px 0 12px 0">'."\n";
|
||||
$out .= $langs->trans('SelectMailModel').': <select name="modelmailselected" disabled="disabled"><option value="none">'.$langs->trans("NoTemplateDefined").'</option></select>'; // Do not put 'disabled' on 'option' tag, it is already on 'select' and it makes chrome crazy.
|
||||
$out .= '<span class="opacitymedium">'.$langs->trans('SelectMailModel').':</span> ';
|
||||
$out .= '<select name="modelmailselected" disabled="disabled"><option value="none">'.$langs->trans("NoTemplateDefined").'</option></select>'; // Do not put 'disabled' on 'option' tag, it is already on 'select' and it makes chrome crazy.
|
||||
if ($user->admin) {
|
||||
$out .= info_admin($langs->trans("YouCanChangeValuesForThisListFrom", $langs->transnoentitiesnoconv('Setup').' - '.$langs->transnoentitiesnoconv('EMails')), 1);
|
||||
}
|
||||
@ -750,7 +751,7 @@ class FormMail extends Form
|
||||
}
|
||||
|
||||
// Ask delivery receipt
|
||||
if (!empty($this->withdeliveryreceipt)) {
|
||||
if (!empty($this->withdeliveryreceipt) && getDolGlobalInt('MAIN_EMAIL_SUPPORT_ACK')) {
|
||||
$out .= $this->getHtmlForDeliveryReceipt();
|
||||
}
|
||||
|
||||
|
||||
@ -10461,14 +10461,14 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st
|
||||
/**
|
||||
* Function dolGetButtonAction
|
||||
*
|
||||
* @param string $label label or tooltip of button. Also used as tooltip in title attribute. Can be escaped HTML content or full simple text.
|
||||
* @param string $text optional : short label on button. Can be escaped HTML content or full simple text.
|
||||
* @param string $actionType default, delete, danger
|
||||
* @param string $url the url for link
|
||||
* @param string $id attribute id of button
|
||||
* @param int $userRight user action right
|
||||
* @param string $label Label or tooltip of button. Also used as tooltip in title attribute. Can be escaped HTML content or full simple text.
|
||||
* @param string $text Optional : short label on button. Can be escaped HTML content or full simple text.
|
||||
* @param string $actionType 'default', 'delete', 'danger'
|
||||
* @param string $url Url for link
|
||||
* @param string $id Attribute id of button
|
||||
* @param int|boolean $userRight User action right
|
||||
* // phpcs:disable
|
||||
* @param array $params = [ // Various params for future : recommended rather than adding more function arguments
|
||||
* @param array $params = [ // Various params for future : recommended rather than adding more function arguments
|
||||
* 'attr' => [ // to add or override button attributes
|
||||
* 'xxxxx' => '', // your xxxxx attribute you want
|
||||
* 'class' => '', // to add more css class to the button class attribute
|
||||
@ -10485,7 +10485,7 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st
|
||||
* ],
|
||||
* ]
|
||||
* // phpcs:enable
|
||||
* @return string html button
|
||||
* @return string html button
|
||||
*/
|
||||
function dolGetButtonAction($label, $text = '', $actionType = 'default', $url = '', $id = '', $userRight = 1, $params = array())
|
||||
{
|
||||
@ -10517,6 +10517,7 @@ function dolGetButtonAction($label, $text = '', $actionType = 'default', $url =
|
||||
if (empty($userRight)) {
|
||||
$attr['class'] = 'butActionRefused';
|
||||
$attr['href'] = '';
|
||||
$attr['title'] = $langs->trans('NotEnoughPermissions');
|
||||
}
|
||||
|
||||
if (!empty($id)) {
|
||||
|
||||
@ -206,8 +206,8 @@ TicketSeverity=Severity
|
||||
ShowTicket=See ticket
|
||||
RelatedTickets=Related tickets
|
||||
TicketAddIntervention=Create intervention
|
||||
CloseTicket=Close|Solve ticket
|
||||
AbandonTicket=Abandon ticket
|
||||
CloseTicket=Close|Solve
|
||||
AbandonTicket=Abandon
|
||||
CloseATicket=Close|Solve a ticket
|
||||
ConfirmCloseAticket=Confirm ticket closing
|
||||
ConfirmAbandonTicket=Do you confirm the closing of the ticket to status 'Abandonned'
|
||||
|
||||
@ -1286,7 +1286,7 @@ if ($action == 'create' && $user->rights->projet->creer) {
|
||||
// Send
|
||||
if (empty($user->socid)) {
|
||||
if ($object->statut != Project::STATUS_CLOSED) {
|
||||
print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?action=presend&token='.newToken().'&id='.$object->id.'&mode=init#formmailbeforetitle', '');
|
||||
print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?action=presend&token='.newToken().'&id='.$object->id.'&mode=init#formmailbeforetitle', '');
|
||||
}
|
||||
}
|
||||
|
||||
@ -1306,7 +1306,7 @@ if ($action == 'create' && $user->rights->projet->creer) {
|
||||
// Modify
|
||||
if ($object->statut != Project::STATUS_CLOSED && $user->rights->projet->creer) {
|
||||
if ($userWrite > 0) {
|
||||
print dolGetButtonAction('', $langs->trans('Modify'), 'default', $_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'&id='.$object->id, '');
|
||||
print dolGetButtonAction('', $langs->trans('Modify'), 'default', $_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'&id='.$object->id, '');
|
||||
} else {
|
||||
print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Modify'), 'default', $_SERVER['PHP_SELF']. '#', '', false);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user