[FIX] HELPDESK: #935
This commit is contained in:
@@ -218,7 +218,7 @@
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.helpdesk.delete_comment %}
|
||||
<a href="{% url 'comment-delete' item.comment.id %}" type="button"
|
||||
<a href="{% url " comment-delete" item.comment.id %}" type="button"
|
||||
title="{% trans 'Delete' %}" class="oh-btn p-3">
|
||||
<ion-icon name="trash-outline"></ion-icon>
|
||||
</a>
|
||||
@@ -308,8 +308,8 @@
|
||||
|
||||
<textarea name="comment" class="oh-helpdesk__chat-input oh-chat__main-input ps-5"
|
||||
placeholder="Type something..."></textarea>
|
||||
<button class="oh-btn oh-btn--chat oh-btn--chat-send" type="submit" onclick="validateComment(event)"
|
||||
aria-label="Send Message"></button>
|
||||
<button class="oh-btn oh-btn--chat oh-btn--chat-send" type="submit" id="sendMessageButton" onclick="validateComment(event)"
|
||||
title="Send Message" aria-label="Send Message"></button>
|
||||
</form>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
@@ -478,13 +478,12 @@
|
||||
<span class="oh-helpdesk__card-title">{% trans "Documents" %}</span>
|
||||
|
||||
{% if perms.helpdesk.add_comment or request.user.employee_get == ticket.employee_id or request.user.employee_get in ticket.assigned_to.all %}
|
||||
<div style="display:flex">
|
||||
<form name="comment-form" action="{% url 'comment-create' ticket.id %}" method="POST"
|
||||
enctype="multipart/form-data" class="oh-chat oh-chat__input-wrapper"
|
||||
style="display: flex; align-items: center; gap: 10px;">
|
||||
{% csrf_token %}
|
||||
|
||||
<input name="file" multiple="True" type="file" id="fileUpload" class="d-none" />
|
||||
|
||||
<!-- Attachment Button -->
|
||||
<label for="fileUpload" aria-label="Attach Files"
|
||||
class="oh-btn oh-btn--chat oh-btn--chat-attachments"
|
||||
@@ -493,6 +492,10 @@
|
||||
<span id="fileCount1" style="position: absolute; top: -6px; right: -6px; background-color: red; color: white; font-size: 12px; border-radius: 50%; padding: 2px 6px; min-width: 16px; text-align: center; display: none; "></span>
|
||||
</label>
|
||||
</form>
|
||||
<button class="oh-btn oh-btn--chat oh-btn--chat-send" style="position: relative !important; cursor: pointer;" onclick="$('#sendMessageButton').click()"
|
||||
title="File Upload" aria-label="File Upload">
|
||||
</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="oh-helpdesk__card-body oh-scrollable-container">
|
||||
|
||||
@@ -2,13 +2,23 @@
|
||||
<div class="d-flex justify-content-end">
|
||||
<div class="oh-btn-group mb-4">
|
||||
{% if document.file %}
|
||||
<a
|
||||
href="{{ document.file.url }}"
|
||||
class="oh-btn oh-btn--success w-100 me-2"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
title="{% trans 'View' %}"
|
||||
>
|
||||
<ion-icon class="me-1" name="eye-outline"></ion-icon>
|
||||
</a>
|
||||
<a
|
||||
href="data:{{ content_type }};base64,{{ file_content|base64_encode }}"
|
||||
class="oh-btn oh-btn--info w-100"
|
||||
download="{{document.file}}"
|
||||
title="{% trans 'Download' %}"
|
||||
><ion-icon class="me-1" name="download-outline"></ion-icon
|
||||
></a>
|
||||
>
|
||||
<ion-icon class="me-1" name="download-outline"></ion-icon>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user