From 57dae38cf9ff5b2a07c908afc3f78b0c7bb67845 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kate=C5=99ina=20=C4=8C=C3=AD=C5=BEkov=C3=A1?= Date: Wed, 6 May 2020 22:45:27 +0200 Subject: [PATCH] =?UTF-8?q?formul=C3=A1=C5=99e=20vzhled=20jako=20tabulky?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seminar/static/seminar/prihlaska.js | 10 +- seminar/templates/seminar/edit.html | 89 ++++++---- seminar/templates/seminar/login.html | 7 +- seminar/templates/seminar/prihlaska.html | 168 +++++++++--------- .../templates/seminar/prihlaska_field.html | 27 ++- 5 files changed, 170 insertions(+), 131 deletions(-) diff --git a/seminar/static/seminar/prihlaska.js b/seminar/static/seminar/prihlaska.js index 81f91d28..c3565450 100644 --- a/seminar/static/seminar/prihlaska.js +++ b/seminar/static/seminar/prihlaska.js @@ -3,7 +3,7 @@ function addrCountryChanged(){ var stat_text = document.getElementById('id_li_stat_text'); var stat = stat_select[stat_select.selectedIndex].value; if (stat === "other"){ - stat_text.style.display="block"; + stat_text.style.display="revert"; } else { stat_text.style.display="none"; $('#id_stat_text').val(""); @@ -12,18 +12,22 @@ function addrCountryChanged(){ function hideSchoolTextfields(){ var skola_nazev = document.getElementById('id_li_skola_nazev'); var skola_adresa = document.getElementById('id_li_skola_adresa'); + var skola_vypln = document.getElementById('id_li_skola_vypln'); skola_nazev.style.display="none"; skola_adresa.style.display="none"; + skola_vypln.style.display="none"; } function schoolNotInList(){ var skola_nazev = document.getElementById('id_li_skola_nazev'); var skola_adresa = document.getElementById('id_li_skola_adresa'); + var skola_vypln = document.getElementById('id_li_skola_vypln'); // FIXME nefunguje a nevim proc (TypeError: $(...).select2 is not a function) //var skola_select = $('#id_skola').select2(); //skola_select.val(null).trigger('change'); - skola_nazev.style.display="block"; - skola_adresa.style.display="block"; + skola_vypln.style.display="revert"; + skola_nazev.style.display="revert"; + skola_adresa.style.display="revert"; } document.addEventListener("DOMContentLoaded", function(){ diff --git a/seminar/templates/seminar/edit.html b/seminar/templates/seminar/edit.html index 3f3e0d99..bc78312c 100644 --- a/seminar/templates/seminar/edit.html +++ b/seminar/templates/seminar/edit.html @@ -15,59 +15,77 @@
{% csrf_token %} {{form.non_field_errors}} -