FIX: Login modal on mobile does not submit on enter.

This commit is contained in:
Guo Xiang Tan 2017-01-09 13:20:53 +08:00
parent e89fc5f483
commit e721e31699
1 changed files with 56 additions and 51 deletions

View File

@ -1,54 +1,59 @@
{{#d-modal-body title="login.title" class="login-modal"}} {{#login-modal screenX=lastX screenY=lastY loginName=loginName loginPassword=loginPassword action="login"}}
{{login-buttons action="externalLogin"}} {{#d-modal-body title="login.title" class="login-modal"}}
{{#if canLoginLocal}} {{login-buttons action="externalLogin"}}
<form id='login-form' method='post'> {{#if canLoginLocal}}
<div> <form id='login-form' method='post'>
<table> <div>
<tr> <table>
<td> <tr>
<label for='login-account-name'>{{i18n 'login.username'}}&nbsp;</label> <td>
</td> <label for='login-account-name'>{{i18n 'login.username'}}&nbsp;</label>
<td> </td>
{{text-field value=loginName type="email" placeholderKey="login.email_placeholder" id="login-account-name" autocorrect="off" autocapitalize="off"}} <td>
</td> {{text-field value=loginName type="email" placeholderKey="login.email_placeholder" id="login-account-name" autocorrect="off" autocapitalize="off"}}
</tr> </td>
<tr> </tr>
<td> <tr>
<label for='login-account-password'>{{i18n 'login.password'}}&nbsp;</label> <td>
</td> <label for='login-account-password'>{{i18n 'login.password'}}&nbsp;</label>
<td> </td>
{{text-field value=loginPassword type="password" id="login-account-password" maxlength="200"}} &nbsp; <td>
</td> {{text-field value=loginPassword type="password" id="login-account-password" maxlength="200"}} &nbsp;
</tr> </td>
<tr> </tr>
<td></td> <tr>
<td> <td></td>
<a id="forgot-password-link" {{action "showForgotPassword"}}>{{i18n 'forgot_password.action'}}</a> <td>
</td> <a id="forgot-password-link" {{action "showForgotPassword"}}>{{i18n 'forgot_password.action'}}</a>
</tr> </td>
</table> </tr>
</div> </table>
</form> </div>
{{/if}}
{{authMessage}}
<div id='login-alert' class={{alertClass}}>{{alert}}</div>
{{/d-modal-body}}
<div class="modal-footer">
{{#if authenticate}}
{{i18n 'login.authenticating'}}
{{/if}}
{{#if canLoginLocal}}
<button class='btn btn-large btn-primary'
disabled={{loginDisabled}}
{{action "login"}}>
<i class="fa fa-unlock"></i>&nbsp;{{loginButtonText}}
</button>
{{#if showSignupLink}} </form>
<button class="btn btn-large" id="new-account-link" {{action "showCreateAccount"}}>
{{i18n 'create_account.title'}}
</button>
{{/if}} {{/if}}
{{/if}} {{authMessage}}
</div> <div id='login-alert' class={{alertClass}}>{{alert}}</div>
{{/d-modal-body}}
<div class="modal-footer">
{{#if authenticate}}
{{i18n 'login.authenticating'}}
{{/if}}
{{#if canLoginLocal}}
<button class='btn btn-large btn-primary'
disabled={{loginDisabled}}
{{action "login"}}>
<i class="fa fa-unlock"></i>&nbsp;{{loginButtonText}}
</button>
{{#if showSignupLink}}
<button class="btn btn-large" id="new-account-link" {{action "showCreateAccount"}}>
{{i18n 'create_account.title'}}
</button>
{{/if}}
{{/if}}
</div>
{{/login-modal}}