Skip to content

Commit

Permalink
Add explicit button type
Browse files Browse the repository at this point in the history
  • Loading branch information
Bubka committed Nov 22, 2024
1 parent 6fa0588 commit 6ead770
Show file tree
Hide file tree
Showing 20 changed files with 51 additions and 51 deletions.
12 changes: 6 additions & 6 deletions resources/js/components/AccessLogViewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -142,23 +142,23 @@
<nav v-if="props.showSearch" class="level is-mobile mb-2">
<div class="level-item has-text-centered">
<div class="buttons">
<button id="btnShowOneMonth" :title="$t('admin.show_last_month_log')" v-on:click="setPeriod(periods.aMonth)" :class="{ 'has-text-grey' : period !== periods.aMonth }" class="button is-ghost p-1">
<button id="btnShowOneMonth" :title="$t('admin.show_last_month_log')" v-on:click="setPeriod(periods.aMonth)" :class="{ 'has-text-grey' : period !== periods.aMonth }" type="button" class="button is-ghost p-1">
{{ $t('commons.one_month') }}
</button>
<button id="btnShowThreeMonths" :title="$t('admin.show_three_months_log')" v-on:click="setPeriod(periods.threeMonths)" :class="{ 'has-text-grey' : period !== periods.threeMonths }" class="button is-ghost p-1">
<button id="btnShowThreeMonths" :title="$t('admin.show_three_months_log')" v-on:click="setPeriod(periods.threeMonths)" :class="{ 'has-text-grey' : period !== periods.threeMonths }" type="button" class="button is-ghost p-1">
{{ $t('commons.x_month', { 'x' : '3' }) }}
</button>
<button id="btnShowSixMonths" :title="$t('admin.show_six_months_log')" v-on:click="setPeriod(periods.halfYear)" :class="{ 'has-text-grey' : period !== periods.halfYear }" class="button is-ghost p-1">
<button id="btnShowSixMonths" :title="$t('admin.show_six_months_log')" v-on:click="setPeriod(periods.halfYear)" :class="{ 'has-text-grey' : period !== periods.halfYear }" type="button" class="button is-ghost p-1">
{{ $t('commons.x_month', { 'x' : '6' }) }}
</button>
<button id="btnShowOneYear" :title="$t('admin.show_one_year_log')" v-on:click="setPeriod(periods.aYear)" :class="{ 'has-text-grey' : period !== periods.aYear }" class="button is-ghost p-1 mr-5">
<button id="btnShowOneYear" :title="$t('admin.show_one_year_log')" v-on:click="setPeriod(periods.aYear)" :class="{ 'has-text-grey' : period !== periods.aYear }" type="button" class="button is-ghost p-1 mr-5">
{{ $t('commons.one_year') }}
</button>
<button id="btnSortLogDesc" v-on:click="setDesc" :title="$t('admin.sort_by_date_desc')" :class="{ 'has-text-grey' : !orderIsDesc }" class="button p-1 is-ghost">
<button id="btnSortLogDesc" v-on:click="setDesc" :title="$t('admin.sort_by_date_desc')" :class="{ 'has-text-grey' : !orderIsDesc }" type="button" class="button p-1 is-ghost">
<FontAwesomeIcon :icon="['fas', 'arrow-up-long']" flip="vertical" />
<FontAwesomeIcon :icon="['far', 'calendar']" />
</button>
<button id="btnSortLogAsc" v-on:click="setAsc" :title="$t('admin.sort_by_date_asc')" :class="{ 'has-text-grey' : orderIsDesc }" class="button p-1 is-ghost">
<button id="btnSortLogAsc" v-on:click="setAsc" :title="$t('admin.sort_by_date_asc')" :class="{ 'has-text-grey' : orderIsDesc }" type="button" class="button p-1 is-ghost">
<FontAwesomeIcon :icon="['fas', 'arrow-up-long']" />
<FontAwesomeIcon :icon="['far', 'calendar']" />
</button>
Expand Down
4 changes: 2 additions & 2 deletions resources/js/components/ActionButtons.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<UseColorMode v-slot="{ mode }">
<!-- New item buttons -->
<p class="control" v-if="!inManagementMode">
<button class="button is-link is-rounded is-focus" @click="goAddNewAccount">
<button type="button" class="button is-link is-rounded is-focus" @click="goAddNewAccount">
<span>{{ $t('commons.new') }}</span>
<span class="icon is-small">
<FontAwesomeIcon :icon="['fas', 'qrcode']" />
Expand All @@ -41,7 +41,7 @@
</p>
<!-- Manage button -->
<p class="control" v-if="!inManagementMode">
<button id="btnManage" class="button is-rounded" :class="{'is-dark' : mode == 'dark'}" @click="$emit('update:inManagementMode', true)">{{ $t('commons.manage') }}</button>
<button type="button" id="btnManage" class="button is-rounded" :class="{'is-dark' : mode == 'dark'}" @click="$emit('update:inManagementMode', true)">{{ $t('commons.manage') }}</button>
</p>
<!-- move button -->
<p class="control" v-if="inManagementMode">
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/CopyButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</script>

<template>
<button :aria-label="$t('commons.copy_to_clipboard')" :title="$t('commons.copy_to_clipboard')" class="button is-like-text is-pulled-right is-small is-text" @click.stop="copyToClipboard()">
<button type="button" :aria-label="$t('commons.copy_to_clipboard')" :title="$t('commons.copy_to_clipboard')" class="button is-like-text is-pulled-right is-small is-text" @click.stop="copyToClipboard()">
<FontAwesomeIcon :icon="['fas', 'copy']" />
</button>
</template>
4 changes: 2 additions & 2 deletions resources/js/components/DestinationGroupSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<div class="columns is-multiline">
<div class="column is-full" v-for="group in groups" :key="group.id">
<UseColorMode v-slot="{ mode }">
<button class="button is-fullwidth" :class="{'is-link' : destinationGroupId === group.id, 'is-dark has-text-light is-outlined': mode == 'dark'}" @click="destinationGroupId = group.id">
<button type="button" class="button is-fullwidth" :class="{'is-link' : destinationGroupId === group.id, 'is-dark has-text-light is-outlined': mode == 'dark'}" @click="destinationGroupId = group.id">
<span v-if="group.id === 0" class="is-italic">
{{ $t('groups.no_group') }}
</span>
Expand All @@ -60,7 +60,7 @@
<VueFooter :showButtons="true">
<!-- Move to selected group button -->
<p class="control">
<button class="button is-link is-rounded" @click="moveAccounts">{{ $t('commons.move') }}</button>
<button type="button" class="button is-link is-rounded" @click="moveAccounts">{{ $t('commons.move') }}</button>
</p>
<ButtonBackCloseCancel action="cancel" :useLinkTag="false" @canceled="$emit('update:showDestinationGroupSelector', false)" />
</VueFooter>
Expand Down
4 changes: 2 additions & 2 deletions resources/js/components/ExportButtons.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
{{ $t('twofaccounts.twofauth_export_schema') }}
</a>
</p>
<button id="btnExport2FAuth" class="button is-link is-rounded is-focus my-3" @click="$emit('export-twofauth-format')" :title="$t('twofaccounts.twofauth_export_format_sub')">
<button type="button" id="btnExport2FAuth" class="button is-link is-rounded is-focus my-3" @click="$emit('export-twofauth-format')" :title="$t('twofaccounts.twofauth_export_format_sub')">
{{ $t('twofaccounts.twofauth_export_format') }}
</button>
</div>
Expand All @@ -32,7 +32,7 @@
<p class="is-size-7-mobile">
{{ $t('twofaccounts.otpauth_export_format_desc') }}
</p>
<button id="btnExportOtpauth" class="button is-link is-rounded is-focus my-3" @click="$emit('export-otpauth-format')" :title="$t('twofaccounts.otpauth_export_format_sub')">
<button type="button" id="btnExportOtpauth" class="button is-link is-rounded is-focus my-3" @click="$emit('export-otpauth-format')" :title="$t('twofaccounts.otpauth_export_format_sub')">
{{ $t('twofaccounts.otpauth_export_format') }}
</button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/GroupSwitch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<div class="columns is-multiline">
<div class="column is-full" v-for="group in groups" :key="group.id">
<UseColorMode v-slot="{ mode }">
<button class="button is-fullwidth" :class="{'is-dark has-text-light is-outlined': mode == 'dark'}" @click="setActiveGroup(group.id)">{{ group.name }}</button>
<button type="button" class="button is-fullwidth" :class="{'is-dark has-text-light is-outlined': mode == 'dark'}" @click="setActiveGroup(group.id)">{{ group.name }}</button>
</UseColorMode>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/OtpDisplay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@
{{ $t('twofaccounts.forms.counter.label') }}: {{ otpauthParams.counter }}
</p>
<p v-if="user.preferences.showOtpAsDot && user.preferences.revealDottedOTP" class="mt-3">
<button class="button is-ghost has-text-grey-dark" @click.stop="revealPassword = !revealPassword">
<button type="button" class="button is-ghost has-text-grey-dark" @click.stop="revealPassword = !revealPassword">
<font-awesome-icon v-if="revealPassword" :icon="['fas', 'eye']" />
<font-awesome-icon v-else :icon="['fas', 'eye-slash']" />
</button>
Expand Down
4 changes: 2 additions & 2 deletions resources/js/components/QrContentDisplay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@
<div class="block mb-6 light-or-darker">{{ qrContent ? qrContent : '[' + trans('commons.nothing') + ']' }}</div>
<!-- Copy to clipboard -->
<div class="block has-text-link" v-if="qrContent">
<button class="button is-link is-outlined is-rounded" @click.stop="copyToClipboard(qrContent)">
<button type="button" class="button is-link is-outlined is-rounded" @click.stop="copyToClipboard(qrContent)">
{{ $t('commons.copy_to_clipboard') }}
</button>
</div>
<!-- Open in browser -->
<div class="block has-text-link" v-if="isUrl(qrContent)" @click="openInBrowser(qrContent)">
<button class="button is-link is-outlined is-rounded">
<button type="button" class="button is-link is-outlined is-rounded">
<span>{{ $t('commons.open_in_browser') }}</span>
<span class="icon is-small">
<FontAwesomeIcon :icon="['fas', 'external-link-alt']" />
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/SearchBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
:value="keyword"
v-on:keyup="$emit('update:keyword', $event.target.value)">
<span class="icon is-small is-right">
<button v-if="keyword != ''" id="btnClearSearch" tabindex="1" :title="$t('commons.clear_search')" class="clear-selection delete" @click="$emit('update:keyword','')"></button>
<button type="button" v-if="keyword != ''" id="btnClearSearch" tabindex="1" :title="$t('commons.clear_search')" class="clear-selection delete" @click="$emit('update:keyword','')"></button>
<FontAwesomeIcon v-else :icon="['fas', 'search']" />
</span>
</div>
Expand Down
8 changes: 4 additions & 4 deletions resources/js/components/Toolbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@
<!-- selected label -->
<span class="has-text-grey mr-1">{{ $t('commons.x_selected', { count: selectedCount }) }}</span>
<!-- deselect all -->
<button id="btnUnselectAll" @click="$emit('clear-selected')" class="clear-selection delete mr-4" :style="{visibility: selectedCount > 0 ? 'visible' : 'hidden'}" :title="$t('commons.clear_selection')"></button>
<button type="button" id="btnUnselectAll" @click="$emit('clear-selected')" class="clear-selection delete mr-4" :style="{visibility: selectedCount > 0 ? 'visible' : 'hidden'}" :title="$t('commons.clear_selection')"></button>
<!-- select all button -->
<button id="btnSelectAll" @click="$emit('select-all')" class="button mr-5 has-line-height p-1 is-ghost has-text-grey" :title="$t('commons.select_all')">
<button type="button" id="btnSelectAll" @click="$emit('select-all')" class="button mr-5 has-line-height p-1 is-ghost has-text-grey" :title="$t('commons.select_all')">
<span>{{ $t('commons.check_all') }}</span>
<FontAwesomeIcon class="ml-1" :icon="['fas', 'check-square']" />
</button>
<!-- sort asc/desc buttons -->
<button id="btnSortAscending" @click="$emit('sort-asc')" class="button has-line-height p-1 is-ghost has-text-grey" :title="$t('commons.sort_ascending')">
<button type="button" id="btnSortAscending" @click="$emit('sort-asc')" class="button has-line-height p-1 is-ghost has-text-grey" :title="$t('commons.sort_ascending')">
<FontAwesomeIcon :icon="['fas', 'sort-alpha-down']" />
</button>
<button id="btnSortDescending" @click="$emit('sort-desc')" class="button has-line-height p-1 is-ghost has-text-grey" :title="$t('commons.sort_descending')">
<button type="button" id="btnSortDescending" @click="$emit('sort-desc')" class="button has-line-height p-1 is-ghost has-text-grey" :title="$t('commons.sort_descending')">
<FontAwesomeIcon :icon="['fas', 'sort-alpha-up']" />
</button>
</div>
Expand Down
6 changes: 3 additions & 3 deletions resources/js/layouts/Footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<!-- sub-links -->
<div v-if="internalFooterType == 'doneButton'" class="content has-text-centered">
<!-- done link -->
<button id="lnkExitEdit" class="button is-ghost is-like-text" @click.stop="$emit('doneButtonClicked', true)">{{ $t('commons.done') }}</button>
<button type="button" id="lnkExitEdit" class="button is-ghost is-like-text" @click.stop="$emit('doneButtonClicked', true)">{{ $t('commons.done') }}</button>
</div>
<div v-else-if="internalFooterType == 'modal'" class="content has-text-centered">
<!-- back to home link -->
Expand Down Expand Up @@ -69,7 +69,7 @@
<!-- sign-out button -->
<li v-if="!$2fauth.config.proxyAuth || ($2fauth.config.proxyAuth && $2fauth.config.proxyLogoutUrl)" class="column">
<UseColorMode v-slot="{ mode }">
<button id="lnkSignOut" class="button is-text is-like-text" :class="mode == 'dark' ? 'has-text-grey-lighter' : 'has-text-grey-darker'" @click="logout">
<button type="button" id="lnkSignOut" class="button is-text is-like-text" :class="mode == 'dark' ? 'has-text-grey-lighter' : 'has-text-grey-darker'" @click="logout">
{{ $t('auth.sign_out') }}
</button>
</UseColorMode>
Expand Down Expand Up @@ -98,7 +98,7 @@
</span>
<!-- sign-out button -->
<span v-if="!$2fauth.config.proxyAuth || ($2fauth.config.proxyAuth && $2fauth.config.proxyLogoutUrl)">
- <button id="lnkSignOut" class="button is-text is-like-text has-text-grey" @click="logout">{{ $t('auth.sign_out') }}</button>
- <button type="button" id="lnkSignOut" class="button is-text is-like-text has-text-grey" @click="logout">{{ $t('auth.sign_out') }}</button>
</span>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion resources/js/views/Start.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
{{ $t('twofaccounts.forms.upload_qrcode') }}
</label>
<!-- scan button that launch camera stream -->
<button v-else class="button is-link is-medium is-rounded is-main" @click="capture()">
<button v-else type="button" class="button is-link is-medium is-rounded is-main" @click="capture()">
{{ $t('twofaccounts.forms.scan_qrcode') }}
</button>
</div>
Expand Down
6 changes: 3 additions & 3 deletions resources/js/views/admin/Users.vue
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@
</div>
<div class="level-item has-text-centered is-justify-content-start">
<div class="buttons">
<button class="button is-small is-ghost p-0" @click="addFilter('admin:1')">admin</button>
<button class="button is-small is-ghost p-0" @click="addFilter('oauth:github')">github</button>
<button class="button is-small is-ghost p-0" @click="addFilter('oauth:openid')">openId</button>
<button type="button" class="button is-small is-ghost p-0" @click="addFilter('admin:1')">admin</button>
<button type="button" class="button is-small is-ghost p-0" @click="addFilter('oauth:github')">github</button>
<button type="button" class="button is-small is-ghost p-0" @click="addFilter('oauth:openid')">openId</button>
</div>
</div>
</div>
Expand Down
10 changes: 5 additions & 5 deletions resources/js/views/admin/users/Manage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,11 @@
<div class="tags ml-3 is-right">
<UseColorMode v-slot="{ mode }">
<!-- resend email button -->
<button v-if="managedUser.password_reset" class="button tag is-pulled-right" :class="mode == 'dark' ? 'is-dark has-background-link' : 'is-white'" @click="resendPasswordEmail" :title="$t('admin.resend_email_title')">
<button type="button" v-if="managedUser.password_reset" class="button tag is-pulled-right" :class="mode == 'dark' ? 'is-dark has-background-link' : 'is-white'" @click="resendPasswordEmail" :title="$t('admin.resend_email_title')">
{{ $t('admin.resend_email') }}
</button>
<!-- reset password button -->
<button class="button tag is-pulled-right " :class="mode == 'dark' ? 'is-dark has-background-link' : 'is-white'" @click="resetPassword" :title="$t('admin.reset_password_title')">
<button type="button" class="button tag is-pulled-right " :class="mode == 'dark' ? 'is-dark has-background-link' : 'is-white'" @click="resetPassword" :title="$t('admin.reset_password_title')">
{{ $t('admin.reset_password') }}
</button>
</UseColorMode>
Expand All @@ -260,7 +260,7 @@
<div class="tags ml-3 is-right">
<UseColorMode v-slot="{ mode }">
<!-- manage link -->
<button class="button tag is-pulled-right" :class="mode == 'dark' ? 'is-dark has-background-link' : 'is-white'" @click="revokePATs" :title="$t('admin.revoke_all_pat_for_user')">
<button type="button" class="button tag is-pulled-right" :class="mode == 'dark' ? 'is-dark has-background-link' : 'is-white'" @click="revokePATs" :title="$t('admin.revoke_all_pat_for_user')">
{{ $t('settings.revoke') }}
</button>
</UseColorMode>
Expand All @@ -279,7 +279,7 @@
<div class="tags ml-3 is-right">
<UseColorMode v-slot="{ mode }">
<!-- manage link -->
<button class="button tag is-pulled-right" :class="mode == 'dark' ? 'is-dark has-background-link' : 'is-white'" :title="$t('admin.revoke_all_devices_for_user')">
<button type="button" class="button tag is-pulled-right" :class="mode == 'dark' ? 'is-dark has-background-link' : 'is-white'" :title="$t('admin.revoke_all_devices_for_user')">
{{ $t('settings.revoke') }}
</button>
</UseColorMode>
Expand Down Expand Up @@ -316,7 +316,7 @@
{{ $t('admin.this_is_not_soft_delete') }}
</span>
</div>
<button class="button is-danger" @click="deleteUser" title="delete">
<button type="button" class="button is-danger" @click="deleteUser" title="delete">
{{ $t('admin.delete_this_user') }}
</button>
</div>
Expand Down
Loading

0 comments on commit 6ead770

Please sign in to comment.