Merge branch 'bot_refactor' of ssh://git.smartsoltech.kr:2222/trevor/lottery_ycms into bot_refactor
This commit is contained in:
@@ -4,11 +4,35 @@
|
|||||||
{% block object-tools %}
|
{% block object-tools %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
{% if original %}
|
{% if original %}
|
||||||
<li>
|
<div class="container-fluid">
|
||||||
<a class="button"
|
<a class="btn btn-warning d-block w-100 text-center my-2"
|
||||||
href="{% url 'admin:botconfig-restart' original.pk %}">
|
href="{% url 'admin:botconfig-restart' original.pk %}">
|
||||||
🔁 Перезапустить бота
|
Перезапустить бота
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
{% block extrahead %}
|
||||||
|
{{ block.super }}
|
||||||
|
<style>
|
||||||
|
.container-fluid {
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block footer %}
|
||||||
|
{{ block.super }}
|
||||||
|
<script>
|
||||||
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
|
const restartButton = document.querySelector('.btn-warning');
|
||||||
|
if (restartButton) {
|
||||||
|
restartButton.addEventListener('click', function(event) {
|
||||||
|
if (!confirm('Вы уверены, что хотите перезапустить бота?')) {
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
||||||
Reference in New Issue
Block a user