|
|
|
@ -65,11 +65,11 @@ const resetError = () => {
|
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
|
<div class="mx-auto relative flex flex-col justify-center gap-2 w-full px-8 md:(bg-white) max-w-[900px]"> |
|
|
|
|
<div class="mx-auto relative flex flex-col justify-center gap-2 w-full px-8 md:(bg-white) max-w-[900px]"> |
|
|
|
|
<div class="text-xl mt-4 mb-8 text-center font-weight-bold">{{ $t('activity.changePwd') }}</div> |
|
|
|
|
<a-form |
|
|
|
|
ref="formValidator" |
|
|
|
|
data-cy="nc-user-settings-form" |
|
|
|
|
data-testid="nc-user-settings-form" |
|
|
|
|
layout="vertical" |
|
|
|
|
class="change-password lg:max-w-3/4 w-full !mx-auto" |
|
|
|
|
no-style |
|
|
|
@ -78,7 +78,7 @@ const resetError = () => {
|
|
|
|
|
> |
|
|
|
|
<Transition name="layout"> |
|
|
|
|
<div v-if="error" class="mx-auto mb-4 bg-red-500 text-white rounded-lg w-3/4 p-1"> |
|
|
|
|
<div data-cy="nc-user-settings-form__error" class="flex items-center gap-2 justify-center"> |
|
|
|
|
<div data-testid="nc-user-settings-form__error" class="flex items-center gap-2 justify-center"> |
|
|
|
|
<MaterialSymbolsWarning /> |
|
|
|
|
{{ error }} |
|
|
|
|
</div> |
|
|
|
@ -88,7 +88,7 @@ const resetError = () => {
|
|
|
|
|
<a-form-item :label="$t('placeholder.password.current')" name="currentPassword" :rules="formRules.currentPassword"> |
|
|
|
|
<a-input-password |
|
|
|
|
v-model:value="form.currentPassword" |
|
|
|
|
data-cy="nc-user-settings-form__current-password" |
|
|
|
|
data-testid="nc-user-settings-form__current-password" |
|
|
|
|
size="large" |
|
|
|
|
class="password" |
|
|
|
|
:placeholder="$t('placeholder.password.current')" |
|
|
|
@ -99,7 +99,7 @@ const resetError = () => {
|
|
|
|
|
<a-form-item :label="$t('placeholder.password.new')" name="password" :rules="formRules.password"> |
|
|
|
|
<a-input-password |
|
|
|
|
v-model:value="form.password" |
|
|
|
|
data-cy="nc-user-settings-form__new-password" |
|
|
|
|
data-testid="nc-user-settings-form__new-password" |
|
|
|
|
size="large" |
|
|
|
|
class="password" |
|
|
|
|
:placeholder="$t('placeholder.password.new')" |
|
|
|
@ -110,7 +110,7 @@ const resetError = () => {
|
|
|
|
|
<a-form-item :label="$t('placeholder.password.confirm')" name="passwordRepeat" :rules="formRules.passwordRepeat"> |
|
|
|
|
<a-input-password |
|
|
|
|
v-model:value="form.passwordRepeat" |
|
|
|
|
data-cy="nc-user-settings-form__new-password-repeat" |
|
|
|
|
data-testid="nc-user-settings-form__new-password-repeat" |
|
|
|
|
size="large" |
|
|
|
|
class="password" |
|
|
|
|
:placeholder="$t('placeholder.password.confirm')" |
|
|
|
@ -119,7 +119,7 @@ const resetError = () => {
|
|
|
|
|
</a-form-item> |
|
|
|
|
|
|
|
|
|
<div class="text-center"> |
|
|
|
|
<button data-cy="nc-user-settings-form__submit" class="scaling-btn bg-opacity-100" type="submit"> |
|
|
|
|
<button data-testid="nc-user-settings-form__submit" class="scaling-btn bg-opacity-100" type="submit"> |
|
|
|
|
<span class="flex items-center gap-2"> |
|
|
|
|
<MdiKeyChange /> |
|
|
|
|
{{ $t('activity.changePwd') }} |
|
|
|
|