diff --git a/src/templates/edit-form-block/index.vue b/src/templates/edit-form-block/index.vue
index 240b997dc..a5fe6ed57 100644
--- a/src/templates/edit-form-block/index.vue
+++ b/src/templates/edit-form-block/index.vue
@@ -40,7 +40,7 @@
const toast = useToast()
const blockViewRedirection = ref(true)
- const { meta, errors, handleSubmit, isSubmitting, resetForm, values } = useForm({
+ const { meta, errors, handleSubmit, isSubmitting, resetForm, values, setValues } = useForm({
validationSchema: props.schema
})
@@ -121,5 +121,6 @@
:errors="errors"
:loading="isSubmitting"
:values="values"
+ :setValues="setValues"
/>
diff --git a/src/templates/navbar-block/create.vue b/src/templates/navbar-block/create.vue
index 81acd1983..dbac765fe 100644
--- a/src/templates/navbar-block/create.vue
+++ b/src/templates/navbar-block/create.vue
@@ -59,7 +59,7 @@
/>
-
+
diff --git a/src/views/EdgeNode/FormFields/FormFieldsEdgeNode.vue b/src/views/EdgeNode/FormFields/FormFieldsEdgeNode.vue
index b2264f9bb..44650f424 100644
--- a/src/views/EdgeNode/FormFields/FormFieldsEdgeNode.vue
+++ b/src/views/EdgeNode/FormFields/FormFieldsEdgeNode.vue
@@ -83,8 +83,8 @@
/>
- The hash ID used to authenticate the edge node.
-
+ The hash ID used to authenticate the edge node.
+
-
+
{
const { account } = useAccountStore()
const id = account.user_id
- return await props.loadUserService({ id })
+ const userData = await props.loadUserService({ id })
+
+ currentEmail.value = userData.email
+
+ return userData
}
+ const formSubmit = (onSubmit, values, setValues) => {
+ onSubmit()
+ if (values.email !== currentEmail.value) {
+ const toastConfig = {
+ closable: true,
+ severity: 'warn',
+ summary: 'Confirmation email',
+ detail: 'A confirmation email message has been sent to your email address.'
+ }
+ toast.add({ ...toastConfig })
+ setValues({
+ email: currentEmail.value
+ })
+ }
+ }
const passwordRequirementsList = ref([
{ label: '> 7 characters', valid: false },
{ label: 'Uppercase letter', valid: false },
@@ -73,12 +97,12 @@
])
const validationSchema = yup.object({
- firstName: yup.string().required().label('First name').max(30),
- lastName: yup.string().required().label('Last name').max(30),
+ firstName: yup.string().required().max(30).label('First name'),
+ lastName: yup.string().required().max(30).label('Last name'),
timezone: yup.string(),
language: yup.string(),
countryCallCode: yup.string(),
- email: yup.string().email().required().label('E-mail').max(254),
+ email: yup.string().email().required().max(254).label('E-mail'),
mobile: yup.string().required().label('Mobile'),
twoFactorEnabled: yup.boolean(),
oldPassword: yup.string(),
@@ -88,7 +112,6 @@
yup
.string()
.required()
- .label('Password')
.test('max', 'Exceeded number of characters', (value) => value?.length <= 128)
.test('noSpaces', 'Spaces are not allowed', (value) => !value?.match(/\s/g))
.test('requirements', '', (value) => {
@@ -102,6 +125,7 @@
passwordRequirementsList.value[3].valid = hasSpecialChar
return hasMinLength && hasUpperCase && hasLowerCase && hasSpecialChar
})
+ .label('Password')
}),
confirmPassword: yup.string().when('password', {
is: (val) => !!val,
@@ -109,8 +133,8 @@
yup
.string()
.required()
- .label('Confirm password')
.oneOf([yup.ref('password'), null], 'Passwords must match')
+ .label('Confirm password')
})
})
diff --git a/src/views/YourSettings/FormFields/FormFieldsYourSettings.vue b/src/views/YourSettings/FormFields/FormFieldsYourSettings.vue
index 7826d086c..90361129d 100644
--- a/src/views/YourSettings/FormFields/FormFieldsYourSettings.vue
+++ b/src/views/YourSettings/FormFields/FormFieldsYourSettings.vue
@@ -201,7 +201,7 @@
@@ -211,7 +211,7 @@
id="timezone"
filter
:options="filteredCountriesMobile"
- optionLabel="label"
+ optionLabel="labelFormat"
placeholder="Loading..."
:loading="isLoadingCountry"
:class="{ 'p-invalid': errorSelectedCountryCallCode }"