Commit f8bab610 authored by Kamil Trzciński's avatar Kamil Trzciński

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

Fix single team selection

See merge request !8251
parents 29c64545 e008e14c
...@@ -8,7 +8,9 @@ ...@@ -8,7 +8,9 @@
= @teams.one? ? 'The team' : 'Select the team' = @teams.one? ? 'The team' : 'Select the team'
where the slash commands will be used in where the slash commands will be used in
- selected_id = @teams.keys.first if @teams.one? - 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 .help-block
- if @teams.one? - if @teams.one?
This is the only team where you are an administrator. 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