diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-04-20 11:30:05 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-04-20 11:30:05 +0300 |
commit | d012648b4916917e2823c8674ae680fcd11183af (patch) | |
tree | eb9dc01af57c0eb50906ccdfc8397fc2d5b48341 /app | |
parent | e883aae0e7cd7765153fd488a26f756c007f54a2 (diff) | |
parent | da89ebbe483e1efc7d1eb4fde1a987d958a78ffd (diff) |
Merge branch 'fix-label-color-input' into 'master'
Fix label color input.
Because `value` was set, every label color would render as purple in the form.
Introduced by 83b5a9ae2bfb594bcb5a9a931d6781ba05c9b9ef between 7.9 and 7.10, so no changelog item.
See merge request !538
Diffstat (limited to 'app')
-rw-r--r-- | app/models/label.rb | 2 | ||||
-rw-r--r-- | app/views/projects/labels/_form.html.haml | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/app/models/label.rb b/app/models/label.rb index 9d7099c5652..1f22ed23d42 100644 --- a/app/models/label.rb +++ b/app/models/label.rb @@ -13,6 +13,8 @@ class Label < ActiveRecord::Base DEFAULT_COLOR = '#428BCA' + default_value_for :color, DEFAULT_COLOR + belongs_to :project has_many :label_links, dependent: :destroy has_many :issues, through: :label_links, source: :target, source_type: 'Issue' diff --git a/app/views/projects/labels/_form.html.haml b/app/views/projects/labels/_form.html.haml index ad993db6c0b..261d52dedc1 100644 --- a/app/views/projects/labels/_form.html.haml +++ b/app/views/projects/labels/_form.html.haml @@ -16,7 +16,7 @@ .col-sm-10 .input-group .input-group-addon.label-color-preview - = f.color_field :color, value: "#AA33EE", class: "form-control" + = f.color_field :color, class: "form-control" .help-block Choose any color. %br |