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
|
// Send
|
||||||
if (empty($user->socid)) {
|
if (empty($user->socid)) {
|
||||||
if ($object->statut == Propal::STATUS_VALIDATED || $object->statut == Propal::STATUS_SIGNED || !empty($conf->global->PROPOSAL_SENDBYEMAIL_FOR_ALL_STATUS)) {
|
if ($object->statut == Propal::STATUS_VALIDATED || $object->statut == Propal::STATUS_SIGNED || !empty($conf->global->PROPOSAL_SENDBYEMAIL_FOR_ALL_STATUS)) {
|
||||||
if ($usercansend) {
|
print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?action=presend&token='.newToken().'&id='.$object->id.'&mode=init#formmailbeforetitle', '', $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>';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1385,6 +1385,7 @@ if (empty($reshook)) {
|
|||||||
$object->note_public = trim(GETPOST('note_public', 'restricthtml'));
|
$object->note_public = trim(GETPOST('note_public', 'restricthtml'));
|
||||||
$object->note_private = trim(GETPOST('note_private', 'restricthtml'));
|
$object->note_private = trim(GETPOST('note_private', 'restricthtml'));
|
||||||
$object->ref_client = GETPOST('ref_client');
|
$object->ref_client = GETPOST('ref_client');
|
||||||
|
$object->ref_customer = GETPOST('ref_client');
|
||||||
$object->model_pdf = GETPOST('model');
|
$object->model_pdf = GETPOST('model');
|
||||||
$object->fk_project = GETPOST('projectid', 'int');
|
$object->fk_project = GETPOST('projectid', 'int');
|
||||||
$object->cond_reglement_id = (GETPOST('type') == 3 ? 1 : GETPOST('cond_reglement_id'));
|
$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
|
// If list of template is empty
|
||||||
$out .= '<div class="center" style="padding: 0px 0 12px 0">'."\n";
|
$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) {
|
if ($user->admin) {
|
||||||
$out .= info_admin($langs->trans("YouCanChangeValuesForThisListFrom", $langs->transnoentitiesnoconv('Setup').' - '.$langs->transnoentitiesnoconv('EMails')), 1);
|
$out .= info_admin($langs->trans("YouCanChangeValuesForThisListFrom", $langs->transnoentitiesnoconv('Setup').' - '.$langs->transnoentitiesnoconv('EMails')), 1);
|
||||||
}
|
}
|
||||||
@ -750,7 +751,7 @@ class FormMail extends Form
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Ask delivery receipt
|
// Ask delivery receipt
|
||||||
if (!empty($this->withdeliveryreceipt)) {
|
if (!empty($this->withdeliveryreceipt) && getDolGlobalInt('MAIN_EMAIL_SUPPORT_ACK')) {
|
||||||
$out .= $this->getHtmlForDeliveryReceipt();
|
$out .= $this->getHtmlForDeliveryReceipt();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10461,14 +10461,14 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st
|
|||||||
/**
|
/**
|
||||||
* Function dolGetButtonAction
|
* 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 $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 $text Optional : short label on button. Can be escaped HTML content or full simple text.
|
||||||
* @param string $actionType default, delete, danger
|
* @param string $actionType 'default', 'delete', 'danger'
|
||||||
* @param string $url the url for link
|
* @param string $url Url for link
|
||||||
* @param string $id attribute id of button
|
* @param string $id Attribute id of button
|
||||||
* @param int $userRight user action right
|
* @param int|boolean $userRight User action right
|
||||||
* // phpcs:disable
|
* // 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
|
* 'attr' => [ // to add or override button attributes
|
||||||
* 'xxxxx' => '', // your xxxxx attribute you want
|
* 'xxxxx' => '', // your xxxxx attribute you want
|
||||||
* 'class' => '', // to add more css class to the button class attribute
|
* 'class' => '', // to add more css class to the button class attribute
|
||||||
@ -10485,7 +10485,7 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st
|
|||||||
* ],
|
* ],
|
||||||
* ]
|
* ]
|
||||||
* // phpcs:enable
|
* // phpcs:enable
|
||||||
* @return string html button
|
* @return string html button
|
||||||
*/
|
*/
|
||||||
function dolGetButtonAction($label, $text = '', $actionType = 'default', $url = '', $id = '', $userRight = 1, $params = array())
|
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)) {
|
if (empty($userRight)) {
|
||||||
$attr['class'] = 'butActionRefused';
|
$attr['class'] = 'butActionRefused';
|
||||||
$attr['href'] = '';
|
$attr['href'] = '';
|
||||||
|
$attr['title'] = $langs->trans('NotEnoughPermissions');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($id)) {
|
if (!empty($id)) {
|
||||||
|
|||||||
@ -206,8 +206,8 @@ TicketSeverity=Severity
|
|||||||
ShowTicket=See ticket
|
ShowTicket=See ticket
|
||||||
RelatedTickets=Related tickets
|
RelatedTickets=Related tickets
|
||||||
TicketAddIntervention=Create intervention
|
TicketAddIntervention=Create intervention
|
||||||
CloseTicket=Close|Solve ticket
|
CloseTicket=Close|Solve
|
||||||
AbandonTicket=Abandon ticket
|
AbandonTicket=Abandon
|
||||||
CloseATicket=Close|Solve a ticket
|
CloseATicket=Close|Solve a ticket
|
||||||
ConfirmCloseAticket=Confirm ticket closing
|
ConfirmCloseAticket=Confirm ticket closing
|
||||||
ConfirmAbandonTicket=Do you confirm the closing of the ticket to status 'Abandonned'
|
ConfirmAbandonTicket=Do you confirm the closing of the ticket to status 'Abandonned'
|
||||||
|
|||||||
@ -1286,7 +1286,7 @@ if ($action == 'create' && $user->rights->projet->creer) {
|
|||||||
// Send
|
// Send
|
||||||
if (empty($user->socid)) {
|
if (empty($user->socid)) {
|
||||||
if ($object->statut != Project::STATUS_CLOSED) {
|
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
|
// Modify
|
||||||
if ($object->statut != Project::STATUS_CLOSED && $user->rights->projet->creer) {
|
if ($object->statut != Project::STATUS_CLOSED && $user->rights->projet->creer) {
|
||||||
if ($userWrite > 0) {
|
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 {
|
} else {
|
||||||
print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Modify'), 'default', $_SERVER['PHP_SELF']. '#', '', false);
|
print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Modify'), 'default', $_SERVER['PHP_SELF']. '#', '', false);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user