diff --git a/courses/static/js/modal_category.js b/courses/static/js/modal_category.js index 42b5f7d..63a893c 100644 --- a/courses/static/js/modal_category.js +++ b/courses/static/js/modal_category.js @@ -1,16 +1,15 @@ - var Submite = { remove: function(url,dados,id_li_link){ $('#category').modal('hide'); $.post(url,dados, function(data){ $(id_li_link).remove(); - $("#modal_category").empty(); - $("#accordion").remove(); + $("#modal_remove_cat").empty(); + $(id_li_link).remove(); $(".modal-backdrop.in").remove(); alertify.success("Category removed successfully!"); }).fail(function(){ - $("#modal_category").empty(); - $("#modal_category").append(data); + $("#modal_remove_cat").empty(); + $("#modal_remove_cat").append(data); $('#category').modal('show'); }); } diff --git a/courses/templates/category/create.html b/courses/templates/category/create.html index e628f81..26b9c87 100644 --- a/courses/templates/category/create.html +++ b/courses/templates/category/create.html @@ -11,13 +11,20 @@ {% endblock %} {% block content %} +{% if messages %} + {% for message in messages %} + + {% endfor %} +{% endif %}
{% csrf_token %} {% for field in form %}
- {% render_field field class='form-control input-sm' %} + {% render_field field class='form-control' %}
{% if field.errors%}