[UPDT] EMPLOYEE: Updated disciplinary action and document request hx-target and data-target
This commit is contained in:
@@ -119,7 +119,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="oh-main__titlebar-button-container">
|
||||
<a hx-get="{% url 'create-actions' %}" hx-target="#actionCreateForm" data-toggle="oh-modal-toggle" data-target="#actionCreateModal" class="oh-btn oh-btn--secondary">
|
||||
<a hx-get="{% url 'create-actions' %}" hx-target="#objectCreateModalTarget" data-toggle="oh-modal-toggle" data-target="#objectCreateModal" class="oh-btn oh-btn--secondary">
|
||||
<ion-icon name="add-outline"></ion-icon>
|
||||
{% trans 'Take An Action' %}
|
||||
</a>
|
||||
@@ -192,28 +192,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- start of create modal -->
|
||||
<div
|
||||
class="oh-modal"
|
||||
id="actionCreateModal"
|
||||
role="dialog"
|
||||
aria-labelledby="emptagModal"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<div class="oh-modal__dialog" id="actionCreateForm"> </div>
|
||||
</div>
|
||||
<!-- end of create modal -->
|
||||
|
||||
|
||||
<!-- start of update modal -->
|
||||
<div class="oh-modal" id="actionUpdateModal"
|
||||
role="dialog" aria-labelledby="actionUpdateModal"
|
||||
aria-hidden="true">
|
||||
<div class="oh-modal__dialog" id='actionUpdateForm'> </div>
|
||||
</div>
|
||||
<!-- end of update modal -->
|
||||
|
||||
<script>
|
||||
function actionChange(selectElement) {
|
||||
var selectedActiontype = selectElement.val();
|
||||
|
||||
@@ -129,13 +129,13 @@
|
||||
<div class="oh-sticky-table__td">
|
||||
<div class="oh-btn-group" >
|
||||
{% if perms.payroll.change_disciplinaryaction %}
|
||||
<a hx-get="{% url 'update-actions' i.id %}" hx-target='#actionUpdateForm' data-toggle='oh-modal-toggle' data-target="#actionUpdateModal" class="oh-btn oh-btn--light-bkg w-50" title="{% trans 'Edit' %}">
|
||||
<a hx-get="{% url 'update-actions' i.id %}" hx-target='#objectUpdateModalTarget' data-toggle='oh-modal-toggle' data-target="#objectUpdateModal" class="oh-btn oh-btn--light-bkg w-50" title="{% trans 'Edit' %}">
|
||||
<ion-icon name="create-outline"></ion-icon></a>
|
||||
{% endif %}
|
||||
{% if perms.payroll.add_disciplinaryaction %}
|
||||
<a class="oh-btn oh-btn--light-bkg w-50" data-toggle="oh-modal-toggle"
|
||||
data-target="#actionCreateModal" hx-get="{% url 'duplicate-disciplinary-actions' i.id %}?{{pg}}"
|
||||
title="{% trans 'Duplicate' %}" hx-target="#actionCreateForm"
|
||||
data-target="#objectCreateModal" hx-get="{% url 'duplicate-disciplinary-actions' i.id %}?{{pg}}"
|
||||
title="{% trans 'Duplicate' %}" hx-target="#objectCreateModalTarget"
|
||||
style= "cursor: pointer;"
|
||||
>
|
||||
<ion-icon name="copy-outline"></ion-icon>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<div class="oh-modal__dialog-body">
|
||||
<form
|
||||
hx-post="{% url 'create-actions' %}"
|
||||
hx-target="#actionCreateForm"
|
||||
hx-target="#objectCreateModalTarget"
|
||||
method="post"
|
||||
hx-encoding="multipart/form-data"
|
||||
id="disciplinaryActionForm"
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="oh-modal__dialog-header">
|
||||
<h5 class="oh-modal__dialog-title" id="actionUpdateModalLabel">
|
||||
<h5 class="oh-modal__dialog-title" id="objectUpdateModalLabel">
|
||||
{% trans "Edit Action." %}
|
||||
</h5>
|
||||
<button
|
||||
@@ -39,7 +39,7 @@
|
||||
<div class="oh-modal__dialog-body">
|
||||
<form
|
||||
hx-post="{% url 'update-actions' form.instance.id %}"
|
||||
hx-target="#actionUpdateForm"
|
||||
hx-target="#objectUpdateModalTarget"
|
||||
method="post"
|
||||
hx-encoding="multipart/form-data"
|
||||
>
|
||||
@@ -48,5 +48,5 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$("#actionUpdateForm #id_action").change();
|
||||
$("#objectUpdateModalTarget #id_action").change();
|
||||
</script>
|
||||
|
||||
@@ -232,9 +232,9 @@
|
||||
<button
|
||||
class="oh-btn oh-btn--secondary"
|
||||
data-toggle="oh-modal-toggle"
|
||||
data-target="#documentRequestCreateModal"
|
||||
data-target="#objectCreateModal"
|
||||
hx-get="{% url 'document-request-create' %}"
|
||||
hx-target="#documentRequestCreateForm"
|
||||
hx-target="#objectCreateModalTarget"
|
||||
onclick="event.preventDefault()"
|
||||
|
||||
>
|
||||
@@ -273,7 +273,7 @@
|
||||
role="dialog"
|
||||
aria-labelledby="BulkRejectModal"
|
||||
aria-hidden="true"
|
||||
>
|
||||
>
|
||||
<div class="oh-modal__dialog">
|
||||
<div class="oh-modal__dialog-header">
|
||||
<span class="oh-modal__dialog-title" id="BulkRejectModalLabel"
|
||||
|
||||
@@ -1,57 +1,76 @@
|
||||
{% load i18n %}
|
||||
<form
|
||||
id="file-form"
|
||||
{% if document_request %}
|
||||
hx-post="{% url 'document-request-update' document_request.id %}"
|
||||
{% else %}
|
||||
hx-post="{% url 'document-request-create' %}"
|
||||
{% endif %}
|
||||
hx-target="#documentRequestCreateForm"
|
||||
hx-encoding="multipart/form-data"
|
||||
>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.title.id_for_label}}">{% trans "Title" %}</label>
|
||||
{{form.title}}
|
||||
<div class="oh-modal__dialog-header">
|
||||
<h5 class="oh-modal__dialog-title" id="objectCreateModalLabel">
|
||||
{% trans "Document Request" %}
|
||||
</h5>
|
||||
<button class="oh-modal__close" aria-label="Close">
|
||||
<ion-icon name="close-outline"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="oh-modal__dialog-body">
|
||||
<form
|
||||
id="file-form"
|
||||
{% if document_request%}
|
||||
hx-post="{% url 'document-request-update' document_request.id %}"
|
||||
{% else %}
|
||||
hx-post="{% url 'document-request-create' %}"
|
||||
{% endif %}
|
||||
hx-target="#objectCreateModalTarget"
|
||||
hx-encoding="multipart/form-data"
|
||||
>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.title.id_for_label}}"
|
||||
>{% trans "Title" %}</label
|
||||
>
|
||||
{{form.title}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.employee_id.id_for_label}}"
|
||||
>{% trans "Employees" %}</label
|
||||
>
|
||||
{{form.employee_id}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.employee_id.id_for_label}}">{% trans "Employees" %}</label>
|
||||
{{form.employee_id}}
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.format.id_for_label}}"
|
||||
>{% trans "Format" %}</label
|
||||
>
|
||||
{{form.format}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.max_size.id_for_label}}"
|
||||
>{% trans "Max size (in MB)" %}</label
|
||||
>
|
||||
{{form.max_size}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.format.id_for_label}}">{% trans "Format" %}</label>
|
||||
{{form.format}}
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.description.id_for_label}}"
|
||||
>{% trans "Description" %}</label
|
||||
>
|
||||
{{form.description}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.max_size.id_for_label}}">{% trans "Max size (in MB)" %}</label>
|
||||
{{form.max_size}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.description.id_for_label}}">{% trans "Description" %}</label>
|
||||
{{form.description}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex flex-row-reverse">
|
||||
<button
|
||||
<div class="d-flex flex-row-reverse">
|
||||
<button
|
||||
type="submit"
|
||||
class="oh-btn oh-btn--secondary mt-2 mr-0 oh-btn--w-100-resp"
|
||||
>
|
||||
>
|
||||
{% trans "Save" %}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -106,9 +106,9 @@
|
||||
<li class="oh-dropdown__item">
|
||||
<a class="oh-dropdown__link"
|
||||
data-toggle="oh-modal-toggle"
|
||||
data-target="#documentRequestCreateModal"
|
||||
data-target="#objectCreateModal"
|
||||
hx-get="{% url 'document-request-update' document_list.list.0.document_request_id.id %}"
|
||||
hx-target="#documentRequestCreateForm">{% trans "Edit" %}</a>
|
||||
hx-target="#objectCreateModalTarget">{% trans "Edit" %}</a>
|
||||
</li>
|
||||
<li class="oh-dropdown__item">
|
||||
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
</div>
|
||||
<div class="oh-sticky-table__tbody">
|
||||
{% for ot in accounts %}
|
||||
<div class="oh-sticky-table__tr" draggable="true" >
|
||||
<div class="oh-sticky-table__tr" draggable="true" id="hourAccount{{ot.id}}">
|
||||
<div class="oh-sticky-table__sd">
|
||||
<div class="oh-profile oh-profile--md">
|
||||
<div class="oh-profile__avatar mr-1">
|
||||
@@ -199,14 +199,14 @@
|
||||
{% if perms.recruitment.change_attendanceovertime or perms.recruitment.delete_attendanceovertime %}
|
||||
<div class="oh-sticky-table__td" onclick="event.stopPropagation();">
|
||||
<div class="oh-btn-group">
|
||||
{% if perms.recruitment.change_attendanceovertime %}
|
||||
<a hx-get="{% url 'attendance-overtime-update' ot.id %}" hx-target='#validateAttendanceRequestModalBody' data-toggle='oh-modal-toggle' data-target='#validateAttendanceRequest' class="oh-btn oh-btn--light-bkg w-50" title="{% trans 'Edit' %}"><ion-icon name="create-outline"></ion-icon></a>
|
||||
{% if perms.attendance.change_attendanceovertime %}
|
||||
<a hx-get="{% url 'attendance-overtime-update' ot.id %}" hx-target='#objectUpdateModalTarget' data-toggle='oh-modal-toggle' data-target='#objectUpdateModal' class="oh-btn oh-btn--light-bkg w-50" title="{% trans 'Edit' %}"><ion-icon name="create-outline"></ion-icon></a>
|
||||
{% endif %}
|
||||
{% if perms.recruitment.delete_attendance %}
|
||||
<form action="{% url 'attendance-overtime-delete' ot.id %}" onsubmit="return confirm('{% trans "Are you sure want to delete this attendance?" %}')" hx-target="#ot-table" method='post' class='w-50'>
|
||||
{% csrf_token %}
|
||||
<button type='submit' class="oh-btn oh-btn--danger-outline oh-btn--light-bkg w-100" title="{% trans 'Remove' %}"><ion-icon name="trash-outline"></ion-icon></button>
|
||||
</form>
|
||||
{% if perms.attendance.delete_attendanceovertime or request.user|is_reportingmanager %}
|
||||
<form hx-confirm="{% trans 'Are you sure want to delete this attendance?' %}" hx-post="{% url 'attendance-overtime-delete' ot.id %}" hx-target="#hourAccount{{ot.id}}" hx-swap="delete" class='w-50'>
|
||||
{% csrf_token %}
|
||||
<button type='submit' class="oh-btn oh-btn--danger-outline oh-btn--light-bkg w-100" title="{% trans 'Remove' %}"><ion-icon name="trash-outline"></ion-icon></button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -66,10 +66,10 @@
|
||||
{% if not request.GET.profile and perms.base.add_rotatingworktypeassign or request.user|is_reportingmanager %}
|
||||
<button
|
||||
class="oh-btn oh-btn--secondary-outline oh-stop-prop oh-accordion-meta__btn p-2"
|
||||
title="Add"
|
||||
title="{% trans 'Add' %}"
|
||||
hx-get="{% url 'rotating-work-type-assign-add' %}?emp_id={{emp_id}}"
|
||||
hx-target="#rotatingWorkTypeAssignModalBody"
|
||||
data-target="#rotating-work-type-modal"
|
||||
hx-target="#objectCreateModalTarget"
|
||||
data-target="#objectCreateModal"
|
||||
data-toggle="oh-modal-toggle"
|
||||
>
|
||||
<ion-icon
|
||||
@@ -120,8 +120,8 @@
|
||||
class="oh-btn oh-btn--secondary-outline oh-stop-prop oh-accordion-meta__btn p-2"
|
||||
title="Add"
|
||||
hx-get="{% url 'rotating-shift-assign-add' %}?emp_id={{emp_id}}"
|
||||
hx-target="#rotatingShiftAssignModalBody"
|
||||
data-target="#rotating-shift-modal"
|
||||
hx-target="#objectCreateModalTarget"
|
||||
data-target="#objectCreateModal"
|
||||
data-toggle="oh-modal-toggle"
|
||||
>
|
||||
<ion-icon
|
||||
@@ -575,8 +575,8 @@
|
||||
{% if perms.base.change_rotatingworktypeassign or request.user|check_manager:rwork_type or request.user|is_reportingmanager %}
|
||||
<a
|
||||
hx-get="{% url 'rotating-work-type-assign-update' rwork_type.id %}"
|
||||
hx-target="#rotatingWorkTypeAssignModalBody"
|
||||
data-target="#rotating-work-type-modal"
|
||||
hx-target="#objectCreateModalTarget"
|
||||
data-target="#objectCreateModal"
|
||||
data-toggle="oh-modal-toggle"
|
||||
type="button"
|
||||
class="oh-btn oh-btn--light-bkg w-50"
|
||||
@@ -846,29 +846,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="oh-modal"
|
||||
id="rotating-work-type-modal"
|
||||
role="dialog"
|
||||
aria-labelledby="rotating-work-type-modal"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<div class="oh-modal__dialog">
|
||||
<div class="oh-modal__dialog-header">
|
||||
<h2 class="oh-modal__dialog-title" id="rotatingWorkTypeAssignModalLabel">
|
||||
{% trans "Rotating Work Type Assign" %}
|
||||
</h2>
|
||||
<button class="oh-modal__close" aria-label="Close">
|
||||
<ion-icon name="close-outline"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
class="oh-modal__dialog-body"
|
||||
id="rotatingWorkTypeAssignModalBody"
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="oh-modal"
|
||||
id="shiftRequestModalUpdate"
|
||||
@@ -937,48 +914,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="oh-modal"
|
||||
id="rotating-shift-modal"
|
||||
role="dialog"
|
||||
aria-labelledby="rotating-shift-modal"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<div class="oh-modal__dialog">
|
||||
<div class="oh-modal__dialog-header">
|
||||
<h2 class="oh-modal__dialog-title" id="rotatingShiftAssignModalLabel">
|
||||
{% trans "Rotating Shift Assign" %}
|
||||
</h2>
|
||||
<button class="oh-modal__close" aria-label="Close">
|
||||
<ion-icon name="close-outline"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="oh-modal__dialog-body" id="rotatingShiftAssignModalBody"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="oh-modal"
|
||||
id="rotating-work-type-update-modal"
|
||||
role="dialog"
|
||||
aria-labelledby="rotating-work-type-update-modal"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<div class="oh-modal__dialog">
|
||||
<div class="oh-modal__dialog-header">
|
||||
<h2 class="oh-modal__dialog-title" id="">
|
||||
{% trans "Rotating Work Type Assign Update" %}
|
||||
</h2>
|
||||
<button class="oh-modal__close" aria-label="Close">
|
||||
<ion-icon name="close-outline"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
class="oh-modal__dialog-body"
|
||||
id="rotatingWorkTypeAssignUpdateModalLabel"
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
Reference in New Issue
Block a user