@C3roe thank you very much, everything is exactly like that, I also blocked the input with csrf, corrected it in the code, everything worked!
modal.find('.modal-body :input').prop('disabled', operation !== 'edit');
modal.find('#csrfToken').prop('disabled', false);