From c1e264955fdcb2501ff4beb31969cb035ab0d712 Mon Sep 17 00:00:00 2001 From: Alys Date: Sun, 28 Jan 2018 02:38:23 +1000 Subject: [PATCH] describe Login Name limitations on Registration form and Add Local Auth form (#9896) * describe Login Name limitations on registration form and Add Local Auth form * adjust text in response to this change: https://github.com/HabitRPG/habitica/pull/9895/commits/c69687f935bc95a94f557ef9950e435622c282ff * update max length --- website/client/components/settings/site.vue | 1 + website/client/components/static/home.vue | 1 + website/common/locales/en/front.json | 1 + 3 files changed, 3 insertions(+) diff --git a/website/client/components/settings/site.vue b/website/client/components/settings/site.vue index eb8132a973..b18f8f29b9 100644 --- a/website/client/components/settings/site.vue +++ b/website/client/components/settings/site.vue @@ -118,6 +118,7 @@ hr div(v-if='!user.auth.local.username') p {{ $t('addLocalAuth') }} + p {{ $t('usernameLimitations') }} .form(name='localAuth', novalidate) //-.alert.alert-danger(ng-messages='changeUsername.$error && changeUsername.submitted') {{ $t('fillAll') }} .form-group diff --git a/website/client/components/static/home.vue b/website/client/components/static/home.vue index 3d5bf3d58b..8f20858108 100644 --- a/website/client/components/static/home.vue +++ b/website/client/components/static/home.vue @@ -23,6 +23,7 @@ .strike span {{$t('or')}} .form(@keyup.enter="register()") + p.form-text {{$t('usernameLimitations')}} input.form-control(type='text', placeholder='Login Name', v-model='username', :class='{"input-valid": username.length > 3}') input.form-control(type='email', placeholder='Email', v-model='email', :class='{"input-invalid": emailInvalid, "input-valid": emailValid}') input.form-control(type='password', placeholder='Password', v-model='password', :class='{"input-valid": password.length > 3}') diff --git a/website/common/locales/en/front.json b/website/common/locales/en/front.json index 849863d0ac..298b1c429f 100644 --- a/website/common/locales/en/front.json +++ b/website/common/locales/en/front.json @@ -298,6 +298,7 @@ "signUpWithSocial": "Sign up with <%= social %>", "loginWithSocial": "Log in with <%= social %>", "confirmPassword": "Confirm Password", + "usernameLimitations": "Login Name must be 1 to 20 characters long, containing only letters a to z, or numbers 0 to 9, or hyphens, or underscores.", "usernamePlaceholder": "e.g., HabitRabbit", "emailPlaceholder": "e.g., rabbit@example.com", "passwordPlaceholder": "e.g., ******************",