Last active
May 26, 2019 18:09
-
-
Save ttamg/98529a15e590b4961e088d42ac7c1be2 to your computer and use it in GitHub Desktop.
A modal that can fetch the Django HTML form by AJAX using the ajax_get.js script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="modal fade" id="messageModal" tabindex="-1" role="dialog" aria-labelledby="messageModalLabel" aria-hidden="true"> | |
<div class="modal-dialog" role="document"> | |
<div class="modal-content"> | |
<div class="modal-header"> | |
<h5 class="modal-title" id="messageModalLabel">Post a message</h5> | |
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> | |
<span aria-hidden="true">×</span> | |
</button> | |
</div> | |
<div class="modal-body"> | |
<div id="messageModalContent" ajax-url="{% url 'message_new' %}"> | |
</div> | |
<div id="messageModalPlaceholder"> | |
<p class="text-center">Loading ...</p> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<script> | |
{% include 'ajax/ajax_get.js' %} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment