diff --git a/apps/dashboard/app/javascript/projects_new.js b/apps/dashboard/app/javascript/projects_new.js index 8aaca8fa37..1c38d680ab 100644 --- a/apps/dashboard/app/javascript/projects_new.js +++ b/apps/dashboard/app/javascript/projects_new.js @@ -1,7 +1,10 @@ 'use strict'; +import { attachPathSelectors } from './path_selector/path_selector'; + jQuery(function() { $("#project_template").on('change', (event) => templateChange(event)); + attachPathSelectors(); }); function templateChange(event) { diff --git a/apps/dashboard/app/views/projects/_form.html.erb b/apps/dashboard/app/views/projects/_form.html.erb index dd6f7f7a4c..5f362d9e63 100644 --- a/apps/dashboard/app/views/projects/_form.html.erb +++ b/apps/dashboard/app/views/projects/_form.html.erb @@ -1,6 +1,21 @@ <% edit_project_action = action_name != "new" && action_name != "create" + + path_selector_id = "project_directory_path_selector" + + path_selector_locals = { + path_selector_id: path_selector_id, + show_files: false, + show_hidden: false, + initial_directory: CurrentUser.home, + table_id: "#{path_selector_id}_table", + breadcrumb_id: "#{path_selector_id}_breadcrumb", + button_id: "#{path_selector_id}_button", + input_field_id: 'project_directory', + favorites: false + } %> +