mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-13 04:00:21 +00:00
Adding introduction and details pages to registration process
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
Darkswarm.controller "RegistrationCtrl", ($scope, $location, AuthenticationService, CurrentUser)->
|
||||
if CurrentUser is undefined
|
||||
$location.search('after_login', '/register/')
|
||||
AuthenticationService.open()
|
||||
Darkswarm.controller "RegistrationCtrl", ($scope, RegistrationService, CurrentUser) ->
|
||||
$scope.current_user = CurrentUser
|
||||
|
||||
$scope.currentStep = RegistrationService.currentStep
|
||||
$scope.select = RegistrationService.select
|
||||
|
||||
$scope.steps = ['details']
|
||||
# ,'address','contact','about','images','social'
|
||||
|
||||
$scope.enterprise = {}
|
||||
@@ -0,0 +1,26 @@
|
||||
Darkswarm.factory "RegistrationService", (Navigation, $modal, $location)->
|
||||
|
||||
new class RegistrationService
|
||||
current_step: 'introduction'
|
||||
|
||||
constructor: ->
|
||||
@open()
|
||||
|
||||
open: =>
|
||||
@modalInstance = $modal.open
|
||||
templateUrl: 'registration.html'
|
||||
windowClass: "login-modal medium"
|
||||
@modalInstance.result.then @close, @close
|
||||
@select @current_step
|
||||
|
||||
select: (step)=>
|
||||
@current_step = step
|
||||
Navigation.navigate '/' + @current_step
|
||||
|
||||
active: Navigation.active
|
||||
|
||||
currentStep: =>
|
||||
@current_step
|
||||
|
||||
close: ->
|
||||
Navigation.navigate "/"
|
||||
Reference in New Issue
Block a user