You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
499 B
19 lines
499 B
5 years ago
|
$(document).on('turbolinks:load', function () {
|
||
|
$('.admin-modal-container').on('show.bs.modal', '.modal.admin-edit-subject-modal', function () {
|
||
|
var $modal = $('.modal.admin-edit-subject-modal');
|
||
|
var $form = $modal.find('form.admin-edit-subject-form');
|
||
5 years ago
|
|
||
5 years ago
|
$modal.on('click', '.submit-btn', function () {
|
||
|
$form.find('.error').html('');
|
||
|
var url = $form.attr('action');
|
||
5 years ago
|
|
||
5 years ago
|
$.ajax({
|
||
|
method: 'PATCH',
|
||
|
dataType: 'script',
|
||
|
url: url,
|
||
|
data: $form.serialize()
|
||
|
});
|
||
|
});
|
||
|
})
|
||
|
});
|