Skip to content
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

add form helpers instead of repeating code #1053

Merged
merged 3 commits into from
Jun 28, 2024
Merged

add form helpers instead of repeating code #1053

merged 3 commits into from
Jun 28, 2024

Conversation

shapiromatron
Copy link
Owner

@shapiromatron shapiromatron commented Jun 21, 2024

In a few recent code reviews I noticed some boilerplate code that sets the textarea height for different fields in django forms. I rewrote the current forms by adding a helper method set_textarea_height that sets the height for all textarea or a specified list.

I also removed some code that set form-control or not to checkboxes; it didn't appear to have any impact, so I wonder if it was related to when we used twitter bootstrap 2 or 3 instead of 4, but please double-check to make sure I'm not missing something.

@shapiromatron shapiromatron marked this pull request as ready for review June 24, 2024 15:18
Copy link
Collaborator

@caseyhans caseyhans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So many forms! LGTM, always nice to cut some lines of code out.

@caseyhans caseyhans merged commit 0810ee4 into main Jun 28, 2024
6 checks passed
@caseyhans caseyhans deleted the form-helpers branch June 28, 2024 03:37
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