Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Remove allow_bright_colors option

Oliver Günther54986a28091e
diff --git a/app/helpers/colors_helper.rb b/app/helpers/colors_helper.rb
index 0edbd8132af..95f63830c50 100644
--- a/app/helpers/colors_helper.rb
+++ b/app/helpers/colors_helper.rb
@@ -29,11 +29,9 @@
#++
module ColorsHelper
- def options_for_colors(colored_thing, allow_bright_colors)
+ def options_for_colors(colored_thing)
colors = []
Color.find_each do |c|
- next if !allow_bright_colors && c.super_bright?
-
options = {}
options[:name] = c.name
options[:value] = c.id
diff --git a/app/views/colors/_color_autocomplete_field.html.erb b/app/views/colors/_color_autocomplete_field.html.erb
index 5a50e58e8a1..e0c6ee7820a 100644
--- a/app/views/colors/_color_autocomplete_field.html.erb
+++ b/app/views/colors/_color_autocomplete_field.html.erb
@@ -10,7 +10,7 @@
<%= content_tag('colors-autocompleter',
'',
class: "colors-autocomplete form--select-container " + "#{container_class.present? ? container_class : '-middle'}",
- data: { colors: options_for_colors(object, allow_bright_colors),
+ data: { colors: options_for_colors(object),
selected_color: selected_color(object),
highlight_text_inline: highlight_text_inline,
update_input: type + '[color_id]'}) %>
diff --git a/app/views/enumerations/_form.html.erb b/app/views/enumerations/_form.html.erb
index 4278d3ea72b..75858ad1bd9 100644
--- a/app/views/enumerations/_form.html.erb
+++ b/app/views/enumerations/_form.html.erb
@@ -45,7 +45,6 @@ See COPYRIGHT and LICENSE files for more details.
form: f,
object: @enumeration,
type: 'enumeration',
- allow_bright_colors: true,
label: @enumeration.color_label
} %>
<% end %>
diff --git a/app/views/statuses/_form.html.erb b/app/views/statuses/_form.html.erb
index 2c720e4bfde..03e15b0aa55 100644
--- a/app/views/statuses/_form.html.erb
+++ b/app/views/statuses/_form.html.erb
@@ -58,7 +58,6 @@ See COPYRIGHT and LICENSE files for more details.
form: f,
object: @status,
type: 'status',
- allow_bright_colors: true,
label: t('statuses.edit.status_color_text')
} %>
diff --git a/app/views/types/form/_settings.html.erb b/app/views/types/form/_settings.html.erb
index 6ec0e80dc90..f796680cf16 100644
--- a/app/views/types/form/_settings.html.erb
+++ b/app/views/types/form/_settings.html.erb
@@ -37,7 +37,6 @@ See COPYRIGHT and LICENSE files for more details.
form: f,
object: @type,
type: 'type',
- allow_bright_colors: true,
highlight_text_inline: true,
label: t('types.edit.type_color_text'),
form_field_class: '-wide-label',