diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-12-22 11:59:41 +0100 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-12-22 11:59:41 +0100 |
commit | e008e14c7b2d3d5596d767dfb51a693f0746dfbb (patch) | |
tree | d680feb65cedeb997363fc09b199c5b8347f0761 | |
parent | 6d9c1d3efce00da95832feaaf36227bcbffecadf (diff) | |
download | gitlab-ce-fix-single-team.tar.gz |
Fix single team selectionfix-single-team
-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. |