duzo fixow i optymalizacji
This commit is contained in:
@ -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 %}
|
||||
|
Reference in New Issue
Block a user