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

Fix bugs in types and custom fields

Inga Maid446cb936687
diff --git a/app/helpers/types_helper.rb b/app/helpers/types_helper.rb
index 1616ddd0591..28b121681b2 100644
--- a/app/helpers/types_helper.rb
+++ b/app/helpers/types_helper.rb
@@ -28,9 +28,9 @@
#++
module ::TypesHelper
- def types_tabs(type)
+ def types_tabs
[
- { name: 'settings', partial: 'types/form/settings',path: edit_type_tab_path(id: @type.id, tab: :settings), label: 'types.edit.settings' },
+ { name: 'settings', partial: 'types/form/settings', path: edit_type_tab_path(id: @type.id, tab: :settings), label: 'types.edit.settings' },
{ name: 'form_configuration', partial: 'types/form/form_configuration', path: edit_type_tab_path(id: @type.id, tab: :form_configuration), label: 'types.edit.form_configuration' },
{ name: 'projects', partial: 'types/form/projects', path: edit_type_tab_path(id: @type.id, tab: :projects), label: 'types.edit.projects' }
]
diff --git a/app/views/types/edit.html.erb b/app/views/types/edit.html.erb
index 3a1ecebeb4b..d03ac00f3b9 100644
--- a/app/views/types/edit.html.erb
+++ b/app/views/types/edit.html.erb
@@ -36,8 +36,6 @@ See docs/COPYRIGHT.rdoc for more details.
<%= breadcrumb_toolbar @type.name %>
</div>
-<%= render_tabs types_tabs(@type) %>
+<%= render_tabs types_tabs %>
<%= error_messages_for 'type' %>
-
-<%= render partial: "types/form/#{@tab}" %>
diff --git a/frontend/src/app/modules/admin/tabs/content-tabs.component.ts b/frontend/src/app/modules/admin/tabs/content-tabs.component.ts
index 0229f224ec8..6d00e877a3b 100644
--- a/frontend/src/app/modules/admin/tabs/content-tabs.component.ts
+++ b/frontend/src/app/modules/admin/tabs/content-tabs.component.ts
@@ -30,7 +30,8 @@ import {
Component,
OnDestroy,
Input,
- ElementRef
+ ElementRef,
+ ChangeDetectionStrategy
} from '@angular/core';
import {DynamicBootstrapper} from "core-app/globals/dynamic-bootstrapper";
import {GonService} from "core-app/modules/common/gon/gon.service";
@@ -50,7 +51,8 @@ interface GonTab {
@Component({
selector: contentTabsSelector,
- templateUrl: '/app/modules/common/tabs/scrollable-tabs.component.html'
+ templateUrl: '/app/modules/common/tabs/scrollable-tabs.component.html',
+ changeDetection: ChangeDetectionStrategy.OnPush
})
export class ContentTabsComponent extends ScrollableTabsComponent {