Skip to content

Commit

Permalink
Merge pull request #2185 from eclarizio/BZ1492150
Browse files Browse the repository at this point in the history
Ensure the 'required' property gets saved for dynamic drop down fields
  • Loading branch information
h-kataria authored Sep 18, 2017
2 parents 0b53727 + de41bb4 commit ac02d7b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 deletions.
1 change: 1 addition & 0 deletions app/controllers/miq_ae_customization_controller/dialogs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1340,6 +1340,7 @@ def dialog_set_record_vars(dialog, validate)
fld[:load_values_on_init] = field[:load_on_init]
fld[:show_refresh_button] = field[:show_refresh_button]
fld[:auto_refresh] = field[:auto_refresh]
fld[:required] = field[:required]
end

if field[:typ] == "DialogFieldCheckBox"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,8 @@
.form-group
%label.col-md-2.control-label= _('Required')
.col-md-8
= check_box_tag('field_required', 'true',
@edit[:field_required],
"data-miq_observe_checkbox" => {:url => url}.to_json)
= check_box_tag('field_required', 'true', @edit[:field_required],
"data-miq_observe_checkbox" => {:url => url}.to_json)
- if %w(DialogFieldTextBox DialogFieldTextAreaBox).include?(@edit[:field_typ])
.form-group
%label.col-md-2.control-label
Expand Down Expand Up @@ -91,12 +90,8 @@
%label.col-md-2.control-label
= _('Required')
.col-md-8
= select_tag('field_required',
options_for_select([[_("True"), true], [_("False"), false]], @edit[:field_required].to_s),
"data-miq_sparkle_on" => true,
:class => "selectpicker")
:javascript
miqSelectPickerEvent('field_required', "#{url}")
= check_box_tag('field_required', 'true', @edit[:field_required],
"data-miq_observe_checkbox" => {:url => url}.to_json)
.form-group
%label.col-md-2.control-label
= _('Value Type')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@
.form-group
%label.col-md-2.control-label= _('Required')
.col-md-8
= check_box_tag('field_required', 'true',
@edit[:field_required],
= check_box_tag('field_required', 'true', @edit[:field_required],
"data-miq_observe_checkbox" => {:url => url}.to_json)

- if %w(DialogFieldTextBox DialogFieldTextAreaBox).include?(@edit[:field_typ])
Expand Down Expand Up @@ -103,12 +102,8 @@
%label.col-md-2.control-label
= _('Required')
.col-md-8
= select_tag('field_required',
options_for_select([[_("True"), true], [_("False"), false]], @edit[:field_required].to_s),
"data-miq_sparkle_on" => true,
:class => "selectpicker")
:javascript
miqSelectPickerEvent('field_required', "#{url}")
= check_box_tag('field_required', 'true', @edit[:field_required],
"data-miq_observe_checkbox" => {:url => url}.to_json)

.form-group
%label.col-md-2.control-label
Expand Down

0 comments on commit ac02d7b

Please sign in to comment.