Commit 106769aa by Oláh István Gergely

dashboard: create group with ajax

parent 8db2683a
...@@ -36,6 +36,23 @@ $(function () { ...@@ -36,6 +36,23 @@ $(function () {
}); });
return false; return false;
}); });
$('.group-create').click(function(e) {
$.ajax({
type: 'GET',
url: '/dashboard/group/create/',
success: function(data) {
$('body').append(data);
addSliderMiscs();
$('#create-modal').modal('show');
$('#create-modal').on('hidden.bs.modal', function() {
$('#create-modal').remove();
});
}
});
return false;
});
$('[href=#index-graph-view]').click(function (e) { $('[href=#index-graph-view]').click(function (e) {
var box = $(this).data('index-box'); var box = $(this).data('index-box');
$("#" + box + "-list-view").hide(); $("#" + box + "-list-view").hide();
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
} }
</style> </style>
<form method="POST" action=""> <form method="POST" action="/dashboard/group/create/">
{% csrf_token %} {% csrf_token %}
{% crispy form %} {% crispy form %}
</form> </form>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment