Skip to content

Commit

Permalink
Merge branch '18.0' into patch-10
Browse files Browse the repository at this point in the history
  • Loading branch information
frederic34 authored Dec 3, 2024
2 parents 29a7a41 + c547362 commit d04b1e5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion htdocs/admin/mails.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

$usersignature = $user->signature;
// For action = test or send, we ensure that content is not html, even for signature, because for this we want a test with NO html.
if ($action == 'test' || ($action == 'send' && $trackid = 'test')) {
if ($action == 'test' || ($action == 'send' && $trackid == 'test')) {
$usersignature = dol_string_nohtmltag($usersignature, 2);
}

Expand Down
4 changes: 4 additions & 0 deletions htdocs/core/class/commonobject.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -8210,6 +8210,10 @@ public function showOptionals($extrafields, $mode = 'view', $params = null, $key
if (($mode == 'create') && abs($visibility) != 1 && abs($visibility) != 3) {
continue; // <> -1 and <> 1 and <> 3 = not visible on forms, only on list
} elseif (($mode == 'edit') && abs($visibility) != 1 && abs($visibility) != 3 && abs($visibility) != 4) {
// We need to make sure, that the values of hidden extrafields are also part of $_POST. Otherwise, they would be empty after an update of the object. See also getOptionalsFromPost
$ef_name = 'options_' . $key;
$ef_value = $this->array_options[$ef_name];
$out .= '<input type="hidden" name="' . $ef_name . '" id="' . $ef_name . '" value="' . $ef_value . '" />' . "\n";
continue; // <> -1 and <> 1 and <> 3 = not visible on forms, only on list and <> 4 = not visible at the creation
} elseif ($mode == 'view' && empty($visibility)) {
continue;
Expand Down
10 changes: 10 additions & 0 deletions htdocs/core/tpl/extrafields_list_search_param.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@
$param .= '&'.$search_options_pattern.$tmpkey.'[]='.urlencode($val2);
}
} else {
// test if we have checkbox type, we add the _multiselect needed into param
$tmpkey = preg_replace('/'.$search_options_pattern.'/', '', $key);
if (in_array($extrafields->attributes[$extrafieldsobjectkey]['type'][$tmpkey], array('checkbox', 'chkbxlst'))) {
$param .= '&'.$search_options_pattern.$tmpkey.'_multiselect='.urlencode($val);
}
// test if we have boolean type, we add the _booleand needed into param
if (in_array($extrafields->attributes[$extrafieldsobjectkey]['type'][$tmpkey], array('boolean'))) {
$param .= '&'.$search_options_pattern.$tmpkey.'_boolean='.urlencode($val);
}

$param .= '&'.$search_options_pattern.$tmpkey.'='.urlencode($val);
}
}
Expand Down

0 comments on commit d04b1e5

Please sign in to comment.