HOLD: Hide scholarship/CE registration boxes when they don't apply#1867
Draft
maebeale wants to merge 1 commit into
Draft
HOLD: Hide scholarship/CE registration boxes when they don't apply#1867maebeale wants to merge 1 commit into
maebeale wants to merge 1 commit into
Conversation
The registration edit form always showed the Scholarship and CE credits boxes, even for free events (where there's no fee to subsidize) and events that don't grant continuing education credits. That implied actions that don't apply and crowded the row. - Add ce_credits_eligible to Event (default true) so organizers can flag whether an event grants CE credits; surface the checkbox on the event form. - On the registration form, hide the scholarship box for free events and the CE box when the event isn't CE-eligible. - Let the organizations box absorb the freed columns: half width with both boxes, three-quarters with one, full width with none. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
maebeale
commented
Jun 22, 2026
| <% show_scholarship = paid_event %> | ||
| <% show_ce = f.object.event.ce_credits_eligible? %> | ||
| <% org_span = 2 + (show_scholarship ? 0 : 1) + (show_ce ? 0 : 1) %> | ||
| <% org_span_class = { 2 => "sm:col-span-2", 3 => "sm:col-span-3", 4 => "sm:col-span-4" }.fetch(org_span) %> |
Collaborator
Author
There was a problem hiding this comment.
🤖 From Claude: The span is mapped to literal class strings (sm:col-span-2/3/4) rather than interpolated (sm:col-span-#{org_span}) so Tailwind's content scanner actually compiles them — interpolated class names wouldn't be generated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the goal of this PR and why is this important?
How did you approach the change?
ce_credits_eligibletoEvent(boolean, defaulttrue, not null) via migration; permitted it inEventPolicyand surfaced a checkbox under Event Cost on the event form.event_registrations/_form):cost_cents == 0).event.ce_credits_eligible?is false.sm:col-span-2(both boxes show)sm:col-span-3sm:col-span-4(full width)UI Testing Checklist
Anything else to add?
🤖 Generated with Claude Code