diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2016-12-27 02:11:50 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2016-12-27 02:11:50 +0300 |
commit | f8bab6108ee80f46863721c41c33f10ee635dc41 (patch) | |
tree | fbdf50c31dca4ecbc089f3060ffa8fad394432fb /app/views | |
parent | 29c64545b5c2bcb8588865df449f2b946a6df07e (diff) | |
parent | e008e14c7b2d3d5596d767dfb51a693f0746dfbb (diff) |
Merge branch 'fix-single-team' into 'master'
Fix single team selection
See merge request !8251
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/projects/mattermosts/_team_selection.html.haml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/views/projects/mattermosts/_team_selection.html.haml b/app/views/projects/mattermosts/_team_selection.html.haml index 7980f7c9a72..24e86b8497f 100644 --- a/app/views/projects/mattermosts/_team_selection.html.haml +++ b/app/views/projects/mattermosts/_team_selection.html.haml @@ -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. |