feat: add a feature for redirecting users on signing

Signed-off-by: Adithya Krishna <adi@documenso.com>
This commit is contained in:
Adithya Krishna
2024-01-31 18:17:43 +05:30
parent 3541a805e5
commit f4c24fd944
7 changed files with 37 additions and 6 deletions

View File

@ -60,7 +60,6 @@ export const AddSubjectFormPartial = ({
register,
handleSubmit,
formState: { errors, isSubmitting, touchedFields },
getValues,
setValue,
} = useForm<TAddSubjectFormSchema>({
defaultValues: {
@ -69,6 +68,7 @@ export const AddSubjectFormPartial = ({
message: document.documentMeta?.message ?? '',
timezone: document.documentMeta?.timezone ?? DEFAULT_DOCUMENT_TIME_ZONE,
dateFormat: document.documentMeta?.dateFormat ?? DEFAULT_DOCUMENT_DATE_FORMAT,
redirectUrl: document.documentMeta?.redirectUrl ?? '',
},
},
});
@ -214,6 +214,28 @@ export const AddSubjectFormPartial = ({
)}
/>
</div>
<div className="flex flex-col">
<div className="flex flex-col gap-y-4">
<div>
<Label htmlFor="redirectUrl">
Title
<span className="text-destructive ml-1 inline-block font-medium">
*
</span>
</Label>
<Input
id="redirectUrl"
className="bg-background my-2"
disabled={isSubmitting}
{...register('meta.redirectUrl')}
/>
<FormErrorMessage className="mt-2" error={errors.meta} />
</div>
</div>
</div>
</AccordionContent>
</AccordionItem>
</Accordion>