238 lines
11 KiB
HTML
238 lines
11 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}Create Onsite Interview{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="container mt-4">
|
|
<div class="row">
|
|
<div class="col-md-8 offset-md-2">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h4 class="mb-0">
|
|
<i class="fas fa-building me-2"></i>
|
|
Create Onsite Interview for {{ candidate.name }}
|
|
</h4>
|
|
<a href="{% url 'interview_create_type_selection' candidate.slug %}"
|
|
class="btn btn-outline-primary">
|
|
<i class="fas fa-arrow-left me-2"></i>
|
|
Back to Candidate List
|
|
</a>
|
|
</div>
|
|
<div class="card-body">
|
|
<p class="text-muted mb-3">
|
|
Schedule an onsite interview for <strong>{{ candidate.name }}</strong>
|
|
for the position of <strong>{{ job.title }}</strong>.
|
|
</p>
|
|
|
|
{% if messages %}
|
|
{% for message in messages %}
|
|
<div class="alert alert-{{ message.tags }} alert-dismissible fade show" role="alert">
|
|
{{ message }}
|
|
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
|
|
</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
<form method="post" action="{% url 'interview_create_onsite' candidate_slug=candidate.slug %}">
|
|
{% csrf_token %}
|
|
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div class="mb-3">
|
|
<label for="{{ form.interview_date.id_for_label }}" class="form-label">
|
|
<i class="fas fa-calendar me-1"></i>
|
|
Topic
|
|
</label>
|
|
{{ form.topic }}
|
|
{% if form.topic.errors %}
|
|
<div class="text-danger small">
|
|
{{ form.topic.errors }}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<div class="mb-3">
|
|
<label for="{{ form.interview_date.id_for_label }}" class="form-label">
|
|
<i class="fas fa-calendar me-1"></i>
|
|
Interview Date
|
|
</label>
|
|
{{ form.interview_date }}
|
|
{% if form.interview_date.errors %}
|
|
<div class="text-danger small">
|
|
{{ form.interview_date.errors }}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-6">
|
|
<div class="mb-3">
|
|
<label for="{{ form.interview_time.id_for_label }}" class="form-label">
|
|
<i class="fas fa-clock me-1"></i>
|
|
Interview Time
|
|
</label>
|
|
{{ form.interview_time }}
|
|
{% if form.interview_time.errors %}
|
|
<div class="text-danger small">
|
|
{{ form.interview_time.errors }}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<div class="mb-3">
|
|
<label for="{{ form.duration.id_for_label }}" class="form-label">
|
|
<i class="fas fa-hourglass-half me-1"></i>
|
|
Duration (minutes)
|
|
</label>
|
|
{{ form.duration }}
|
|
{% if form.duration.errors %}
|
|
<div class="text-danger small">
|
|
{{ form.duration.errors }}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
{% comment %} <div class="col-md-6">
|
|
<div class="mb-3">
|
|
<label for="{{ form.interviewer.id_for_label }}" class="form-label">
|
|
<i class="fas fa-user me-1"></i>
|
|
Interviewer
|
|
</label>
|
|
{{ form.interviewer }}
|
|
{% if form.interviewer.errors %}
|
|
<div class="text-danger small">
|
|
{{ form.interviewer.errors }}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div> {% endcomment %}
|
|
</div>
|
|
|
|
{% comment %} <div class="mb-3">
|
|
<label for="{{ form.topic.id_for_label }}" class="form-label">
|
|
<i class="fas fa-comment me-1"></i>
|
|
Meeting Topic
|
|
</label>
|
|
{{ form.topic }}
|
|
{% if form.topic.errors %}
|
|
<div class="text-danger small">
|
|
{{ form.topic.errors }}
|
|
</div>
|
|
{% endif %}
|
|
</div> {% endcomment %}
|
|
|
|
<div class="mb-3">
|
|
<label for="{{ form.physical_address.id_for_label }}" class="form-label">
|
|
<i class="fas fa-map-marker-alt me-1"></i>
|
|
Physical Address
|
|
</label>
|
|
{{ form.physical_address }}
|
|
{% if form.physical_address.errors %}
|
|
<div class="text-danger small">
|
|
{{ form.physical_address.errors }}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<div class="mb-3">
|
|
<label for="{{ form.room_number.id_for_label }}" class="form-label">
|
|
<i class="fas fa-door-open me-1"></i>
|
|
Room Number
|
|
</label>
|
|
{{ form.room_number }}
|
|
{% if form.room_number.errors %}
|
|
<div class="text-danger small">
|
|
{{ form.room_number.errors }}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
{% comment %} <div class="col-md-6">
|
|
<div class="mb-3">
|
|
<label for="{{ form.floor_number.id_for_label }}" class="form-label">
|
|
<i class="fas fa-layer-group me-1"></i>
|
|
Floor Number
|
|
</label>
|
|
{{ form.floor_number }}
|
|
{% if form.floor_number.errors %}
|
|
<div class="text-danger small">
|
|
{{ form.floor_number.errors }}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div> {% endcomment %}
|
|
{% comment %} </div> {% endcomment %}
|
|
|
|
{% comment %} <div class="mb-3">
|
|
<label for="{{ form.parking_info.id_for_label }}" class="form-label">
|
|
<i class="fas fa-parking me-1"></i>
|
|
Parking Information
|
|
</label>
|
|
{{ form.parking_info }}
|
|
{% if form.parking_info.errors %}
|
|
<div class="text-danger small">
|
|
{{ form.parking_info.errors }}
|
|
</div>
|
|
{% endif %}
|
|
</div> {% endcomment %}
|
|
|
|
{% comment %} <div class="mb-3">
|
|
<label for="{{ form.notes.id_for_label }}" class="form-label">
|
|
<i class="fas fa-sticky-note me-1"></i>
|
|
Notes
|
|
</label>
|
|
{{ form.notes }}
|
|
{% if form.notes.errors %}
|
|
<div class="text-danger small">
|
|
{{ form.notes.errors }}
|
|
</div>
|
|
{% endif %}
|
|
</div> {% endcomment %}
|
|
|
|
<div class="d-flex justify-content-between">
|
|
<button type="submit" class="btn btn-main-action">
|
|
<i class="fas fa-save me-2"></i>
|
|
Schedule Onsite Interview
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block extra_js %}
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
// Add form validation for future dates
|
|
const dateInput = document.querySelector('input[type="date"]');
|
|
const today = new Date().toISOString().split('T')[0];
|
|
|
|
if (dateInput) {
|
|
dateInput.min = today;
|
|
|
|
dateInput.addEventListener('change', function() {
|
|
if (this.value < today) {
|
|
this.setCustomValidity('Interview date must be in the future');
|
|
} else {
|
|
this.setCustomValidity('');
|
|
}
|
|
});
|
|
}
|
|
});
|
|
</script>
|
|
{% endblock %}
|