From a7aa06d18a187183a14ba74060b264111dae3a62 Mon Sep 17 00:00:00 2001 From: Alex Kriuchykhin Date: Mon, 28 Aug 2023 09:37:11 +0200 Subject: [PATCH] Fix error handling on new folder and project edit modals [SCI-9135] (#6082) --- app/assets/javascripts/projects/index.js | 2 +- app/views/projects/index/modals/_edit_project_contents.html.erb | 2 +- app/views/projects/index/modals/_new_project_folder.html.erb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/projects/index.js b/app/assets/javascripts/projects/index.js index 34df7ad5f..a01be4979 100644 --- a/app/assets/javascripts/projects/index.js +++ b/app/assets/javascripts/projects/index.js @@ -52,7 +52,7 @@ var ProjectsIndex = (function() { refreshCurrentView(); }) .on('ajax:error', newProjectFolderModal, function(e, data) { - let form = $(this).find('form#new_project_folder'); + let form = $(this).find('.new_project_folder'); form.renderFormErrors('project_folder', data.responseJSON); }); diff --git a/app/views/projects/index/modals/_edit_project_contents.html.erb b/app/views/projects/index/modals/_edit_project_contents.html.erb index 8bc7fb116..e27769e98 100644 --- a/app/views/projects/index/modals/_edit_project_contents.html.erb +++ b/app/views/projects/index/modals/_edit_project_contents.html.erb @@ -4,7 +4,7 @@ <%= t('projects.index.modal_edit_project.modal_title', project: @project.name) %> -<%= form_with model: @project, url: project_path(@project ,format: :json), method: :put, data: { remote: true } do |f| %> +<%= form_with model: @project, url: project_path(@project ,format: :json), method: :put, class: 'edit_project', data: { remote: true } do |f| %>