cisagov / manage.get.gov

A Django-based domain name registrar that interfaces with an EPP registry
https://get.gov
Other
60 stars 18 forks source link

Django Admin: Show only fields applicable to Org Type #1042

Open PaulKuykendall opened 1 year ago

PaulKuykendall commented 1 year ago

Issue Description

Goal: When rendering these pages, show ONLY the fields which are appropriate and applicable to the Organization Type specified.

Applicability

In Django Admin, this issue applies to multiple pages.

Problem:

When editing domain information, all available fields are exposed to the user, regardless of org type, including those fields which are not relevant nor appropriate for the selected org type.

Improvement:

Instead, only show the fields applicable to chosen org type.

Test Case:

Given a user is viewing or editing Domain Information When the user selects an Organization Type Then is should be clear to the user, which fields are required/applicable to that organization type.

Constraint:

Avoid making Django Admin any more javascript dependent.

Acceptance Criteria:

For the above mentioned pages, when the Org Type is:

Additional Context (optional)

No response

Issue Links

This originated from #935

PaulKuykendall commented 8 months ago

@rachidatecs - can you comment on the relative difficulty in making DjA display fields conditionally??

PaulKuykendall commented 8 months ago

The LOE for this seems high, and would create more of a reliance on JS in DjA. Not a good thing. ALSO - this is NOT particularly valueable, rather it just reduces the "nuisance" of seeing this fields under conditions where they are irrelevant. Moving to the FUTURE Analyst enhancements.