mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Add comment to make sure both out of stock modal get updated.
There is no easy way to share template between AngularJS and Rails. The modal in `edit.html.haml` is a copy of app/assets/javascripts/templates/out_of_stock.html.haml, so we need to update both if either of them is updated.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// please update the modal html in app/view/checkout/edit.html.haml if updating this template
|
||||
%a.close-reveal-modal{"ng-click" => "$close()"}
|
||||
%i.ofn-i_009-close
|
||||
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
= render partial: "shopping_shared/order_cycles"
|
||||
|
||||
%div{ "data-controller": "guest-checkout", "data-guest-checkout-distributor-value": @order.distributor.id }
|
||||
= #TODO create new component ? reuse out_of_stock.html.haml template
|
||||
- if @any_out_of_stock
|
||||
= render ModalComponent.new(id: "out-of-stock-items", modal_class: "medium" ,instant: true, close_button: false) do
|
||||
- # please update app/assets/javascripts/templates/out_of_stock.html.haml if updating the modal html
|
||||
%a.close-reveal-modal{"data-action": "click->modal#close" }
|
||||
%i.ofn-i_009-close
|
||||
%h3
|
||||
|
||||
Reference in New Issue
Block a user