mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-22 05:18:51 +00:00
Highlight update button when cart page form is "dirty"
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
Darkswarm.controller "CartFormCtrl", ($scope) ->
|
||||
|
||||
@@ -33,7 +33,8 @@
|
||||
|
||||
- else
|
||||
%div{"data-hook" => "outside_cart_form"}
|
||||
= form_for @order, :url => main_app.update_cart_path, :html => {:id => 'update-cart'} do |order_form|
|
||||
= form_for @order, :url => main_app.update_cart_path,
|
||||
:html => {id: 'update-cart', name: "form", "ng-controller"=> 'CartFormCtrl'} do |order_form|
|
||||
%div{"data-hook" => "inside_cart_form"}
|
||||
%div{"data-hook" => "cart_items"}
|
||||
.row
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
%tr
|
||||
%td{colspan:"2"}
|
||||
%td
|
||||
%button#update-button.secondary.radius.expand.small
|
||||
%button#update-button.secondary.radius.expand.small{"ng-class" => "{ alert: form.$dirty }"}
|
||||
%i.ofn-i_023-refresh
|
||||
= t(:update)
|
||||
%td
|
||||
|
||||
Reference in New Issue
Block a user