diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php
index ab9e2462cc2..0ed42f226b8 100644
--- a/htdocs/adherents/type.php
+++ b/htdocs/adherents/type.php
@@ -520,6 +520,7 @@ if (!$rowid && $action != 'create' && $action != 'edit') {
}
}
+
// Creation
if ($action == 'create') {
print load_fiche_titre($langs->trans("NewMemberType"), '', 'members');
@@ -642,14 +643,18 @@ if ($rowid > 0) {
print yn($object->vote);
print '';
- // Duration
- print '
| '.$langs->trans("Duration").' | '.$object->duration_value.' ';
+ $durationarray = array();
if ($object->duration_value > 1) {
- $dur = array("i" => $langs->trans("Minutes"), "h" => $langs->trans("Hours"), "d" => $langs->trans("Days"), "w" => $langs->trans("Weeks"), "m" => $langs->trans("Months"), "y" => $langs->trans("Years"));
- } elseif ($object->duration_value > 0) {
- $dur = array("i" => $langs->trans("Minute"), "h" => $langs->trans("Hour"), "d" => $langs->trans("Day"), "w" => $langs->trans("Week"), "m" => $langs->trans("Month"), "y" => $langs->trans("Year"));
+ $durationarray = array("s" => $langs->trans("Seconds"), "mn" => $langs->trans("Minutes"), "i" => $langs->trans("Minutes"), "h" => $langs->trans("Hours"), "d" => $langs->trans("Days"), "w" => $langs->trans("Weeks"), "m" => $langs->trans("Months"), "y" => $langs->trans("Years"));
+ } else {
+ $durationarray = array("s" => $langs->trans("Seconds"), "mn" => $langs->trans("Minutes"), "i" => $langs->trans("Minute"), "h" => $langs->trans("Hour"), "d" => $langs->trans("Day"), "w" => $langs->trans("Week"), "m" => $langs->trans("Month"), "y" => $langs->trans("Year"));
}
- print(!empty($object->duration_unit) && isset($dur[$object->duration_unit]) ? $langs->trans($dur[$object->duration_unit]) : '')." ";
+
+ // Duration
+ print ' |
| '.$langs->trans("Duration").' | ';
+ print $object->duration_value > 0 ? $object->duration_value : '';
+ print ' ';
+ print (!empty($object->duration_unit) && isset($durationarray[$object->duration_unit]) ? $langs->trans($durationarray[$object->duration_unit]) : '');
print ' |
';
// Description
@@ -1071,7 +1076,7 @@ if ($rowid > 0) {
print '| '.$langs->trans("Amount").' | ';
print '';
print ' |
';
@@ -1084,7 +1089,7 @@ if ($rowid > 0) {
print '';
print '| '.$langs->trans("Duration").' | ';
- print ' ';
+ print ' ';
print $formproduct->selectMeasuringUnits("duration_unit", "time", ($object->duration_unit === '' ? 'y' : $object->duration_unit), 0, 1);
print ' |
';
diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php
index b32c64b8b35..48a17e1fdf7 100644
--- a/htdocs/admin/mails.php
+++ b/htdocs/admin/mails.php
@@ -472,10 +472,13 @@ if ($action == 'edit') {
$vartosmtpstype = 'MAIN_MAIL_SMTPS_AUTH_TYPE';
if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) {
// Note: Default value for MAIN_MAIL_SMTPS_AUTH_TYPE if not defined is 'LOGIN' (but login/pass may be empty and they won't be provided in such a case)
+ print ' ';
+ print '';
+ print '
';
print ' ';
print '';
print '
';
- print ' ';
+ print ' ';
print '';
print '
';
print ' ';
@@ -733,7 +736,9 @@ if ($action == 'edit') {
if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer'))) {
$authtype = getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE', 'LOGIN');
$text = '';
- if ($authtype === "LOGIN") {
+ if ($authtype === "NONE") {
+ $text = $langs->trans("None");
+ } elseif ($authtype === "LOGIN") {
$text = $langs->trans("UseAUTHLOGIN");
} elseif ($authtype === "PLAIN") {
$text = $langs->trans("UseAUTHPLAIN");
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 8cb159b4fbd..3e002b9e651 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -13153,26 +13153,12 @@ function dolGetButtonAction($label, $text = '', $actionType = 'default', $url =
unset($attr['href']);
}
- // Escape all attributes
- if (!empty($params['use_unsecured_unescapedattr'])) { // Not recommended.
- if (is_array($params['use_unsecured_unescapedattr'])) {
- foreach ($attr as $attrK => $attrV) {
- if (in_array($attrK, $params['use_unsecured_unescapedattr'])) {
- $attr[$attrK] = dol_htmlentities($attrV, ENT_QUOTES | ENT_SUBSTITUTE);
- } else {
- $attr[$attrK] = dolPrintHTMLForAttribute($attrV);
- }
- }
- } else {
- $attr = array_map('dol_htmlentities', $attr);
- }
- } else {
- $attr = array_map('dolPrintHTMLForAttribute', $attr);
- }
-
$TCompiledAttr = array();
foreach ($attr as $key => $value) {
- if ($key == 'href') {
+ if (!empty($params['use_unsecured_unescapedattr']) && is_array($params['use_unsecured_unescapedattr']) && in_array($key, $params['use_unsecured_unescapedattr'])) {
+ // Not recommended
+ $value = dol_htmlentities($attrV, ENT_QUOTES | ENT_SUBSTITUTE);
+ } elseif ($key == 'href') {
$value = dolPrintHTMLForAttributeUrl($value);
} else {
$value = dolPrintHTMLForAttribute($value);
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 261d0066f0d..478374b6214 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -2444,6 +2444,7 @@ DontForgetCreateTokenOauthMod=A token with the right permissions must have been
AuthenticationMethod=Authentication method
MAIN_MAIL_SMTPS_AUTH_TYPE=Authentication method
UsePassword=Use a password
+UseAUTHNONE=Use no authentication (try also with or without the SMTP user ID)
UseAUTHLOGIN=Use a password (AUTH LOGIN)
UseAUTHPLAIN=Use a password (AUTH PLAIN)
UseOauth=Use a OAUTH token
@@ -2639,4 +2640,4 @@ NotConnected=Not connected
HTTPHeaderEditor=This page allows you to edit security related HTTP headers
ReservedToAdvancedUsers=It is reserverd for advanced users
HTTPHeader=HTTP Header
-RefWebsite=Website reference
\ No newline at end of file
+RefWebsite=Website reference
diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php
index 42b6b585810..7a2b1dd6e0d 100644
--- a/htdocs/projet/list.php
+++ b/htdocs/projet/list.php
@@ -1245,7 +1245,7 @@ if (getDolGlobalString('MAIN_SEARCH_CATEGORY_CUSTOMER_ON_PROJECT_LIST') && isMod
// alert on late date
$moreforfilter .= '';
-$moreforfilter .= $langs->trans('Alert').' ';
+$moreforfilter .= '';
$moreforfilter .= '
';
if (getDolGlobalInt('PROJECT_ENABLE_SUB_PROJECT')) {