From a43e053e77686f6843906f1498733f206f2249cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Barrag=C3=A1n=20Merino?= Date: Mon, 7 Jul 2014 14:40:47 +0200 Subject: [PATCH] Add forgot-password form --- app/coffee/app.coffee | 1 + app/coffee/modules/auth.coffee | 7 +++++++ app/coffee/modules/base.coffee | 3 +++ app/partials/forgot-password.jade | 18 ++++++++++++++++++ app/partials/views/modules/forgot-form.jade | 4 ++-- 5 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 app/partials/forgot-password.jade diff --git a/app/coffee/app.coffee b/app/coffee/app.coffee index 20ffaf84..78ee7a7d 100644 --- a/app/coffee/app.coffee +++ b/app/coffee/app.coffee @@ -41,6 +41,7 @@ configure = ($routeProvider, $locationProvider, $httpProvider, $provide, # Auth $routeProvider.when("/login", {templateUrl: "/partials/login.html"}) $routeProvider.when("/register", {templateUrl: "/partials/register.html"}) + $routeProvider.when("/forgot-password", {templateUrl: "/partials/forgot-password.html"}) $routeProvider.otherwise({redirectTo: '/login'}) $locationProvider.html5Mode(true) diff --git a/app/coffee/modules/auth.coffee b/app/coffee/modules/auth.coffee index 7a5e4dc5..6baab5e0 100644 --- a/app/coffee/modules/auth.coffee +++ b/app/coffee/modules/auth.coffee @@ -185,5 +185,12 @@ RegisterDirective = ($auth, $confirm) -> return {link:link} + +ForgotPasswordDirective = ($auth, $confirm) -> + link = ($scope, $el, $attrs) -> + console.log "caca" + + module.directive("tgRegister", ["$tgAuth", "$tgConfirm", RegisterDirective]) module.directive("tgLogin", ["$tgAuth", "$tgConfirm", "$location", LoginDirective]) +module.directive("tgForgotPassword", ["$tgAuth", "$tgConfirm", "$location", ForgotPasswordDirective]) diff --git a/app/coffee/modules/base.coffee b/app/coffee/modules/base.coffee index 0fae5e9a..3ca0b44a 100644 --- a/app/coffee/modules/base.coffee +++ b/app/coffee/modules/base.coffee @@ -160,6 +160,9 @@ module.directive("tgMain", ["$log", "$compile", "$rootScope", MainTaigaDirective urls = { "home": "/", + "logint": "/login", + "forgot-password": "/forgot-password", + "register": "/register", "profile": "/:user", "project": "/project/:project", "project-backlog": "/project/:project/backlog", diff --git a/app/partials/forgot-password.jade b/app/partials/forgot-password.jade new file mode 100644 index 00000000..eddd63de --- /dev/null +++ b/app/partials/forgot-password.jade @@ -0,0 +1,18 @@ +extends dummy-layout + +block head + title Taiga Project management web application with scrum in mind! + +block content + 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/forgot-form diff --git a/app/partials/views/modules/forgot-form.jade b/app/partials/views/modules/forgot-form.jade index 5a52d639..c397c566 100644 --- a/app/partials/views/modules/forgot-form.jade +++ b/app/partials/views/modules/forgot-form.jade @@ -1,8 +1,8 @@ -div.forgot-form-container +div.forgot-form-container(tg-forgot-Password) p.forgot-text strong Don't worry, it happens even in the best families :-)
span Give us your mail and we'll sent you instructions to get a new one - form + form{ng-submit="ctrl.submit()"} fieldset input(type="text", placeholder="Your email") fieldset