Skip to content

Make form classes configurable #6395

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 27, 2023
Merged

Make form classes configurable #6395

merged 1 commit into from
Oct 27, 2023

Conversation

marrus-sh
Copy link
Collaborator

This commit allows applications to provide their own behaviours in subclasses of the default Hyrax form classes
(Hyrax::Forms::AdministrativeSetForm, Hyrax::Forms::FileSetForm, Hyrax::Forms::PcdmCollectionForm, Hyrax::Forms::PcdmObjectForm) and then tell Hyrax to use those subclasses instead via Hyrax configuration.

The situation of Hyrax::Forms::PcdmCollectionForm is a bit complicated, since these classes are generated dynamically on‐demand. So the configuration in this case is a Proc rather than a simple class.

This commit allows applications to provide their own behaviours in
subclasses of the default Hyrax form classes
(`Hyrax::Forms::AdministrativeSetForm`, `Hyrax::Forms::FileSetForm`,
`Hyrax::Forms::PcdmCollectionForm`, `Hyrax::Forms::PcdmObjectForm`) and
then tell Hyrax to use those subclasses instead via Hyrax configuration.

The situation of `Hyrax::Forms::PcdmCollectionForm` is a bit
complicated, since these classes are generated dynamically on‐demand. So
the configuration in this case is a Proc rather than a simple class.
@dlpierce dlpierce merged commit 5a8d0ee into main Oct 27, 2023
@dlpierce dlpierce deleted the form_config branch October 27, 2023 15:13
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