* allow BACK button to work even if invalid state VRFS-3924
This commit is contained in:
parent
d7ddff9bb7
commit
1da6749d70
|
|
@ -55,7 +55,7 @@ rest = window.JK.Rest()
|
|||
handleNav: (e) ->
|
||||
navTo = this.navDestination(e)
|
||||
this.state.validate_basics = true
|
||||
teacherActions.change.trigger(this.state, {navTo: navTo})
|
||||
teacherActions.change.trigger(this.state, {navTo: navTo, instructions:e})
|
||||
|
||||
render: () ->
|
||||
# Render the following:
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ rest = window.JK.Rest()
|
|||
handleNav: (e) ->
|
||||
logger.debug("handleNav #{this.screenName()}: ", this.state, this, e)
|
||||
navTo = this.navDestination(e)
|
||||
teacherActions.change.trigger(this.state, {navTo: navTo})
|
||||
teacherActions.change.trigger(this.state, {navTo: navTo, instructions:e})
|
||||
|
||||
handleListChange: (listName, listObjects)->
|
||||
logger.debug("EXPERIENCE handleListChange:", listName, listObjects)
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ rest = window.JK.Rest()
|
|||
|
||||
handleNav: (e) ->
|
||||
navTo = this.navDestination(e)
|
||||
teacherActions.change.trigger(this.state, {navTo: navTo})
|
||||
teacherActions.change.trigger(this.state, {navTo: navTo, instructions:e})
|
||||
|
||||
render: () ->
|
||||
`<div className="TeacherSetupIntroduction TeacherSetupComponent" >
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ rest = window.JK.Rest()
|
|||
if navTo == 'rejected'
|
||||
# do nothing...handled elsewhere
|
||||
else
|
||||
teacherActions.change.trigger(this.state, {navTo: navTo})
|
||||
teacherActions.change.trigger(this.state, {navTo: navTo, instructions:e})
|
||||
|
||||
handleFocus: (e) ->
|
||||
@pricePerLessonCents=e.target.value
|
||||
|
|
|
|||
|
|
@ -69,6 +69,10 @@ EVENTS = context.JK.EVENTS
|
|||
if (jqXHR.status==422)
|
||||
logger.debug("FAILED422",jqXHR.responseJSON.errors)
|
||||
this.trigger({errors: jqXHR.responseJSON.errors})
|
||||
if instructions?.instructions?.direction == 'back'
|
||||
if instructions.navTo?
|
||||
logger.debug("NAVIGATING TO",instructions.navTo)
|
||||
window.location = instructions.navTo
|
||||
else
|
||||
context.JK.app.ajaxError(textStatus)
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue