From 996bd7af67bba0fea8dbbeb56207cd01a83ce2a6 Mon Sep 17 00:00:00 2001 From: moanos Date: Wed, 3 Sep 2025 06:28:13 +0200 Subject: [PATCH] feat: Re-style comment field to be inside comment box --- .../fellchensammlung/forms/form-comment.html | 24 +++++++------------ .../partials/partial-comment-section.html | 17 +++++++------ 2 files changed, 17 insertions(+), 24 deletions(-) diff --git a/src/fellchensammlung/templates/fellchensammlung/forms/form-comment.html b/src/fellchensammlung/templates/fellchensammlung/forms/form-comment.html index c21268c..18aab53 100644 --- a/src/fellchensammlung/templates/fellchensammlung/forms/form-comment.html +++ b/src/fellchensammlung/templates/fellchensammlung/forms/form-comment.html @@ -1,19 +1,13 @@ {% load i18n %} +{% load widget_tweaks %} -
-
-
- {% blocktrans %} - Als {{ user }} kommentieren - {% endblocktrans %} -
+
+ {% csrf_token %} + +
+ {{ comment_form.text |add_class:"input textarea"|attr:"rows:3"|attr:"placeholder:Neuer Kommentar" }}
-
- - {% csrf_token %} - - {{ comment_form }} - - +
+
-
\ No newline at end of file + \ No newline at end of file diff --git a/src/fellchensammlung/templates/fellchensammlung/partials/partial-comment-section.html b/src/fellchensammlung/templates/fellchensammlung/partials/partial-comment-section.html index a1cd704..62b2b13 100644 --- a/src/fellchensammlung/templates/fellchensammlung/partials/partial-comment-section.html +++ b/src/fellchensammlung/templates/fellchensammlung/partials/partial-comment-section.html @@ -12,14 +12,13 @@ {% else %}

{% translate 'Noch keine Kommentare' %}

{% endif %} + {% if user.is_authenticated %} +
+ {% include "fellchensammlung/forms/form-comment.html" %} + {% else %} + + {% endif %}
-
-
- {% if user.is_authenticated %} - {% include "fellchensammlung/forms/form-comment.html" %} - {% else %} - - {% endif %}
\ No newline at end of file