| 123456789101112131415161718192021222324252627282930313233343536 |
- <div class="chat-container" id="chat"
- hx-on::after-swap="const content = this.querySelector('#chatContent'); if (content) content.scrollTop = content.scrollHeight;">
- <h2 class="gc-section-title" id="comments-title"><i class="icon cil-chat-bubble" aria-hidden="true"></i> Kommentare</h2>
- <p class="gc-section-description">{{ forderungen_details[0].Kunde_Text }} / {{ forderungen_details[0].Beleg_Nr }}</p>
- {% include 'forderungen/details/details_kommentare.html' %}
- <div class="input-area">
- <div class="toolbar">
- <form id="comment-form" method="post" action="{{ detail_url }}" hx-post="{{ detail_url }}"
- hx-target="#comments-history" hx-swap="outerHTML" hx-push-url="false"
- hx-sync="#comments-history:replace"
- hx-disabled-elt="#comment-form input, #comment-form button, #comments-history button"
- hx-on::after-request="if (event.detail.successful) this.querySelector('[name=Kommentar]').value = ''">
- <input type="hidden" name="_csrf" value="{{ request.state.principal.csrf }}" />
- <button type="button" class="btn btn-outline-secondary" aria-label="Dateianhang (noch nicht verfügbar)" disabled>
- <i class="icon icon-lg cil-paperclip"></i>
- </button>
- <input type="hidden" name="source" value="comments" />
- <input type="text" class="message-input" id="comment" name="Kommentar" placeholder="Kommentieren ..."
- aria-label="Kommentar" />
- <button type="submit" class="btn btn-primary" aria-label="Kommentar speichern">
- <i class="icon icon-lg cil-chevron-right"></i>
- </button>
- </form>
- </div>
- </div>
- </div>
- <script>
- window.setTimeout(function() {
- const content = document.getElementById("chatContent");
- if (content) content.scrollTop = content.scrollHeight;
- }, 1000);
- </script>
|