mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 01:33:24 +08:00
UX: semantic form on login modal
cf. https://meta.discourse.org/t/improve-semantics-of-orphaned-form-elements-such-as-buttons/72936
This commit is contained in:
parent
9112d2da3b
commit
f2219138e1
|
@ -1,8 +1,8 @@
|
|||
{{#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'>
|
||||
<form id='login-form' method='post'>
|
||||
{{#d-modal-body title="login.title" class="login-modal"}}
|
||||
{{login-buttons action="externalLogin"}}
|
||||
{{#if canLoginLocal}}
|
||||
<div>
|
||||
<table>
|
||||
<tr>
|
||||
|
@ -32,32 +32,30 @@
|
|||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
{{/if}}
|
||||
{{authMessage}}
|
||||
<div id='login-alert' class={{alertClass}}>{{alert}}</div>
|
||||
{{/d-modal-body}}
|
||||
|
||||
<div class="modal-footer">
|
||||
{{#if canLoginLocal}}
|
||||
<button class="btn btn-large btn-primary"
|
||||
disabled={{loginDisabled}}
|
||||
{{action "login"}}>
|
||||
{{d-icon "unlock"}} {{loginButtonText}}
|
||||
</button>
|
||||
|
||||
{{#if showSignupLink}}
|
||||
|
||||
<button class="btn btn-large" id="new-account-link" {{action "createAccount"}}>
|
||||
{{i18n 'create_account.title'}}
|
||||
</button>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{authMessage}}
|
||||
<div id='login-alert' class={{alertClass}}>{{alert}}</div>
|
||||
{{/d-modal-body}}
|
||||
|
||||
{{#if authenticate}}
|
||||
{{i18n 'login.authenticating'}}
|
||||
{{/if}}
|
||||
<div class="modal-footer">
|
||||
{{#if canLoginLocal}}
|
||||
<button class="btn btn-large btn-primary" type="submit" disabled={{loginDisabled}} {{action "login"}}>
|
||||
{{d-icon "unlock"}} {{loginButtonText}}
|
||||
</button>
|
||||
|
||||
{{conditional-loading-spinner condition=showSpinner size="small"}}
|
||||
</div>
|
||||
{{#if showSignupLink}}
|
||||
|
||||
<button class="btn btn-large" id="new-account-link" {{action "createAccount"}}>
|
||||
{{i18n 'create_account.title'}}
|
||||
</button>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{#if authenticate}}
|
||||
{{i18n 'login.authenticating'}}
|
||||
{{/if}}
|
||||
|
||||
{{conditional-loading-spinner condition=showSpinner size="small"}}
|
||||
</div>
|
||||
</form>
|
||||
{{/login-modal}}
|
||||
|
|
Loading…
Reference in New Issue
Block a user