Skip to content

Use "Submit" label on /new form buttons#1863

Merged
maebeale merged 2 commits into
mainfrom
maebeale/new-form-submit-label
Jul 4, 2026
Merged

Use "Submit" label on /new form buttons#1863
maebeale merged 2 commits into
mainfrom
maebeale/new-form-submit-label

Conversation

@maebeale

Copy link
Copy Markdown
Collaborator

What is the goal of this PR and why is this important?

  • Standardizes the submit call to action on new-record forms to read "Submit" instead of "Create <Model>"
  • Gives creation screens a consistent label across the app

How did you approach the change?

  • Replaced explicit "Create …" submit labels with "Submit" on forms served from /new endpoints
  • For partials shared between new and edit, only the new-record branch was changed; the edit label (e.g. "Save changes" / "Update") is preserved
  • Files touched:
    • forms/new.html.erb — "Create form" → "Submit"
    • payments/_form.html.erb (rendered only by payments/new) — "Create Payment" → "Submit"
    • allocations/new.html.erb — "Create Allocation" → "Submit"
    • refunds/new.html.erb — "Create Refund" → "Submit" (kept "Refund via Stripe" branch)
    • scholarships/_form.html.erb — new branch "Create scholarship" → "Submit"
    • event_registrations/_form.html.erb — new branch "Create registration" → "Submit"

Anything else to add?

  • Marked HOLD pending confirmation on scope.
  • Intentionally left unchanged (flagging for reviewer):
    • payments/_allocation_form.html.erb and discounts/_allocation_form.html.erb ("Create Payment"/"Create Discount") render via the custom allocation_form turbo action, not a /new route.
    • ~30 forms use bare f.button :submit (no explicit label); simple_form auto-renders these as "Create <Model>" on new / "Update <Model>" on edit. Switching those to "Submit" would require a per-form persisted? conditional in each shared partial — held off pending direction.

🤖 Generated with Claude Code

maebeale and others added 2 commits June 22, 2026 08:30
Replaces "Create <Model>" submit labels with "Submit" on new-record
forms so the call to action is consistent across creation screens.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Catches the create-branch label introduced on main so all new-record
forms read "Submit" consistently.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
<div class="ml-auto flex items-center gap-3">
<%= link_to "Cancel", cancel_path, class: "btn btn-secondary-outline" %>
<%= f.button :submit, f.object.persisted? ? "Save changes" : "Create registration", class: "btn btn-primary" %>
<%= f.button :submit, f.object.persisted? ? "Save changes" : "Submit", class: "btn btn-primary" %>

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

🤖 From Claude: This partial is shared by new and edit, so only the non-persisted branch changes to "Submit" — the edit label ("Save changes") is intentionally preserved.

@maebeale maebeale changed the title HOLD: Use "Submit" label on /new form buttons Use "Submit" label on /new form buttons Jul 4, 2026
@maebeale maebeale marked this pull request as ready for review July 4, 2026 20:41
Copilot AI review requested due to automatic review settings July 4, 2026 20:41
@maebeale maebeale merged commit be63eb1 into main Jul 4, 2026
3 checks passed
@maebeale maebeale deleted the maebeale/new-form-submit-label branch July 4, 2026 20:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR standardizes the primary submit button label on /new (create) forms to “Submit”, improving consistency across the Rails app’s new-record creation screens while preserving edit-specific labels in shared partials.

Changes:

  • Updated new-record submit labels to “Submit” in several /new views and the “new” branches of shared form partials.
  • Preserved existing edit/update button labels (e.g., “Save changes”) where the partial is shared by both new and edit.
  • Kept the special-case refund CTA (“Refund via Stripe”) unchanged.

Outstanding decisions:

  • Confirm whether the intended scope should remain limited to explicitly-labeled /new forms, or if the broader set of forms relying on Simple Form’s default “Create ” label should also be updated.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
app/views/scholarships/_form.html.erb Changes the new-record submit label to “Submit” while keeping “Save changes” for persisted records.
app/views/refunds/new.html.erb Updates the non-Stripe refund submit label to “Submit” while preserving the “Refund via Stripe” branch.
app/views/payments/_form.html.erb Updates the submit label to “Submit” in the partial used by the new payment flow.
app/views/forms/new.html.erb Changes the new form creation submit label from “Create form” to “Submit”.
app/views/event_registrations/_form.html.erb Changes the new-record submit label to “Submit” while keeping “Save changes” for persisted records.
app/views/allocations/new.html.erb Updates the allocation creation submit label to “Submit”.

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