mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-19 15:26:36 +00:00
Fix login form
This commit is contained in:
parent
f177c0eb9f
commit
e2e02acf30
@ -4,8 +4,7 @@
|
|||||||
|
|
||||||
<link rel="import" href="../../bower_components/paper-checkbox/paper-checkbox.html">
|
<link rel="import" href="../../bower_components/paper-checkbox/paper-checkbox.html">
|
||||||
<link rel="import" href="../../bower_components/paper-button/paper-button.html">
|
<link rel="import" href="../../bower_components/paper-button/paper-button.html">
|
||||||
<link rel="import" href="../../bower_components/paper-input/paper-input-container.html">
|
<link rel="import" href="../../bower_components/paper-input/paper-input.html">
|
||||||
<link rel="import" href="../../bower_components/paper-input/paper-input-error.html">
|
|
||||||
<link rel="import" href="../../bower_components/iron-input/iron-input.html">
|
<link rel="import" href="../../bower_components/iron-input/iron-input.html">
|
||||||
<link rel="import" href="../../bower_components/paper-spinner/paper-spinner.html">
|
<link rel="import" href="../../bower_components/paper-spinner/paper-spinner.html">
|
||||||
|
|
||||||
@ -17,7 +16,7 @@
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
#passwordDecorator {
|
paper-input {
|
||||||
display: block;
|
display: block;
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
}
|
}
|
||||||
@ -49,19 +48,14 @@
|
|||||||
<a href="#" id="hideKeyboardOnFocus"></a>
|
<a href="#" id="hideKeyboardOnFocus"></a>
|
||||||
<div class='interact'>
|
<div class='interact'>
|
||||||
<div id='loginform' hidden$="[[showSpinner]]">
|
<div id='loginform' hidden$="[[showSpinner]]">
|
||||||
<paper-input-container
|
<paper-input
|
||||||
id="passwordDecorator"
|
id='passwordInput'
|
||||||
invalid="[[errorMessage]]"
|
label='Password'
|
||||||
>
|
type='password'
|
||||||
<label>Password</label>
|
invalid='[[errorMessage]]'
|
||||||
<input
|
error-message='[[errorMessage]]'
|
||||||
is="iron-input"
|
value='{{password}}'
|
||||||
type="password"
|
></paper-input>
|
||||||
id="passwordInput"
|
|
||||||
bind-value="{{password}}"
|
|
||||||
/>
|
|
||||||
<paper-input-error invalid="[[errorMessage]]">[[errorMessage]]</paper-input-error>
|
|
||||||
</paper-input-container>
|
|
||||||
<div class="layout horizontal center">
|
<div class="layout horizontal center">
|
||||||
<paper-checkbox for id='rememberLogin'>Remember</paper-checkbox>
|
<paper-checkbox for id='rememberLogin'>Remember</paper-checkbox>
|
||||||
<paper-button id='loginButton'>Log In</paper-button>
|
<paper-button id='loginButton'>Log In</paper-button>
|
||||||
@ -138,7 +132,7 @@ Polymer({
|
|||||||
isValidatingChanged: function (newVal) {
|
isValidatingChanged: function (newVal) {
|
||||||
if (!newVal) {
|
if (!newVal) {
|
||||||
this.async(function () {
|
this.async(function () {
|
||||||
this.$.passwordInput.focus();
|
this.$.passwordInput.inputElement.inputElement.focus();
|
||||||
}.bind(this), 10);
|
}.bind(this), 10);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -67,6 +67,7 @@
|
|||||||
<paper-input
|
<paper-input
|
||||||
label='[[item.name]]'
|
label='[[item.name]]'
|
||||||
name='[[item.id]]'
|
name='[[item.id]]'
|
||||||
|
type='[[item.type]]'
|
||||||
on-change='fieldChanged'
|
on-change='fieldChanged'
|
||||||
></paper-input>
|
></paper-input>
|
||||||
</template>
|
</template>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user