Skip to content

Commit

Permalink
Update requested threshold input's max value with updated help text (#…
Browse files Browse the repository at this point in the history
…272)

Co-authored-by: Garrett Edmonds <[email protected]>
  • Loading branch information
edmondsgarrett and Garrett Edmonds committed Feb 12, 2024
1 parent 421c4da commit 4e20f90
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ <h4>Acknowledgment of Terms</h4>
// exception block number
function getHelpText(fieldSelection, file_type, exceptions) {
helpText = document.getElementById(`help-text-threshold-requested_${exceptions}`);
thresholdInput = document.getElementById(`threshold-requested_${exceptions}`)
$.ajax({
url: "{% url 'exception:get-cdls' %}",
type: 'GET',
Expand All @@ -388,9 +389,10 @@ <h4>Acknowledgment of Terms</h4>
},
success: function(response) {
let cdls = response;
//To change help text for requested threshold percentage
//To change input's max value & help text for requested threshold percentage
for (let i = 0; i < cdls.length; i++)
if (fieldSelection == cdls[i].field_list_code) {
thresholdInput.max = cdls[i].threshold_value
helpText.innerHTML = "";
helpText.innerHTML = `Must be less than the ${cdls[i].threshold_value}% required.`
};
Expand Down

0 comments on commit 4e20f90

Please sign in to comment.