Skip to content

Commit

Permalink
Improve usability of organisation select on batch_invitations/new
Browse files Browse the repository at this point in the history
This makes it easier to select the organisation for a batch of users
by excluding closed organisations and sorting the remaining ones
alphabetically. We did something similar in #2426 and #2417 - there's
enough subtle differences in those two select boxes (indicating a
current organisation and adding a "None" option respectively) that I
haven't attempted to extract the duplication. I think the new scopes
are self-explanatory enough that I'm happy to keep them inline in this
view.
  • Loading branch information
chrislo committed Oct 11, 2023
1 parent dd376e4 commit e47cec0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/batch_invitations/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
id: "batch_invitation_organisation_id",
name: "batch_invitation[organisation_id]",
label: "Organisation",
options: policy_scope(Organisation).map { |organisation| { text: organisation.name_with_abbreviation, value: organisation.id } }
options: policy_scope(Organisation).not_closed.order(:name).map { |organisation| { text: organisation.name_with_abbreviation, value: organisation.id } }
} %>

<% end %>
Expand Down

0 comments on commit e47cec0

Please sign in to comment.