duzo fixow i optymalizacji

This commit is contained in:
Mateusz Gruszczyński
2025-03-10 23:32:43 +01:00
parent c4b5e703f3
commit a8954020f6
4 changed files with 274 additions and 106 deletions

View File

@ -61,19 +61,16 @@
{% block extra_js %}
{{ super() }}
<script>
// Ustaw dynamicznie action formularza dla czyszczenia pojedynczego serwera
document.getElementById('clear-single-form').addEventListener('submit', function(e) {
e.preventDefault();
var hostId = document.getElementById('host_id').value;
if(!hostId) {
if (!hostId) {
alert("Proszę wybrać serwer!");
return;
}
// Skonstruuj URL bez użycia url_for
this.action = "/clear-single-server/" + hostId;
this.submit();
});
</script>
{% endblock %}