[UPDT] STATIC: Upated country.js file to load js function in htmx content
This commit is contained in:
@@ -1,128 +1,92 @@
|
||||
{% load i18n %}
|
||||
<div class="oh-onboarding-card__header">
|
||||
<span class="oh-onboarding-card__company-name">Horilla HRMS</span>
|
||||
<ul class="oh-onboarding-card__steps">
|
||||
<li class="oh-onboarding-card__step">
|
||||
<div class="oh-onboarding-card__count">1</div>
|
||||
<span class="oh-onboarding-card__text">Sign Up</span>
|
||||
</li>
|
||||
<li class="oh-onboarding-card__step oh-onboarding-card__step--active">
|
||||
<div class="oh-onboarding-card__count">2</div>
|
||||
<span class="oh-onboarding-card__text">Company</span>
|
||||
</li>
|
||||
<li class="oh-onboarding-card__step">
|
||||
<div class="oh-onboarding-card__count">3</div>
|
||||
<span class="oh-onboarding-card__text">Department</span>
|
||||
</li>
|
||||
<li class="oh-onboarding-card__step oh-onboarding-card__step">
|
||||
<div class="oh-onboarding-card__count">4</div>
|
||||
<span class="oh-onboarding-card__text">Job Position</span>
|
||||
</li>
|
||||
</ul>
|
||||
<span class="oh-onboarding-card__company-name">Horilla HRMS</span>
|
||||
<ul class="oh-onboarding-card__steps">
|
||||
<li class="oh-onboarding-card__step">
|
||||
<div class="oh-onboarding-card__count">1</div>
|
||||
<span class="oh-onboarding-card__text">Sign Up</span>
|
||||
</li>
|
||||
<li class="oh-onboarding-card__step oh-onboarding-card__step--active">
|
||||
<div class="oh-onboarding-card__count">2</div>
|
||||
<span class="oh-onboarding-card__text">Company</span>
|
||||
</li>
|
||||
<li class="oh-onboarding-card__step">
|
||||
<div class="oh-onboarding-card__count">3</div>
|
||||
<span class="oh-onboarding-card__text">Department</span>
|
||||
</li>
|
||||
<li class="oh-onboarding-card__step oh-onboarding-card__step">
|
||||
<div class="oh-onboarding-card__count">4</div>
|
||||
<span class="oh-onboarding-card__text">Job Position</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<h1
|
||||
class="oh-onboarding-card__title oh-onboarding-card__title--h2 text-center my-3"
|
||||
>
|
||||
{% trans "Company" %}
|
||||
<h1 class="oh-onboarding-card__title oh-onboarding-card__title--h2 text-center my-3">
|
||||
{% trans "Company" %}
|
||||
</h1>
|
||||
<form
|
||||
hx-post="{% url 'initialize-database-company' %}"
|
||||
hx-target="#ohAuthCard"
|
||||
hx-encoding="multipart/form-data"
|
||||
class="oh-profile-section"
|
||||
>
|
||||
{% csrf_token %}
|
||||
<div class="oh-inner-sidebar-content__body">
|
||||
<div class="oh-input-group mb-2">
|
||||
<label for="id_{{form.company.name}}" class="mb-1"
|
||||
>{% trans "Company" %}</label
|
||||
>
|
||||
{{form.company}} {{form.company.errors}}
|
||||
<form hx-post="{% url 'initialize-database-company' %}" hx-target="#ohAuthCard" hx-encoding="multipart/form-data"
|
||||
class="oh-profile-section">
|
||||
{% csrf_token %}
|
||||
<div class="oh-inner-sidebar-content__body">
|
||||
<div class="oh-input-group mb-2">
|
||||
<label for="id_{{form.company.name}}" class="mb-1">{% trans "Company" %}</label>
|
||||
{{form.company}} {{form.company.errors}}
|
||||
</div>
|
||||
<div class="oh-input-group mb-2">
|
||||
<label for="id_{{form.address.name}}" class="mb-1">{% trans "Address" %}</label>
|
||||
{{form.address}} {{form.address.errors}}
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="oh-input-group mb-2">
|
||||
<label for="{{ form.country.id_for_label }}" class="mb-1">{% trans "Country" %}</label>
|
||||
<select name="country" id="{{ form.country.id_for_label }}" required class="oh-select oh-select-2" data-selected="{{ form.country.value|default:'' }}"></select>
|
||||
{{ form.country.errors }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="oh-input-group mb-2">
|
||||
<label for="{{ form.state.id_for_label }}" class="mb-1">{% trans "State" %}</label>
|
||||
<select name="state" id="{{ form.state.id_for_label }}" required class="oh-select oh-select-2" data-selected="{{ form.state.value|default:'' }}"></select>
|
||||
{{ form.state.errors }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="oh-input-group mb-2">
|
||||
<label for="id_{{form.city.name}}" class="mb-1">{% trans "City" %}</label>
|
||||
{{form.city}} {{form.city.errors}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="oh-input-group mb-2">
|
||||
<label for="id_{{form.zip.name}}" class="mb-1">{% trans "Zip" %}</label>
|
||||
{{form.zip}} {{form.zip.errors}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="oh-input-group mb-2">
|
||||
<label for="id_{{form.icon.name}}" class="mb-1">{% trans "Icon" %}</label>
|
||||
{{form.icon}} {{form.icon.errors}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="oh-input-group mb-2">
|
||||
<div class="oh-switch" style="display: grid">
|
||||
<label for="id_{{form.hq.name}}" class="mb-1 mr-3" style="padding-right: 15px">{% trans "Hq" %}</label>
|
||||
<p class="m-2">{{form.hq}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="oh-input-group mb-2">
|
||||
<label for="id_{{form.address.name}}" class="mb-1"
|
||||
>{% trans "Address" %}</label
|
||||
>
|
||||
{{form.address}} {{form.address.errors}}
|
||||
<div class="oh-modal__dialog-footer p-0 mt-3">
|
||||
<button type="submit" class="oh-btn oh-onboarding-card__button mt-4 oh-btn--secondary oh-btn--shadow w-100 mb-4"
|
||||
role="button">
|
||||
{% trans "Next Step" %}
|
||||
<ion-icon class="ms-2" name="arrow-forward-outline"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="oh-input-group mb-2">
|
||||
<label for="" class="mb-1">{% trans "Country" %}</label>
|
||||
<select name="country" id="id_country" class="oh-select oh-select-2">
|
||||
<option value="{{form.instance.country}}" selected>
|
||||
{{form.instance.country}}
|
||||
</option>
|
||||
</select>
|
||||
{{form.country.errors}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="oh-input-group mb-2">
|
||||
<label for="" class="mb-1">{% trans "State" %}</label>
|
||||
<select name="state" id="id_state" class="oh-select oh-select-2">
|
||||
<option value="{{form.instance.state}}" selected>
|
||||
{{form.instance.state}}
|
||||
</option>
|
||||
</select>
|
||||
{{form.state.errors}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="oh-input-group mb-2">
|
||||
<label for="id_{{form.city.name}}" class="mb-1"
|
||||
>{% trans "City" %}</label
|
||||
>
|
||||
{{form.city}} {{form.city.errors}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="oh-input-group mb-2">
|
||||
<label for="id_{{form.zip.name}}" class="mb-1"
|
||||
>{% trans "Zip" %}</label
|
||||
>
|
||||
{{form.zip}} {{form.zip.errors}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="oh-input-group mb-2">
|
||||
<label for="id_{{form.icon.name}}" class="mb-1"
|
||||
>{% trans "Icon" %}</label
|
||||
>
|
||||
{{form.icon}} {{form.icon.errors}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="oh-input-group mb-2">
|
||||
<div class="oh-switch" style="display: grid">
|
||||
<label
|
||||
for="id_{{form.hq.name}}"
|
||||
class="mb-1 mr-3"
|
||||
style="padding-right: 15px"
|
||||
>{% trans "Hq" %}</label
|
||||
>
|
||||
<p class="m-2">{{form.hq}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="oh-modal__dialog-footer p-0 mt-3">
|
||||
<button
|
||||
type="submit"
|
||||
class="oh-btn oh-onboarding-card__button mt-4 oh-btn--secondary oh-btn--shadow w-100 mb-4"
|
||||
role="button"
|
||||
>
|
||||
{% trans "Next Step" %}
|
||||
<ion-icon class="ms-2" name="arrow-forward-outline"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
{% include 'country.js' %}
|
||||
</script>
|
||||
|
||||
@@ -1,28 +1,26 @@
|
||||
{% load i18n %} {% load i18n %}
|
||||
<div class="oh-onboarding-card__header">
|
||||
<span class="oh-onboarding-card__company-name">Horilla HRMS</span>
|
||||
<ul class="oh-onboarding-card__steps">
|
||||
<li class="oh-onboarding-card__step">
|
||||
<div class="oh-onboarding-card__count">1</div>
|
||||
<span class="oh-onboarding-card__text">Sign Up</span>
|
||||
</li>
|
||||
<li class="oh-onboarding-card__step">
|
||||
<div class="oh-onboarding-card__count">2</div>
|
||||
<span class="oh-onboarding-card__text">Company</span>
|
||||
</li>
|
||||
<li class="oh-onboarding-card__step oh-onboarding-card__step--active">
|
||||
<div class="oh-onboarding-card__count">3</div>
|
||||
<span class="oh-onboarding-card__text">Department</span>
|
||||
</li>
|
||||
<li class="oh-onboarding-card__step oh-onboarding-card__step">
|
||||
<div class="oh-onboarding-card__count">4</div>
|
||||
<span class="oh-onboarding-card__text">Job Position</span>
|
||||
</li>
|
||||
</ul>
|
||||
<span class="oh-onboarding-card__company-name">Horilla HRMS</span>
|
||||
<ul class="oh-onboarding-card__steps">
|
||||
<li class="oh-onboarding-card__step">
|
||||
<div class="oh-onboarding-card__count">1</div>
|
||||
<span class="oh-onboarding-card__text">Sign Up</span>
|
||||
</li>
|
||||
<li class="oh-onboarding-card__step">
|
||||
<div class="oh-onboarding-card__count">2</div>
|
||||
<span class="oh-onboarding-card__text">Company</span>
|
||||
</li>
|
||||
<li class="oh-onboarding-card__step oh-onboarding-card__step--active">
|
||||
<div class="oh-onboarding-card__count">3</div>
|
||||
<span class="oh-onboarding-card__text">Department</span>
|
||||
</li>
|
||||
<li class="oh-onboarding-card__step oh-onboarding-card__step">
|
||||
<div class="oh-onboarding-card__count">4</div>
|
||||
<span class="oh-onboarding-card__text">Job Position</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<h1
|
||||
class="oh-onboarding-card__title oh-onboarding-card__title--h2 text-center my-3"
|
||||
>
|
||||
{% trans "Department" %}
|
||||
<h1 class="oh-onboarding-card__title oh-onboarding-card__title--h2 text-center my-3">
|
||||
{% trans "Department" %}
|
||||
</h1>
|
||||
{% include "initialize_database/horilla_department_form.html" %}
|
||||
|
||||
@@ -1,89 +1,62 @@
|
||||
{% load i18n %}
|
||||
<div id="initializeDepartment">
|
||||
{% if departments %}
|
||||
<div class="oh-main__titlebar oh-main__titlebar--left">
|
||||
<div class="mb-2 mt-2">
|
||||
<div class="oh-filter-tag-container">
|
||||
{% for instance in departments %}
|
||||
<span class="oh-filter-tag">
|
||||
<span
|
||||
hx-get="{% url 'initialize-department-edit' instance.id %}"
|
||||
hx-target="#initializeDepartment"
|
||||
hx-swap="outerHTML"
|
||||
>{{instance}}</span
|
||||
>
|
||||
<form
|
||||
hx-confirm="{% trans 'Are you sure you want to delete this department?' %}"
|
||||
hx-get="{% url 'initialize-department-delete' instance.id %}"
|
||||
hx-target="#initializeDepartment"
|
||||
hx-swap="outerHTML"
|
||||
>
|
||||
<button class="oh-filter-tag__close" style="color: red;" title={% trans "Delete" %}>
|
||||
<ion-icon name="trash-outline"></ion-icon>
|
||||
</button>
|
||||
</form>
|
||||
</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<form
|
||||
class="oh-profile-section"
|
||||
{% if department %}
|
||||
hx-post="{% url 'initialize-department-edit' department.id %}"
|
||||
{% else %}
|
||||
hx-post="{% url 'initialize-database-department' %}"
|
||||
{% endif %}
|
||||
hx-target="#initializeDepartment"
|
||||
hx-swap="outerHTML"
|
||||
>
|
||||
{% csrf_token %} {{form.non_field_errors}}
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-12 col-md-6 col-lg-10">
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="oh-input-group mb-2">
|
||||
<label for="{{form.department.id_for_label}}" class="mb-1"
|
||||
>{% trans "Department" %}</label
|
||||
>
|
||||
{{form.department}} {{form.department.errors}}
|
||||
{% if departments %}
|
||||
<div class="oh-main__titlebar oh-main__titlebar--left">
|
||||
<div class="mb-2 mt-2">
|
||||
<div class="oh-filter-tag-container">
|
||||
{% for instance in departments %}
|
||||
<span class="oh-filter-tag">
|
||||
<span hx-get="{% url 'initialize-department-edit' instance.id %}" hx-target="#initializeDepartment"
|
||||
hx-swap="outerHTML">{{instance}}</span>
|
||||
<form hx-confirm="{% trans 'Are you sure you want to delete this department?' %}"
|
||||
hx-get="{% url 'initialize-department-delete' instance.id %}" hx-target="#initializeDepartment"
|
||||
hx-swap="outerHTML">
|
||||
<button class="oh-filter-tag__close" style="color: red;" title={% trans "Delete" %}>
|
||||
<ion-icon name="trash-outline"></ion-icon>
|
||||
</button>
|
||||
</form>
|
||||
</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="oh-input-group mb-2">
|
||||
<label for="{{form.company_id.id_for_label}}" class="mb-1"
|
||||
>{% trans "Company" %}</label
|
||||
>
|
||||
{{form.company_id}} {{form.company_id.errors}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-12 col-md-6 col-lg-2">
|
||||
<button
|
||||
type="submit"
|
||||
title="{% trans 'Save' %}"
|
||||
class="oh-btn oh-btn--secondary mr-1 mt-4 w-100"
|
||||
style="height: 43px"
|
||||
>
|
||||
<ion-icon name="save"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
{% if departments %}
|
||||
<div class="oh-modal__dialog-footer p-0 mt-3">
|
||||
<button
|
||||
hx-get="{% url 'initialize-database-job-position' %}"
|
||||
hx-target="#ohAuthCard"
|
||||
hx-swap="innerHTML"
|
||||
class="oh-btn oh-btn--secondary-outline m-2"
|
||||
role="button"
|
||||
>
|
||||
{% trans "Next Step" %}
|
||||
<ion-icon class="ms-2" name="arrow-forward-outline"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</form>
|
||||
{% endif %}
|
||||
<form class="oh-profile-section" {% if department %} hx-post="{% url 'initialize-department-edit' department.id %}"
|
||||
{% else %} hx-post="{% url 'initialize-database-department' %}" {% endif %} hx-target="#initializeDepartment"
|
||||
hx-swap="outerHTML">
|
||||
{% csrf_token %} {{form.non_field_errors}}
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-12 col-md-6 col-lg-10">
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="oh-input-group mb-2">
|
||||
<label for="{{form.department.id_for_label}}" class="mb-1">{% trans "Department" %}</label>
|
||||
{{form.department}} {{form.department.errors}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="oh-input-group mb-2">
|
||||
<label for="{{form.company_id.id_for_label}}" class="mb-1">{% trans "Company" %}</label>
|
||||
{{form.company_id}} {{form.company_id.errors}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-12 col-md-6 col-lg-2">
|
||||
<button type="submit" title="{% trans 'Save' %}" class="oh-btn oh-btn--secondary mr-1 mt-4 w-100"
|
||||
style="height: 43px">
|
||||
<ion-icon name="save"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
{% if departments %}
|
||||
<div class="oh-modal__dialog-footer p-0 mt-3">
|
||||
<button hx-get="{% url 'initialize-database-job-position' %}" hx-target="#ohAuthCard"
|
||||
hx-swap="innerHTML" class="oh-btn oh-btn--secondary-outline m-2" role="button">
|
||||
{% trans "Next Step" %}
|
||||
<ion-icon class="ms-2" name="arrow-forward-outline"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -1,28 +1,26 @@
|
||||
{% load i18n %}
|
||||
<div class="oh-onboarding-card__header">
|
||||
<span class="oh-onboarding-card__company-name">Horilla HRMS</span>
|
||||
<ul class="oh-onboarding-card__steps">
|
||||
<li class="oh-onboarding-card__step">
|
||||
<div class="oh-onboarding-card__count">1</div>
|
||||
<span class="oh-onboarding-card__text">Sign Up</span>
|
||||
</li>
|
||||
<li class="oh-onboarding-card__step">
|
||||
<div class="oh-onboarding-card__count">2</div>
|
||||
<span class="oh-onboarding-card__text">Company</span>
|
||||
</li>
|
||||
<li class="oh-onboarding-card__step">
|
||||
<div class="oh-onboarding-card__count">3</div>
|
||||
<span class="oh-onboarding-card__text">Department</span>
|
||||
</li>
|
||||
<li class="oh-onboarding-card__step oh-onboarding-card__step--active">
|
||||
<div class="oh-onboarding-card__count">4</div>
|
||||
<span class="oh-onboarding-card__text">Job Position</span>
|
||||
</li>
|
||||
</ul>
|
||||
<span class="oh-onboarding-card__company-name">Horilla HRMS</span>
|
||||
<ul class="oh-onboarding-card__steps">
|
||||
<li class="oh-onboarding-card__step">
|
||||
<div class="oh-onboarding-card__count">1</div>
|
||||
<span class="oh-onboarding-card__text">Sign Up</span>
|
||||
</li>
|
||||
<li class="oh-onboarding-card__step">
|
||||
<div class="oh-onboarding-card__count">2</div>
|
||||
<span class="oh-onboarding-card__text">Company</span>
|
||||
</li>
|
||||
<li class="oh-onboarding-card__step">
|
||||
<div class="oh-onboarding-card__count">3</div>
|
||||
<span class="oh-onboarding-card__text">Department</span>
|
||||
</li>
|
||||
<li class="oh-onboarding-card__step oh-onboarding-card__step--active">
|
||||
<div class="oh-onboarding-card__count">4</div>
|
||||
<span class="oh-onboarding-card__text">Job Position</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<h1
|
||||
class="oh-onboarding-card__title oh-onboarding-card__title--h2 text-center my-3"
|
||||
>
|
||||
{% trans "Job Position" %}
|
||||
<h1 class="oh-onboarding-card__title oh-onboarding-card__title--h2 text-center my-3">
|
||||
{% trans "Job Position" %}
|
||||
</h1>
|
||||
{% include "initialize_database/horilla_job_position_form.html" %}
|
||||
|
||||
@@ -1,95 +1,72 @@
|
||||
{% load i18n %}
|
||||
<div id="initializeJobPositions">
|
||||
{% if job_positions %}
|
||||
<div class="oh-main__titlebar oh-main__titlebar--left">
|
||||
<div class="mb-2 mt-2">
|
||||
<div class="oh-filter-tag-container">
|
||||
{% for instance in job_positions %}
|
||||
<span class="oh-filter-tag">
|
||||
<span
|
||||
hx-get="{% url 'initialize-job-position-edit' instance.id %}"
|
||||
hx-target="#initializeJobPositions"
|
||||
hx-swap="outerHTML"
|
||||
>{{instance}}</span
|
||||
>
|
||||
<form
|
||||
hx-confirm="{% trans 'Are you sure you want to delete this job position?' %}"
|
||||
hx-get="{% url 'initialize-job-position-delete' instance.id %}"
|
||||
hx-target="#initializeJobPositions"
|
||||
hx-swap="outerHTML"
|
||||
>
|
||||
<button class="oh-filter-tag__close" style="color: red;" title={% trans "Delete" %}>
|
||||
<ion-icon name="trash-outline"></ion-icon>
|
||||
</button>
|
||||
</form>
|
||||
</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<form
|
||||
class="oh-profile-section"
|
||||
{% if job_position %}
|
||||
hx-post="{% url 'initialize-job-position-edit' job_position.id %}"
|
||||
{% else %}
|
||||
hx-post="{% url 'initialize-database-job-position' %}"
|
||||
{% endif %}
|
||||
hx-target="#initializeJobPositions"
|
||||
hx-swap="outerHTML"
|
||||
>
|
||||
{% csrf_token %} {{form.non_field_errors}}
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-12 col-md-6 col-lg-10">
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-12 col-md-6 col-lg-4">
|
||||
<div class="oh-input-group mb-2">
|
||||
<label for="{{form.job_position.id_for_label}}" class="mb-1"
|
||||
>{% trans "Job Position" %}</label
|
||||
>
|
||||
{{form.job_position}} {{form.job_position.errors}}
|
||||
{% if job_positions %}
|
||||
<div class="oh-main__titlebar oh-main__titlebar--left">
|
||||
<div class="mb-2 mt-2">
|
||||
<div class="oh-filter-tag-container">
|
||||
{% for instance in job_positions %}
|
||||
<span class="oh-filter-tag">
|
||||
<span hx-get="{% url 'initialize-job-position-edit' instance.id %}"
|
||||
hx-target="#initializeJobPositions" hx-swap="outerHTML">{{instance}}
|
||||
</span>
|
||||
<form hx-confirm="{% trans 'Are you sure you want to delete this job position?' %}"
|
||||
hx-get="{% url 'initialize-job-position-delete' instance.id %}"
|
||||
hx-target="#initializeJobPositions" hx-swap="outerHTML">
|
||||
<button class="oh-filter-tag__close" style="color: red;" title={% trans "Delete" %}>
|
||||
<ion-icon name="trash-outline"></ion-icon>
|
||||
</button>
|
||||
</form>
|
||||
</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-12 col-md-6 col-lg-4">
|
||||
<div class="oh-input-group mb-2">
|
||||
<label for="{{form.department_id.id_for_label}}" class="mb-1"
|
||||
>{% trans "Department" %}</label
|
||||
>
|
||||
{{form.department_id}} {{form.department_id.errors}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-12 col-md-6 col-lg-4">
|
||||
<div class="oh-input-group mb-2">
|
||||
<label for="{{form.company_id.id_for_label}}" class="mb-1"
|
||||
>{% trans "Company" %}</label
|
||||
>
|
||||
{{form.company_id}} {{form.company_id.errors}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-12 col-md-6 col-lg-2">
|
||||
<button
|
||||
type="submit"
|
||||
title="{% trans 'Save' %}"
|
||||
class="oh-btn oh-btn--secondary mr-1 mt-4 w-100"
|
||||
style="height: 43px"
|
||||
>
|
||||
<ion-icon name="save"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
{% if job_positions %}
|
||||
<div class="oh-modal__dialog-footer p-0 mt-3">
|
||||
<a
|
||||
hx-get="{% url "update-selected-company" %}?company_id={{company.id}}"
|
||||
class="oh-btn oh-btn--secondary-outline m-2"
|
||||
role="button"
|
||||
>
|
||||
{% trans "Go To Home" %}
|
||||
<ion-icon class="ms-2" name="arrow-forward-outline"></ion-icon>
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</form>
|
||||
{% endif %}
|
||||
<form class="oh-profile-section"
|
||||
hx-post="{% if job_position %}{% url 'initialize-job-position-edit' job_position.id %}{% else %}{% url 'initialize-database-job-position' %}{% endif %}"
|
||||
hx-target="#initializeJobPositions" hx-swap="outerHTML">
|
||||
{% csrf_token %}
|
||||
{{form.non_field_errors}}
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-12 col-md-6 col-lg-10">
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-12 col-md-6 col-lg-4">
|
||||
<div class="oh-input-group mb-2">
|
||||
<label for="{{form.job_position.id_for_label}}" class="mb-1">{% trans "Job Position"
|
||||
%}</label>
|
||||
{{form.job_position}} {{form.job_position.errors}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-12 col-md-6 col-lg-4">
|
||||
<div class="oh-input-group mb-2">
|
||||
<label for="{{form.department_id.id_for_label}}" class="mb-1">{% trans "Department"
|
||||
%}</label>
|
||||
{{form.department_id}} {{form.department_id.errors}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-12 col-md-6 col-lg-4">
|
||||
<div class="oh-input-group mb-2">
|
||||
<label for="{{form.company_id.id_for_label}}" class="mb-1">{% trans "Company" %}</label>
|
||||
{{form.company_id}} {{form.company_id.errors}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-12 col-md-6 col-lg-2">
|
||||
<button type="submit" title="{% trans 'Save' %}" class="oh-btn oh-btn--secondary mr-1 mt-4 w-100"
|
||||
style="height: 43px">
|
||||
<ion-icon name="save"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
{% if job_positions %}
|
||||
<div class="oh-modal__dialog-footer p-0 mt-3">
|
||||
<a hx-get="{% url " update-selected-company" %}?company_id={{company.id}}"
|
||||
class="oh-btn oh-btn--secondary-outline m-2" role="button">
|
||||
{% trans "Go To Home" %}
|
||||
<ion-icon class="ms-2" name="arrow-forward-outline"></ion-icon>
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -116,6 +116,7 @@
|
||||
<script src="{% static 'htmx/htmx.min.js' %}"></script>
|
||||
<script src="{% static 'build/js/htmxSelect2.js' %}"></script>
|
||||
<script src="{% static '/index/index.js' %}"></script>
|
||||
<script src="{% static '/index/country.js' %}"></script>
|
||||
<script type="module" src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.esm.js"></script>
|
||||
<script nomodule src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10"></script>
|
||||
|
||||
Reference in New Issue
Block a user