mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Ajaxify booth responsibles selectize interface
No need to load *all* users into a select input...
This commit is contained in:
parent
800bb28c34
commit
2e21079991
4 changed files with 77 additions and 29 deletions
|
|
@ -115,14 +115,6 @@ module ApplicationHelper
|
|||
user_selector_input(:speakers, form, '', true)
|
||||
end
|
||||
|
||||
def responsibles_selector_input(form)
|
||||
user_selector_input(
|
||||
:responsibles,
|
||||
form,
|
||||
"The people responsible for the #{t 'booth'}. You can only select existing users."
|
||||
)
|
||||
end
|
||||
|
||||
def user_selector_input(field, form, hint = '', multiple = true)
|
||||
users = User.where(is_disabled: false).pluck(:id, :name, :username, :email).map { |user| [user[0], user[1].blank? ? user[2] : user[1], user[2], user[3]] }.sort_by { |user| user[1].downcase }
|
||||
form.input(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue