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

[#67516] consolidate button text of nextcloud storage creation finish

Eric Schubert24af96d5b1b1
diff --git a/frontend/src/stimulus/controllers/dynamic/storages/automatically-managed-project-folders-form.controller.ts b/frontend/src/stimulus/controllers/dynamic/storages/automatically-managed-project-folders-form.controller.ts
index 6ab846f75c8..28f8a23d145 100644
--- a/frontend/src/stimulus/controllers/dynamic/storages/automatically-managed-project-folders-form.controller.ts
+++ b/frontend/src/stimulus/controllers/dynamic/storages/automatically-managed-project-folders-form.controller.ts
@@ -39,8 +39,6 @@ export default class AutomaticallyManagedProjectFoldersFormController extends Co
static values = {
providerType: String,
isAutomaticallyManaged: Boolean,
- doneCompleteLabel: String,
- doneCompleteWithoutLabel: String,
};
declare readonly applicationPasswordInputTarget:HTMLElement;
@@ -48,8 +46,6 @@ export default class AutomaticallyManagedProjectFoldersFormController extends Co
declare readonly submitButtonTarget:HTMLElement;
declare isAutomaticallyManagedValue:boolean;
- declare doneCompleteLabelValue:string;
- declare doneCompleteWithoutLabelValue:string;
connect():void {
this.toggleApplicationPasswordDisplay(this.isAutomaticallyManagedValue);
@@ -66,10 +62,8 @@ export default class AutomaticallyManagedProjectFoldersFormController extends Co
if (automaticManagementEnabled) {
this.applicationPasswordInputTarget.classList.remove('d-none');
- this.submitButtonTarget.textContent = this.doneCompleteLabelValue;
} else {
this.applicationPasswordInputTarget.classList.add('d-none');
- this.submitButtonTarget.textContent = this.doneCompleteWithoutLabelValue;
}
}
}
diff --git a/modules/storages/app/components/storages/admin/forms/automatically_managed_project_folders_form_component.html.erb b/modules/storages/app/components/storages/admin/forms/automatically_managed_project_folders_form_component.html.erb
index b45464e6570..22ff436e58c 100644
--- a/modules/storages/app/components/storages/admin/forms/automatically_managed_project_folders_form_component.html.erb
+++ b/modules/storages/app/components/storages/admin/forms/automatically_managed_project_folders_form_component.html.erb
@@ -7,9 +7,7 @@
method: form_method,
data: {
controller: "storages--automatically-managed-project-folders-form",
- "storages--automatically-managed-project-folders-form-is-automatically-managed-value": storage.automatic_management_enabled?,
- "storages--automatically-managed-project-folders-form-done-complete-label-value": I18n.t("storages.buttons.done_complete_setup"),
- "storages--automatically-managed-project-folders-form-done-complete-without-label-value": I18n.t("storages.buttons.complete_without_setup")
+ "storages--automatically-managed-project-folders-form-is-automatically-managed-value": storage.automatic_management_enabled?
}
) do |form|
flex_layout do |project_folders_form|
diff --git a/modules/storages/app/components/storages/admin/forms/automatically_managed_project_folders_form_component.rb b/modules/storages/app/components/storages/admin/forms/automatically_managed_project_folders_form_component.rb
index 4f526f2194a..e6d8d28cd26 100644
--- a/modules/storages/app/components/storages/admin/forms/automatically_managed_project_folders_form_component.rb
+++ b/modules/storages/app/components/storages/admin/forms/automatically_managed_project_folders_form_component.rb
@@ -43,7 +43,7 @@ module Storages::Admin::Forms
def submit_button_options
{
- label: submit_button_label,
+ label: I18n.t(:button_finish_setup),
data: { "storages--automatically-managed-project-folders-form-target": "submitButton" }.tap do |data_hash|
# For create action, break from Turbo Frame and follow full page redirect
data_hash[:turbo] = false if new_record?
@@ -57,14 +57,6 @@ module Storages::Admin::Forms
private
- def submit_button_label
- if storage.automatic_management_enabled?
- I18n.t("storages.buttons.done_complete_setup")
- else
- I18n.t("storages.buttons.complete_without_setup")
- end
- end
-
def application_password_display_options
{}.tap do |options_hash|
options_hash[:display] = :none unless storage.automatic_management_enabled?