diff options
author | Kamil TrzciĆski <ayufan@ayufan.eu> | 2016-12-26 23:11:50 +0000 |
---|---|---|
committer | Marin Jankovski <marin@gitlab.com> | 2016-12-27 16:59:50 +0000 |
commit | 15aaa5a5b69a73b0b68d115dd57ff323f159bc99 (patch) | |
tree | b3e9773b54d2eff7d1e2882c6beb6b28889deeb0 | |
parent | 0aeefcef14e459aea7d42f7aba1e7933536ee235 (diff) | |
download | gitlab-ce-15aaa5a5b69a73b0b68d115dd57ff323f159bc99.tar.gz |
Merge branch 'fix-single-team' into 'master'
Fix single team selection
See merge request !8251
-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. |