Skip to content

Commit

Permalink
Fix selectize input defaults
Browse files Browse the repository at this point in the history
Not pre-filling those with existing associations lead to them being
removed on any update.

Fixes openSUSE#2988
  • Loading branch information
hennevogel committed May 6, 2022
1 parent a7e517e commit c97d0a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/views/booths/_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
= f.text_field :website_url, class: 'form-control', required: true, placeholder: 'URL'
.form-group
= f.label :responsible_ids, 'Responsibles'
= f.select :responsible_ids, [], {}, { multiple: true, class: 'form-control', id: 'users_selectize', placeholder: 'Responsibles' }
= f.select :responsible_ids, @booth.responsibles.pluck(:username, :id), {}, { multiple: true, class: 'form-control', id: 'users_selectize', placeholder: 'Responsibles' }
%span.help-block
The people responsible for the `t('booth')`. You can only select existing users.
.form-group
Expand Down
6 changes: 1 addition & 5 deletions app/views/proposals/_proposal_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@
= f.text_field :subtitle, class: 'form-control'
.form-group
= f.label :speaker_ids, 'Speakers'
- if f.object.speakers.any?
%p
Current:
= f.object.speakers.pluck(:username).join(', ')
= f.select :speaker_ids, [], {}, { multiple: true, class: "form-control", id: "users_selectize", placeholder: "Speakers" }
= f.select :speaker_ids, f.object.speakers.pluck(:username, :id), {}, { multiple: true, class: "form-control", id: "users_selectize", placeholder: "Speakers" }
%span.help-block
The people responsible for the event, beside you. You can only select existing users.
- if @program.tracks.confirmed.cfp_active.any?
Expand Down

0 comments on commit c97d0a1

Please sign in to comment.