init
This commit is contained in:
49
templates/course/course_form.html
Normal file
49
templates/course/course_form.html
Normal file
@ -0,0 +1,49 @@
|
||||
{% extends 'base.html' %}
|
||||
{% load static %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block title %}
|
||||
{% if action == 'create' %}
|
||||
Добавление курса | Автошкола
|
||||
{% else %}
|
||||
Редактирование курса | Автошкола
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<div class="card shadow">
|
||||
<div class="card-header bg-primary text-white">
|
||||
<h4 class="mb-0">
|
||||
{% if action == 'create' %}
|
||||
<i class="fas fa-plus-circle me-2"></i>Добавление курса
|
||||
{% else %}
|
||||
<i class="fas fa-edit me-2"></i>Редактирование курса
|
||||
{% endif %}
|
||||
</h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form method="post" novalidate>
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<div class="d-grid gap-2 d-md-flex justify-content-md-end mt-4">
|
||||
<a href="{% url 'course:list' %}" class="btn btn-secondary me-md-2">
|
||||
<i class="fas fa-times me-2"></i>Отмена
|
||||
</a>
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{% if action == 'create' %}
|
||||
<i class="fas fa-save me-2"></i>Создать
|
||||
{% else %}
|
||||
<i class="fas fa-save me-2"></i>Сохранить
|
||||
{% endif %}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user