mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-29 03:35:25 +08:00
Fix error handling on new folder and project edit modals [SCI-9135] (#6082)
This commit is contained in:
parent
f4c48fe907
commit
a7aa06d18a
3 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
});
|
||||
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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">
|
||||
|
|
Loading…
Reference in a new issue