Skip to content

Commit 7fb8879

Browse files
committed
feedback from client for RCS form fixed issue with validation triggering
1 parent aafa048 commit 7fb8879

File tree

3 files changed

+8
-18
lines changed

3 files changed

+8
-18
lines changed

forms/other/regionalCapacityServicesReport.json

+6-14
Original file line numberDiff line numberDiff line change
@@ -150,28 +150,20 @@
150150
{
151151
"dataType": "number",
152152
"name": "organisationFteWorkforce",
153-
"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.",
153+
"description": "Enter total RDP staff (full time equivalent) deployed on Services for the Deed and all Contracts (including <span style='white-space: nowrap;'>non-DCCEEW</span> Contracts) during this reporting period.",
154154
"validate": [
155155
{
156156
"rule": "required"
157157
},
158158
{
159159
"rule": "min[0]"
160-
},
161-
{
162-
"param": {
163-
"expression": "organisationFteIndigenousWorkforce",
164-
"type": "computed"
165-
},
166-
"rule": "min",
167-
"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?'"
168160
}
169161
]
170162
},
171163
{
172164
"dataType": "number",
173165
"name": "organisationFteIndigenousWorkforce",
174-
"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.",
166+
"description": "Enter total RDP Indigenous staff (full time equivalent) deployed on Services for the Deed and all Contracts (including <span style='white-space: nowrap;'>non-DCCEEW</span> Contracts) during this reporting period.",
175167
"validate": [
176168
{
177169
"rule": "required"
@@ -185,14 +177,14 @@
185177
"type": "computed"
186178
},
187179
"rule": "max",
188-
"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?'"
180+
"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?'"
189181
}
190182
]
191183
},
192184
{
193185
"dataType": "number",
194186
"name": "servicesContractedValueFirstNations",
195-
"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).",
187+
"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 <span style='white-space: nowrap;'>non-DCCEEW</span> Contracts).",
196188
"validate": [
197189
{
198190
"rule": "required"
@@ -544,7 +536,7 @@
544536
"items": [
545537
{
546538
"type": "literal",
547-
"source": "<b>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.</b>"
539+
"source": "<b>Q5(c). Please complete workforce and supply chain data (Deed of Standing Offer Clause 38 Indigenous Procurement Policy). Please do not provide personal or <span style='white-space: nowrap;'>commercial-in-confidence</span> information when answering this question. Please retain documentation as evidence to support assurance activities undertaken to verify the reported information.</b>"
548540
}
549541
]
550542
},
@@ -577,7 +569,7 @@
577569
"css": "span7",
578570
"preLabel": "What was the dollar value of Services contracted to First Nations people/Indigenous enterprises during this reporting period?",
579571
"source": "servicesContractedValueFirstNations",
580-
"type": "currency"
572+
"type": "number"
581573
}
582574
]
583575
},

grails-app/assets/javascripts/organisation.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ OrganisationPageViewModel = function (props, options) {
737737
}
738738

739739
self.attachValidation = function() {
740-
$("#organisation-targets").validationEngine('attach', {validationAttribute: "data-validation-engine"});
740+
$("#organisation-targets > table").validationEngine('attach');
741741
};
742742

743743
self.saveOrganisationConfiguration = function() {
@@ -762,7 +762,7 @@ OrganisationPageViewModel = function (props, options) {
762762
};
763763

764764
self.saveCustomFields = function() {
765-
if ($("#organisation-targets form").validationEngine('validate')) {
765+
if ($("#organisation-targets > table").validationEngine('validate')) {
766766
var json = JSON.parse(self.reportingTargets().modelAsJSON());
767767
return saveOrganisation(json);
768768
}

grails-app/views/organisation/_serviceTargets.gsp

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<!-- ko with:reportingTargets() -->
22
<h4>${title ?: "Organisation services and minimum targets"}</h4>
33
<!-- ko with: services -->
4-
<form>
54
<table class="table service-targets validationEngineContainer">
65
<thead>
76
<tr>
@@ -75,7 +74,6 @@
7574
%{-- </tr>--}%
7675
%{-- </tfoot>--}%
7776
</table>
78-
</form>
7977
<!-- /ko -->
8078
<!-- /ko -->
8179
<button class="btn btn-sm btn-primary" data-bind="click: saveCustomFields">Save changes</button>

0 commit comments

Comments
 (0)