From 33f6872647cd21d06bc567249a5f311b245b9790 Mon Sep 17 00:00:00 2001 From: Adam Abdelaziz Date: Mon, 2 Oct 2017 14:24:15 -0400 Subject: [PATCH] Confirmation pages ported over (confirmation, lounge, recovery) --- src/app/index.default-config.coffee | 1 + src/app/index.route.coffee | 8 + src/app/stylesheets/variables.less | 4 - .../auth/confirmation/confirm_original.html | 374 ------------------ .../auth/confirmation/new.controller.coffee | 16 + src/app/views/auth/confirmation/new.html | 39 ++ .../views/auth/login/login.controller.coffee | 4 +- src/app/views/auth/login/login.html | 4 +- 8 files changed, 69 insertions(+), 381 deletions(-) delete mode 100644 src/app/views/auth/confirmation/confirm_original.html create mode 100644 src/app/views/auth/confirmation/new.controller.coffee create mode 100644 src/app/views/auth/confirmation/new.html diff --git a/src/app/index.default-config.coffee b/src/app/index.default-config.coffee index 373c9cb4..0850ebf1 100644 --- a/src/app/index.default-config.coffee +++ b/src/app/index.default-config.coffee @@ -11,3 +11,4 @@ angular.module('mnoEnterprise.defaultConfiguration', []) .constant('APP_NAME', null) .constant('INTERCOM_ID', null) .constant('URL_CONFIG', {}) + .constant('DEVISE_CONFIG', {}) diff --git a/src/app/index.route.coffee b/src/app/index.route.coffee index 8c536c4b..4eacfac3 100644 --- a/src/app/index.route.coffee +++ b/src/app/index.route.coffee @@ -62,6 +62,14 @@ angular.module 'mnoEnterpriseAngular' controller: 'AuthConfirmCtrl' controllerAs: 'vm' public: true + .state 'confirmation_recovery', + data: + pageTitle: 'ConfirmationRecovery' + url: '/confirmation/new' + templateUrl: 'app/views/auth/confirmation/new.html' + controller: 'AuthConfirmRecoveryCtrl' + controllerAs: 'vm' + public: true .state 'password_recovery', data: pageTitle: 'PasswordRecovery' diff --git a/src/app/stylesheets/variables.less b/src/app/stylesheets/variables.less index 655d75f0..325b79cc 100644 --- a/src/app/stylesheets/variables.less +++ b/src/app/stylesheets/variables.less @@ -40,12 +40,8 @@ @login-box-bg-color: @bg-inverse-color; @login-box-padding: 20px; -<<<<<<< HEAD -@login-box-brand-logo: { max-width: 300px; max-height: 200px; margin: 16px auto 16px auto; }; -======= @login-box-brand-logo-img: "../images/main-logo.png"; @login-box-brand-logo: { min-height: 61px; max-width: 160px; max-height: 130px; margin: 17px auto 5px auto; }; ->>>>>>> Move login page to SPA - WIP @login-box-btn-login: { width: 100%; }; @login-box-sso-intuit-logo: "../images/logo-intuit.png"; diff --git a/src/app/views/auth/confirmation/confirm_original.html b/src/app/views/auth/confirmation/confirm_original.html deleted file mode 100644 index 78d24537..00000000 --- a/src/app/views/auth/confirmation/confirm_original.html +++ /dev/null @@ -1,374 +0,0 @@ - - - - My Company - - - - - - - - - - - - - - - - - -
-
-
-
- - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/app/views/auth/confirmation/new.controller.coffee b/src/app/views/auth/confirmation/new.controller.coffee new file mode 100644 index 00000000..6d48452b --- /dev/null +++ b/src/app/views/auth/confirmation/new.controller.coffee @@ -0,0 +1,16 @@ +angular.module 'mnoEnterpriseAngular' + .controller('AuthConfirmRecoveryCtrl', + ($state, $stateParams, MnoeAuthSvc, toastr, MnoErrorsHandler) -> + vm = @ + vm.user = {} + + vm.resendConfirmation = -> + MnoeAuthSvc.all('/users/confirmation').post({user: vm.user}).then( + -> + toastr.info('If your email address exists in our database and is unconfirmed, you will receive an email with instructions in a few minutes.') + $state.go('login') + -> + toastr.error('Your request was unsuccessful, please try again or contact your platform administrator.') + ) + return + ) diff --git a/src/app/views/auth/confirmation/new.html b/src/app/views/auth/confirmation/new.html new file mode 100644 index 00000000..64102d61 --- /dev/null +++ b/src/app/views/auth/confirmation/new.html @@ -0,0 +1,39 @@ +
+
+ +
+
diff --git a/src/app/views/auth/login/login.controller.coffee b/src/app/views/auth/login/login.controller.coffee index e586a991..59565886 100644 --- a/src/app/views/auth/login/login.controller.coffee +++ b/src/app/views/auth/login/login.controller.coffee @@ -1,6 +1,6 @@ angular.module 'mnoEnterpriseAngular' .controller('AuthLoginCtrl', - (Auth, toastr, $state) -> + (Auth, toastr, $state, DEVISE_CONFIG) -> vm = @ vm.login = -> @@ -13,4 +13,4 @@ angular.module 'mnoEnterpriseAngular' ).finally(-> vm.hasClicked = false) return - ) \ No newline at end of file + ) diff --git a/src/app/views/auth/login/login.html b/src/app/views/auth/login/login.html index 9e980332..adb86862 100644 --- a/src/app/views/auth/login/login.html +++ b/src/app/views/auth/login/login.html @@ -35,7 +35,9 @@

{{'mno_enterprise.auth.sessions.new.title' | translate}}


{{'mno_enterprise.auth.shared.links.recover_password' | translate}}
- {{'mno_enterprise.auth.shared.links.resend_confirmation' | translate}} + {{'mno_enterprise.auth.shared.links.resend_confirmation' | translate}} +
+ {{'mno_enterprise.auth.shared.links.unlock' | translate}}