mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
Merge pull request #3504 from gradido/frontend_fix_password_labels
fix(frontend): fix password labels
This commit is contained in:
commit
657862048e
@ -80,7 +80,7 @@ describe('InputPassword', () => {
|
||||
})
|
||||
|
||||
it('has the placeholder "input-field-placeholder"', () => {
|
||||
expect(wrapper.find('input').attributes('placeholder')).toEqual('form.password')
|
||||
expect(wrapper.find('input').attributes('placeholder')).toEqual('input-field-placeholder')
|
||||
})
|
||||
|
||||
it('has the value ""', () => {
|
||||
@ -88,7 +88,7 @@ describe('InputPassword', () => {
|
||||
})
|
||||
|
||||
it('has the label "input-field-label"', () => {
|
||||
expect(wrapper.find('label').text()).toEqual('form.password')
|
||||
expect(wrapper.find('label').text()).toEqual('input-field-label')
|
||||
})
|
||||
|
||||
it('has the label for "input-field-name-input-field"', () => {
|
||||
|
||||
@ -62,6 +62,14 @@ const props = defineProps({
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
label: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
})
|
||||
|
||||
const name = toRef(props, 'name')
|
||||
@ -73,8 +81,8 @@ const { value, errorMessage, meta, errors, validate } = useField(name, props.rul
|
||||
const { t } = useI18n()
|
||||
|
||||
const defaultTranslations = computed(() => ({
|
||||
label: t('form.password'),
|
||||
placeholder: t('form.password'),
|
||||
label: props.label || t('form.password'),
|
||||
placeholder: props.placeholder || t('form.password'),
|
||||
}))
|
||||
|
||||
const showPassword = ref(false)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user