[UPDT] ASSET: Updated asset action for v2
This commit is contained in:
18
asset/templates/cbv/asset/asset_form.html
Normal file
18
asset/templates/cbv/asset/asset_form.html
Normal file
@@ -0,0 +1,18 @@
|
||||
<div id="formContainer">
|
||||
{% include "generic/horilla_form.html" %}
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function toggleNotify(elm) {
|
||||
$this = $(elm).val()
|
||||
|
||||
if ($this) {
|
||||
$("#id_notify_before_parent_div").show()
|
||||
} else {
|
||||
$("#id_notify_before_parent_div").hide()
|
||||
}
|
||||
}
|
||||
$(document).ready(function(){
|
||||
toggleNotify($("#id_expiry_date"))
|
||||
})
|
||||
</script>
|
||||
@@ -1,4 +1,5 @@
|
||||
{% load i18n %}
|
||||
|
||||
{% if perms.asset.add_assetassignment %}
|
||||
{% if instance.asset_request_status == 'Requested' %}
|
||||
<div>
|
||||
@@ -15,18 +16,15 @@
|
||||
>
|
||||
<ion-icon name="checkmark-outline"></ion-icon>
|
||||
</a>
|
||||
<form
|
||||
action="{% url 'asset-request-reject' req_id=instance.id %}"
|
||||
method="post"
|
||||
onsubmit="return confirm('{% trans "Do you want to reject this request?" %}')"
|
||||
<a
|
||||
class="oh-btn oh-btn--danger w-50"
|
||||
role="button"
|
||||
href="{% url 'asset-request-reject' instance.id %}"
|
||||
onclick="return confirm(`{% trans 'Do you want to reject this request?' %}`)"
|
||||
title="{% trans 'Reject' %}"
|
||||
class='w-50'
|
||||
>
|
||||
{% csrf_token %}
|
||||
<button class="oh-btn oh-btn--danger w-100" onclick="event.stopPropagation();">
|
||||
<ion-icon name="close-outline"></ion-icon>
|
||||
</button>
|
||||
</form>
|
||||
<ion-icon name="close-outline"></ion-icon>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
|
||||
@@ -13,17 +13,15 @@
|
||||
>
|
||||
<ion-icon name="checkmark-outline"></ion-icon>{% trans 'Approve' %}
|
||||
</a>
|
||||
<form
|
||||
action="{% url 'asset-request-reject' req_id=instance.id %}"
|
||||
onsubmit="event.stopPropagation(); return confirm('{% trans "Do you want to reject this request?" %}')"
|
||||
method="post"
|
||||
class="w-100"
|
||||
<a
|
||||
class="oh-btn oh-btn--danger w-50"
|
||||
role="button"
|
||||
href="{% url 'asset-request-reject' instance.id %}"
|
||||
onclick="return confirm(`{% trans 'Do you want to reject this request?' %}`)"
|
||||
title="{% trans 'Reject' %}"
|
||||
>
|
||||
{% csrf_token %}
|
||||
<button class="oh-btn oh-btn--danger w-100" onclick="event.stopPropagation();">
|
||||
<ion-icon name="close-outline"></ion-icon> {% trans 'Reject' %}
|
||||
</button>
|
||||
</form>
|
||||
<ion-icon name="close-outline"></ion-icon> {% trans 'Reject' %}
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user