Commit 15aaa5a5 authored by Kamil Trzciński's avatar Kamil Trzciński Committed by Marin Jankovski

Merge branch 'fix-single-team' into 'master'

Fix single team selection

See merge request !8251
parent 0aeefcef
......@@ -8,7 +8,9 @@
= @teams.one? ? 'The team' : 'Select the team'
where the slash commands will be used in
- selected_id = @teams.keys.first if @teams.one?
= f.select(:team_id, mattermost_teams_options(@teams), {}, { class: 'form-control', selected: "#{selected_id}", disabled: @teams.one? })
- options = mattermost_teams_options(@teams)
- options = options_for_select(options, selected_id)
= f.select(:team_id, options, {}, { class: 'form-control', selected: "#{selected_id}" })
.help-block
- if @teams.one?
This is the only team where you are an administrator.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment