mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-11-08 01:14:29 +01:00
Add maxlength attribute to name and email fields
This commit is contained in:
parent
74f4765d5b
commit
eef020faae
@ -11,6 +11,7 @@
|
|||||||
:placeholder="placeholder"
|
:placeholder="placeholder"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
v-on:change="$emit('field-changed', form[fieldName])"
|
v-on:change="$emit('field-changed', form[fieldName])"
|
||||||
|
:maxlength="this.maxLength"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<field-error :form="form" :field="fieldName" />
|
<field-error :form="form" :field="fieldName" />
|
||||||
@ -69,6 +70,11 @@
|
|||||||
isDisabled: {
|
isDisabled: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
|
||||||
|
maxLength: {
|
||||||
|
type: Number,
|
||||||
|
default: null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,8 +23,8 @@
|
|||||||
<!-- User registration form -->
|
<!-- User registration form -->
|
||||||
<form-wrapper v-else :title="$t('auth.register')" :punchline="$t('auth.forms.register_punchline')">
|
<form-wrapper v-else :title="$t('auth.register')" :punchline="$t('auth.forms.register_punchline')">
|
||||||
<form @submit.prevent="handleRegisterSubmit" @keydown="registerForm.onKeydown($event)">
|
<form @submit.prevent="handleRegisterSubmit" @keydown="registerForm.onKeydown($event)">
|
||||||
<form-field :form="registerForm" fieldName="name" inputType="text" :label="$t('auth.forms.name')" autofocus />
|
<form-field :form="registerForm" fieldName="name" inputType="text" :label="$t('auth.forms.name')" :maxLength="255" autofocus />
|
||||||
<form-field :form="registerForm" fieldName="email" inputType="email" :label="$t('auth.forms.email')" />
|
<form-field :form="registerForm" fieldName="email" inputType="email" :label="$t('auth.forms.email')" :maxLength="255" />
|
||||||
<form-password-field :form="registerForm" fieldName="password" :showRules="true" :label="$t('auth.forms.password')" />
|
<form-password-field :form="registerForm" fieldName="password" :showRules="true" :label="$t('auth.forms.password')" />
|
||||||
<!-- <form-field :form="registerForm" fieldName="password_confirmation" inputType="password" :label="$t('auth.forms.confirm_password')" /> -->
|
<!-- <form-field :form="registerForm" fieldName="password_confirmation" inputType="password" :label="$t('auth.forms.confirm_password')" /> -->
|
||||||
<form-buttons :isBusy="registerForm.isBusy" :isDisabled="registerForm.isDisabled" :caption="$t('auth.register')" :submitId="'btnRegister'" />
|
<form-buttons :isBusy="registerForm.isBusy" :isDisabled="registerForm.isDisabled" :caption="$t('auth.register')" :submitId="'btnRegister'" />
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
<div v-if="isRemoteUser" class="notification is-warning has-text-centered" v-html="$t('auth.user_account_controlled_by_proxy')" />
|
<div v-if="isRemoteUser" class="notification is-warning has-text-centered" v-html="$t('auth.user_account_controlled_by_proxy')" />
|
||||||
<h4 class="title is-4 has-text-grey-light">{{ $t('settings.profile') }}</h4>
|
<h4 class="title is-4 has-text-grey-light">{{ $t('settings.profile') }}</h4>
|
||||||
<fieldset :disabled="isRemoteUser">
|
<fieldset :disabled="isRemoteUser">
|
||||||
<form-field :form="formProfile" fieldName="name" :label="$t('auth.forms.name')" autofocus />
|
<form-field :form="formProfile" fieldName="name" :label="$t('auth.forms.name')" :maxLength="255" autofocus />
|
||||||
<form-field :form="formProfile" fieldName="email" inputType="email" :label="$t('auth.forms.email')" />
|
<form-field :form="formProfile" fieldName="email" inputType="email" :label="$t('auth.forms.email')" :maxLength="255" />
|
||||||
<form-field :form="formProfile" fieldName="password" inputType="password" :label="$t('auth.forms.current_password.label')" :help="$t('auth.forms.current_password.help')" />
|
<form-field :form="formProfile" fieldName="password" inputType="password" :label="$t('auth.forms.current_password.label')" :help="$t('auth.forms.current_password.help')" />
|
||||||
<form-buttons :isBusy="formProfile.isBusy" :caption="$t('commons.update')" />
|
<form-buttons :isBusy="formProfile.isBusy" :caption="$t('commons.update')" />
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
Loading…
Reference in New Issue
Block a user