diff options
Diffstat (limited to 'www/js/router.js')
-rw-r--r-- | www/js/router.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/www/js/router.js b/www/js/router.js index b7b9539..9d7e751 100644 --- a/www/js/router.js +++ b/www/js/router.js @@ -12,6 +12,7 @@ 'existing': 'existing', 'photo': 'photo', 'details': 'details', + 'submit-start': 'submitStart', 'submit': 'submit', 'submit-email': 'submitEmail', 'submit-name': 'submitName', @@ -71,6 +72,16 @@ this.changeView(detailsView); }, + submitStart: function() { + var submitView; + if ( FMS.currentUser && FMS.isLoggedIn() ) { + submitView = new FMS.SubmitConfirmView({ model: FMS.currentDraft }); + } else { + submitView = new FMS.SubmitEmailView({ model: FMS.currentDraft }); + } + this.changeView(submitView); + }, + submit: function(){ var submitView = new FMS.SubmitView({ model: FMS.currentDraft }); this.changeView(submitView); |