mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Rearrange buttons on cart checkout form
This commit is contained in:
@@ -135,3 +135,20 @@ ul.product-listing {
|
||||
.distributor-fixed {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* View cart form */
|
||||
#subtotal {
|
||||
width: 100%;
|
||||
}
|
||||
.links {
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
#empty-cart {
|
||||
float: left;
|
||||
|
||||
p {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
5
app/overrides/rearrange_cart_form.rb
Normal file
5
app/overrides/rearrange_cart_form.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
# Remove column layout from cart form items so we can style it with CSS
|
||||
Deface::Override.new(:virtual_path => "spree/orders/edit",
|
||||
:replace => "[data-hook='inside_cart_form']",
|
||||
:partial => "spree/orders/inside_cart_form",
|
||||
:name => "inside_cart_form")
|
||||
14
app/views/spree/orders/_inside_cart_form.html.haml
Normal file
14
app/views/spree/orders/_inside_cart_form.html.haml
Normal file
@@ -0,0 +1,14 @@
|
||||
%div{'data-hook' => "inside_cart_form"}
|
||||
%div{'data-hook' => "cart_items"}
|
||||
= render :partial => 'form', :locals => { :order_form => order_form }
|
||||
|
||||
#subtotal{'data-hook' => ""}
|
||||
%h5
|
||||
= t(:subtotal)
|
||||
\:
|
||||
%span.order-total= order_subtotal(@order)
|
||||
|
||||
.links{'data-hook' => "cart_buttons"}
|
||||
= button_tag :class => 'primary', :id => 'update-button' do
|
||||
= t(:update)
|
||||
= link_to t(:checkout), checkout_path, :class => 'button checkout primary', :id => 'checkout-link'
|
||||
Reference in New Issue
Block a user