mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Moving over the new checkout authentication
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
window.AuthenticationActionsCtrl = Darkswarm.controller "AuthenticationActionsCtrl", ($scope, Navigation, storage) ->
|
||||
$scope.toggleLogin = ->
|
||||
Navigation.navigate "/login"
|
||||
|
||||
$scope.toggleSignup = ->
|
||||
Navigation.navigate "/signup"
|
||||
|
||||
$scope.toggleSignup = ->
|
||||
Navigation.navigate "/signup"
|
||||
|
||||
$scope.toggle = (path = null)->
|
||||
Navigation.navigate(path)
|
||||
@@ -1,6 +1,6 @@
|
||||
%nav.top-bar
|
||||
%section.top-bar-section
|
||||
%ul.left{"ng-controller" => "MenuCtrl"}
|
||||
%ul.left{"ng-controller" => "AuthenticationActionsCtrl"}
|
||||
%li
|
||||
%a.icon{"ng-click" => "toggle()"}
|
||||
%i.fi-list
|
||||
|
||||
9
app/views/shop/checkout/_authentication.html.haml
Normal file
9
app/views/shop/checkout/_authentication.html.haml
Normal file
@@ -0,0 +1,9 @@
|
||||
%fieldset
|
||||
%accordion-group{heading: "User", "is-open" => "accordion.user"}
|
||||
.row
|
||||
.large-4.columns.text-center{"ng-controller" => "AuthenticationActionsCtrl"}
|
||||
%button{"ng-click" => "toggle('/login')"} Login
|
||||
.large-4.columns.text-center{"ng-controller" => "AuthenticationActionsCtrl"}
|
||||
%button{"ng-click" => "toggle('/signup')"} Signup
|
||||
.large-4.columns.text-center
|
||||
%button{"ng-click" => "show('details')"} Checkout as guest
|
||||
@@ -6,21 +6,13 @@
|
||||
|
||||
= render partial: "shop/details"
|
||||
|
||||
%checkout
|
||||
.row
|
||||
%accordion.row{"close-others" => "true"}
|
||||
%checkout{"ng-controller" => "CheckoutCtrl"}
|
||||
.large-9.columns
|
||||
- unless spree_current_user
|
||||
.row
|
||||
%section#checkout_login
|
||||
.large-6.columns
|
||||
= render partial: "shop/checkout/login"
|
||||
%section#checkout_signup
|
||||
.large-6.columns
|
||||
= render partial: "shop/checkout/signup"
|
||||
= render partial: "shop/checkout/authentication"
|
||||
.row
|
||||
= render partial: "shop/checkout/form"
|
||||
|
||||
.large-3.columns
|
||||
.row
|
||||
= render partial: "shop/checkout/summary"
|
||||
= render partial: "shop/checkout/summary"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user