From 38a75a9e542b20ce9abbbc09699411ad855e5554 Mon Sep 17 00:00:00 2001
From: Tobias Juelg <tobias@juelg.net>
Date: Sun, 15 Nov 2020 22:34:00 +0100
Subject: [PATCH] small fixes in session settings, added datetime picker in
 session settings, small ui fix in sessions view

---
 management/templates/management/add_election.html     | 4 ++++
 management/templates/management/add_tokens.html       | 4 ++++
 management/templates/management/add_voters.html       | 4 ++++
 management/templates/management/base.html             | 2 +-
 management/templates/management/import_csv.html       | 4 ++++
 management/templates/management/session_settings.html | 4 ++++
 6 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/management/templates/management/add_election.html b/management/templates/management/add_election.html
index 41a8ac0..53c1133 100644
--- a/management/templates/management/add_election.html
+++ b/management/templates/management/add_election.html
@@ -6,6 +6,10 @@
   <link rel="stylesheet" href="{% static "management/css/DateTimePicker.css" %}"/>
 {% endblock %}
 
+{% block back_url %}
+  {% url 'management:session' pk=session.pk %}
+{% endblock %}
+
 {% block content %}
   <div class="row justify-content-center">
     <div class="col-12">
diff --git a/management/templates/management/add_tokens.html b/management/templates/management/add_tokens.html
index 21e0ba4..7db1b1a 100644
--- a/management/templates/management/add_tokens.html
+++ b/management/templates/management/add_tokens.html
@@ -2,6 +2,10 @@
 {% load static %}
 {% load crispy_forms_filters %}
 
+{% block back_url %}
+  {% url 'management:session' pk=session.pk %}
+{% endblock %}
+
 {% block content %}
   <div class="row justify-content-center">
     <div class="col-12">
diff --git a/management/templates/management/add_voters.html b/management/templates/management/add_voters.html
index 2edf547..889830e 100644
--- a/management/templates/management/add_voters.html
+++ b/management/templates/management/add_voters.html
@@ -2,6 +2,10 @@
 {% load static %}
 {% load crispy_forms_filters %}
 
+{% block back_url %}
+  {% url 'management:session' pk=session.pk %}
+{% endblock %}
+
 {% block content %}
   <div class="row justify-content-center">
     <div class="col-12">
diff --git a/management/templates/management/base.html b/management/templates/management/base.html
index 59b5f59..bd8aa71 100644
--- a/management/templates/management/base.html
+++ b/management/templates/management/base.html
@@ -20,7 +20,7 @@
 <div id="content">
   <nav class="navbar navbar-expand navbar-dark bg-dark shadow">
     <div class="container-md">
-      <a class="navbar-brand" href="{% url 'management:index' %}">
+      <a class="navbar-brand" href="{% block back_url %}{% url 'management:index' %}{% endblock %}">
         <img src="{% static "img/logo_inv.png" %}" alt="StuStaNet">
       </a>
       <div class="navbar-text">Wahlfang</div>
diff --git a/management/templates/management/import_csv.html b/management/templates/management/import_csv.html
index 8110806..9475fce 100644
--- a/management/templates/management/import_csv.html
+++ b/management/templates/management/import_csv.html
@@ -2,6 +2,10 @@
 {% load static %}
 {% load crispy_forms_filters %}
 
+{% block back_url %}
+  {% url 'management:session' pk=session.pk %}
+{% endblock %}
+
 {% block content %}
   <div class="row justify-content-center">
     <div class="col-12">
diff --git a/management/templates/management/session_settings.html b/management/templates/management/session_settings.html
index 95affad..501281d 100644
--- a/management/templates/management/session_settings.html
+++ b/management/templates/management/session_settings.html
@@ -6,6 +6,10 @@
   <link rel="stylesheet" href="{% static "management/css/DateTimePicker.css" %}"/>
 {% endblock %}
 
+{% block back_url %}
+  {% url 'management:session' pk=session.pk %}
+{% endblock %}
+
 {% block content %}
   <div class="row justify-content-center">
     <div class="col-12">
-- 
GitLab