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

Update New announcement form to ensure group names are properly displayed in the Select groups dropdown #1965

Merged
merged 1 commit into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/views/admin/announcements/edit.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
.row
.col.col-md-10.col-lg-8
= simple_form_for [:admin, @announcement] do |f|
= f.association :groups, label_method: :to_s
= f.association :groups, label_method: :to_s, label: 'Select groups'
= f.input :message, input_html: { rows: 3 },
hint: raw(t('admin.shared.markdown_hint', link: link_to(t('admin.shared.markdown'), 'https://commonmark.org/help/')))
= f.input :expires_at, as: :string
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/announcements/new.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
.row
.col.col-md-10.col-lg-8
= simple_form_for [:admin, @announcement] do |f|
= f.association :groups, label: 'Select groups'
= f.association :groups, label_method: :to_s, label: 'Select groups'
= f.input :all_groups, as: :boolean, checked_value: true, unchecked_value: false, label: 'Send to all groups'
= f.input :message, input_html: { rows: 3 },
hint: raw(t('admin.shared.markdown_hint', link: link_to(t('admin.shared.markdown'), 'https://commonmark.org/help/')))
Expand Down
2 changes: 1 addition & 1 deletion spec/features/admin/announcements_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
scenario 'can successfully send a new announcement to selected groups' do
visit new_admin_announcement_path
fill_in 'Message', with: 'An announcement to selected groups'
select "Coaches", from: 'Select group'
select "Coaches #{chapter.name}", from: 'Select group'
click_on 'announcement[create]'

expect(page).to have_content('An announcement to selected groups')
Expand Down
Loading