Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions shared/router.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Router.map ->
@route "entrySignIn",
path: "/sign-in"
onBeforeAction: ->
@layout AccountsEntry.settings.layoutTemplate if AccountsEntry.settings?.layoutTemplate?

Session.set('entryError', undefined)
Session.set('buttonText', 'in')
@next()
Expand Down Expand Up @@ -34,6 +36,8 @@ Router.map ->
@route "entrySignUp",
path: "/sign-up"
onBeforeAction: ->
@layout AccountsEntry.settings.layoutTemplate if AccountsEntry.settings?.layoutTemplate?

Session.set('entryError', undefined)
Session.set('buttonText', 'up')
@next()
Expand Down Expand Up @@ -62,12 +66,16 @@ Router.map ->
@route "entryForgotPassword",
path: "/forgot-password"
onBeforeAction: ->
@layout AccountsEntry.settings.layoutTemplate if AccountsEntry.settings?.layoutTemplate?

Session.set('entryError', undefined)
@next()

@route 'entrySignOut',
path: '/sign-out'
onBeforeAction: ()->
@layout AccountsEntry.settings.layoutTemplate if AccountsEntry.settings?.layoutTemplate?

Session.set('entryError', undefined)
if not AccountsEntry.settings.homeRoute
@next()
Expand All @@ -78,19 +86,25 @@ Router.map ->
@route 'entryVerificationPending',
path: '/verification-pending'
onBeforeAction: ->
@layout AccountsEntry.settings.layoutTemplate if AccountsEntry.settings?.layoutTemplate?

Session.set('entryError', undefined)
@next()

@route 'entryResetPassword',
path: 'reset-password/:resetToken'
onBeforeAction: ->
@layout AccountsEntry.settings.layoutTemplate if AccountsEntry.settings?.layoutTemplate?

Session.set('entryError', undefined)
Session.set('resetToken', @params.resetToken)
@next()

@route 'entryEnrollAccount',
path: 'enroll-account/:resetToken'
onBeforeAction: ->
@layout AccountsEntry.settings.layoutTemplate if AccountsEntry.settings?.layoutTemplate?

Session.set('entryError', undefined)
Session.set('resetToken', @params.resetToken)

Expand Down