Cleaned up login/account creation page
Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
parent
4a9bb061b0
commit
1566d132f6
@ -385,7 +385,7 @@
|
||||
<paper-input tabindex=0 id="password" label="Password" type="password" value="{{password}}" on-keypress="enterCheck"></paper-input>
|
||||
<paper-input tabindex=0 id="name" label="Display name" value="{{name}}" on-keypress="enterCheck"></paper-input>
|
||||
<paper-input tabindex=0 id="who" label="Who do you know?" value="{{who}}" on-keypress="enterCheck"></paper-input>
|
||||
<paper-button tabindex=0 id="createButton" disabled$="[[disableCreate(username,name,password,mail)]]" on-tap="create" raised><div hidden$="[[loggingIn]]">create</div><div hidden$="[[!loggingIn]]"><paper-spinner active$="[[loggingIn]]"></paper-spinner></div></paper-button>
|
||||
<paper-button tabindex=0 id="createButton" disabled$="[[disableCreate(mail,password,name,who)]]" on-tap="create" raised><div hidden$="[[loggingIn]]">create</div><div hidden$="[[!loggingIn]]"><paper-spinner active$="[[loggingIn]]"></paper-spinner></div></paper-button>
|
||||
</div>
|
||||
</paper-dialog>
|
||||
<paper-toast id="toast"></paper-toast>
|
||||
@ -478,11 +478,11 @@
|
||||
return !username || username == "" || !password || password == "";
|
||||
},
|
||||
|
||||
disableCreate: function(username, name, mail, password) {
|
||||
return !username || username == "" ||
|
||||
disableCreate: function(mail, password, name, who) {
|
||||
return !mail || mail == "" ||
|
||||
!password || password == "" ||
|
||||
!name || name == "" ||
|
||||
!mail || mail == "";
|
||||
!who || who == "";
|
||||
},
|
||||
|
||||
enterCheck: function(event) {
|
||||
@ -490,7 +490,9 @@
|
||||
var next = event.currentTarget.nextElementSibling;
|
||||
event.preventDefault();
|
||||
if (next.tagName.toLowerCase() == "paper-button") {
|
||||
if (!next.disabled) {
|
||||
next.click();
|
||||
}
|
||||
} else {
|
||||
this.async(function(next) {
|
||||
next._focusableElement.focus();
|
||||
|
Loading…
x
Reference in New Issue
Block a user