-
-
Notifications
You must be signed in to change notification settings - Fork 527
/
Copy pathvalidate.html.erb
53 lines (50 loc) · 2.09 KB
/
validate.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Request Confirmation</h5>
<button id="modalClose" type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body" style="max-height: 60vh; overflow-y: auto;">
<%# Items and quantities %>
<table class="table">
<thead>
<tr>
<th>Item Name</th>
<th>Total Items</th>
<% if Flipper.enabled?(:enable_packs) && @partner_request.item_requests.any?( &:request_unit ) %>
<th>Units</th>
<% end %>
</tr>
</thead>
<tbody>
<% @partner_request.item_requests.each do |line_item| %>
<tr>
<td><%= line_item.name %></td>
<td><%= line_item.quantity %></td>
<% if Flipper.enabled?(:enable_packs) && @partner_request.item_requests.any?( &:request_unit ) %>
<td><%= line_item.request_unit&.capitalize&.pluralize(line_item.quantity.to_i) %></td>
<% end %>
</tr>
<% end %>
</tbody>
</table>
<%# Confirmation message %>
<div class="message fs-5">
<p>Please confirm that the above list is what you meant to request.</p>
</div>
<%# Quota exceeded warning %>
<% if @quota_exceeded %>
<div class="alert alert-warning" role="alert">
You are ordering
<span class="fw-bolder fst-italic"><%= @total_items %></span>
total items, are you sure?
</div>
<% end %>
</div>
<%# Actions %>
<div class="modal-footer">
<button id="modalNo" type="button" class="btn btn-secondary" data-bs-dismiss="modal" aria-label="No I need to make changes">No, I need to make changes</button>
<button id="modalYes" type="button" class="btn btn-success" data-action="confirmation#submitForm">Yes, it's correct</button>
</div>
</div>
</div>