Skip to content

Commit

Permalink
Fixes Ansible Tower Service Catalog new item creation
Browse files Browse the repository at this point in the history
Checks for required Provider and Job Template selections in the drop downs

https://bugzilla.redhat.com/show_bug.cgi?id=1491772
  • Loading branch information
GregP committed May 3, 2018
1 parent db0e8c4 commit a72c9ba
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/controllers/catalog_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -887,6 +887,13 @@ def atomic_req_submit
if @edit[:new][:st_prov_type] == 'generic' && @edit[:new][:generic_subtype].blank?
add_flash(_('Subtype is required.'), :error)
end
# ensureProvider is selected, required field
if !@edit[:new][:manager_id].present?
add_flash(_("Provider is required, please select one from the list"), :error)
else
# ensure Job Template is selectied, required field
add_flash(_("Job Template is required, please select one from the list"), :error) if !@edit[:new][:template_id].present?
end
add_flash(_("Provisioning Entry Point is required"), :error) if @edit[:new][:fqname].blank?

# Check for a Dialog if Display in Catalog is selected
Expand Down

0 comments on commit a72c9ba

Please sign in to comment.