FIX: Allow submitting various forms via keyboard (#8866)

This commit is contained in:
Jarek Radosz 2020-02-05 15:23:35 +01:00 committed by GitHub
parent 5d97286fa7
commit be42b87338
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 48 additions and 34 deletions

View File

@ -25,6 +25,7 @@
{{d-button
class="btn-primary"
action=(action 'massAward')
type="submit"
disabled=saving
label="admin.badges.mass_award.perform"}}
{{#link-to 'adminBadges.index' class="btn btn-danger"}}

View File

@ -158,6 +158,7 @@
{{d-button
class="btn-primary"
action=(action "save")
type="submit"
disabled=saving
label="admin.badges.save"}}
<span class='saving'>{{savingStatus}}</span>

View File

@ -255,8 +255,8 @@
action=(action "enableComponent")
icon="check"
label="admin.customize.theme.enable"}}
{{/if}}
{{/if}}
{{/if}}
{{d-button action=(action "destroy") label="admin.customize.delete" icon="trash-alt" class="btn-danger"}}
{{d-button action=(action "destroy") label="admin.customize.delete" icon="trash-alt" class="btn-danger"}}
</div>

View File

@ -30,6 +30,7 @@
{{d-button
class="btn-primary"
action=(action "grantBadge")
type="submit"
label="admin.badges.grant"}}
</form>
{{/if}}

View File

@ -9,17 +9,18 @@
{{nav-item route='adminUsersList.show' routeParam='suspect' label='admin.users.nav.suspect'}}
{{nav-item route='adminUsersList.show' routeParam='staged' label='admin.users.nav.staged'}}
{{nav-item route='groups' label='groups.index.title'}}
<div class="admin-actions">
{{#if currentUser.can_invite_to_forum}}
{{d-button class="btn-default" action=(route-action "sendInvites") title="admin.invite.button_title" icon="user-plus" label="admin.invite.button_text"}}
{{/if}}
{{#if currentUser.admin}}
{{d-button class="btn-default" action=(route-action "exportUsers") title="admin.export_csv.button_title.user" icon="download" label="admin.export_csv.button_text"}}
{{/if}}
</div>
<li class="admin-actions">
{{#if currentUser.can_invite_to_forum}}
{{d-button class="btn-default" action=(route-action "sendInvites") title="admin.invite.button_title" icon="user-plus" label="admin.invite.button_text"}}
{{/if}}
{{#if currentUser.admin}}
{{d-button class="btn-default" action=(route-action "exportUsers") title="admin.export_csv.button_title.user" icon="download" label="admin.export_csv.button_text"}}
{{/if}}
</li>
</ul>
</nav>
</div>
<div class="admin-container">

View File

@ -32,10 +32,10 @@
{{#if group.messageable}}
<li>
{{d-button
action=(action "messageGroup")
class="btn-primary group-message-button inline"
icon="envelope"
label="groups.message"}}
action=(action "messageGroup")
class="btn-primary group-message-button inline"
icon="envelope"
label="groups.message"}}
</li>
{{/if}}
</ul>

View File

@ -38,10 +38,13 @@
{{/if}}
{{#unless model.security_key_required }}
{{d-button label="email_login.confirm_button" action=(action "finishLogin") class="btn-primary"}}
{{/unless}}
{{d-button
label="email_login.confirm_button"
action=(action "finishLogin")
type="submit"
class="btn-primary"}}
{{/unless}}
{{/if}}
</form>
</div>
</div>

View File

@ -28,10 +28,12 @@
{{groups-form-interaction-fields model=model}}
<div class='control-group buttons'>
{{d-button action=(action "save")
disabled=saving
class='btn btn-primary group-form-save'
label="admin.groups.new.create"}}
{{d-button
action=(action "save")
type="submit"
disabled=saving
class='btn btn-primary group-form-save'
label="admin.groups.new.create"}}
{{#link-to "groups"}}
{{i18n 'cancel'}}

View File

@ -59,6 +59,7 @@
{{d-button
class="btn-primary"
action=(action "submit")
type="submit"
disabled=submitDisabled
label="invites.accept_invite"}}

View File

@ -1,22 +1,17 @@
<form>
{{#d-modal-body class="forgot-password-modal"}}
{{#unless offerHelp}}
{{#if offerHelp}}
{{{offerHelp}}}
{{else}}
<label for='username-or-email'>{{i18n 'forgot_password.invite'}}</label>
{{text-field value=accountEmailOrUsername placeholderKey="login.email_placeholder" id="username-or-email" autocorrect="off" autocapitalize="off"}}
{{else}}
{{{offerHelp}}}
{{/unless}}
{{/if}}
{{/d-modal-body}}
<div class="modal-footer">
{{#unless offerHelp}}
{{d-button action=(action "resetPassword")
label="forgot_password.reset"
disabled=submitDisabled
class="btn-primary forgot-password-reset"
type='submit'}}
{{else}}
{{#if offerHelp}}
{{d-button class="btn-large btn-primary"
label="forgot_password.button_ok"
type="submit"
action=(action "ok")}}
{{#unless helpSeen}}
{{d-button class="btn-large"
@ -24,6 +19,12 @@
icon="question-circle"
action=(action "help")}}
{{/unless}}
{{/unless}}
{{else}}
{{d-button action=(action "resetPassword")
label="forgot_password.reset"
disabled=submitDisabled
class="btn-primary forgot-password-reset"
type='submit'}}
{{/if}}
</div>
</form>

View File

@ -21,6 +21,7 @@
{{d-button
class="btn-primary"
action=(action "generateSecondFactorCodes")
type="submit"
disabled=loading
label=generateBackupCodeBtnLabel}}
{{#if backupEnabled}}

View File

@ -52,6 +52,7 @@
{{#d-button
class="btn-primary"
action=(action "changeEmail")
type="submit"
disabled=saveDisabled
}}
{{saveButtonText}}

View File

@ -27,6 +27,7 @@
{{#d-button
class="btn-primary"
action=(action "changeUsername")
type="submit"
disabled=saveDisabled
}}
{{saveButtonText}}