Skip to content

Commit 0f98f66

Browse files
committed
Merge branch '5.0/inline-edit-always-cfs' into 5.0-trunk
2 parents caeb1e9 + df3737d commit 0f98f66

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

share/html/Elements/EditCustomFieldSelect

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
% if ( $checktype eq 'radio' ) {
6363
% if ( $show_empty_option ) {
6464
<div class="none custom-control custom-radio">
65-
<input class="none custom-control-input" id="<% $name %>-none" type="<% $checktype %>" name="<% $name %>" id="<% $name %>-none" value="" <% keys %default ? '' : ' checked="checked"' |n%> />
65+
<input class="none custom-control-input" id="<% $name %>-none" type="<% $checktype %>" name="<% $name %>" value="" <% keys %default ? '' : ' checked="checked"' |n%> />
6666
<label class="custom-control-label" for="<% $name %>-none"><&|/l&>(no value)</&></label>
6767
</div>
6868
% }

share/static/js/util.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1421,7 +1421,11 @@ jQuery(function () {
14211421
}
14221422

14231423
/* skip duplicates, such as ticket id */
1424-
if (currentForm.find('[name="' + field.attr('name') + '"]').length > 0) {
1424+
/* Specifically exclude radio and checkbox because the name of all inputs are the same
1425+
* so checked values don't get properly submitted. This results in these CFs getting
1426+
* unset when a field in another portlet is updated because the current value isn't
1427+
* submitted. */
1428+
if (field.attr('type') != 'radio' && field.attr('type') != 'checkbox' && currentForm.find('[name="' + field.attr('name') + '"]').length > 0) {
14251429
return;
14261430
}
14271431

0 commit comments

Comments
 (0)