Fix error handling on new folder and project edit modals [SCI-9135] (#6082)

This commit is contained in:
Alex Kriuchykhin 2023-08-28 09:37:11 +02:00 committed by GitHub
parent f4c48fe907
commit a7aa06d18a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -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);
});

View file

@ -4,7 +4,7 @@
<%= t('projects.index.modal_edit_project.modal_title', project: @project.name) %>
</h4>
</div>
<%= 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| %>
<div class="modal-body">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 sci-input-container">

View file

@ -1,5 +1,5 @@
<div class="modal" id="new-project-folder-modal" tabindex="-1" role="dialog" aria-labelledby="new-project-folder-modal-label">
<%= form_with model: @project_folder, data: { remote: true } do |f| %>
<%= form_with model: @project_folder, class: 'new_project_folder', data: { remote: true } do |f| %>
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">