From 7fb8879a626e529c3f2846d86a009ffb02228800 Mon Sep 17 00:00:00 2001 From: temi Date: Mon, 25 Nov 2024 17:28:50 +1100 Subject: [PATCH] #3369 feedback from client for RCS form fixed issue with validation triggering --- .../other/regionalCapacityServicesReport.json | 20 ++++++------------- grails-app/assets/javascripts/organisation.js | 4 ++-- .../views/organisation/_serviceTargets.gsp | 2 -- 3 files changed, 8 insertions(+), 18 deletions(-) diff --git a/forms/other/regionalCapacityServicesReport.json b/forms/other/regionalCapacityServicesReport.json index 645016b99..b77e6506e 100644 --- a/forms/other/regionalCapacityServicesReport.json +++ b/forms/other/regionalCapacityServicesReport.json @@ -150,28 +150,20 @@ { "dataType": "number", "name": "organisationFteWorkforce", - "description": "Enter total RDP staff (full time equivalent) deployed on Services for the Deed and all Contracts (including non-DCCEEW Contracts) during this reporting period.", + "description": "Enter total RDP staff (full time equivalent) deployed on Services for the Deed and all Contracts (including non-DCCEEW Contracts) during this reporting period.", "validate": [ { "rule": "required" }, { "rule": "min[0]" - }, - { - "param": { - "expression": "organisationFteIndigenousWorkforce", - "type": "computed" - }, - "rule": "min", - "message": "numeric value must be higher or equal to the numeric value entered for 'What was your organisation’s full time equivalent Indigenous workforce deployed on the Services this reporting period?'" } ] }, { "dataType": "number", "name": "organisationFteIndigenousWorkforce", - "description": "Enter total RDP Indigenous staff (full time equivalent) deployed on Services for the Deed and all Contracts (including non-DCCEEW Contracts) during this reporting period.", + "description": "Enter total RDP Indigenous staff (full time equivalent) deployed on Services for the Deed and all Contracts (including non-DCCEEW Contracts) during this reporting period.", "validate": [ { "rule": "required" @@ -185,14 +177,14 @@ "type": "computed" }, "rule": "max", - "message": "numeric value must be less than or equal to the numeric value entered for 'What was your organisation’s full time equivalent workforce deployed on the Services this reporting period?'" + "message": "Numeric value must be less than or equal to the numeric value entered for 'What was your organisation’s full time equivalent workforce deployed on the Services this reporting period?'" } ] }, { "dataType": "number", "name": "servicesContractedValueFirstNations", - "description": "Enter total dollar value (GST inclusive) of goods and services contracted to First Nations people/Indigenous enterprises, during this reporting period, for the Deed and all Contracts (including non-DCCEEW Contracts).", + "description": "Enter total dollar value (GST inclusive) of goods and services contracted to First Nations people/Indigenous enterprises, during this reporting period, for the Deed and all Contracts (including non-DCCEEW Contracts).", "validate": [ { "rule": "required" @@ -544,7 +536,7 @@ "items": [ { "type": "literal", - "source": "Q5(c). Please complete workforce and supply chain data (Deed of Standing Offer Clause 38 Indigenous Procurement Policy). Please do not provide personal or commercial-in-confidence information when answering this question. Please retain documentation as evidence to support assurance activities undertaken to verify the reported information." + "source": "Q5(c). Please complete workforce and supply chain data (Deed of Standing Offer Clause 38 Indigenous Procurement Policy). Please do not provide personal or commercial-in-confidence information when answering this question. Please retain documentation as evidence to support assurance activities undertaken to verify the reported information." } ] }, @@ -577,7 +569,7 @@ "css": "span7", "preLabel": "What was the dollar value of Services contracted to First Nations people/Indigenous enterprises during this reporting period?", "source": "servicesContractedValueFirstNations", - "type": "currency" + "type": "number" } ] }, diff --git a/grails-app/assets/javascripts/organisation.js b/grails-app/assets/javascripts/organisation.js index 4871cee15..34071310b 100644 --- a/grails-app/assets/javascripts/organisation.js +++ b/grails-app/assets/javascripts/organisation.js @@ -737,7 +737,7 @@ OrganisationPageViewModel = function (props, options) { } self.attachValidation = function() { - $("#organisation-targets").validationEngine('attach', {validationAttribute: "data-validation-engine"}); + $("#organisation-targets > table").validationEngine('attach'); }; self.saveOrganisationConfiguration = function() { @@ -762,7 +762,7 @@ OrganisationPageViewModel = function (props, options) { }; self.saveCustomFields = function() { - if ($("#organisation-targets form").validationEngine('validate')) { + if ($("#organisation-targets > table").validationEngine('validate')) { var json = JSON.parse(self.reportingTargets().modelAsJSON()); return saveOrganisation(json); } diff --git a/grails-app/views/organisation/_serviceTargets.gsp b/grails-app/views/organisation/_serviceTargets.gsp index b3ce6edda..d593e65ac 100644 --- a/grails-app/views/organisation/_serviceTargets.gsp +++ b/grails-app/views/organisation/_serviceTargets.gsp @@ -1,7 +1,6 @@

${title ?: "Organisation services and minimum targets"}

-
@@ -75,7 +74,6 @@ %{-- --}% %{-- --}%
-
\ No newline at end of file