Skip to content

Conversation

csbarnet
Copy link

This PR adds the setting FIELD_OF_SCIENCE_HIDE that removes or hides references to Field of Science from all pages when True. It defaults to False, so that the default behavior of Coldfront does not change. It does not remove the field of science field from the Project model.

In many cases, references to the field of science were removed by simply adding conditional inclusion of the field on respective templates. This includes the allocations by field of science graphic on the center-summary page. Additionally, references to relevant fields in javascript are also handled.

In the cases of the ProjectSearchForm and the ProjectCreationForm (renamed ProjectUpdateForm), the django crispy-forms FormHelper object was used to dynamically include/exclude the Field of Science search field.

The ProjectUpdateView was assigned the same form_class as the ProjectCreateView so that they share fields.

Tests test inclusion or exclusion of the Field of Science depending on the setting using the @override_settings decorator.

@csbarnet
Copy link
Author

csbarnet commented Oct 1, 2025

@aebruno I updated this PR to fix a merge conflict that arose. I also see that some tests failed, but they appear to be unrelated to any of the changes in this PR. (AllocationModel expiration tests). Please advise.

@aebruno
Copy link
Member

aebruno commented Oct 1, 2025

Thanks @csbarnet, looks like you just had to rebase with main to get the latest changes. Checks are passing now. Can you please squash this into a single signed commit. Thanks!

…of Science from all pages when True

Signed-off-by: Chris Barnett <[email protected]>
@csbarnet csbarnet force-pushed the feature-hide-field-of-science branch from 7501776 to d6b145a Compare October 2, 2025 14:36
@csbarnet
Copy link
Author

csbarnet commented Oct 2, 2025

@aebruno I think this should be all set now. thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants