From 57435ce4accdd663d49a1e1553bfe028dc254876 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tobias=20J=C3=BClg?= <tobias@juelg.net>
Date: Tue, 31 May 2022 20:33:03 +0200
Subject: [PATCH] Fix apply button and add cancel button

* cancel button for adding/editing election options
* apply button did not render text as html was wrongly formatted
---
 management/templates/management/application.html | 2 ++
 vote/templates/vote/index_election_item.html     | 4 +---
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/management/templates/management/application.html b/management/templates/management/application.html
index 8fb4da6..e18d39c 100644
--- a/management/templates/management/application.html
+++ b/management/templates/management/application.html
@@ -74,6 +74,8 @@
             </div>
           {% endif %}
           <button type="submit" class="btn btn-primary btn-block">Submit</button>
+          <a class="btn btn-secondary btn-block"
+              href="{% url 'management:election' election.pk %}">Cancel</a>
           </form>
         </div>
       </div>
diff --git a/vote/templates/vote/index_election_item.html b/vote/templates/vote/index_election_item.html
index a1b118e..2b3d1ce 100644
--- a/vote/templates/vote/index_election_item.html
+++ b/vote/templates/vote/index_election_item.html
@@ -8,9 +8,7 @@
       <a class="btn btn-danger float-right ml-3" href="{% url 'vote:delete_own_application' election.pk %}"> Delete
         application </a>
       {% endif %}
-      <a class="btn btn-dark float-right" href="{% url 'vote:apply' election.pk %}"> {% if edit %} Edit application {%
-        else %}
-        Apply {% endif %}</a>
+      <a class="btn btn-dark float-right" href="{% url 'vote:apply' election.pk %}"> {% if edit %} Edit application {% else %} Apply {% endif %}</a>
       {% endif %}
     </h4>
     {% if election.end_date %}
-- 
GitLab