From bcc46416c6434c8500f82867ee391c08c1887fbd Mon Sep 17 00:00:00 2001 From: sophia-massie <96220951+sophia-massie@users.noreply.github.com> Date: Fri, 20 Sep 2024 15:17:35 -0500 Subject: [PATCH] hotfix/allow-zero-in-reg-forms (#319) * hotfix/allow-zero-in-reg-forms * Updated with proper regrex pattern * - Updates with proper regex pattern * - Keeps dollar amount pattern intact while allowing for zero --------- Co-authored-by: Chandra Y --- .../submission_form/registration_form_body.html | 12 ++++++------ .../submission_form/registration_form_scripts.html | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/apcd_cms/src/apps/registrations/templates/submission_form/registration_form_body.html b/apcd_cms/src/apps/registrations/templates/submission_form/registration_form_body.html index 14bd0a95..5167beba 100644 --- a/apcd_cms/src/apps/registrations/templates/submission_form/registration_form_body.html +++ b/apcd_cms/src/apps/registrations/templates/submission_form/registration_form_body.html @@ -463,7 +463,7 @@
class="integerfield" id="total_covered_lives_{{ent_no}}_{{r.reg_id}}" inputmode="numeric" - pattern="^[1-9]+[0-9]*$" + pattern="^(0|[1-9][0-9]*)$" value="{% if not renew %}{{ entity.no_covered }}{% endif %}" /> @@ -482,7 +482,7 @@
class="integerfield" id="claims_encounters_volume_{{ent_no}}_{{r.reg_id}}" inputmode="numeric" - pattern="^[1-9]+[0-9]*$" + pattern="^(0|[1-9][0-9]*)$" value="{% if not renew %}{{ entity.claim_and_enc_vol }}{% endif %}" /> @@ -506,7 +506,7 @@
class="integerfield" id="total_claims_value_{{ent_no}}_{{r.reg_id}}" inputmode="numeric" - pattern="^(?=.*[1-9])[0-9]*[.]?[0-9]{1,2}$" + pattern="^(0|[1-9][0-9]*)(\.[0-9]{1,2})?$" value="{% if not renew %}{{ entity.claim_val }}{% endif %}" /> @@ -760,7 +760,7 @@
class="integerfield" id="total_covered_lives_1" inputmode="numeric" - pattern="^[1-9]+[0-9]*$" + pattern="^(0|[1-9][0-9]*)$" /> @@ -778,7 +778,7 @@
class="integerfield" id="claims_encounters_volume_1" inputmode="numeric" - pattern="^[1-9]+[0-9]*$" + pattern="^(0|[1-9][0-9]*)$" />
@@ -801,7 +801,7 @@
class="integerfield" id="total_claims_value_1" inputmode="numeric" - pattern="^(?=.*[1-9])[0-9]*[.]?[0-9]{1,2}$" + pattern="^(0|[1-9][0-9]*)(\.[0-9]{1,2})?$" />
{# Additional entities rendered here... #} diff --git a/apcd_cms/src/apps/registrations/templates/submission_form/registration_form_scripts.html b/apcd_cms/src/apps/registrations/templates/submission_form/registration_form_scripts.html index ba1458da..c525b582 100644 --- a/apcd_cms/src/apps/registrations/templates/submission_form/registration_form_scripts.html +++ b/apcd_cms/src/apps/registrations/templates/submission_form/registration_form_scripts.html @@ -316,7 +316,7 @@
class="integerfield" id="total_covered_lives_${entities}${reg_id_substr}" inputmode="numeric" - pattern="^[1-9]+[0-9]*$" + pattern="^(0|[1-9][0-9]*)$" />
@@ -333,7 +333,7 @@
class="integerfield" id="claims_encounters_volume_${entities}${reg_id_substr}" inputmode="numeric" - pattern="^[1-9]+[0-9]*$" + pattern="^(0|[1-9][0-9]*)$" />
Enter a whole number. @@ -352,7 +352,7 @@
class="integerfield" id="total_claims_value_${entities}${reg_id_substr}" inputmode="numeric" - pattern="^(?=.*[1-9])[0-9]*[.]?[0-9]{1,2}$" + pattern="^(0|[1-9][0-9]*)(\.[0-9]{1,2})?$" />