From f5c260d79c8f73bf96e3349d62239868b2982c9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Tue, 11 Oct 2022 13:56:56 +0200 Subject: [PATCH] =?UTF-8?q?Kop=C3=ADrov=C3=A1n=C3=AD=20deadlinu=20p=C5=99i?= =?UTF-8?q?=20hodnocen=C3=AD.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- odevzdavatko/templates/odevzdavatko/detail.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/odevzdavatko/templates/odevzdavatko/detail.html b/odevzdavatko/templates/odevzdavatko/detail.html index cf4e394a..10f86a14 100644 --- a/odevzdavatko/templates/odevzdavatko/detail.html +++ b/odevzdavatko/templates/odevzdavatko/detail.html @@ -49,6 +49,10 @@ $(document).ready(function(){ $('.smazat_hodnoceni').click(function(){ deleteForm("form",this); }); + // Copy deadline + if (form_idx !== "0") { + $('#id_form-' + form_idx + '-deadline_body')[0].value = $('#id_form-' + (form_idx - 1) + '-deadline_body')[0].value + } $('#id_form-TOTAL_FORMS').val(parseInt(form_idx) + 1); }); $('.smazat_hodnoceni').click(function(){