diff --git a/src/login/pages/shared/UserProfileFormFields.tsx b/src/login/pages/shared/UserProfileFormFields.tsx index af8bfdf0..45c7ff77 100644 --- a/src/login/pages/shared/UserProfileFormFields.tsx +++ b/src/login/pages/shared/UserProfileFormFields.tsx @@ -1,4 +1,4 @@ -import { useEffect, useState, Fragment } from "react"; +import { useEffect, Fragment } from "react"; import type { ClassKey } from "keycloakify/login/TemplateProps"; import { clsx } from "keycloakify/tools/clsx"; import { @@ -36,7 +36,7 @@ const doMakeUserConfirmPassword = true; export function UserProfileFormFields(props: UserProfileFormFieldsProps) { const { kcContext, onIsFormSubmittableValueChange, i18n, getClassName, BeforeField, AfterField } = props; - const { advancedMsg, msg } = i18n; + const { advancedMsg } = i18n; const { formState: { formFieldStates, isFormSubmittable }, @@ -82,9 +82,7 @@ export function UserProfileFormFields(props: UserProfileFormFieldsProps) { )}
@@ -465,22 +389,25 @@ function AddRemoveButtonsMultiValuedAttribute(props: { }) } > - {msg("add value")} + {msg("addValue")} )} ); } -function InputFiledByType(props: { +type PropsOfInputFiledByType = { attribute: Attribute; index: number; value: string; + displayableErrors: FormFieldError[]; formValidationDispatch: React.Dispatch; getClassName: UserProfileFormFieldsProps["getClassName"]; i18n: I18n; -}) { - const { attribute, formValidationDispatch, getClassName, i18n } = props; +}; + +function InputFiledByType(props: PropsOfInputFiledByType) { + const { attribute } = props; /* <#macro inputFieldByType attribute> @@ -510,13 +437,47 @@ function InputFiledByType(props: { switch (attribute.annotations.inputType) { case "textarea": - return ; + return ; case "select": case "multiselect": - return ; + return ; case "select-radiobuttons": case "multiselect-checkboxes": - return ; + return ; default: + return ; } } + +function TextareaTag(props: PropsOfInputFiledByType) { + const { attribute, index, value, formValidationDispatch, getClassName, displayableErrors } = props; + + return ( +