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 administration_settings script

Oliver Günther1013a0c63db9
diff --git a/app/views/admin/settings/display_settings/show.html.erb b/app/views/admin/settings/display_settings/show.html.erb
index 07bf21568fa..d6eca6d868f 100644
--- a/app/views/admin/settings/display_settings/show.html.erb
+++ b/app/views/admin/settings/display_settings/show.html.erb
@@ -27,10 +27,6 @@ See COPYRIGHT and LICENSE files for more details.
++#%>
-<% content_for :header_tags do %>
- <meta name="required_script" content="administration_settings" />
-<% end %>
-
<%= toolbar title: t(:label_display) %>
<%= styled_form_tag(admin_settings_update_display_path, method: :patch) do %>
diff --git a/app/views/admin/settings/working_days_settings/show.html.erb b/app/views/admin/settings/working_days_settings/show.html.erb
index ffb41ddab32..8ed3ee7a3c0 100644
--- a/app/views/admin/settings/working_days_settings/show.html.erb
+++ b/app/views/admin/settings/working_days_settings/show.html.erb
@@ -27,10 +27,6 @@ See COPYRIGHT and LICENSE files for more details.
++#%>
-<% content_for :header_tags do %>
- <meta name="required_script" content="administration_settings" />
-<% end %>
-
<%= toolbar title: t(:label_working_days) %>
<div class="op-toast -warning">
diff --git a/frontend/src/app/core/augmenting/dynamic-scripts/administration_settings.js b/frontend/src/app/core/augmenting/dynamic-scripts/administration_settings.js
deleted file mode 100644
index 14f1ae6a7dc..00000000000
--- a/frontend/src/app/core/augmenting/dynamic-scripts/administration_settings.js
+++ /dev/null
@@ -1,44 +0,0 @@
-var Administration = (function ($) {
- const toggle_disabled_state = function (active) {
- jQuery('#setting_default_language select').attr('disabled', active)
- .closest('form')
- .find('input:submit')
- .attr('disabled', active);
- };
-
- const update_default_language_options = function (input) {
- var default_language_select = $('#setting_default_language select'),
- default_language_select_active;
-
- if (input.attr('checked')) {
- default_language_select.find('option[value="' + input.val() + '"]').removeAttr('disabled');
- } else {
- default_language_select.find('option[value="' + input.val() + '"]').attr('disabled', 'disabled');
- }
-
- default_language_select_active = default_language_select.find('option:not([disabled="disabled"])');
-
- toggle_disabled_state(default_language_select_active.length === 0);
-
- if (default_language_select_active.length === 1) {
- default_language_select_active.attr('selected', true);
- } else if (default_language_select.val() === input.val() && !input.attr('checked')) {
- default_language_select_active.first().attr('selected', true);
- }
- };
-
- const init_language_selection_handling = function () {
- jQuery('#setting_available_languages input:not([checked="checked"])').each(function (index, input) {
- update_default_language_options($(input));
- });
- jQuery('#setting_available_languages input').click(function () {
- update_default_language_options($(this));
- });
- };
-
- return {
- init_language_selection_handling: init_language_selection_handling
- };
-}(jQuery));
-
-Administration.init_language_selection_handling();