Skip to content

Commit

Permalink
refactor: add name attribute for 'select' and 'input' tags
Browse files Browse the repository at this point in the history
  • Loading branch information
rudnovd committed Mar 31, 2024
1 parent bdc7bef commit 0edaaac
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/PageFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{{ about.text || t('components.pageFooter.about') }}
</router-link>

<select v-model="locale">
<select v-model="locale" name="select-locale">
<option v-for="availableLocale in locales" :key="availableLocale.name" :value="availableLocale.name">
{{ availableLocale.value }}
</option>
Expand Down
1 change: 1 addition & 0 deletions src/components/SelectUnitModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
:value="search"
type="text"
class="search-input"
name="search-creatures"
:placeholder="t('components.selectUnitModal.searchCreature')"
@keyup.enter="selectFirstFounded"
@input="searchCreature"
Expand Down
1 change: 1 addition & 0 deletions src/components/base/BaseCheckbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
:value="value"
:checked="value"
:disabled="disabled"
:name="`${label}-checkbox`"
@change="$emit('change', value)"
/>
<svg class="checkbox" viewBox="0 0 20 20">
Expand Down
10 changes: 9 additions & 1 deletion src/components/base/BaseInputNumber.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
<template>
<input :value="currentValue" class="input-number" type="number" :min="min" :max="max" @input="onInput" />
<input
:value="currentValue"
class="input-number"
type="number"
name="input-number"
:min="min"
:max="max"
@input="onInput"
/>
</template>

<script lang="ts">
Expand Down
1 change: 1 addition & 0 deletions src/components/base/BaseSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:value="search"
autocomplete="off"
class="search"
:name="`input-${label}`"
:placeholder="placeholder"
@input="searchElement"
/>
Expand Down
1 change: 1 addition & 0 deletions src/views/CreaturesLibraryPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<div class="search-creature">
<input
ref="searchInput"
name="search-creatures"
:value="search"
:placeholder="t('components.selectUnitModal.searchCreature')"
@input="setSearch"
Expand Down
2 changes: 1 addition & 1 deletion src/views/SendErrorPage.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<section class="send-error-page">
<form class="send-error" name="send-error" method="post" data-netlify="true" data-netlify-honeypot="bot-field">
<input type="hidden" name="form-name" value="send-error" />
<input type="hidden" name="send-error" value="send-error" />
<textarea name="error" :placeholder="t('components.pageFooter.sendErrorForm.placeholder')" />
<button class="send-error-button" type="submit">
{{ t('components.pageFooter.sendErrorForm.button') }}
Expand Down

0 comments on commit 0edaaac

Please sign in to comment.