# HG changeset patch # User Alexandre Segura # Date 1487609205 -3600 # Node ID 8f19067caeecdb7b1fdb3f419e7c596a8ce939c0 # Parent 55c024fc7c60ad40238f77202bcdb0ab81905f47 Fix comment form. diff -r 55c024fc7c60 -r 8f19067caeec src/iconolab/templates/iconolab/detail_image.html --- a/src/iconolab/templates/iconolab/detail_image.html Mon Feb 20 17:29:55 2017 +0100 +++ b/src/iconolab/templates/iconolab/detail_image.html Mon Feb 20 17:46:45 2017 +0100 @@ -49,12 +49,14 @@ {% csrf_token %} -
-
- -
- -
+
+
+
+ +
+ +
+
@@ -90,7 +92,7 @@ $.getJSON('/comments/annotation/' + annotation + '/comments.json') .then(function(comments) { - $('#annotation-panel form:last').replaceWith(form); + $('#form-comment form').replaceWith(form); $('.list-group a[data-annotation-id]').removeClass('active'); $el.addClass('active'); @@ -139,7 +141,7 @@ vm.$refs.panel.reset(); vm.$refs.commentList.comments = []; - $('#annotation-panel form:last').find('textarea, [type="submit"]').attr('disabled', true); + $('#form-comment form').find('textarea, [type="submit"]').attr('disabled', true); location.hash = ''; }); diff -r 55c024fc7c60 -r 8f19067caeec src/iconolab/templates/partials/comment_form.html --- a/src/iconolab/templates/partials/comment_form.html Mon Feb 20 17:29:55 2017 +0100 +++ b/src/iconolab/templates/partials/comment_form.html Mon Feb 20 17:46:45 2017 +0100 @@ -1,5 +1,7 @@
+ {% csrf_token %} + {{ comment_form.content_type }} {{ comment_form.object_pk }} {{ comment_form.timestamp }} @@ -23,45 +25,4 @@ - {% comment %} - {# - - -

Commenter ({{user.username}})

-
- -
-

-
-
-
-
- Annuler et répondre sur le fil principal

-
-
- {% if comment_form.comment.errors %} - - {% endif %} - -
-
-
- {% for metacategory in comment_form.metacategories %} - - {% endfor %} -
-
-

- -

- #} - {% endcomment %}
diff -r 55c024fc7c60 -r 8f19067caeec src_js/iconolab-bundle/src/iconolab.scss --- a/src_js/iconolab-bundle/src/iconolab.scss Mon Feb 20 17:29:55 2017 +0100 +++ b/src_js/iconolab-bundle/src/iconolab.scss Mon Feb 20 17:46:45 2017 +0100 @@ -331,7 +331,7 @@ > * { flex: 1; } - form:last-of-type { + > *:last-child { display: flex; flex-direction: column; justify-content: flex-end;