commit: 3fc9673a7d0fb851283e4ed687c2fd7790f03317
parent 3c9d6b0ff092801023ed39fd4ccbb2cc97380222
Author: HJ <30-hj@users.noreply.git.pleroma.social>
Date: Mon, 1 Aug 2022 11:48:52 +0000
Merge branch 'from/develop/tusooa/1172-reg-indicator' into 'develop'
Add optional/required indicator for registration fields
Closes #1172
See merge request pleroma/pleroma-fe!1543
Diffstat:
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/components/registration/registration.vue b/src/components/registration/registration.vue
@@ -23,6 +23,7 @@
v-model.trim="v$.user.username.$model"
:disabled="isPending"
class="form-control"
+ :aria-required="true"
:placeholder="$t('registration.username_placeholder')"
>
</div>
@@ -50,6 +51,7 @@
v-model.trim="v$.user.fullname.$model"
:disabled="isPending"
class="form-control"
+ :aria-required="true"
:placeholder="$t('registration.fullname_placeholder')"
>
</div>
@@ -71,13 +73,14 @@
<label
class="form--label"
for="email"
- >{{ $t('registration.email') }}</label>
+ >{{ accountActivationRequired ? $t('registration.email') : $t('registration.email_optional') }}</label>
<input
id="email"
v-model="v$.user.email.$model"
:disabled="isPending"
class="form-control"
type="email"
+ :aria-required="accountActivationRequired"
>
</div>
<div
@@ -95,7 +98,7 @@
<label
class="form--label"
for="bio"
- >{{ $t('registration.bio') }} ({{ $t('general.optional') }})</label>
+ >{{ $t('registration.bio_optional') }}</label>
<textarea
id="bio"
v-model="user.bio"
@@ -119,6 +122,7 @@
:disabled="isPending"
class="form-control"
type="password"
+ :aria-required="true"
>
</div>
<div
@@ -146,6 +150,7 @@
:disabled="isPending"
class="form-control"
type="password"
+ :aria-required="true"
>
</div>
<div
diff --git a/src/i18n/en.json b/src/i18n/en.json
@@ -234,8 +234,9 @@
}
},
"registration": {
- "bio": "Bio",
+ "bio_optional": "Bio (optional)",
"email": "Email",
+ "email_optional": "Email (optional)",
"fullname": "Display name",
"password_confirm": "Password confirmation",
"registration": "Registration",