Adding introduction and details pages to registration process

This commit is contained in:
Rob H
2014-08-20 10:33:32 +10:00
parent 595aa760cb
commit c92aa41e28
13 changed files with 163 additions and 7 deletions

View File

@@ -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 = {}

View File

@@ -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 "/"