Fix login form

This commit is contained in:
Paulus Schoutsen 2017-06-20 21:06:57 -07:00
parent f177c0eb9f
commit e2e02acf30
2 changed files with 12 additions and 17 deletions

View File

@ -4,8 +4,7 @@
<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-input/paper-input-container.html">
<link rel="import" href="../../bower_components/paper-input/paper-input-error.html">
<link rel="import" href="../../bower_components/paper-input/paper-input.html">
<link rel="import" href="../../bower_components/iron-input/iron-input.html">
<link rel="import" href="../../bower_components/paper-spinner/paper-spinner.html">
@ -17,7 +16,7 @@
white-space: nowrap;
}
#passwordDecorator {
paper-input {
display: block;
margin-bottom: 16px;
}
@ -49,19 +48,14 @@
<a href="#" id="hideKeyboardOnFocus"></a>
<div class='interact'>
<div id='loginform' hidden$="[[showSpinner]]">
<paper-input-container
id="passwordDecorator"
invalid="[[errorMessage]]"
>
<label>Password</label>
<input
is="iron-input"
type="password"
id="passwordInput"
bind-value="{{password}}"
/>
<paper-input-error invalid="[[errorMessage]]">[[errorMessage]]</paper-input-error>
</paper-input-container>
<paper-input
id='passwordInput'
label='Password'
type='password'
invalid='[[errorMessage]]'
error-message='[[errorMessage]]'
value='{{password}}'
></paper-input>
<div class="layout horizontal center">
<paper-checkbox for id='rememberLogin'>Remember</paper-checkbox>
<paper-button id='loginButton'>Log In</paper-button>
@ -138,7 +132,7 @@ Polymer({
isValidatingChanged: function (newVal) {
if (!newVal) {
this.async(function () {
this.$.passwordInput.focus();
this.$.passwordInput.inputElement.inputElement.focus();
}.bind(this), 10);
}
},

View File

@ -67,6 +67,7 @@
<paper-input
label='[[item.name]]'
name='[[item.id]]'
type='[[item.type]]'
on-change='fieldChanged'
></paper-input>
</template>