diff --git a/share/html/Admin/CustomFields/Modify.html b/share/html/Admin/CustomFields/Modify.html index 6e35d8da722..904eaea04d4 100644 --- a/share/html/Admin/CustomFields/Modify.html +++ b/share/html/Admin/CustomFields/Modify.html @@ -181,7 +181,7 @@ % if ( $CustomFieldObj->SupportDefaultValues ) { <&| /Elements/LabeledValue, Label => loc("Default [numerate,_1,value,values]", $CustomFieldObj->MaxValues), Class => $default_value_class &> - <& /Elements/EditCustomField, NamePrefix => 'Default-', CustomField => $CustomFieldObj, ShowEmptyOption => 1 &> + <& /Elements/EditCustomField, NamePrefix => 'Default-', CustomField => $CustomFieldObj, ShowEmptyOption => 1, Required => 0 &> % } diff --git a/share/html/Admin/Queues/DefaultValues.html b/share/html/Admin/Queues/DefaultValues.html index 0cde0c46ddd..3f69b0fb2ec 100644 --- a/share/html/Admin/Queues/DefaultValues.html +++ b/share/html/Admin/Queues/DefaultValues.html @@ -68,6 +68,8 @@ CustomFields => $queue->TicketCustomFields->LimitToDefaultValuesSupportedTypes, Grouping => 'Basics', CategoryObj => $queue, + ShowEmptyOption => 1, + Required => 0, &> <&| /Elements/LabeledValue, Label => loc('Article') &> @@ -91,6 +93,8 @@ CustomFields => $queue->TicketCustomFields->LimitToDefaultValuesSupportedTypes, Grouping => 'Dates', CategoryObj => $queue, + ShowEmptyOption => 1, + Required => 0, &> @@ -103,6 +107,8 @@ CustomFields => $queue->TicketCustomFields->LimitToDefaultValuesSupportedTypes, Grouping => 'People', CategoryObj => $queue, + ShowEmptyOption => 1, + Required => 0, &> @@ -116,6 +122,8 @@ CustomFields => $queue->TicketCustomFields->LimitToDefaultValuesSupportedTypes, Grouping => 'Links', CategoryObj => $queue, + ShowEmptyOption => 1, + Required => 0, &> @@ -126,11 +134,13 @@ Object => RT::Ticket->new($session{CurrentUser}), Groupings => \@groupings, CategoryObj => $queue, + ShowEmptyOption => 1, + Required => 0, &>
<&|/Widgets/TitleBox, title => loc("Transaction Custom Fields"), content_class => 'mx-auto width-sm' &> - <& /Elements/EditCustomFields, CustomFields => $queue->TicketTransactionCustomFields->LimitToDefaultValuesSupportedTypes, Object => RT::Transaction->new($session{CurrentUser}), QueueObj => $queue, &> + <& /Elements/EditCustomFields, CustomFields => $queue->TicketTransactionCustomFields->LimitToDefaultValuesSupportedTypes, Object => RT::Transaction->new($session{CurrentUser}), QueueObj => $queue, ShowEmptyOption => 1, Required => 0 &>
diff --git a/share/html/Elements/EditCustomField b/share/html/Elements/EditCustomField index c088917ee70..b2e75720642 100644 --- a/share/html/Elements/EditCustomField +++ b/share/html/Elements/EditCustomField @@ -162,4 +162,5 @@ $Rows => 5 $Cols => 15 $Default => undef $DefaultsFromTopArguments => 1, +$Required => undef diff --git a/share/html/Elements/EditCustomFieldAutocomplete b/share/html/Elements/EditCustomFieldAutocomplete index 40104555ae7..2acef923d7c 100644 --- a/share/html/Elements/EditCustomFieldAutocomplete +++ b/share/html/Elements/EditCustomFieldAutocomplete @@ -53,6 +53,9 @@ cols="<% $Cols %>" \ % if ( defined $Rows ) { rows="<% $Rows %>" \ % } +% if ( $Required ) { +required +% } name="<% $name %>" id="<% $name %>" class="CF-<%$CustomField->id%>-Edit form-control"><% $Default || '' %>