From 78589bbcf3e16be7088fd3ed01b9ae7ec6635958 Mon Sep 17 00:00:00 2001 From: Denis Durepos Date: Tue, 12 Aug 2025 20:30:22 -0400 Subject: [PATCH] Corrected function of N/A field on injury edit and created portal templates. --- .../injury_management_portal_templates.xml | 25 +++++++- .../views/sports_clinic_portal_views.xml | 60 +++++++++++++++++-- .../views/sports_patient_injury_portal.xml | 25 +++++++- 3 files changed, 102 insertions(+), 8 deletions(-) diff --git a/bemade_sports_clinic/views/injury_management_portal_templates.xml b/bemade_sports_clinic/views/injury_management_portal_templates.xml index a73ff28..937bfae 100644 --- a/bemade_sports_clinic/views/injury_management_portal_templates.xml +++ b/bemade_sports_clinic/views/injury_management_portal_templates.xml @@ -63,13 +63,34 @@
+ t-att-value="injury.injury_date" t-att-disabled="injury.injury_date_na" + t-att-required="not injury.injury_date_na"/>
+ t-att-checked="injury.injury_date_na" + onchange="(function(){var el=document.getElementById('injury_date'); if(!el){return;} el.required=!this.checked; if(this.checked){ el.value=''; el.disabled=true; el.setAttribute('disabled','disabled'); } else { el.disabled=false; el.removeAttribute('disabled'); } }).call(this)"/>
+ Check N/A if exact date is unknown diff --git a/bemade_sports_clinic/views/sports_clinic_portal_views.xml b/bemade_sports_clinic/views/sports_clinic_portal_views.xml index 93b78ec..a180787 100644 --- a/bemade_sports_clinic/views/sports_clinic_portal_views.xml +++ b/bemade_sports_clinic/views/sports_clinic_portal_views.xml @@ -7,29 +7,33 @@ Teams /my/teams - teams_count + Players /my/players - players_count + Activities /my/activities - activities_count + Events /my/events - events_count + + + + + diff --git a/bemade_sports_clinic/views/sports_patient_injury_portal.xml b/bemade_sports_clinic/views/sports_patient_injury_portal.xml index 13b909f..2332f7c 100644 --- a/bemade_sports_clinic/views/sports_patient_injury_portal.xml +++ b/bemade_sports_clinic/views/sports_patient_injury_portal.xml @@ -59,13 +59,34 @@
+ t-att-required="'injury_date_na' not in request.params"/>
- +
Check N/A if exact date is unknown +