33 lines
1.3 KiB
HTML
33 lines
1.3 KiB
HTML
{% 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%} |