Commit e8fc49455eb7134e5d58f8df14f12cf39a74a0d8
1 parent
c84a65b2
Exists in
master
and in
8 other branches
Validação dos formularios e pequenos ajustes
Showing
13 changed files
with
253 additions
and
204 deletions
Show diff stats
bower.json
| ... | ... | @@ -6,6 +6,7 @@ |
| 6 | 6 | "angular-animate": "~1.4.0", |
| 7 | 7 | "angular-breadcrumb": "~0.4.1", |
| 8 | 8 | "angular-cookies": "~1.4.0", |
| 9 | + "angular-messages": "ng-messages#*", | |
| 9 | 10 | "angular-sanitize": "~1.4.0", |
| 10 | 11 | "angular-slugify": "~1.0.1", |
| 11 | 12 | "angular-social-links": "~0.0.19", |
| ... | ... | @@ -22,6 +23,7 @@ |
| 22 | 23 | "angular-mocks": "~1.4.0" |
| 23 | 24 | }, |
| 24 | 25 | "resolutions": { |
| 25 | - "angular": "~1.4.0" | |
| 26 | + "angular": "~1.4.0", | |
| 27 | + "angular-messages": "~1.4.5" | |
| 26 | 28 | } |
| 27 | 29 | } | ... | ... |
src/app/components/show-message/message.html
| 1 | -<div id="message" class="show-message"> | |
| 1 | +<div | |
| 2 | + id="message" | |
| 3 | + class="show-message"> | |
| 2 | 4 | <div class="row"> |
| 3 | 5 | <div class="col-sm-1 col-sm-offset-2"> |
| 4 | - <div ng-class="{ 'success': vm.type, 'error': !vm.type }" class="message-border"> | |
| 5 | - <span class="glyphicon glyphicon-ok icon-white" aria-hidden="true"></span> | |
| 6 | + <div class="message-border {{ ::vm.type }}"> | |
| 7 | + <span | |
| 8 | + class="glyphicon glyphicon-ok icon-white" | |
| 9 | + aria-hidden="true"></span> | |
| 6 | 10 | </div> |
| 7 | 11 | </div> |
| 8 | - <div class="col-sm-4"><h3>{{ vm.title }}</h3></div> | |
| 9 | - </div> | |
| 10 | - <div class="row"> | |
| 11 | - <div class="col-sm-8 col-sm-offset-3"> | |
| 12 | - <h5>{{ vm.message }}</h5> | |
| 13 | - </div> | |
| 14 | - </div> | |
| 15 | -</div> | |
| 16 | - | |
| 17 | -<!-- add the class 'text-success' if the variable 'awesome' is true --> | |
| 18 | -<!-- <div ng-class="{ 'text-success': awesome, 'text-large': giant }"> --> | |
| 12 | + <div class="col-sm-4"> | |
| 13 | + <h3>{{ ::vm.title }}</h3> | |
| 14 | + </div> | |
| 15 | + </div> | |
| 16 | + <div class="row"> | |
| 17 | + <div class="col-sm-8 col-sm-offset-3"> | |
| 18 | + <h5>{{ ::vm.message }}</h5> | |
| 19 | + </div> | |
| 20 | + </div> | |
| 21 | +</div> | |
| 19 | 22 | \ No newline at end of file | ... | ... |
src/app/components/show-message/show-message.scss
src/app/index.module.js
| ... | ... | @@ -2,6 +2,6 @@ |
| 2 | 2 | 'use strict'; |
| 3 | 3 | |
| 4 | 4 | angular |
| 5 | - .module('dialoga', ['ngAnimate', 'ngCookies', 'ngTouch', 'ngSanitize', 'ui.router', 'ngStorage', 'socialLinks', 'slugifier', 'ncy-angular-breadcrumb']); | |
| 5 | + .module('dialoga', ['ngAnimate', 'ngCookies', 'ngTouch', 'ngSanitize', 'ui.router', 'ngStorage', 'socialLinks', 'slugifier', 'ncy-angular-breadcrumb', 'ngMessages']); | |
| 6 | 6 | |
| 7 | 7 | })(); | ... | ... |
src/app/layout.scss
src/app/pages/auth/auth.scss
src/app/pages/auth/change.html
| 1 | - <div class="container"> | |
| 2 | - <div class="row"> | |
| 1 | + | |
| 2 | +<div class="container"> | |
| 3 | + <div class="row"> | |
| 3 | 4 | <div class="col-sm-12"> |
| 4 | - <h2>Esqueci minha senha</h2> | |
| 5 | - <h5>Agra é só criar e confirmar sua nova senha.</h5> | |
| 6 | - </div> | |
| 7 | - </div> | |
| 5 | + <h2>Esqueci minha senha</h2> | |
| 6 | + <h5>Agra é só criar e confirmar sua nova senha.</h5> | |
| 7 | + </div> | |
| 8 | + </div> | |
| 8 | 9 | </div> |
| 9 | -<section role="main" class="section-gray auth-content"> | |
| 10 | +<section | |
| 11 | + role="main" | |
| 12 | + class="section-gray auth-content"> | |
| 10 | 13 | <div class="container"> |
| 11 | 14 | <div class="row"> |
| 12 | 15 | <!-- Mostra só se estiver logado --> |
| ... | ... | @@ -14,7 +17,10 @@ |
| 14 | 17 | <div class="row"> |
| 15 | 18 | <div class="col-sm-8 col-sm-offset-2"> |
| 16 | 19 | <h3>Você está logado!</h3> |
| 17 | - <button type="button" ng-click="pageSignin.onClickLogout()" class="btn btn-primary">Sair</button> | |
| 20 | + <button | |
| 21 | + type="button" | |
| 22 | + ng-click="pageSignin.onClickLogout()" | |
| 23 | + class="btn btn-primary">Sair</button> | |
| 18 | 24 | </div> |
| 19 | 25 | </div> |
| 20 | 26 | </div> |
| ... | ... | @@ -24,18 +30,42 @@ |
| 24 | 30 | <div class="col-sm-8 col-sm-offset-2"> |
| 25 | 31 | <div class="row"> |
| 26 | 32 | <div class="col-md-12"> |
| 27 | - <form name="loginForm" ng-submit=""> | |
| 33 | + <form | |
| 34 | + name="changePassForm" | |
| 35 | + ng-submit=""> | |
| 28 | 36 | <div class="row"> |
| 29 | 37 | <div class="col-md-6"> |
| 30 | 38 | <div class="form-group"> |
| 31 | - <label for="inputPassword">Senha*</label> | |
| 32 | - <input type="password" id="inputPassword" class="form-control input-lg" required="" autofocus=""> | |
| 39 | + <label for="inputPassword">Senha*</label> <input | |
| 40 | + type="password" | |
| 41 | + id="inputPassword" | |
| 42 | + name="inputPassword" | |
| 43 | + class="form-control input-lg" | |
| 44 | + ng-class="{ 'has-error' : changePassForm.inputPassword.$invalid && changePassForm.inputPassword.$touched }" | |
| 45 | + ng-model="password" | |
| 46 | + required> | |
| 47 | + <div ng-show="changePassForm.inputPassword.$touched"> | |
| 48 | + <div ng-messages="changePassForm.inputPassword.$error"> | |
| 49 | + <div ng-messages-include="app/pages/geral/error-messages.html"></div> | |
| 50 | + </div> | |
| 51 | + </div> | |
| 33 | 52 | </div> |
| 34 | 53 | </div> |
| 35 | 54 | <div class="col-md-6"> |
| 36 | 55 | <div class="form-group"> |
| 37 | - <label for="inputRepeatPassword">Confirmar senha*</label> | |
| 38 | - <input type="password" id="inputRepeatPassword" class="form-control input-lg" required="" autofocus=""> | |
| 56 | + <label for="inputRepeatPassword">Confirmar senha*</label> <input | |
| 57 | + type="password" | |
| 58 | + id="inputRepeatPassword" | |
| 59 | + name="inputRepeatPassword" | |
| 60 | + class="form-control input-lg" | |
| 61 | + ng-class="{ 'has-error' : changePassForm.inputRepeatPassword.$invalid && changePassForm.inputRepeatPassword.$touched }" | |
| 62 | + ng-model="repeatPassword" | |
| 63 | + required> | |
| 64 | + <div ng-show="changePassForm.inputRepeatPassword.$touched"> | |
| 65 | + <div ng-messages="changePassForm.inputRepeatPassword.$error"> | |
| 66 | + <div ng-messages-include="app/pages/geral/error-messages.html"></div> | |
| 67 | + </div> | |
| 68 | + </div> | |
| 39 | 69 | </div> |
| 40 | 70 | </div> |
| 41 | 71 | </div> |
| ... | ... | @@ -44,11 +74,13 @@ |
| 44 | 74 | <span>A senha deve ter 6 ou mais caracteres e conter números e letras.</span> |
| 45 | 75 | </div> |
| 46 | 76 | </div> |
| 47 | - <br> | |
| 77 | + <br> | |
| 48 | 78 | <div class="row"> |
| 49 | 79 | <div class="col-md-6 col-sm-offset-3"> |
| 50 | 80 | <div class="form-group"> |
| 51 | - <button class="btn btn-lg btn-block btn-submit" type="submit">Confirmar alteração de senha</button> | |
| 81 | + <button | |
| 82 | + class="btn btn-lg btn-block btn-submit" | |
| 83 | + type="submit">Confirmar alteração de senha</button> | |
| 52 | 84 | </div> |
| 53 | 85 | </div> |
| 54 | 86 | </div> | ... | ... |
src/app/pages/auth/message.html
| 1 | -<section role="main" class="section-gray auth-content"> | |
| 2 | - <div class="container"> | |
| 3 | - | |
| 4 | - <show-message type="true" title="'Cadastro efetuado com sucesso :)'" message="'Agora você faz parte do Dialoga Brasil. Você será redirecionado para a página (página) em 10 segundos'"></show-message> | |
| 5 | - <!-- <show-message type="false" title="'Infelizmente não conseguimos efetuar o seu cadastro :('" message="'Por favor, tente novamente mais tarde ou entre em contato através da página de Dúvidas.'"></show-message> --> | |
| 6 | - | |
| 7 | - </div> | |
| 1 | +<section | |
| 2 | + role="main" | |
| 3 | + class="section-gray auth-content"> | |
| 4 | + <div class="container"> | |
| 5 | + <show-message | |
| 6 | + type="'error'" | |
| 7 | + title="'Cadastro efetuado com sucesso :)'" | |
| 8 | + message="'Agora você faz parte do Dialoga Brasil. Você será redirecionado para a página (página) em 10 segundos'"></show-message> | |
| 9 | + </div> | |
| 8 | 10 | </section> | ... | ... |
src/app/pages/auth/recover.html
| 1 | - <div class="container"> | |
| 1 | +<div class="container"> | |
| 2 | 2 | <div class="row"> |
| 3 | 3 | <div class="col-sm-12"> |
| 4 | 4 | <h2>Esqueci minha senha</h2> |
| 5 | - <h5>Calma, podemos ajudar! Informe o seu e-mail que a gente envia um link de alteração.</h5> | |
| 5 | + <h5> | |
| 6 | + Calma, podemos ajudar! Informe o seu e-mail que a gente envia um link de alteração. | |
| 7 | + </h5> | |
| 6 | 8 | </div> |
| 7 | 9 | </div> |
| 8 | 10 | </div> |
| 9 | -<section role="main" class="section-gray auth-content"> | |
| 11 | +<section | |
| 12 | + role="main" | |
| 13 | + class="section-gray auth-content"> | |
| 10 | 14 | <div class="container"> |
| 11 | 15 | <div class="row"> |
| 12 | 16 | <!-- Mostra só se estiver logado --> |
| ... | ... | @@ -14,7 +18,10 @@ |
| 14 | 18 | <div class="row"> |
| 15 | 19 | <div class="col-sm-8 col-sm-offset-2"> |
| 16 | 20 | <h3>Você está logado!</h3> |
| 17 | - <button type="button" ng-click="pageSignin.onClickLogout()" class="btn btn-primary">Sair</button> | |
| 21 | + <button | |
| 22 | + type="button" | |
| 23 | + ng-click="pageSignin.onClickLogout()" | |
| 24 | + class="btn btn-primary">Sair</button> | |
| 18 | 25 | </div> |
| 19 | 26 | </div> |
| 20 | 27 | </div> |
| ... | ... | @@ -24,26 +31,42 @@ |
| 24 | 31 | <div class="col-sm-8 col-sm-offset-2"> |
| 25 | 32 | <div class="row"> |
| 26 | 33 | <div class="col-md-12"> |
| 27 | - <form name="loginForm" ng-submit="pageSignin.login(pageSignin.credentials)"> | |
| 34 | + <form | |
| 35 | + name="recoverPassForm" | |
| 36 | + ng-submit="pageSignin.login(pageSignin.credentials)"> | |
| 28 | 37 | <div class="form-group"> |
| 29 | 38 | <label for="inputUsername">E-mail*</label> |
| 30 | - <input type="text" id="inputUsername" class="form-control input-lg" required="" autofocus="" ng-model="pageSignin.credentials.username"> | |
| 39 | + <input | |
| 40 | + type="email" | |
| 41 | + id="inputUsername" | |
| 42 | + name="inputUsername" | |
| 43 | + class="form-control input-lg" | |
| 44 | + ng-class="{ 'has-error' : recoverPassForm.inputUsername.$invalid && recoverPassForm.inputUsername.$touched }" | |
| 45 | + ng-model="pageSignin.credentials.username" | |
| 46 | + required /> | |
| 47 | + <div ng-show="recoverPassForm.inputUsername.$touched"> | |
| 48 | + <div ng-messages="recoverPassForm.inputUsername.$error"> | |
| 49 | + <div ng-messages-include="app/pages/geral/error-messages.html"></div> | |
| 50 | + </div> | |
| 51 | + </div> | |
| 31 | 52 | </div> |
| 32 | 53 | <div class="form-group"> |
| 33 | 54 | <div class="input-group"> |
| 34 | - <label for="inputPassword">Digite o texto desta imagem</label><br> | |
| 55 | + <label for="inputPassword">Digite o texto desta imagem</label> | |
| 56 | + <br> | |
| 35 | 57 | <span>Aqui vai um CAPTCHA</span> |
| 36 | 58 | </div> |
| 37 | 59 | </div> |
| 38 | 60 | <div class="form-group"> |
| 39 | - <button class="btn btn-lg btn-block btn-submit" type="submit">Solicitar alteração de senha</button> | |
| 61 | + <button | |
| 62 | + class="btn btn-lg btn-block btn-submit" | |
| 63 | + type="submit">Solicitar alteração de senha</button> | |
| 40 | 64 | </div> |
| 41 | 65 | </form> |
| 42 | 66 | </div> |
| 43 | 67 | </div> |
| 44 | 68 | </div> |
| 45 | - <br> | |
| 46 | - </div> | |
| 69 | + <br></div> | |
| 47 | 70 | </div> |
| 48 | 71 | </div> |
| 49 | 72 | -</section> |
| 73 | +</section> | |
| 50 | 74 | \ No newline at end of file | ... | ... |
src/app/pages/auth/signin.html
| 1 | - <div class="container"> | |
| 1 | +<div class="container"> | |
| 2 | 2 | <div class="row"> |
| 3 | 3 | <div class="col-sm-12"> |
| 4 | 4 | <h2>Cadastrar ou entrar</h2> |
| ... | ... | @@ -24,15 +24,23 @@ |
| 24 | 24 | <div class="col-md-12"> |
| 25 | 25 | <h2>Já possui cadastro</h2> |
| 26 | 26 | <p>Use seus dados para acessar o Dialoga Brasil</p> |
| 27 | - <form name="loginForm" ng-submit="pageSignin.login(pageSignin.credentials)"> | |
| 27 | + <form name="loginForm" ng-submit="pageSignin.login(pageSignin.credentials)" novalidate> | |
| 28 | 28 | <div class="form-group"> |
| 29 | - <label for="inputUsername">E-mail*</label> | |
| 30 | - <input type="text" id="inputUsername" class="form-control input-lg" required="" autofocus="" ng-model="pageSignin.credentials.username"> | |
| 29 | + <label for="inputLoginUsername">E-mail*</label> | |
| 30 | + <input type="email" id="inputLoginUsername" name="inputLoginUsername" class="form-control input-lg" ng-class="{ 'has-error' : loginForm.inputLoginUsername.$invalid && loginForm.inputLoginUsername.$touched }" ng-model="pageSignin.credentials.username" required/> | |
| 31 | + <div ng-show="loginForm.inputLoginUsername.$touched"> | |
| 32 | + <div ng-messages="loginForm.inputLoginUsername.$error"> | |
| 33 | + <div ng-messages-include="app/pages/geral/error-messages.html"></div> | |
| 34 | + </div> | |
| 35 | + </div> | |
| 31 | 36 | </div> |
| 32 | 37 | <div class="form-group"> |
| 33 | - <div class="input-group"> | |
| 34 | - <label for="inputPassword">Senha*</label> | |
| 35 | - <input type="password" id="inputPassword" class="form-control input-lg" required="" ng-model="pageSignin.credentials.password"> | |
| 38 | + <label for="inputLoginPassword">Senha*</label> | |
| 39 | + <input type="password" id="inputLoginPassword" name="inputLoginPassword" class="form-control input-lg" ng-class="{ 'has-error' : loginForm.inputLoginPassword.$invalid && loginForm.inputLoginPassword.$touched }" ng-model="pageSignin.credentials.password" required> | |
| 40 | + <div ng-show="loginForm.inputLoginPassword.$touched"> | |
| 41 | + <div ng-messages="loginForm.inputLoginPassword.$error"> | |
| 42 | + <div ng-messages-include="app/pages/geral/error-messages.html"></div> | |
| 43 | + </div> | |
| 36 | 44 | </div> |
| 37 | 45 | </div> |
| 38 | 46 | <div class="form-group"> |
| ... | ... | @@ -44,119 +52,156 @@ |
| 44 | 52 | <div class="row"> |
| 45 | 53 | <div class="col-md-12"> |
| 46 | 54 | <hr class="separator separator-or"></hr> |
| 47 | - </div> | |
| 48 | 55 | </div> |
| 49 | - <div class="row"> | |
| 50 | - <div class="col-md-5"> | |
| 51 | - <button type="button" class="btn btn-lg btn-block btn-social btn-facebook"> | |
| 56 | + </div> | |
| 57 | + <div class="row"> | |
| 58 | + <div class="col-md-5"> | |
| 59 | + <button type="button" class="btn btn-lg btn-block btn-social btn-facebook"> | |
| 52 | 60 | <div class="border-social-icon border-social-facebook"> |
| 53 | 61 | <span class="glyphicon icon-google-plus icon-white" aria-hidden="true"> |
| 54 | 62 | <!-- Facebook --> |
| 55 | - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 33 33" width="25" height="25"><path d="M18 32L12 32 12 16l-4 0 0-5.5 4 0 0-3.2C12 2.7 13.2 0 18.5 0l4.4 0 0 5.5 -2.8 0c-2.1 0-2.2 0.8-2.2 2.2l0 2.8 5 0 -0.6 5.5L18 16 18 32z"/></svg> | |
| 63 | + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 33 33" width="25" height="25"> | |
| 64 | + <path d="M18 32L12 32 12 16l-4 0 0-5.5 4 0 0-3.2C12 2.7 13.2 0 18.5 0l4.4 0 0 5.5 -2.8 0c-2.1 0-2.2 0.8-2.2 2.2l0 2.8 5 0 -0.6 5.5L18 16 18 32z"/> | |
| 65 | + </svg> | |
| 56 | 66 | </span> |
| 57 | 67 | </div> |
| 58 | - <span class="text"> | |
| 59 | - Entrar com Facebook | |
| 60 | - </span> | |
| 61 | - </button> | |
| 62 | - </div> | |
| 63 | - <div class="col-md-5"> | |
| 64 | - <button type="button" class="btn btn-lg btn-block btn-social btn-google-plus"> | |
| 65 | - <div class="border-social-icon border-social-googlePlus"> | |
| 66 | - <span class="glyphicon icon-google-plus icon-white" aria-hidden="true"> | |
| 67 | - <!-- Google Plus --> | |
| 68 | - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 33 33" width="25" height="25"><path d="M17.5 2c0 0-6.3 0-8.4 0C5.3 2 1.8 4.8 1.8 8.1c0 3.4 2.6 6.1 6.4 6.1 0.3 0 0.5 0 0.8 0 -0.2 0.5-0.4 1-0.4 1.6 0 0.9 0.5 1.7 1.1 2.3 -0.5 0-0.9 0-1.5 0C3.6 18.1 0 21.1 0 24.1c0 3 3.9 4.9 8.6 4.9 5.3 0 8.2-3 8.2-6 0-2.4-0.7-3.9-2.9-5.4 -0.8-0.5-2.2-1.8-2.2-2.6 0-0.9 0.3-1.3 1.6-2.4 1.4-1.1 2.4-2.6 2.4-4.4 0-2.1-0.9-4.2-2.7-4.8l2.7 0L17.5 2zM14.5 22.5c0.1 0.3 0.1 0.6 0.1 0.9 0 2.4-1.6 4.4-6.1 4.4 -3.2 0-5.5-2-5.5-4.5 0-2.4 2.9-4.4 6.1-4.4 0.8 0 1.4 0.1 2.1 0.3C12.9 20.4 14.2 21.1 14.5 22.5zM9.4 13.4c-2.2-0.1-4.2-2.4-4.6-5.2 -0.4-2.8 1.1-5 3.2-4.9 2.2 0.1 4.2 2.3 4.6 5.2C13 11.2 11.6 13.4 9.4 13.4zM26 8L26 2 24 2 24 8 18 8 18 10 24 10 24 16 26 16 26 10 32 10 32 8z"/></svg> | |
| 69 | - </span> | |
| 70 | - </div> | |
| 71 | - <span class="text"> | |
| 72 | - Entrar com Google+ | |
| 73 | - </span> | |
| 74 | - </button> | |
| 75 | - </div> | |
| 76 | - </div> | |
| 77 | - </div> | |
| 78 | - <div class="col-sm-6"> | |
| 79 | - <div class="row"> | |
| 80 | - <div class="col-sm-12"> | |
| 81 | - <h2>Ou cadastre-se</h2> | |
| 82 | - <p>Para fazer parte do Dialoga Brasil, interagir com as propostas e enviar as suas!</p> | |
| 68 | + <span class="text">Entrar com Facebook</span> | |
| 69 | + </button> | |
| 70 | + </div> | |
| 71 | + <div class="col-md-5"> | |
| 72 | + <button type="button" class="btn btn-lg btn-block btn-social btn-google-plus"> | |
| 73 | + <div class="border-social-icon border-social-googlePlus"> | |
| 74 | + <span class="glyphicon icon-google-plus icon-white" aria-hidden="true"> | |
| 75 | + <!-- Google Plus --> | |
| 76 | + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 33 33" width="25" height="25"> | |
| 77 | + <path d="M17.5 2c0 0-6.3 0-8.4 0C5.3 2 1.8 4.8 1.8 8.1c0 3.4 2.6 6.1 6.4 6.1 0.3 0 0.5 0 0.8 0 -0.2 0.5-0.4 1-0.4 1.6 0 0.9 0.5 1.7 1.1 2.3 -0.5 0-0.9 0-1.5 0C3.6 18.1 0 21.1 0 24.1c0 3 3.9 4.9 8.6 4.9 5.3 0 8.2-3 8.2-6 0-2.4-0.7-3.9-2.9-5.4 -0.8-0.5-2.2-1.8-2.2-2.6 0-0.9 0.3-1.3 1.6-2.4 1.4-1.1 2.4-2.6 2.4-4.4 0-2.1-0.9-4.2-2.7-4.8l2.7 0L17.5 2zM14.5 22.5c0.1 0.3 0.1 0.6 0.1 0.9 0 2.4-1.6 4.4-6.1 4.4 -3.2 0-5.5-2-5.5-4.5 0-2.4 2.9-4.4 6.1-4.4 0.8 0 1.4 0.1 2.1 0.3C12.9 20.4 14.2 21.1 14.5 22.5zM9.4 13.4c-2.2-0.1-4.2-2.4-4.6-5.2 -0.4-2.8 1.1-5 3.2-4.9 2.2 0.1 4.2 2.3 4.6 5.2C13 11.2 11.6 13.4 9.4 13.4zM26 8L26 2 24 2 24 8 18 8 18 10 24 10 24 16 26 16 26 10 32 10 32 8z"/> | |
| 78 | + </svg> | |
| 79 | + </span> | |
| 80 | + </div> | |
| 81 | + <span class="text">Entrar com Google+</span> | |
| 82 | + </button> | |
| 83 | + </div> | |
| 83 | 84 | </div> |
| 84 | 85 | </div> |
| 85 | - <div class="row"> | |
| 86 | - <div class="col-md-6"> | |
| 87 | - <button type="button" class="btn btn-lg btn-block btn-social btn-facebook"> | |
| 88 | - <div class="border-social-icon border-social-facebook"> | |
| 89 | - <span class="glyphicon icon-google-plus icon-white" aria-hidden="true"> | |
| 90 | - <!-- Google Plus --> | |
| 91 | - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 33 33" width="25" height="25"><path d="M18 32L12 32 12 16l-4 0 0-5.5 4 0 0-3.2C12 2.7 13.2 0 18.5 0l4.4 0 0 5.5 -2.8 0c-2.1 0-2.2 0.8-2.2 2.2l0 2.8 5 0 -0.6 5.5L18 16 18 32z"/></svg> | |
| 92 | - </span> | |
| 93 | - </div> | |
| 94 | - <span class="text">Conectar pelo Facebook</span> | |
| 95 | - </button> | |
| 86 | + <div class="col-sm-6"> | |
| 87 | + <div class="row"> | |
| 88 | + <div class="col-sm-12"> | |
| 89 | + <h2>Ou cadastre-se</h2> | |
| 90 | + <p> | |
| 91 | + Para fazer parte do Dialoga Brasil, interagir com as propostas e enviar as suas! | |
| 92 | + </p> | |
| 93 | + </div> | |
| 96 | 94 | </div> |
| 97 | - <div class="col-md-6"> | |
| 98 | - <button type="button" class="btn btn-lg btn-block btn-social btn-google-plus"> | |
| 99 | - <div class="border-social-icon border-social-googlePlus"> | |
| 100 | - <span class="glyphicon icon-google-plus icon-white" aria-hidden="true"> | |
| 101 | - <!-- Google Plus --> | |
| 102 | - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 33 33" width="25" height="25"><path d="M17.5 2c0 0-6.3 0-8.4 0C5.3 2 1.8 4.8 1.8 8.1c0 3.4 2.6 6.1 6.4 6.1 0.3 0 0.5 0 0.8 0 -0.2 0.5-0.4 1-0.4 1.6 0 0.9 0.5 1.7 1.1 2.3 -0.5 0-0.9 0-1.5 0C3.6 18.1 0 21.1 0 24.1c0 3 3.9 4.9 8.6 4.9 5.3 0 8.2-3 8.2-6 0-2.4-0.7-3.9-2.9-5.4 -0.8-0.5-2.2-1.8-2.2-2.6 0-0.9 0.3-1.3 1.6-2.4 1.4-1.1 2.4-2.6 2.4-4.4 0-2.1-0.9-4.2-2.7-4.8l2.7 0L17.5 2zM14.5 22.5c0.1 0.3 0.1 0.6 0.1 0.9 0 2.4-1.6 4.4-6.1 4.4 -3.2 0-5.5-2-5.5-4.5 0-2.4 2.9-4.4 6.1-4.4 0.8 0 1.4 0.1 2.1 0.3C12.9 20.4 14.2 21.1 14.5 22.5zM9.4 13.4c-2.2-0.1-4.2-2.4-4.6-5.2 -0.4-2.8 1.1-5 3.2-4.9 2.2 0.1 4.2 2.3 4.6 5.2C13 11.2 11.6 13.4 9.4 13.4zM26 8L26 2 24 2 24 8 18 8 18 10 24 10 24 16 26 16 26 10 32 10 32 8z"/></svg> | |
| 103 | - </span> | |
| 104 | - </div> | |
| 105 | - <span class="text">Conectar pelo Google+</span> | |
| 106 | - </button> | |
| 95 | + <div class="row"> | |
| 96 | + <div class="col-md-6"> | |
| 97 | + <button type="button" class="btn btn-lg btn-block btn-social btn-facebook"> | |
| 98 | + <div class="border-social-icon border-social-facebook"> | |
| 99 | + <span class="glyphicon icon-google-plus icon-white" aria-hidden="true"> | |
| 100 | + <!-- Google Plus --> | |
| 101 | + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 33 33" width="25" height="25"> | |
| 102 | + <path d="M18 32L12 32 12 16l-4 0 0-5.5 4 0 0-3.2C12 2.7 13.2 0 18.5 0l4.4 0 0 5.5 -2.8 0c-2.1 0-2.2 0.8-2.2 2.2l0 2.8 5 0 -0.6 5.5L18 16 18 32z"/> | |
| 103 | + </svg> | |
| 104 | + </span> | |
| 105 | + </div> | |
| 106 | + <span class="text">Conectar pelo Facebook</span> | |
| 107 | + </button> | |
| 108 | + </div> | |
| 109 | + <div class="col-md-6"> | |
| 110 | + <button type="button" class="btn btn-lg btn-block btn-social btn-google-plus"> | |
| 111 | + <div class="border-social-icon border-social-googlePlus"> | |
| 112 | + <span class="glyphicon icon-google-plus icon-white" aria-hidden="true"> | |
| 113 | + <!-- Google Plus --> | |
| 114 | + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 33 33" width="25" height="25"> | |
| 115 | + <path d="M17.5 2c0 0-6.3 0-8.4 0C5.3 2 1.8 4.8 1.8 8.1c0 3.4 2.6 6.1 6.4 6.1 0.3 0 0.5 0 0.8 0 -0.2 0.5-0.4 1-0.4 1.6 0 0.9 0.5 1.7 1.1 2.3 -0.5 0-0.9 0-1.5 0C3.6 18.1 0 21.1 0 24.1c0 3 3.9 4.9 8.6 4.9 5.3 0 8.2-3 8.2-6 0-2.4-0.7-3.9-2.9-5.4 -0.8-0.5-2.2-1.8-2.2-2.6 0-0.9 0.3-1.3 1.6-2.4 1.4-1.1 2.4-2.6 2.4-4.4 0-2.1-0.9-4.2-2.7-4.8l2.7 0L17.5 2zM14.5 22.5c0.1 0.3 0.1 0.6 0.1 0.9 0 2.4-1.6 4.4-6.1 4.4 -3.2 0-5.5-2-5.5-4.5 0-2.4 2.9-4.4 6.1-4.4 0.8 0 1.4 0.1 2.1 0.3C12.9 20.4 14.2 21.1 14.5 22.5zM9.4 13.4c-2.2-0.1-4.2-2.4-4.6-5.2 -0.4-2.8 1.1-5 3.2-4.9 2.2 0.1 4.2 2.3 4.6 5.2C13 11.2 11.6 13.4 9.4 13.4zM26 8L26 2 24 2 24 8 18 8 18 10 24 10 24 16 26 16 26 10 32 10 32 8z"/> | |
| 116 | + </svg> | |
| 117 | + </span> | |
| 118 | + </div> | |
| 119 | + <span class="text">Conectar pelo Google+</span> | |
| 120 | + </button> | |
| 121 | + </div> | |
| 107 | 122 | </div> |
| 108 | - </div> | |
| 109 | - <div class="row"> | |
| 110 | - <div class="col-sm-12"> | |
| 111 | - <hr class="separator separator-cadastro"></hr> | |
| 123 | + <div class="row"> | |
| 124 | + <div class="col-sm-12"> | |
| 125 | + <hr class="separator separator-cadastro"></hr> | |
| 112 | 126 | </div> |
| 113 | 127 | </div> |
| 114 | 128 | <div class="row"> |
| 115 | 129 | <div class="col-sm-12"> |
| 116 | - <form name="loginForm"> | |
| 130 | + <form name="cadastroForm"> | |
| 117 | 131 | <div class="form-group"> |
| 118 | 132 | <label for="inputNome">Nome:</label> |
| 119 | - <span class="text-right">*Dados obrigatórios</span> | |
| 120 | - <input type="text" id="inputNome" class="form-control input-lg" required="true" autofocus=""> | |
| 133 | + <span class="pull-right">*Dados obrigatórios</span> | |
| 134 | + <input type="text" id="inputNome" name="inputNome" class="form-control input-lg" ng-class="{ 'has-error' : cadastroForm.inputNome.$invalid && cadastroForm.inputNome.$touched }" ng-model="nome" ng-minlength="" ng-maxlength="" required> | |
| 135 | + <div ng-show="cadastroForm.inputNome.$touched"> | |
| 136 | + <div ng-messages="cadastroForm.inputNome.$error"> | |
| 137 | + <div ng-messages-include="app/pages/geral/error-messages.html"></div> | |
| 138 | + </div> | |
| 139 | + </div> | |
| 121 | 140 | </div> |
| 122 | 141 | <div class="form-group"> |
| 123 | 142 | <label for="inputEmail">E-mail*</label> |
| 124 | - <input type="text" id="inputEmail" class="form-control input-lg" required="true" autofocus=""> | |
| 143 | + <input type="email" id="inputEmail" name="inputEmail" class="form-control input-lg" ng-class="{ 'has-error' : cadastroForm.inputEmail.$invalid && cadastroForm.inputEmail.$touched }" ng-model="email" ng-minlength="" ng-maxlength="" required> | |
| 144 | + <div ng-show="cadastroForm.inputEmail.$touched"> | |
| 145 | + <div ng-messages="cadastroForm.inputEmail.$error"> | |
| 146 | + <div ng-messages-include="app/pages/geral/error-messages.html"></div> | |
| 147 | + </div> | |
| 148 | + </div> | |
| 125 | 149 | </div> |
| 126 | 150 | <div class="row"> |
| 127 | 151 | <div class="col-sm-6"> |
| 128 | 152 | <div class="form-group"> |
| 129 | 153 | <label for="inputPassword">Senha:</label> |
| 130 | - <input type="password" id="inputPassword" class="form-control input-lg" required="true" > | |
| 154 | + <input type="password" id="inputPassword" name="inputPassword" class="form-control input-lg" ng-class="{ 'has-error' : cadastroForm.inputPassword.$invalid && cadastroForm.inputPassword.$touched }" ng-model="senha" ng-minlength="" ng-maxlength="" required> | |
| 155 | + <div ng-show="cadastroForm.inputPassword.$touched"> | |
| 156 | + <div ng-messages="cadastroForm.inputPassword.$error"> | |
| 157 | + <div ng-messages-include="app/pages/geral/error-messages.html"></div> | |
| 158 | + </div> | |
| 159 | + </div> | |
| 131 | 160 | </div> |
| 132 | 161 | </div> |
| 133 | 162 | <div class="col-sm-6"> |
| 134 | 163 | <div class="form-group"> |
| 135 | 164 | <label for="inputRepeatPassword">Confirmar Senha:</label> |
| 136 | - <input type="password" id="inputRepeatPassword" class="form-control input-lg" required="true"> | |
| 165 | + <input type="password" id="inputRepeatPassword" name="inputRepeatPassword" class="form-control input-lg" ng-class="{ 'has-error' : cadastroForm.inputRepeatPassword.$invalid && cadastroForm.inputRepeatPassword.$touched }" ng-model="senhaRepetida" ng-minlength="" ng-maxlength="" required> | |
| 166 | + <div ng-show="cadastroForm.inputRepeatPassword.$touched"> | |
| 167 | + <div ng-messages="cadastroForm.inputRepeatPassword.$error"> | |
| 168 | + <div ng-messages-include="app/pages/geral/error-messages.html"></div> | |
| 169 | + </div> | |
| 170 | + </div> | |
| 137 | 171 | </div> |
| 138 | 172 | </div> |
| 139 | 173 | </div> |
| 140 | 174 | <div class="row"> |
| 141 | 175 | <div class="col-sm-12"> |
| 142 | - <span class="text">A senha deve ter 6 ou mais caracteres e conter números e letras.</span> | |
| 176 | + <span class="text"> | |
| 177 | + A senha deve ter 6 ou mais caracteres e conter números e letras. | |
| 178 | + </span> | |
| 143 | 179 | </div> |
| 144 | 180 | </div> |
| 145 | 181 | <div class="form-group"> |
| 146 | - <input type="checkbox" name="termosDeUso" value="aceito">Já li os <a href="">Termos de Uso</a> e concordo com os mesmos*</input> | |
| 147 | - </div> | |
| 148 | - <div class="form-group"> | |
| 149 | - <span>Digite o texto da imagem</span> | |
| 150 | - <p>O Captcha vai aqui</p> | |
| 151 | - </div> | |
| 152 | - <div class="form-group"> | |
| 153 | - <button class="btn btn-lg btn-block btn-submit" type="submit">Cadastrar</button> | |
| 182 | + <input type="checkbox" id="termosDeUso" name="termosDeUso" value="aceito" required> | |
| 183 | + Já li os | |
| 184 | + <a href="">Termos de Uso</a> | |
| 185 | + e concordo com os mesmos* | |
| 186 | + </input> | |
| 187 | + <div ng-show="cadastroForm.termosDeUso.$touched"> | |
| 188 | + <div ng-messages="cadastroForm.termosDeUso.$error"> | |
| 189 | + <div ng-messages-include="app/pages/geral/error-messages.html"></div> | |
| 190 | + </div> | |
| 154 | 191 | </div> |
| 155 | - </form> | |
| 156 | - </div> | |
| 192 | + </div> | |
| 193 | + <div class="form-group"> | |
| 194 | + <span>Digite o texto da imagem</span> | |
| 195 | + <p>O Captcha vai aqui</p> | |
| 196 | + </div> | |
| 197 | + <div class="form-group"> | |
| 198 | + <button class="btn btn-lg btn-block btn-submit" type="submit">Cadastrar</button> | |
| 199 | + </div> | |
| 200 | + </form> | |
| 157 | 201 | </div> |
| 158 | 202 | </div> |
| 159 | 203 | </div> |
| 160 | 204 | </div> |
| 161 | 205 | </div> |
| 162 | -</section> | |
| 206 | +</div> | |
| 207 | +</section> | |
| 163 | 208 | \ No newline at end of file | ... | ... |
src/app/pages/auth/signinbkp.html
| ... | ... | @@ -1,70 +0,0 @@ |
| 1 | -<section role="main" class="section-gray auth-content"> | |
| 2 | - <div class="container"> | |
| 3 | - | |
| 4 | - <div ng-if="pageSignin.currentUser"> | |
| 5 | - <div class="row"> | |
| 6 | - <div class="col-sm-8 col-sm-offset-2"> | |
| 7 | - <h3>Você está logado!</h3> | |
| 8 | - <button type="button" ng-click="pageSignin.onClickLogout()" class="btn btn-primary">Sair</button> | |
| 9 | - </div> | |
| 10 | - </div> | |
| 11 | - </div> | |
| 12 | - | |
| 13 | - <div ng-if="!pageSignin.currentUser"> | |
| 14 | - <div class="row"> | |
| 15 | - <div class="col-sm-8 col-sm-offset-2"> | |
| 16 | - <h2>Já possui cadastro</h2> | |
| 17 | - <h5p>Use seus dados para acessar o Dialoga Brasil</p> | |
| 18 | - <form name="loginForm" ng-submit="pageSignin.login(pageSignin.credentials)"> | |
| 19 | - <div class="form-group"> | |
| 20 | - <!-- <div class="input-group"> --> | |
| 21 | - <label for="inputUsername">E-mail*</label> | |
| 22 | - <!-- <div class="input-group-addon"><span class="glyphicon glyphicon-user"></span></div> --> | |
| 23 | - <input type="text" id="inputUsername" class="form-control input-lg" required="" autofocus="" ng-model="pageSignin.credentials.username"> | |
| 24 | - <!-- </div> --> | |
| 25 | - </div> | |
| 26 | - <div class="form-group"> | |
| 27 | - <!-- <div class="input-group"> --> | |
| 28 | - <label for="inputPassword">Senha*</label> | |
| 29 | - <!-- <div class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></div> --> | |
| 30 | - <input type="password" id="inputPassword" class="form-control input-lg" required="" ng-model="pageSignin.credentials.password"> | |
| 31 | - <!-- </div> --> | |
| 32 | - </div> | |
| 33 | - <div class="form-group"> | |
| 34 | - <button class="btn btn-lg btn-block btn-submit" type="submit">Entrar</button> | |
| 35 | - </div> | |
| 36 | - </form> | |
| 37 | - </div> | |
| 38 | - </div> | |
| 39 | - <div class="row"> | |
| 40 | - <div class="col-sm-8 col-sm-offset-2"> | |
| 41 | - <hr class="separator separator-or"></hr> | |
| 42 | - </div> | |
| 43 | - </div> | |
| 44 | - <div class="row"> | |
| 45 | - <div class="col-md-6"> | |
| 46 | - <button type="button" class="btn btn-lg btn-block btn-social btn-facebook"> | |
| 47 | - <span class="glyphicon icon-facebook icon-white" aria-hidden="true"> | |
| 48 | - <!-- Facebook --> | |
| 49 | - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 33 33" width="25" height="25"><path d="M18 32L12 32 12 16l-4 0 0-5.5 4 0 0-3.2C12 2.7 13.2 0 18.5 0l4.4 0 0 5.5 -2.8 0c-2.1 0-2.2 0.8-2.2 2.2l0 2.8 5 0 -0.6 5.5L18 16 18 32z"/></svg> | |
| 50 | - </span> | |
| 51 | - <span class="text"> | |
| 52 | - Entrar com Facebook | |
| 53 | - </span> | |
| 54 | - </button> | |
| 55 | - </div> | |
| 56 | - <div class="col-md-6"> | |
| 57 | - <button type="button" class="btn btn-lg btn-block btn-social btn-google-plus"> | |
| 58 | - <span class="glyphicon icon-google-plus icon-white" aria-hidden="true"> | |
| 59 | - <!-- Google Plus --> | |
| 60 | - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 33 33" width="25" height="25"><path d="M17.5 2c0 0-6.3 0-8.4 0C5.3 2 1.8 4.8 1.8 8.1c0 3.4 2.6 6.1 6.4 6.1 0.3 0 0.5 0 0.8 0 -0.2 0.5-0.4 1-0.4 1.6 0 0.9 0.5 1.7 1.1 2.3 -0.5 0-0.9 0-1.5 0C3.6 18.1 0 21.1 0 24.1c0 3 3.9 4.9 8.6 4.9 5.3 0 8.2-3 8.2-6 0-2.4-0.7-3.9-2.9-5.4 -0.8-0.5-2.2-1.8-2.2-2.6 0-0.9 0.3-1.3 1.6-2.4 1.4-1.1 2.4-2.6 2.4-4.4 0-2.1-0.9-4.2-2.7-4.8l2.7 0L17.5 2zM14.5 22.5c0.1 0.3 0.1 0.6 0.1 0.9 0 2.4-1.6 4.4-6.1 4.4 -3.2 0-5.5-2-5.5-4.5 0-2.4 2.9-4.4 6.1-4.4 0.8 0 1.4 0.1 2.1 0.3C12.9 20.4 14.2 21.1 14.5 22.5zM9.4 13.4c-2.2-0.1-4.2-2.4-4.6-5.2 -0.4-2.8 1.1-5 3.2-4.9 2.2 0.1 4.2 2.3 4.6 5.2C13 11.2 11.6 13.4 9.4 13.4zM26 8L26 2 24 2 24 8 18 8 18 10 24 10 24 16 26 16 26 10 32 10 32 8z"/></svg> | |
| 61 | - </span> | |
| 62 | - <span class="text"> | |
| 63 | - Entrar com Google+ | |
| 64 | - </span> | |
| 65 | - </button> | |
| 66 | - </div> | |
| 67 | - </div> | |
| 68 | - </div> | |
| 69 | - </div> | |
| 70 | -</section> |
| ... | ... | @@ -0,0 +1,6 @@ |
| 1 | +<div class="error-message"> | |
| 2 | + <div ng-message="required" >Ops, o campo é obrigatório.</div> | |
| 3 | + <div ng-message="minlength">O campo deve ser maior.</div> | |
| 4 | + <div ng-message="maxlength">O campo deve ser menor</div> | |
| 5 | + <div ng-message="email">O endereço de e-mail deve ser válido</div> | |
| 6 | +</div> | |
| 0 | 7 | \ No newline at end of file | ... | ... |
src/assets/images/icons/sprite.png