mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 17:18:13 +01:00
Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
@@ -520,6 +520,7 @@ if (!$rowid && $action != 'create' && $action != 'edit') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Creation
|
// Creation
|
||||||
if ($action == 'create') {
|
if ($action == 'create') {
|
||||||
print load_fiche_titre($langs->trans("NewMemberType"), '', 'members');
|
print load_fiche_titre($langs->trans("NewMemberType"), '', 'members');
|
||||||
@@ -642,14 +643,18 @@ if ($rowid > 0) {
|
|||||||
print yn($object->vote);
|
print yn($object->vote);
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Duration
|
$durationarray = array();
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("Duration").'</td><td colspan="2">'.$object->duration_value.' ';
|
|
||||||
if ($object->duration_value > 1) {
|
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"));
|
$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"));
|
||||||
} elseif ($object->duration_value > 0) {
|
} else {
|
||||||
$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("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 '<tr><td class="titlefield">'.$langs->trans("Duration").'</td><td colspan="2">';
|
||||||
|
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 '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Description
|
// Description
|
||||||
@@ -1071,7 +1076,7 @@ if ($rowid > 0) {
|
|||||||
|
|
||||||
print '<tr><td>'.$langs->trans("Amount").'</td><td>';
|
print '<tr><td>'.$langs->trans("Amount").'</td><td>';
|
||||||
print '<input name="amount" size="5" value="';
|
print '<input name="amount" size="5" value="';
|
||||||
print((is_null($object->amount) || $object->amount === '') ? '' : price($object->amount));
|
print ((is_null($object->amount) || $object->amount === '') ? '' : price($object->amount));
|
||||||
print '">';
|
print '">';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@@ -1084,7 +1089,7 @@ if ($rowid > 0) {
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("Duration").'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans("Duration").'</td><td colspan="3">';
|
||||||
print '<input name="duration_value" size="5" value="'.$object->duration_value.'"> ';
|
print '<input name="duration_value" size="5" value="'.($object->duration_value > 0 ? $object->duration_value : '').'"> ';
|
||||||
print $formproduct->selectMeasuringUnits("duration_unit", "time", ($object->duration_unit === '' ? 'y' : $object->duration_unit), 0, 1);
|
print $formproduct->selectMeasuringUnits("duration_unit", "time", ($object->duration_unit === '' ? 'y' : $object->duration_unit), 0, 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|||||||
@@ -472,10 +472,13 @@ if ($action == 'edit') {
|
|||||||
$vartosmtpstype = 'MAIN_MAIL_SMTPS_AUTH_TYPE';
|
$vartosmtpstype = 'MAIN_MAIL_SMTPS_AUTH_TYPE';
|
||||||
if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) {
|
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)
|
// 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 '<input type="radio" id="radio_none" name="'.$vartosmtpstype.'" value="NONE"'.(getDolGlobalString($vartosmtpstype) == 'NONE' ? ' checked' : '').'> ';
|
||||||
|
print '<label for="radio_none" >'.$langs->trans("UseAUTHNONE").'</label>';
|
||||||
|
print '<br>';
|
||||||
print '<input type="radio" id="radio_pw" name="'.$vartosmtpstype.'" value="LOGIN"'.(getDolGlobalString($vartosmtpstype, 'LOGIN') == 'LOGIN' ? ' checked' : '').'> ';
|
print '<input type="radio" id="radio_pw" name="'.$vartosmtpstype.'" value="LOGIN"'.(getDolGlobalString($vartosmtpstype, 'LOGIN') == 'LOGIN' ? ' checked' : '').'> ';
|
||||||
print '<label for="radio_pw" >'.$langs->trans("UseAUTHLOGIN").'</label>';
|
print '<label for="radio_pw" >'.$langs->trans("UseAUTHLOGIN").'</label>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print '<input type="radio" id="radio_plain" name="'.$vartosmtpstype.'" value="PLAIN"'.(getDolGlobalString($vartosmtpstype, 'PLAIN') == 'PLAIN' ? ' checked' : '').'> ';
|
print '<input type="radio" id="radio_plain" name="'.$vartosmtpstype.'" value="PLAIN"'.(getDolGlobalString($vartosmtpstype) == 'PLAIN' ? ' checked' : '').'> ';
|
||||||
print '<label for="radio_plain" >'.$langs->trans("UseAUTHPLAIN").'</label>';
|
print '<label for="radio_plain" >'.$langs->trans("UseAUTHPLAIN").'</label>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print '<input type="radio" id="radio_oauth" name="'.$vartosmtpstype.'" value="XOAUTH2"'.(getDolGlobalString($vartosmtpstype) == 'XOAUTH2' ? ' checked' : '').(isModEnabled('oauth') ? '' : ' disabled').'> ';
|
print '<input type="radio" id="radio_oauth" name="'.$vartosmtpstype.'" value="XOAUTH2"'.(getDolGlobalString($vartosmtpstype) == 'XOAUTH2' ? ' checked' : '').(isModEnabled('oauth') ? '' : ' disabled').'> ';
|
||||||
@@ -733,7 +736,9 @@ if ($action == 'edit') {
|
|||||||
if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer'))) {
|
if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer'))) {
|
||||||
$authtype = getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE', 'LOGIN');
|
$authtype = getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE', 'LOGIN');
|
||||||
$text = '';
|
$text = '';
|
||||||
if ($authtype === "LOGIN") {
|
if ($authtype === "NONE") {
|
||||||
|
$text = $langs->trans("None");
|
||||||
|
} elseif ($authtype === "LOGIN") {
|
||||||
$text = $langs->trans("UseAUTHLOGIN");
|
$text = $langs->trans("UseAUTHLOGIN");
|
||||||
} elseif ($authtype === "PLAIN") {
|
} elseif ($authtype === "PLAIN") {
|
||||||
$text = $langs->trans("UseAUTHPLAIN");
|
$text = $langs->trans("UseAUTHPLAIN");
|
||||||
|
|||||||
@@ -13153,26 +13153,12 @@ function dolGetButtonAction($label, $text = '', $actionType = 'default', $url =
|
|||||||
unset($attr['href']);
|
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();
|
$TCompiledAttr = array();
|
||||||
foreach ($attr as $key => $value) {
|
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);
|
$value = dolPrintHTMLForAttributeUrl($value);
|
||||||
} else {
|
} else {
|
||||||
$value = dolPrintHTMLForAttribute($value);
|
$value = dolPrintHTMLForAttribute($value);
|
||||||
|
|||||||
@@ -2444,6 +2444,7 @@ DontForgetCreateTokenOauthMod=A token with the right permissions must have been
|
|||||||
AuthenticationMethod=Authentication method
|
AuthenticationMethod=Authentication method
|
||||||
MAIN_MAIL_SMTPS_AUTH_TYPE=Authentication method
|
MAIN_MAIL_SMTPS_AUTH_TYPE=Authentication method
|
||||||
UsePassword=Use a password
|
UsePassword=Use a password
|
||||||
|
UseAUTHNONE=Use no authentication (try also with or without the SMTP user ID)
|
||||||
UseAUTHLOGIN=Use a password (AUTH LOGIN)
|
UseAUTHLOGIN=Use a password (AUTH LOGIN)
|
||||||
UseAUTHPLAIN=Use a password (AUTH PLAIN)
|
UseAUTHPLAIN=Use a password (AUTH PLAIN)
|
||||||
UseOauth=Use a OAUTH token
|
UseOauth=Use a OAUTH token
|
||||||
@@ -2639,4 +2640,4 @@ NotConnected=Not connected
|
|||||||
HTTPHeaderEditor=This page allows you to edit security related HTTP headers
|
HTTPHeaderEditor=This page allows you to edit security related HTTP headers
|
||||||
ReservedToAdvancedUsers=It is reserverd for advanced users
|
ReservedToAdvancedUsers=It is reserverd for advanced users
|
||||||
HTTPHeader=HTTP Header
|
HTTPHeader=HTTP Header
|
||||||
RefWebsite=Website reference
|
RefWebsite=Website reference
|
||||||
|
|||||||
@@ -1245,7 +1245,7 @@ if (getDolGlobalString('MAIN_SEARCH_CATEGORY_CUSTOMER_ON_PROJECT_LIST') && isMod
|
|||||||
|
|
||||||
// alert on late date
|
// alert on late date
|
||||||
$moreforfilter .= '<div class="divsearchfield">';
|
$moreforfilter .= '<div class="divsearchfield">';
|
||||||
$moreforfilter .= $langs->trans('Alert').' <input type="checkbox" name="search_option" value="late"'.($search_option == 'late' ? ' checked' : '').'>';
|
$moreforfilter .= '<label for="search_option" title="'.$langs->trans("Late").'">'.$langs->trans('Alert').' </label><input type="checkbox" id="search_option" name="search_option" value="late"'.($search_option == 'late' ? ' checked' : '').'>';
|
||||||
$moreforfilter .= '</div>';
|
$moreforfilter .= '</div>';
|
||||||
|
|
||||||
if (getDolGlobalInt('PROJECT_ENABLE_SUB_PROJECT')) {
|
if (getDolGlobalInt('PROJECT_ENABLE_SUB_PROJECT')) {
|
||||||
|
|||||||
Reference in New Issue
Block a user