75 lines
2.8 KiB
HTML
75 lines
2.8 KiB
HTML
{% extends "base.html" %}
|
|
{% load i18n crispy_forms_tags %}
|
|
|
|
{% block title %}{% trans "Create Remote 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-video me-2"></i>
|
|
Create Remote Interview for {{ application.name }}
|
|
</h4>
|
|
<a href="{% url 'interview_create_type_selection' application.slug %}"
|
|
class="btn btn-outline-primary">
|
|
<i class="fas fa-arrow-left me-2"></i>
|
|
{% trans "Back to application List" %}
|
|
</a>
|
|
</div>
|
|
<div class="card-body">
|
|
<p class="text-muted mb-3">
|
|
Schedule a remote interview for <strong>{{ application.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_remote' application.slug %}">
|
|
{% csrf_token %}
|
|
{{form|crispy}}
|
|
<div class="d-flex justify-content-between">
|
|
<button type="submit" class="btn btn-main-action">
|
|
<i class="fas fa-save me-2"></i>
|
|
{% trans "Schedule Remote Interview" %}
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block customJS %}
|
|
<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('{% trans "Interview date must be in the future" %}');
|
|
} else {
|
|
this.setCustomValidity('');
|
|
}
|
|
});
|
|
}
|
|
});
|
|
</script>
|
|
{% endblock %}
|