first comit
This commit is contained in:
33
templates/manager/select_departments.html
Normal file
33
templates/manager/select_departments.html
Normal file
@@ -0,0 +1,33 @@
|
||||
{% extends 'includes/base.html' %}
|
||||
{% load static %}
|
||||
{% load gravatar %}
|
||||
{% block content %}
|
||||
<div class="container-fluid py-4 mt-6">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<form id="department_select">
|
||||
<h4>Please select Department</h4>
|
||||
<select class="form-control" name="choices-button" id="departmentSelector" >
|
||||
{% for department in departments %}
|
||||
<option value="{{department.id}}">{{department.name}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<button class="btn btn-primary mt-2 mb-2" type="button" value="Select" text="Select" id="departmentSelect" onclick="selectDepartment()">Select</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
{% block scripts %}
|
||||
<script>
|
||||
function selectDepartment() {
|
||||
var e = document.getElementById("departmentSelector");
|
||||
var value = e.value;
|
||||
window.location.href = "{% url 'manager:edit_department'%}"+"?department_id="+value
|
||||
}
|
||||
</script>
|
||||
{% endblock scripts%}
|
||||
Reference in New Issue
Block a user