Commit 8e4d0b180c3c351ca6e7edec7fbc5e27f5d21dc5
1 parent
8d9d623e
Refactory html template + new environment service property
Showing
4 changed files
with
40 additions
and
23 deletions
Show diff stats
src/app/account/register-component.html
1 | 1 | <div class="register-page"> |
2 | 2 | <div class="welcome-message"> |
3 | 3 | <h1>{{"account.register.welcomeMessageTitle" | translate }}</h1> |
4 | - <p>{{"account.register.welcomeMessage" | translate }}</p> | |
5 | - <p>{{"account.register.seeMoreMessage" | translate}}<a href="#">{{"account.register.informationsMessage" | translate}}</a></p> | |
4 | + <div class="environment-signup-intro" ng-bind-html="ctrl.environment.signup_intro"></div> | |
5 | + <p>{{"account.register.seeMoreMessage" | translate}} <a href="#">{{"account.register.informationsMessage" | translate}} </a></p> | |
6 | 6 | </div> |
7 | 7 | <form> |
8 | 8 | <div class="row"> |
9 | 9 | <div class="col-md-6 register-field"> |
10 | - <label for="name">{{"account.register.firstNameLabel" | translate }}</label> | |
11 | - <input type="text" class="form-control" id="name" placeholder="joao" ng-model="ctrl.account.name"> | |
10 | + <div class="input-group"> | |
11 | + <span class="input-group-addon"><i class="fa fa-male"></i><i class="fa fa-female"></i></span> | |
12 | + <input type="text" class="form-control" id="name" placeholder="{{'account.register.firstNameLabel' | translate }}" ng-model="ctrl.account.name"> | |
13 | + </div> | |
12 | 14 | </div> |
13 | 15 | |
14 | 16 | <div class="col-md-6 register-field"> |
15 | - <label for="lastName">{{"account.register.lastNameLabel" | translate }}</label> | |
16 | - <input type="text" class="form-control" id="lastName" placeholder="silva" ng-model="ctrl.account.lastName"> | |
17 | + <div class="input-group"> | |
18 | + <span class="input-group-addon"><i class="fa fa-male"></i><i class="fa fa-female"></i></span> | |
19 | + <input type="text" class="form-control" id="lastName" placeholder="{{'account.register.lastNameLabel' | translate }}" ng-model="ctrl.account.lastName"> | |
20 | + </div> | |
17 | 21 | </div> |
18 | 22 | |
19 | 23 | <div class="col-md-12 register-field"> |
20 | - <label for="login">{{"account.register.usernameLabel" | translate }}</label> | |
21 | - <input type="text" class="form-control" id="login" placeholder="username" ng-model="ctrl.account.login"> | |
22 | - <p class="light-text">ex: ola.coop.br/joaosilva</p> | |
24 | + <div class="input-group"> | |
25 | + <span class="input-group-addon" style="font-weight: bold;"><i class="fa fa-globe"></i> http://ola.coop.br/</span> | |
26 | + <input type="text" class="form-control" id="login" placeholder="{{'account.register.usernameLabel' | translate }}" ng-model="ctrl.account.login"> | |
27 | + </div> | |
23 | 28 | </div> |
24 | 29 | |
25 | 30 | <div class="col-md-12 register-field"> |
26 | - <label for="email">{{"account.register.emailLabel" | translate }}</label> | |
27 | - <input type="text" class="form-control" id="email" placeholder="Email" ng-model="ctrl.account.email"> | |
31 | + <div class="input-group"> | |
32 | + <span class="input-group-addon"><i class="fa fa-envelope"></i></span> | |
33 | + <input type="text" class="form-control" id="email" placeholder="{{'account.register.emailLabel' | translate }}" ng-model="ctrl.account.email"> | |
34 | + </div> | |
28 | 35 | </div> |
29 | 36 | |
30 | 37 | <div class="col-md-6 register-field"> |
31 | - <label for="password">{{"account.register.passwordLabel" | translate }}</label> | |
32 | - <input type="password" class="form-control" id="password" placeholder="Password" ng-model="ctrl.account.password"> | |
38 | + <div class="input-group"> | |
39 | + <span class="input-group-addon"><i class="fa fa-lock"></i></span> | |
40 | + <input type="password" class="form-control" id="password" placeholder="{{'account.register.passwordLabel' | translate }}" ng-model="ctrl.account.password"> | |
41 | + </div> | |
33 | 42 | </div> |
34 | 43 | |
35 | 44 | <div class="col-md-6 register-field"> |
36 | - <label for="password-confirmation">{{"account.register.passwordConfirmationLabel" | translate}}</label> | |
37 | - <input type="password" class="form-control" id="passwordConfirmation" placeholder="Password Confirmation" ng-model="ctrl.account.password_confirmation"> | |
45 | + <div class="input-group"> | |
46 | + <span class="input-group-addon"><i class="fa fa-unlock-alt"></i></span> | |
47 | + <input type="password" class="form-control" id="passwordConfirmation" placeholder="{{'account.register.passwordConfirmationLabel' | translate}}" ng-model="ctrl.account.password_confirmation"> | |
48 | + </div> | |
38 | 49 | </div> |
39 | 50 | |
40 | 51 | <div class="col-md-12"> | ... | ... |
src/app/account/register.component.ts
1 | 1 | import { Inject, Input, Component, Output, EventEmitter, provide } from 'ng-forward'; |
2 | 2 | import { RegisterService } from "./../../lib/ng-noosfero-api/http/register.service"; |
3 | 3 | import { NotificationService } from "./../shared/services/notification.service"; |
4 | +import { EnvironmentService } from "../../lib/ng-noosfero-api/http/environment.service"; | |
4 | 5 | |
5 | 6 | @Component({ |
6 | 7 | selector: 'noosfero-register', |
... | ... | @@ -10,12 +11,19 @@ import { NotificationService } from "./../shared/services/notification.service"; |
10 | 11 | ] |
11 | 12 | }) |
12 | 13 | |
13 | -@Inject("$state", RegisterService, NotificationService) | |
14 | +@Inject("$state", RegisterService, NotificationService, EnvironmentService) | |
14 | 15 | export class RegisterComponent { |
15 | 16 | @Input() account: any; |
17 | + environment: noosfero.Environment; | |
16 | 18 | |
17 | - constructor(private $state: ng.ui.IStateService, public registerService: RegisterService, private notificationService: NotificationService) { | |
19 | + constructor( | |
20 | + private $state: ng.ui.IStateService, | |
21 | + public registerService: RegisterService, | |
22 | + private notificationService: NotificationService, | |
23 | + private environmentService: EnvironmentService | |
24 | + ) { | |
18 | 25 | this.account = {}; |
26 | + this.environment = environmentService.getCurrentEnvironment(); | |
19 | 27 | } |
20 | 28 | |
21 | 29 | signup() { | ... | ... |
src/languages/en.json
... | ... | @@ -100,17 +100,16 @@ |
100 | 100 | "block.edition.display_user.not_logged": "Not logged", |
101 | 101 | "block.edition.language.label": "Show for:", |
102 | 102 | "account.register.welcomeMessageTitle": "Nice to have you there!", |
103 | - "account.register.welcomeMessage": "Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...", | |
104 | 103 | "account.register.seeMoreMessage": "See more ", |
105 | 104 | "account.register.informationsMessage": "informations", |
106 | - "account.register.firstNameLabel": "First Name", | |
107 | - "account.register.lastNameLabel": "Last Name", | |
105 | + "account.register.firstNameLabel": "First name", | |
106 | + "account.register.lastNameLabel": "Last name", | |
108 | 107 | "account.register.usernameLabel": "Username", |
109 | 108 | "account.register.emailLabel": "Email", |
110 | 109 | "account.register.passwordLabel": "Password", |
111 | - "account.register.passwordConfirmationLabel": "Password Confirmation", | |
110 | + "account.register.passwordConfirmationLabel": "Password confirmation", | |
112 | 111 | "account.register.accountCreatingMessage": "By creating an account, you are agreeing with the ", |
113 | - "account.register.signupMessage": "Create Account", | |
112 | + "account.register.signupMessage": "Register", | |
114 | 113 | "account.register.haveAccountMessage": "Already have an account?", |
115 | 114 | "account.register.termsOfUseMessage": "terms of use", |
116 | 115 | "account.register.success.title": "Good job!", | ... | ... |
src/languages/pt.json
... | ... | @@ -100,7 +100,6 @@ |
100 | 100 | "block.edition.display_user.not_logged": "Não logados", |
101 | 101 | "block.edition.language.label": "Exibir para:", |
102 | 102 | "account.register.welcomeMessageTitle": "Ótimo ter você aqui!", |
103 | - "account.register.welcomeMessage": "Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...", | |
104 | 103 | "account.register.seeMoreMessage": "Saiba mais ", |
105 | 104 | "account.register.informationsMessage": "informações", |
106 | 105 | "account.register.firstNameLabel": "Nome", | ... | ... |