Skip to content
Snippets Groups Projects
Unverified Commit e008e14c authored by Kamil Trzcinski's avatar Kamil Trzcinski
Browse files

Fix single team selection

parent 6d9c1d3e
Branches
Tags
No related merge requests found
Loading
@@ -8,7 +8,9 @@
Loading
@@ -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.
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment