diff --git a/app/controllers/miq_ae_customization_controller/dialogs.rb b/app/controllers/miq_ae_customization_controller/dialogs.rb index 7179d8c432c..6f7f54fcedd 100644 --- a/app/controllers/miq_ae_customization_controller/dialogs.rb +++ b/app/controllers/miq_ae_customization_controller/dialogs.rb @@ -965,6 +965,11 @@ def dialog_get_form_vars_field # element type was NOT changed and is present elsif !@edit[:field_typ].blank? @edit[:field_visible] = key[:visible] + + if params[:field_required] + @edit[:field_required] = key[:required] = (params[:field_required] == "true") + end + # set default_value - checkbox if @edit[:field_typ] =~ /Check/ if params[:field_default_value] @@ -987,10 +992,6 @@ def dialog_get_form_vars_field @edit[:field_default_value] ||= "" key[:default_value] ||= "" end - - if params[:field_required] - @edit[:field_required] = key[:required] = (params[:field_required] == "true") - end end if %w(DialogFieldTextBox DialogFieldTextAreaBox).include?(@edit[:field_typ]) @@ -1030,10 +1031,6 @@ def dialog_get_form_vars_field @edit[:field_single_value] = key[:single_value] = (params[:field_single_value] == "true") end - if params[:field_required] - @edit[:field_required] = key[:required] = (params[:field_required] == "true") - end - @edit[:field_sort_by] = key[:sort_by] = params[:field_sort_by] if params[:field_sort_by] @edit[:field_sort_order] = key[:sort_order] = params[:sort_order] if params[:sort_order] @edit[:field_data_typ] = key[:data_typ] = params[:field_data_typ] if params[:data_typ]