Add ChangePasswordFromRecoveryDirective
parent
cb456a095a
commit
9c27c0ebef
|
@ -42,6 +42,7 @@ configure = ($routeProvider, $locationProvider, $httpProvider, $provide,
|
|||
$routeProvider.when("/login", {templateUrl: "/partials/login.html"})
|
||||
$routeProvider.when("/register", {templateUrl: "/partials/register.html"})
|
||||
$routeProvider.when("/forgot-password", {templateUrl: "/partials/forgot-password.html"})
|
||||
$routeProvider.when("/change-password/:token", {templateUrl: "/partials/change-password-from-recovery.html"})
|
||||
|
||||
$routeProvider.otherwise({redirectTo: '/login'})
|
||||
$locationProvider.html5Mode(true)
|
||||
|
|
|
@ -101,6 +101,14 @@ class AuthService extends taiga.Service
|
|||
return @http.post(url, data)
|
||||
|
||||
|
||||
changePasswordFromRecovery: (data) ->
|
||||
url = @urls.resolve("users-change-password-from-recovery")
|
||||
|
||||
data = _.clone(data, false)
|
||||
|
||||
return @http.post(url, data)
|
||||
|
||||
|
||||
# acceptInvitiationWithNewUser: (username, email, password, token) ->
|
||||
# url = @urls.resolve("auth-register")
|
||||
# data = _.extend(data, {
|
||||
|
@ -242,6 +250,22 @@ ForgotPasswordDirective = ($auth, $confirm, $location) ->
|
|||
return {link:link}
|
||||
|
||||
|
||||
###################
|
||||
## Change Password from Recovery Directive
|
||||
###################
|
||||
|
||||
ChangePasswordFromRecoveryDirective = ($auth, $confirm, $location) ->
|
||||
link = ($scope, $el, $attrs) ->
|
||||
$scope.data = {}
|
||||
###
|
||||
TODO: We need UX
|
||||
###
|
||||
|
||||
return {link:link}
|
||||
|
||||
|
||||
module.directive("tgRegister", ["$tgAuth", "$tgConfirm", RegisterDirective])
|
||||
module.directive("tgLogin", ["$tgAuth", "$tgConfirm", "$location", LoginDirective])
|
||||
module.directive("tgForgotPassword", ["$tgAuth", "$tgConfirm", "$location", ForgotPasswordDirective])
|
||||
module.directive("tgChangePasswordFromRecovery", ["$tgAuth", "$tgConfirm", "$location",
|
||||
ChangePasswordFromRecoveryDirective])
|
||||
|
|
|
@ -162,6 +162,7 @@ urls = {
|
|||
"home": "/",
|
||||
"logint": "/login",
|
||||
"forgot-password": "/forgot-password",
|
||||
"change-password": "/change-password/:token",
|
||||
"register": "/register",
|
||||
"profile": "/:user",
|
||||
"project": "/project/:project",
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
extends dummy-layout
|
||||
|
||||
block head
|
||||
title Taiga Project management web application with scrum in mind!
|
||||
|
||||
block content
|
||||
// TODO: Xavi
|
||||
//div.wrapper
|
||||
// div.login-main
|
||||
// div.login-container
|
||||
// h1.logo
|
||||
// img(src="/images/logo.png", alt="TAIGA")
|
||||
// p.tagline Project management web application with scrum in mind!
|
||||
// p.login-error
|
||||
// span.title Ooops! Something went wrong!
|
||||
// span.text According to our Oompa Loompas, your are not registered yet.
|
||||
// a.icon.icon-delete(href="", title="Close message")
|
||||
|
||||
// include views/modules/change-password-from-recovery-form
|
|
@ -0,0 +1,13 @@
|
|||
// TODO: Xavi
|
||||
//
|
||||
//div.forgot-form-container(tg-forgot-Password)
|
||||
// p.forgot-text
|
||||
// strong Don't worry, it happens even in the best families :-) <br />
|
||||
// span Give us your username or email and we'll sent you instructions to get a new one
|
||||
//
|
||||
// form(ng-submit="ctrl.submit()")
|
||||
// fieldset
|
||||
// input(type="text", name="username", ng-model="data.username", data-required="true",
|
||||
// placeholder="Username or email")
|
||||
// fieldset
|
||||
// a.button.button-forgot.button-gray(href="", title="Reset Password") Reset Password
|
Loading…
Reference in New Issue