diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-04-17 18:38:31 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-04-17 18:38:31 +0300 |
commit | da89ebbe483e1efc7d1eb4fde1a987d958a78ffd (patch) | |
tree | c9fbc1d62c1d5582fed7abe8df1abe8809069fa1 /app | |
parent | a66953b16bab5ecf874958d1acb3520ed7490559 (diff) |
Fix label color input.
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 |