[UPDT] LEAVE: Added text to the assigned leave detail view buttons
This commit is contained in:
@@ -5,4 +5,4 @@ try:
|
||||
if not enabled_restriction:
|
||||
enabled_restriction = EmployeePastLeaveRestrict.objects.create(enabled=True)
|
||||
except:
|
||||
pass
|
||||
pass
|
||||
@@ -1,24 +1,33 @@
|
||||
{% load i18n %}
|
||||
{% load basefilters %}
|
||||
<div class="oh-btn-group" style="width: 100%;">
|
||||
{% if request.user|is_reportingmanager or perms.leave.change_availableleave %}
|
||||
<a hx-get="{% url 'available-leave-update' instance.id %}" hx-target='#objectUpdateModalTarget'
|
||||
data-toggle="oh-modal-toggle" data-target='#objectUpdateModal' class="oh-btn oh-btn--info w-50" title="{% trans 'Edit' %}">
|
||||
<ion-icon name="create-outline"></ion-icon>
|
||||
</a>
|
||||
{% endif %}
|
||||
<button class="oh-btn oh-btn-group oh-btn--secondary"
|
||||
hx-confirm="{% trans 'Are you sure you want to delete this assigned leave request?' %}" id="deletebtn"
|
||||
hx-post="{% url 'assign-delete' instance.id %}?instances_ids={{request.GET.instance_ids}}"
|
||||
hx-target="#genericModalBody" style="width:50%;"
|
||||
title="{% trans 'Delete' %}"
|
||||
data-toggle="oh-modal-toggle">
|
||||
<ion-icon class="me-1" name="trash-outline"></ion-icon>
|
||||
</button>
|
||||
{% load i18n %} {% load basefilters %}
|
||||
<div class="oh-btn-group" style="width: 100%">
|
||||
{% if request.user|is_reportingmanager or perms.leave.change_availableleave %}
|
||||
<a
|
||||
hx-get="{% url 'available-leave-update' instance.id %}"
|
||||
hx-target="#objectUpdateModalTarget"
|
||||
data-toggle="oh-modal-toggle"
|
||||
data-target="#objectUpdateModal"
|
||||
class="oh-btn oh-btn--info w-50"
|
||||
>
|
||||
<ion-icon name="create-outline"></ion-icon>
|
||||
{% trans 'Edit' %}
|
||||
</a>
|
||||
{% endif %}
|
||||
<button
|
||||
class="oh-btn oh-btn-group oh-btn--secondary"
|
||||
hx-confirm="{% trans 'Are you sure you want to delete this assigned leave request?' %}"
|
||||
id="deletebtn"
|
||||
hx-post="{% url 'assign-delete' instance.id %}?instances_ids={{request.GET.instance_ids}}"
|
||||
hx-target="#genericModalBody"
|
||||
style="width: 50%"
|
||||
data-toggle="oh-modal-toggle"
|
||||
>
|
||||
<ion-icon class="me-1" name="trash-outline"></ion-icon>
|
||||
{% trans 'Delete' %}
|
||||
</button>
|
||||
</div>
|
||||
{% if request.GET.deleted %}
|
||||
<script>
|
||||
$(".reload-record").click()
|
||||
$("#reloadMessagesButton").click()
|
||||
</script>
|
||||
<script>
|
||||
$(".reload-record").click();
|
||||
$("#reloadMessagesButton").click();
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user