|
|
|
@ -181,19 +181,21 @@ function Form<
|
|
|
|
editable
|
|
|
|
editable
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
: <Input
|
|
|
|
: <>
|
|
|
|
className={cn(inputClassName, `${disabled && 'cursor-not-allowed opacity-60'}`)}
|
|
|
|
<Input
|
|
|
|
value={(isShowDefaultValue && ((value[variable] as string) === '' || value[variable] === undefined || value[variable] === null)) ? formSchema.default : value[variable]}
|
|
|
|
className={cn(inputClassName, `${disabled && 'cursor-not-allowed opacity-60'}`)}
|
|
|
|
onChange={val => handleFormChange(variable, val)}
|
|
|
|
value={(isShowDefaultValue && ((value[variable] as string) === '' || value[variable] === undefined || value[variable] === null)) ? formSchema.default : value[variable]}
|
|
|
|
validated={validatedSuccess}
|
|
|
|
onChange={val => handleFormChange(variable, val)}
|
|
|
|
placeholder={placeholder?.[language] || placeholder?.en_US}
|
|
|
|
validated={validatedSuccess}
|
|
|
|
disabled={disabled}
|
|
|
|
placeholder={placeholder?.[language] || placeholder?.en_US}
|
|
|
|
type={formSchema.type === FormTypeEnum.secretInput ? 'password'
|
|
|
|
disabled={disabled}
|
|
|
|
: formSchema.type === FormTypeEnum.textNumber ? 'number'
|
|
|
|
type={formSchema.type === FormTypeEnum.secretInput ? 'password'
|
|
|
|
: 'text'}
|
|
|
|
: formSchema.type === FormTypeEnum.textNumber ? 'number'
|
|
|
|
{...(formSchema.type === FormTypeEnum.textNumber ? { min: (formSchema as CredentialFormSchemaNumberInput).min, max: (formSchema as CredentialFormSchemaNumberInput).max } : {})} />
|
|
|
|
: 'text'}
|
|
|
|
{fieldMoreInfo?.(formSchema)}
|
|
|
|
{...(formSchema.type === FormTypeEnum.textNumber ? { min: (formSchema as CredentialFormSchemaNumberInput).min, max: (formSchema as CredentialFormSchemaNumberInput).max } : {})} />
|
|
|
|
{validating && changeKey === variable && <ValidatingTip />}
|
|
|
|
{fieldMoreInfo?.(formSchema)}
|
|
|
|
|
|
|
|
{validating && changeKey === variable && <ValidatingTip />}
|
|
|
|
|
|
|
|
</>}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|