From 41a11bd7cfcb71f6b3ac29ed406da2486cd5502a Mon Sep 17 00:00:00 2001 From: chrisala Date: Wed, 14 Feb 2024 14:27:41 +1100 Subject: [PATCH] Clear data from a form section marked n/a on save #3097 --- grails-app/assets/javascripts/forms.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/grails-app/assets/javascripts/forms.js b/grails-app/assets/javascripts/forms.js index 9e0bb60..329243f 100644 --- a/grails-app/assets/javascripts/forms.js +++ b/grails-app/assets/javascripts/forms.js @@ -1575,6 +1575,11 @@ function orEmptyArray(v) { return deferred; }; + self.clearDataIfOutputMarkedAsNotCompleted = function() { + if (self.outputNotCompleted() && self.dirtyFlag && self.dirtyFlag.isDirty()) { + self.loadData({}); + } + } }; }());