ember-flexberry-account 0.1.0-beta.1 → 0.1.0-beta.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -69,6 +69,15 @@ export default Ember.Component.extend({
69
69
  */
70
70
  remember: true,
71
71
 
72
+ /**
73
+ Flag is used to hide remember me field.
74
+
75
+ @property showRemember
76
+ @type Boolean
77
+ @default false
78
+ */
79
+ showRemember: false,
80
+
72
81
  /**
73
82
  This computed field shows whether login is allowed or not.
74
83
 
@@ -124,8 +133,8 @@ export default Ember.Component.extend({
124
133
  Ember.getOwner(this).lookup('router:main').transitionTo('pwd-reset');
125
134
  },
126
135
 
127
- onKeyPress(e) {
128
- if (e.keyCode === 13) {
136
+ onKeyPress: function(e) {
137
+ if (e.keyCode === 13 && !this.get('allowToLogin')) {
129
138
  this.send('login');
130
139
  }
131
140
  },
@@ -25,9 +25,9 @@ export default {
25
25
  },
26
26
  components: {
27
27
  login: {
28
- 'username-label': 'User name (E-mail):',
29
- 'password-label': 'Password:',
30
- 'remember-label': 'Remember:',
28
+ 'username-label': 'User name (E-mail)',
29
+ 'password-label': 'Password',
30
+ 'remember-label': 'Remember',
31
31
  'login-button-title': 'Log in to the system using login and password',
32
32
  'login-button-text': 'Login',
33
33
  'login-with-label': 'Login with:',
@@ -27,9 +27,9 @@ export default {
27
27
 
28
28
  components: {
29
29
  login: {
30
- 'username-label': 'Логин (E-mail):',
31
- 'password-label': 'Пароль:',
32
- 'remember-label': 'Запомнить:',
30
+ 'username-label': 'Логин (E-mail)',
31
+ 'password-label': 'Пароль',
32
+ 'remember-label': 'Запомнить',
33
33
  'login-button-title': 'Выполнить вход в систему по логину и паролю',
34
34
  'login-button-text': 'Войти',
35
35
  'login-with-label': 'Войти с помощью:',
@@ -1,13 +1,30 @@
1
1
  <div class="username-div">
2
- {{t "components.login.username-label"}}<br/>
3
- {{input type="text" keyPress=(action "onKeyPress") value=username}}
2
+ <label for="username">{{t "components.login.username-label"}}</label>
3
+ {{input
4
+ type="text"
5
+ id="username"
6
+ keyPress=(action "onKeyPress")
7
+ value=username
8
+ placeholder="Введите логин"}}
4
9
  </div>
5
10
  <div class="password-div">
6
- {{t "components.login.password-label"}}<br/>
7
- {{input type="password" keyPress=(action "onKeyPress") value=password}}
11
+ <label for="password">{{t "components.login.password-label"}}</label>
12
+ {{input
13
+ type="password"
14
+ id="password"
15
+ keyPress=(action "onKeyPress")
16
+ value=password
17
+ placeholder="Введите пароль"}}
8
18
  </div>
19
+ {{#if showRemember}}
20
+ <div class="remember-div">
21
+ <div class="ui checkbox">
22
+ {{input type="checkbox" id="remember" checked=remember}}
23
+ <label for="remember">{{t "components.login.remember-label"}}</label>
24
+ </div>
25
+ </div>
26
+ {{/if}}
9
27
  <div class="login-div">
10
- {{t "components.login.remember-label"}} {{input type="checkbox" checked=remember}}
11
28
  <button
12
29
  class="ui login-button button"
13
30
  title={{t "components.login.login-button-title"}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-flexberry-account",
3
- "version": "0.1.0-beta.1",
3
+ "version": "0.1.0-beta.3",
4
4
  "description": "User account management addon.",
5
5
  "directories": {
6
6
  "doc": "doc",