diff --git a/frontend/src/stimulus/controllers/dynamic/project-storage-form.controller.ts b/frontend/src/stimulus/controllers/dynamic/project-storage-form.controller.ts index a1dc85e6a661..2e1385657e51 100644 --- a/frontend/src/stimulus/controllers/dynamic/project-storage-form.controller.ts +++ b/frontend/src/stimulus/controllers/dynamic/project-storage-form.controller.ts @@ -195,14 +195,14 @@ export default class ProjectStorageFormController extends Controller { protected displayFolderSelectionOrLoginButton(isConnected:boolean, projectFolder:IStorageFile|null):void { if (isConnected) { - this.selectProjectFolderButtonTarget.style.display = 'inline-block'; - this.loginButtonTarget.style.display = 'none'; + this.selectProjectFolderButtonTarget.classList.remove('d-none'); + this.loginButtonTarget.classList.add('d-none'); this.selectedFolderTextTarget.innerText = projectFolder === null ? this.placeholderFolderNameValue : projectFolder.name; } else { - this.selectProjectFolderButtonTarget.style.display = 'none'; - this.loginButtonTarget.style.display = 'inline-block'; + this.selectProjectFolderButtonTarget.classList.add('d-none'); + this.loginButtonTarget.classList.remove('d-none'); this.selectedFolderTextTarget.innerText = this.notLoggedInValidationValue; } } @@ -213,12 +213,12 @@ export default class ProjectStorageFormController extends Controller { window.history.replaceState(window.history.state, '', url); } - protected toggleFolderDisplay(value:string):void { + private toggleFolderDisplay(value:string):void { // If the manual radio button is selected, show the manual folder selection section if (this.hasProjectFolderSectionTarget && value === 'manual') { - this.projectFolderSectionTarget.style.display = 'flex'; + this.projectFolderSectionTarget.classList.remove('d-none'); } else { - this.projectFolderSectionTarget.style.display = 'none'; + this.projectFolderSectionTarget.classList.add('d-none'); } } } diff --git a/frontend/src/stimulus/controllers/dynamic/storages/project-folder-mode-form.controller.ts b/frontend/src/stimulus/controllers/dynamic/storages/project-folder-mode-form.controller.ts index e6f1bd755219..ce5cdd449038 100644 --- a/frontend/src/stimulus/controllers/dynamic/storages/project-folder-mode-form.controller.ts +++ b/frontend/src/stimulus/controllers/dynamic/storages/project-folder-mode-form.controller.ts @@ -46,13 +46,4 @@ export default class ProjectFolderModeFormController extends ProjectStorageFormC this.selectedFolderTextTarget.innerText = this.notLoggedInValidationValue; } } - - protected toggleFolderDisplay(value:string):void { - // If the manual radio button is selected, show the manual folder selection section - if (this.hasProjectFolderSectionTarget && value === 'manual') { - this.projectFolderSectionTarget.classList.remove('d-none'); - } else { - this.projectFolderSectionTarget.classList.add('d-none'); - } - } } diff --git a/modules/storages/app/views/storages/project_settings/_project_folder_form.html.erb b/modules/storages/app/views/storages/project_settings/_project_folder_form.html.erb index 7341efc4f5f7..d667e379aadc 100644 --- a/modules/storages/app/views/storages/project_settings/_project_folder_form.html.erb +++ b/modules/storages/app/views/storages/project_settings/_project_folder_form.html.erb @@ -121,8 +121,7 @@ See COPYRIGHT and LICENSE files for more details. <% end %>