Skip to content

Commit

Permalink
Merge branch 'develop' into fix_time_pdf_time_spent
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy authored Feb 12, 2025
2 parents 96fdc43 + 3823945 commit 335da91
Show file tree
Hide file tree
Showing 21 changed files with 341 additions and 121 deletions.
14 changes: 8 additions & 6 deletions htdocs/admin/mails.php
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,7 @@ function change_smtp_auth_method() {
clearstatcache();


print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
print '<table class="noborder centpercent">';
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameters").'</td><td></td></tr>';

Expand Down Expand Up @@ -613,11 +614,11 @@ function change_smtp_auth_method() {
print '</td></tr>';

print '</table>';

print '</div>';

print '<br>';


print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
print '<table class="noborder centpercent">';
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("OtherOptions").'</td><td></td></tr>';

Expand Down Expand Up @@ -664,6 +665,7 @@ function change_smtp_auth_method() {
print '</td></tr>';

print '</table>';
print '</div>';

print dol_get_fiche_end();

Expand Down Expand Up @@ -868,7 +870,7 @@ function change_smtp_auth_method() {
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_FORCE_SENDTO").'</td><td>'.getDolGlobalString('MAIN_MAIL_FORCE_SENDTO');
if (getDolGlobalString('MAIN_MAIL_FORCE_SENDTO')) {
if (!isValidEmail(getDolGlobalString('MAIN_MAIL_FORCE_SENDTO'))) {
print img_warning($langs->trans("ErrorBadEMail"));
print img_warning($langs->trans("ErrorBadEMail", getDolGlobalString('MAIN_MAIL_FORCE_SENDTO')));
} else {
print img_warning($langs->trans("RecipientEmailsWillBeReplacedWithThisValue"));
}
Expand All @@ -892,7 +894,7 @@ function change_smtp_auth_method() {
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_FORCE_SENDTO").'</td><td>'.getDolGlobalString('MAIN_MAIL_FORCE_SENDTO');
if (getDolGlobalString('MAIN_MAIL_FORCE_SENDTO')) {
if (!isValidEmail(getDolGlobalString('MAIN_MAIL_FORCE_SENDTO'))) {
print img_warning($langs->trans("ErrorBadEMail"));
print img_warning($langs->trans("ErrorBadEMail", getDolGlobalString('MAIN_MAIL_FORCE_SENDTO')));
} else {
print img_warning($langs->trans("RecipientEmailsWillBeReplacedWithThisValue"));
}
Expand All @@ -910,7 +912,7 @@ function change_smtp_auth_method() {
if (!getDolGlobalString('MAIN_MAIL_EMAIL_FROM')) {
print img_warning($langs->trans("Mandatory"));
} elseif (!isValidEmail(getDolGlobalString('MAIN_MAIL_EMAIL_FROM'))) {
print img_warning($langs->trans("ErrorBadEMail"));
print img_warning($langs->trans("ErrorBadEMail", getDolGlobalString('MAIN_MAIL_EMAIL_FROM')));
}
print '</td></tr>';

Expand Down Expand Up @@ -958,7 +960,7 @@ function change_smtp_auth_method() {
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_ERRORS_TO").'</td>';
print '<td>'.(getDolGlobalString('MAIN_MAIL_ERRORS_TO'));
if (getDolGlobalString('MAIN_MAIL_ERRORS_TO') && !isValidEmail(getDolGlobalString('MAIN_MAIL_ERRORS_TO'))) {
print img_warning($langs->trans("ErrorBadEMail"));
print img_warning($langs->trans("ErrorBadEMail", getDolGlobalString('MAIN_MAIL_ERRORS_TO')));
}
print '</td></tr>';

Expand Down
55 changes: 55 additions & 0 deletions htdocs/admin/mails_passwordreset.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@
dolibarr_set_const($db, "MAIN_MAIL_EMAIL_STARTTLS_PASSWORDRESET", GETPOST("MAIN_MAIL_EMAIL_STARTTLS_PASSWORDRESET"), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_PASSWORDRESET", GETPOST("MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_PASSWORDRESET"), 'chaine', 0, '', $conf->entity);

if (GETPOSTISSET("MAIN_MAIL_EMAIL_FROM_PASSWORDRESET")) {
dolibarr_set_const($db, "MAIN_MAIL_EMAIL_FROM_PASSWORDRESET", GETPOST("MAIN_MAIL_EMAIL_FROM_PASSWORDRESET", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
}

header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup");
exit;
}
Expand Down Expand Up @@ -349,6 +353,7 @@ function change_smtp_auth_method() {

clearstatcache();

print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
print '<table class="noborder centpercent">';
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameters").'</td><td></td></tr>';

Expand Down Expand Up @@ -553,6 +558,26 @@ function change_smtp_auth_method() {
print '</td></tr>';

print '</table>';
print '</div>';

print '<br>';


print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
print '<table class="noborder centpercent">';
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("OtherOptions").'</td><td></td></tr>';

// From
$help = $form->textwithpicto('', $langs->trans("EMailHelpMsgSPFDKIM"));
print '<tr class="oddeven"><td class="">';
print $langs->trans("MAIN_MAIL_EMAIL_FROM", ini_get('sendmail_from') ? ini_get('sendmail_from') : $langs->transnoentities("Undefined"));
print ' '.$help;
print '</td>';
print '<td><input class="flat minwidth300" name="MAIN_MAIL_EMAIL_FROM_PASSWORDRESET" value="'.getDolGlobalString('MAIN_MAIL_EMAIL_FROM_PASSWORDRESET');
print '"></td></tr>';

print '</table>';
print '</div>';

print dol_get_fiche_end();

Expand Down Expand Up @@ -685,6 +710,36 @@ function change_smtp_auth_method() {
print '</table>';
print '</div>';


print '<br>';


print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
print '<table class="noborder centpercent">';
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("OtherOptions").'</td><td></td></tr>';

// From
$help = $form->textwithpicto('', $langs->trans("EMailHelpMsgSPFDKIM"));
print '<tr class="oddeven"><td>';
print $langs->trans("MAIN_MAIL_EMAIL_FROM", ini_get('sendmail_from') ? ini_get('sendmail_from') : $langs->transnoentities("Undefined"));
print ' '.$help;
print '</td>';
print '<td>';
if (!getDolGlobalString('MAIN_MAIL_EMAIL_FROM_PASSWORDRESET')) {
print '<span class="opacitymedium">'.getDolGlobalString('MAIN_MAIL_EMAIL_FROM').'</span>';
} else {
print getDolGlobalString('MAIN_MAIL_EMAIL_FROM_PASSWORDRESET');
}
if (!getDolGlobalString('MAIN_MAIL_EMAIL_FROM') && !getDolGlobalString('MAIN_MAIL_EMAIL_FROM_PASSWORDRESET')) {
print img_warning($langs->trans("Mandatory"));
} elseif (getDolGlobalString('MAIN_MAIL_EMAIL_FROM_PASSWORDRESET') && !isValidEmail(getDolGlobalString('MAIN_MAIL_EMAIL_FROM_PASSWORDRESET'))) {
print img_warning($langs->trans("ErrorBadEMail", getDolGlobalString('MAIN_MAIL_EMAIL_FROM_PASSWORDRESET')));
}
print '</td></tr>';

print '</table>';
print '</div>';

print dol_get_fiche_end();


Expand Down
Loading

0 comments on commit 335da91

Please sign in to comment.