Files
openfoodnetwork/app/views/checkout/_billing.html.haml
summerscope 15cde6c372 Merge branch 'laura_and_will' into icon_font
Conflicts:
	app/views/groups/index.html.haml
	app/views/modals/_producers.html.haml
2014-05-30 12:12:07 +10:00

51 lines
1.9 KiB
Plaintext

%fieldset#billing
%ng-form{"ng-controller" => "BillingCtrl", name: "billing"}
%h5{"ng-class" => "{valid: billing.$valid, dirty: billing.$dirty}"}
%span.right
%label.label.round.alert.right
%i.ofn-i_009-close
%label.label.round.success.right
%i.ofn-i_051-check-big
Billing info
%accordion-group{"is-open" => "accordion.billing",
"ng-class" => "{valid: billing.$valid, open: accordion.billing}"}
%accordion-heading
.row
.small-11.columns
%em
%small
{{ summary() | printArray }}
.small-1.columns.right
%span.accordion-up.right
%i.ofn-i_006-caret-up
%span.accordion-down.right
%i.ofn-i_005-caret-down
= f.fields_for :bill_address, @order.bill_address do |ba|
.row
.small-12.columns
= validated_input "Address", "order.bill_address.address1", "ofn-focus" => "accordion['billing']"
.row
.small-12.columns
= validated_input "Address (contd.)", "order.bill_address.address2", required: false
.row
.small-6.columns
= validated_input "City", "order.bill_address.city"
.small-6.columns
= ba.select :state_id, @order.billing_address.country.states.map{|c|[c.name, c.id]}, {include_blank: false},
"ng-model" => "order.bill_address.state_id"
.row
.small-6.columns
= validated_input "Postcode", "order.bill_address.zipcode"
.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"
.row
.small-12.columns.text-right
%button.primary{"ng-disabled" => "billing.$invalid", "ng-click" => "next($event)"} Next