mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Adding missing data-bindings for country/state
This commit is contained in:
@@ -47,7 +47,7 @@
|
||||
|
||||
.small-6.columns.right
|
||||
= ba.select :country_id, available_countries.map{|c|[c.name, c.id]},
|
||||
{include_blank: false}, "ng-model" => "order.bill_address.country_id"
|
||||
"ng-model" => "order.bill_address.country_id", required: true
|
||||
|
||||
.row
|
||||
.small-12.columns.text-right
|
||||
|
||||
@@ -9,23 +9,23 @@
|
||||
%i.ofn-i_051-check-big
|
||||
Your details
|
||||
|
||||
%accordion-group{"is-open" => "accordion.details",
|
||||
%accordion-group{"is-open" => "accordion.details",
|
||||
"ng-class" => "{valid: details.$valid, open: accordion.details}"}
|
||||
%accordion-heading
|
||||
.row
|
||||
.small-8.medium-10.columns
|
||||
%em
|
||||
%em
|
||||
%small
|
||||
{{ summary() | printArray }}
|
||||
.small-4.medium-2.columns.text-right
|
||||
%span.accordion-up
|
||||
%em
|
||||
%em
|
||||
%small Hide
|
||||
%i.ofn-i_053-point-up
|
||||
%i.ofn-i_053-point-up
|
||||
%span.accordion-down
|
||||
%em
|
||||
%em
|
||||
%small Expand
|
||||
%i.ofn-i_052-point-down
|
||||
%i.ofn-i_052-point-down
|
||||
|
||||
.row
|
||||
.small-6.columns
|
||||
@@ -36,10 +36,10 @@
|
||||
.row
|
||||
.small-6.columns
|
||||
= validated_input 'Email', 'order.email', type: :email, "ofn-focus" => "accordion['details']"
|
||||
|
||||
|
||||
.small-6.columns
|
||||
= validated_input 'Phone', 'order.bill_address.phone'
|
||||
|
||||
|
||||
.row
|
||||
.small-12.columns.text-right
|
||||
%button.primary{"ng-disabled" => "details.$invalid", "ng-click" => "next($event)"} Next
|
||||
|
||||
@@ -14,16 +14,16 @@
|
||||
%accordion-heading
|
||||
.row
|
||||
.small-8.medium-10.columns
|
||||
%em
|
||||
%em
|
||||
%small
|
||||
{{ Checkout.shippingMethod().name }}
|
||||
.small-4.medium-2.columns.text-right
|
||||
%span.accordion-up
|
||||
%em
|
||||
%em
|
||||
%small Hide
|
||||
%i.ofn-i_053-point-up
|
||||
%i.ofn-i_053-point-up
|
||||
%span.accordion-down
|
||||
%em
|
||||
%em
|
||||
%small Expand
|
||||
%i.ofn-i_052-point-down
|
||||
|
||||
@@ -61,13 +61,14 @@
|
||||
.small-6.columns
|
||||
= validated_input "City", "order.ship_address.city"
|
||||
.small-6.columns
|
||||
= sa.select :state_id, @order.shipping_address.country.states.map{|c|[c.name, c.id]}
|
||||
= sa.select :state_id, @order.shipping_address.country.states.map{|c|[c.name, c.id]}, {include_blank: false},
|
||||
"ng-model" => "order.ship_address.state_id", required: true
|
||||
.row
|
||||
.small-6.columns
|
||||
= validated_input "Postcode", "order.ship_address.zipcode"
|
||||
.small-6.columns.right
|
||||
= sa.select :country_id, available_countries.map{|c|[c.name, c.id]},
|
||||
{include_blank: false}
|
||||
"ng-model" => "order.ship_address.country_id", required: true
|
||||
.row
|
||||
.small-6.columns
|
||||
= validated_input "First Name", "order.ship_address.firstname"
|
||||
|
||||
@@ -23,7 +23,7 @@ feature "As a consumer I want to check out my cart", js: true do
|
||||
end
|
||||
|
||||
it "shows the current distributor on checkout" do
|
||||
visit checkout_path
|
||||
visit checkout_path
|
||||
page.should have_content distributor.name
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user