diff --git a/frontend/src/components/Inputs/InputPassword.spec.js b/frontend/src/components/Inputs/InputPassword.spec.js index 9d6f5481d..94e50e026 100644 --- a/frontend/src/components/Inputs/InputPassword.spec.js +++ b/frontend/src/components/Inputs/InputPassword.spec.js @@ -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"', () => { diff --git a/frontend/src/components/Inputs/InputPassword.vue b/frontend/src/components/Inputs/InputPassword.vue index b496d09a3..b7619045a 100644 --- a/frontend/src/components/Inputs/InputPassword.vue +++ b/frontend/src/components/Inputs/InputPassword.vue @@ -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)