[ADD] RECRUITMENT: Duplicate functionality for records in recruitment
This commit is contained in:
@@ -38,8 +38,22 @@
|
||||
{% for template in templates %}
|
||||
<div class="oh-faq-card">
|
||||
{% if perms.recruitment.delete_recruitmentmailtemplate %}
|
||||
<h3 class="oh-faq-card__title d-flex justify-content-between"><span>{{ template.title }}</span> <a href="{% url "delete-mail-template" %}?ids={{template.id}}" class="text-danger" style="cursor: pointer;" onclick="return confirm('Do you want to delete this template?')"><ion-icon name="trash-outline"></ion-icon></a></h3>
|
||||
<h3 class="oh-faq-card__title d-flex justify-content-between"><span>{{ template.title }}</span>
|
||||
<div>
|
||||
<a hx-get="{% url 'duplicate-mail-template' template.id %}" hx-target="#duplicateTemplateFormModal" data-toggle="oh-modal-toggle"
|
||||
data-target="#duplicateTemplateModal" title="{% trans 'Duplicate' %}" style= "cursor: pointer;">
|
||||
<ion-icon name="copy-outline"></ion-icon>
|
||||
</a>
|
||||
<a href="{% url "delete-mail-template" %}?ids={{template.id}}" class="text-danger" style="cursor: pointer;"
|
||||
onclick="return confirm('Do you want to delete this template?')" title="{% trans 'Edit' %}" >
|
||||
<ion-icon name="trash-outline"></ion-icon>
|
||||
</a>
|
||||
</div>
|
||||
</h3>
|
||||
{% endif %}
|
||||
{% if perms.recruitment.change_recruitmentmailtemplate %}
|
||||
|
||||
{% endif %}
|
||||
<p class="oh-faq-card__desc oh-card__footer--border-top">
|
||||
<div style="max-height: 350px;overflow: hidden;" class="truncated-text">{{ template.body|safe }}</div>
|
||||
</p>
|
||||
@@ -75,6 +89,18 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="oh-modal" id="duplicateTemplateModal" role="dialog" aria-labelledby="duplicateTemplateModal" aria-hidden="true">
|
||||
<div class="oh-modal__dialog">
|
||||
<div class="oh-modal__dialog-header">
|
||||
<span class="oh-modal__dialog-title" id="duplicateTemplateModalLabel">{% trans "Duplicate Template" %}</span>
|
||||
<button class="oh-modal__close" aria-label="Close"><ion-icon name="close-outline"></ion-icon></button>
|
||||
</div>
|
||||
<div class="oh-modal__dialog-body" id="duplicateTemplateFormModal"></div>
|
||||
<div class="oh-modal__dialog-footer">
|
||||
<button type="submit" onclick="$('#submitFormButton')[0].click()" class="oh-btn oh-btn--secondary oh-btn--shadow">{% trans "Save Duplicate" %}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function setModalLabel(label, modalTarget) {
|
||||
$(modalTarget).html(label)
|
||||
|
||||
Reference in New Issue
Block a user