From 699aef3ce6544b9bdabe7ce665fcd84c37aed588 Mon Sep 17 00:00:00 2001 From: schefbi Date: Fri, 16 Aug 2024 16:03:39 +0200 Subject: [PATCH] vss dependency required use backend #172 --- app/framework/form-helpers.js | 2 +- app/routes/list/category/event/subscribe.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/framework/form-helpers.js b/app/framework/form-helpers.js index 6bdf6baf..39ce4192 100644 --- a/app/framework/form-helpers.js +++ b/app/framework/form-helpers.js @@ -110,7 +110,7 @@ if(field.options.dependencyItems !== undefined) { if(vssDependencyCheck(formValue,operator,values)) { hidden.classList.remove(hiddenClass); - requiredElement.required = true; + requiredElement.required = element.required; } else { hidden.classList.add(hiddenClass); requiredElement.required = false; diff --git a/app/routes/list/category/event/subscribe.js b/app/routes/list/category/event/subscribe.js index ecf66758..39b8857c 100644 --- a/app/routes/list/category/event/subscribe.js +++ b/app/routes/list/category/event/subscribe.js @@ -105,6 +105,7 @@ function addSubscriptionDetailDependencies(subscriptionDetailDependencies,subscr if (dependency.IdVss === item.id){ item.options.hidden = 'uk-hidden'; + dependency.required = item.options.required item.options.required = false; } if (dependency.IdVssInfluencer === item.id) {