Commit 74b67520b7efb857de77f0e76d9442cfb3e63e4b
1 parent
716c2a26
Exists in
master
and in
7 other branches
Refactory html template + new environment service property
Showing
3 changed files
with
53 additions
and
35 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
| ... | ... | @@ -31,23 +31,6 @@ |
| 31 | 31 | "auth.createAccount": "Create account", |
| 32 | 32 | "navbar.content_viewer_actions.new_item": "New Item", |
| 33 | 33 | "navbar.profile_actions.new_item": "New Item", |
| 34 | - "account.register.welcomeMessageTitle": "Nice to have you there!", | |
| 35 | - "account.register.welcomeMessage": "Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...", | |
| 36 | - "account.register.seeMoreMessage": "See more ", | |
| 37 | - "account.register.informationsMessage": "informations", | |
| 38 | - "account.register.firstNameLabel": "First Name", | |
| 39 | - "account.register.lastNameLabel": "Last Name", | |
| 40 | - "account.register.usernameLabel": "Username", | |
| 41 | - "account.register.emailLabel": "Email", | |
| 42 | - "account.register.passwordLabel": "Password", | |
| 43 | - "account.register.passwordConfirmationLabel": "Password Confirmation", | |
| 44 | - "account.register.accountCreatingMessage": "By creating an account, you are agreeing with the ", | |
| 45 | - "account.register.signupMessage": "Create Account", | |
| 46 | - "account.register.haveAccountMessage": "Already have an account?", | |
| 47 | - "account.register.termsOfUseMessage": "terms of use", | |
| 48 | - "account.register.success.title": "Good job!", | |
| 49 | - "account.register.success.message": "Account created!", | |
| 50 | - "account.register.passwordConfirmation.failed": "Wrong password confirmation" | |
| 51 | 34 | "navbar.content_viewer_actions.new_post": "New Post", |
| 52 | 35 | "navbar.content_viewer_actions.new_discussion": "New Discussion", |
| 53 | 36 | "navbar.profile_actions.new_discussion": "New Discussion", |
| ... | ... | @@ -118,5 +101,21 @@ |
| 118 | 101 | "block.edition.language.label": "Show for:", |
| 119 | 102 | "activities.event.description": "Event on", |
| 120 | 103 | "time.at": "at", |
| 121 | - "date.on": "On" | |
| 104 | + "date.on": "On", | |
| 105 | + "account.register.welcomeMessageTitle": "Nice to have you there!", | |
| 106 | + "account.register.seeMoreMessage": "See more ", | |
| 107 | + "account.register.informationsMessage": "informations", | |
| 108 | + "account.register.firstNameLabel": "First name", | |
| 109 | + "account.register.lastNameLabel": "Last name", | |
| 110 | + "account.register.usernameLabel": "Username", | |
| 111 | + "account.register.emailLabel": "Email", | |
| 112 | + "account.register.passwordLabel": "Password", | |
| 113 | + "account.register.passwordConfirmationLabel": "Password confirmation", | |
| 114 | + "account.register.accountCreatingMessage": "By creating an account, you are agreeing with the ", | |
| 115 | + "account.register.signupMessage": "Register", | |
| 116 | + "account.register.haveAccountMessage": "Already have an account?", | |
| 117 | + "account.register.termsOfUseMessage": "terms of use", | |
| 118 | + "account.register.success.title": "Good job!", | |
| 119 | + "account.register.success.message": "Account created!", | |
| 120 | + "account.register.passwordConfirmation.failed": "Wrong password confirmation" | |
| 122 | 121 | } | ... | ... |