Skip to content

Commit

Permalink
form submits -> to confirmation
Browse files Browse the repository at this point in the history
  • Loading branch information
lokisk1155 committed Jul 3, 2023
1 parent f3c3bc3 commit 7b40832
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions app/controllers/distributions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ def new
end
@items = current_organization.items.alphabetized
@storage_locations = current_organization.storage_locations.active_locations.has_inventory_items.alphabetized
session[:distribution_id] = @distribution.id
end

def show
Expand Down
5 changes: 2 additions & 3 deletions app/views/distributions/_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<%= simple_form_for distribution, html: {class: "storage-location-required"}, wrapper_mappings: { datetime: :custom_multi_select } do |f| %>

<%= simple_form_for distribution, url: confirmation_distributions_path(organization_id: current_organization.id), method: :get, html: {class: "storage-location-required"}, wrapper_mappings: { datetime: :custom_multi_select } do |f| %>
<div class="box-body">
<%= f.simple_fields_for :request do |r| %>
<%= r.input :id, as: :hidden %>
Expand Down Expand Up @@ -43,7 +42,7 @@
</fieldset>
</div>
<div class="card-footer">
<%= link_to "Confirmation", confirmation_distributions_path(organization_id: current_organization.id) %>
<%= f.submit 'Submit request', class: 'btn btn-primary' %>
</div>
</div>
<% end %>

0 comments on commit 7b40832

Please sign in to comment.