Skip to content

Commit

Permalink
Merge pull request #725 from eresearchqut/ERP-533_Registration_Cleanup
Browse files Browse the repository at this point in the history
[ERP-533] Delete unused parent registration forms and classes from ba…
  • Loading branch information
ppettitau authored Jan 21, 2025
2 parents b2686b5 + 84ee505 commit e048779
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 115 deletions.
25 changes: 0 additions & 25 deletions rdrf/rdrf/forms/registration_forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,28 +81,3 @@ def setup_fields(self):
choices=Patient.SEX_CHOICES, widget=RadioSelect, required=True
)
preferred_languages = ChoiceField(required=False, choices=language_choices)


class ParentWithPatientRegistrationForm(PatientRegistrationForm):
PatientRegistrationForm.labels.update(
{
"parent_guardian_first_name": _("Parent/Guardian Given Names"),
"parent_guardian_last_name": _("Parent/Guardian Surname"),
"parent_guardian_date_of_birth": _("Parent/Guardian Date of Birth"),
"parent_guardian_gender": _("Parent/Guardian gender"),
}
)

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
for field, tooltip in self.tooltip_info.items():
self.fields[field].widget.attrs["data-bs-toggle"] = "tooltip"
self.fields[field].widget.attrs["data-bs-placement"] = "left"
self.fields[field].widget.attrs["title"] = tooltip

parent_guardian_first_name = CharField(required=True)
parent_guardian_last_name = CharField(required=True)
parent_guardian_date_of_birth = DateField(required=True)
parent_guardian_gender = ChoiceField(
choices=Patient.SEX_CHOICES, widget=RadioSelect, required=True
)
3 changes: 1 addition & 2 deletions rdrf/rdrf/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,8 +685,7 @@
REGISTRATION_CLASS = "registry.groups.registration.patient.PatientRegistration"

# Parent Registration (also adding a patient at registration time)
# REGISTRATION_FORM = "rdrf.forms.registration_forms.ParentWithPatientRegistrationForm"
# REGISTRATION_CLASS = "registry.groups.registration.parent_with_patient.ParentWithPatientRegistration"
# [ERP-533] Deleted these forms and classes as they are unused across all currently hosted registries.

# In case you set up customised email templates for the "new-patient" notification, you should
# set this to False, otherwise the default registration email will also be sent to the user.
Expand Down
88 changes: 0 additions & 88 deletions rdrf/registry/groups/registration/parent_with_patient.py

This file was deleted.

0 comments on commit e048779

Please sign in to comment.