Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX: Login modal on mobile does not submit on enter.
- Loading branch information
Showing
1 changed file
with
55 additions
and
50 deletions.
There are no files selected for viewing
105 changes: 55 additions & 50 deletions
105
app/assets/javascripts/discourse/templates/mobile/modal/login.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,59 @@ | ||
{{#d-modal-body title="login.title" class="login-modal"}} | ||
{{login-buttons action="externalLogin"}} | ||
{{#if canLoginLocal}} | ||
<form id='login-form' method='post'> | ||
<div> | ||
<table> | ||
<tr> | ||
<td> | ||
<label for='login-account-name'>{{i18n 'login.username'}} </label> | ||
</td> | ||
<td> | ||
{{text-field value=loginName type="email" placeholderKey="login.email_placeholder" id="login-account-name" autocorrect="off" autocapitalize="off"}} | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
<label for='login-account-password'>{{i18n 'login.password'}} </label> | ||
</td> | ||
<td> | ||
{{text-field value=loginPassword type="password" id="login-account-password" maxlength="200"}} | ||
</td> | ||
</tr> | ||
<tr> | ||
<td></td> | ||
<td> | ||
<a id="forgot-password-link" {{action "showForgotPassword"}}>{{i18n 'forgot_password.action'}}</a> | ||
</td> | ||
</tr> | ||
</table> | ||
</div> | ||
</form> | ||
{{/if}} | ||
{{authMessage}} | ||
<div id='login-alert' class={{alertClass}}>{{alert}}</div> | ||
{{/d-modal-body}} | ||
{{#login-modal screenX=lastX screenY=lastY loginName=loginName loginPassword=loginPassword action="login"}} | ||
{{#d-modal-body title="login.title" class="login-modal"}} | ||
{{login-buttons action="externalLogin"}} | ||
{{#if canLoginLocal}} | ||
<form id='login-form' method='post'> | ||
<div> | ||
<table> | ||
<tr> | ||
<td> | ||
<label for='login-account-name'>{{i18n 'login.username'}} </label> | ||
</td> | ||
<td> | ||
{{text-field value=loginName type="email" placeholderKey="login.email_placeholder" id="login-account-name" autocorrect="off" autocapitalize="off"}} | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
<label for='login-account-password'>{{i18n 'login.password'}} </label> | ||
</td> | ||
<td> | ||
{{text-field value=loginPassword type="password" id="login-account-password" maxlength="200"}} | ||
</td> | ||
</tr> | ||
<tr> | ||
<td></td> | ||
<td> | ||
<a id="forgot-password-link" {{action "showForgotPassword"}}>{{i18n 'forgot_password.action'}}</a> | ||
</td> | ||
</tr> | ||
</table> | ||
</div> | ||
|
||
<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> {{loginButtonText}} | ||
</button> | ||
|
||
{{#if showSignupLink}} | ||
<button class="btn btn-large" id="new-account-link" {{action "showCreateAccount"}}> | ||
{{i18n 'create_account.title'}} | ||
</form> | ||
{{/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> {{loginButtonText}} | ||
</button> | ||
|
||
{{#if showSignupLink}} | ||
<button class="btn btn-large" id="new-account-link" {{action "showCreateAccount"}}> | ||
{{i18n 'create_account.title'}} | ||
</button> | ||
{{/if}} | ||
{{/if}} | ||
{{/if}} | ||
</div> | ||
</div> | ||
{{/login-modal}} |