Add loading spinner to forgot button on signin page

refs #5652

- replaces basic forgot? button on signin page with spin button
- replaces {{input with gh-input}}
This commit is contained in:
cobbspur 2015-08-26 14:23:14 +01:00
parent 6989843b19
commit 594ae6c7d9
2 changed files with 37 additions and 37 deletions

View File

@ -7,38 +7,38 @@
<input style="display:none;" type="text" name="fakeusernameremembered"/> <input style="display:none;" type="text" name="fakeusernameremembered"/>
<input style="display:none;" type="password" name="fakepasswordremembered"/> <input style="display:none;" type="password" name="fakepasswordremembered"/>
{{gh-profile-image fileStorage=config.fileStorage email=validEmail setImage="setImage"}} {{gh-profile-image fileStorage=config.fileStorage email=validEmail setImage="setImage"}}
{{#gh-form-group errors=errors property="email"}} {{#gh-form-group errors=errors property="email"}}
<label for="email-address">Email address</label> <label for="email-address">Email address</label>
<span class="input-icon icon-mail"> <span class="input-icon icon-mail">
{{gh-trim-focus-input tabindex="1" type="email" name="email" enter=(action "setup") placeholder="Eg. john@example.com" autocorrect="off" value=email focusOut=(action "handleEmail")}} {{gh-trim-focus-input tabindex="1" type="email" name="email" placeholder="Eg. john@example.com" autocorrect="off" value=email focusOut=(action "handleEmail")}}
</span> </span>
{{gh-error-message errors=errors property="email"}} {{gh-error-message errors=errors property="email"}}
{{/gh-form-group}} {{/gh-form-group}}
{{#gh-form-group errors=errors property="name"}} {{#gh-form-group errors=errors property="name"}}
<label for="full-name">Full name</label> <label for="full-name">Full name</label>
<span class="input-icon icon-user"> <span class="input-icon icon-user">
{{gh-input tabindex="2" type="text" name="name" enter=(action "setup") placeholder="Eg. John H. Watson" autocorrect="off" value=name focusOut=(action "validate" "name")}} {{gh-input tabindex="2" type="text" name="name" placeholder="Eg. John H. Watson" autocorrect="off" value=name focusOut=(action "validate" "name")}}
</span> </span>
{{gh-error-message errors=errors property="name"}} {{gh-error-message errors=errors property="name"}}
{{/gh-form-group}} {{/gh-form-group}}
{{#gh-form-group errors=errors property="password"}} {{#gh-form-group errors=errors property="password"}}
<label for="password">Password</label> <label for="password">Password</label>
<span class="input-icon icon-lock"> <span class="input-icon icon-lock">
{{gh-input tabindex="3" type="password" name="password" enter=(action "setup") placeholder="At least 8 characters" autocorrect="off" value=password focusOut=(action "validate" "password")}} {{gh-input tabindex="3" type="password" name="password" placeholder="At least 8 characters" autocorrect="off" value=password focusOut=(action "validate" "password")}}
</span> </span>
{{gh-error-message errors=errors property="password"}} {{gh-error-message errors=errors property="password"}}
{{/gh-form-group}} {{/gh-form-group}}
{{#gh-form-group errors=errors property="blogTitle"}} {{#gh-form-group errors=errors property="blogTitle"}}
<label for="blog-title">Blog title</label> <label for="blog-title">Blog title</label>
<span class="input-icon icon-content"> <span class="input-icon icon-content">
{{gh-input tabindex="4" type="text" name="blog-title" enter=(action "setup") placeholder="Eg. The Daily Awesome" autocorrect="off" value=blogTitle focusOut=(action "validate" "blogTitle")}} {{gh-input tabindex="4" type="text" name="blog-title" placeholder="Eg. The Daily Awesome" autocorrect="off" value=blogTitle focusOut=(action "validate" "blogTitle")}}
</span> </span>
{{gh-error-message errors=errors property="blogTitle"}} {{gh-error-message errors=errors property="blogTitle"}}
{{/gh-form-group}} {{/gh-form-group}}
</form> {{#gh-spin-button type="submit" tabindex="5" class="btn btn-green btn-lg btn-block" action="setup" submitting=submitting autoWidth="false"}}
{{#gh-spin-button type="submit" tabindex="5" class="btn btn-green btn-lg btn-block" action="setup" submitting=submitting autoWidth="false"}} Last step: Invite your team <i class="icon-chevron"></i>
Last step: Invite your team <i class="icon-chevron"></i> {{/gh-spin-button}}
{{/gh-spin-button}} </form>
<p class="main-error">{{{flowErrors}}}</p> <p class="main-error">{{{flowErrors}}}</p>

View File

@ -1,7 +1,7 @@
<div class="gh-flow"> <div class="gh-flow">
<div class="gh-flow-content-wrap"> <div class="gh-flow-content-wrap">
<section class="gh-flow-content"> <section class="gh-flow-content">
<form id="login" class="gh-signin" method="post" novalidate="novalidate" {{action "validateAndAuthenticate" on="submit"}}> <form id="login" class="gh-signin" method="post" novalidate="novalidate">
{{#gh-form-group errors=model.errors property="identification"}} {{#gh-form-group errors=model.errors property="identification"}}
<span class="input-icon icon-mail"> <span class="input-icon icon-mail">
{{gh-trim-focus-input class="gh-input email" type="email" placeholder="Email Address" name="identification" autocapitalize="off" autocorrect="off" tabindex="1" value=model.identification}} {{gh-trim-focus-input class="gh-input email" type="email" placeholder="Email Address" name="identification" autocapitalize="off" autocorrect="off" tabindex="1" value=model.identification}}
@ -9,11 +9,11 @@
{{/gh-form-group}} {{/gh-form-group}}
{{#gh-form-group errors=model.errors property="password"}} {{#gh-form-group errors=model.errors property="password"}}
<span class="input-icon icon-lock forgotten-wrap"> <span class="input-icon icon-lock forgotten-wrap">
{{input class="gh-input password" type="password" placeholder="Password" name="password" tabindex="2" value=model.password}} {{gh-input class="password" type="password" placeholder="Password" name="password" tabindex="2" value=model.password autocorrect="off"}}
<button type="button" {{action "forgotten"}} class="forgotten-link btn btn-link" tabindex="4" disabled={{submitting}}>Forgot?</button> {{#gh-spin-button class="forgotten-link btn btn-link" type="button" action="forgotten" tabindex="4" submitting=submitting autoWidth="true"}}Forgot?{{/gh-spin-button}}
</span> </span>
{{/gh-form-group}} {{/gh-form-group}}
{{#gh-spin-button class="login btn btn-blue btn-block" type="submit" tabindex="3" submitting=loggingIn autoWidth="false"}}Sign in{{/gh-spin-button}} {{#gh-spin-button class="login btn btn-blue btn-block" type="submit" action="validateAndAuthenticate" tabindex="3" submitting=loggingIn autoWidth="false"}}Sign in{{/gh-spin-button}}
</form> </form>
<p class="main-error">{{{flowErrors}}}</p> <p class="main-error">{{{flowErrors}}}</p>