mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-23 00:12:15 +00:00
Updates to AJAX forms and adding autofill function to the event form when adding things via AJAX
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
||||
@@ -10,5 +10,16 @@
|
||||
<div class="modal-footer">
|
||||
{% block footer %}{% endblock %}
|
||||
</div>
|
||||
<script>
|
||||
$('.modal-content form').on('submit', function(e) {
|
||||
e.preventDefault();
|
||||
data = $(this).serialize();
|
||||
action = $(this).attr('action');
|
||||
console.log(action)
|
||||
$.post(action, data, function(resp) {
|
||||
$('#modal').html(resp);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user