Skip to content

Commit

Permalink
Добавил кнопку "Назад" в окне урока. #217 (#221)
Browse files Browse the repository at this point in the history
Co-authored-by: Konstantin Raikhert <[email protected]>
Co-authored-by: Konstantin Raikhert <[email protected]>
  • Loading branch information
3 people authored Aug 16, 2024
1 parent 063de09 commit 1fe30b2
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 12 deletions.
14 changes: 8 additions & 6 deletions src/schooling/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@
cancel_lesson,
name='cancel_lesson',
),
path('lesson_change_success/',
lesson_change_success,
name='lesson_change_success',
path(
'lesson_change_success/',
lesson_change_success,
name='lesson_change_success',
),
path('lesson_cancel_success/',
lesson_cancel_success,
name='lesson_cancel_success',
path(
'lesson_cancel_success/',
lesson_cancel_success,
name='lesson_cancel_success',
),
]
8 changes: 5 additions & 3 deletions src/templates/schedule_cancel_lesson.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ <h2 class="card-header">
</h2>
<form method="post">
{% csrf_token %}
<button type="submit" class="btn main-button danger-button second-button">Уверен?</button>
<button type="button" class="btn btn-secondary" onclick="window.history.back()">Закрыть</button>
<button type="submit" class="btn main-button danger-button second-button">Уверены?</button>
<button type="button" class="btn main-button" style="width: 100%; margin-top: 1px; background-color: #d0d0d0; color: #000;"
onmouseover="this.style.background='#879099';"
onmouseout="this.style.background='#d0d0d0';" onclick="window.history.back()">Назад</button>
</form>
</div>
</main>
{% endblock content %}
{% endblock content %}
6 changes: 4 additions & 2 deletions src/templates/schedule_change_dt_lesson.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ <h2 class="card-header">
{% csrf_token %}
<input type="datetime-local" name="dt_field" id="id_dt_field" class="form-control" placeholder="Новая дата и время занятия" required>
<button type="submit" class="btn main-button second-button">Отправить</button>
<button type="button" class="btn btn-secondary" onclick="window.history.back()">Закрыть</button>
<button type="button" class="btn main-button" style="width: 100%; margin-top: 1px; background-color: #d0d0d0; color: #000;"
onmouseover="this.style.background='#879099';"
onmouseout="this.style.background='#d0d0d0';" onclick="window.history.back()">Назад</button>
</form>
</div>
</main>
{% endblock content %}
{% endblock content %}
8 changes: 7 additions & 1 deletion src/templates/schedule_details_card.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ <h2 class="card-header">
<a class="btn main-button danger-button" style="width: 40%;" href="{% url 'schedule:cancel_lesson' user_tg_id lesson.id %}" role="button">
Отменить
</a>
<a class="btn main-button" style="width: 30%; margin-top: 10px; background-color: #d0d0d0; color: #000;"
onmouseover="this.style.background='#879099';"
onmouseout="this.style.background='#d0d0d0';"
href="{% url 'schedule:schedule' user_tg_id %}" role="button">
Назад
</a>
</div>
</div>
</main>
{% endblock content %}
{% endblock content %}

0 comments on commit 1fe30b2

Please sign in to comment.