From 6f4afe7b18d9eb95eb7fcaf798f2a9e38aea23b4 Mon Sep 17 00:00:00 2001 From: runarvestmann Date: Tue, 14 Jan 2025 15:42:50 +0000 Subject: [PATCH] Move formprovider to top --- .../Forms/StandardForm/StandardForm.tsx | 418 +++++++++--------- 1 file changed, 205 insertions(+), 213 deletions(-) diff --git a/apps/web/components/ServiceWeb/Forms/StandardForm/StandardForm.tsx b/apps/web/components/ServiceWeb/Forms/StandardForm/StandardForm.tsx index ffbb0de1e941..da841bbd00ca 100644 --- a/apps/web/components/ServiceWeb/Forms/StandardForm/StandardForm.tsx +++ b/apps/web/components/ServiceWeb/Forms/StandardForm/StandardForm.tsx @@ -773,7 +773,7 @@ export const StandardForm = ({ .sort(sortAlpha('label')) return ( - <> + @@ -927,254 +927,246 @@ export const StandardForm = ({ {called && ( - -
- - {institutionSlugBelongsToMannaudstorg && ( - - - ( - ( + - )} - /> - - - {addonFields} - - + + )} + + + ( + + )} + /> + + + + + ( + + )} + /> + + + {addonFields} + + + ( + + )} + /> + + + + + {institutionSlug === 'syslumenn' && ( ( - ( + { - onChange(label) - setSyslumadurId(value) - }} - hasError={errors?.syslumadur !== undefined} - errorMessage={ - errors?.syslumadur?.message as string - } - options={(syslumenn ?? []).map((x) => ({ - label: x.title, - value: x.id, - }))} - placeholder={fn( - 'syslumadur', - 'placeholder', - 'Veldu sýslumannsembætti', - )} - size="sm" - required - /> - )} - /> - )} - - - - - - - - - - -
-
+ {n( + 'submitServiceWebForm', + activeLocale === 'is' + ? 'Senda fyrirspurn' + : 'Submit inquiry', + )} + + + + + + + + )} - +
) }