From 6a6aa00d6414a17ed150461fffc0ee5585e6467c Mon Sep 17 00:00:00 2001 From: Frank Poetzsch-Heffter <p-h@katharineum.de> Date: Tue, 30 Oct 2018 21:12:01 +0100 Subject: [PATCH] hide button for edit and delete --- schoolapps/aub/templates/aub/check.html | 4 ++++ schoolapps/aub/templates/aub/index.html | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/schoolapps/aub/templates/aub/check.html b/schoolapps/aub/templates/aub/check.html index afece7bf2..fcafc05af 100755 --- a/schoolapps/aub/templates/aub/check.html +++ b/schoolapps/aub/templates/aub/check.html @@ -38,12 +38,16 @@ <form action="" method="POST" class="right"> {% csrf_token %} <input type="hidden" value="{{ aub.id }}" name="aub-id"> + {% if aub.status_id != 3 %} <button type="submit" name="allow" class="waves-effect waves-light btn-flat btn-flat-large" title="Annehmen"> <i class="material-icons center green-text">check_circle</i> </button> + {% endif %} + {% if aub.status_id != 4 %} <button type="submit" name="deny" class="waves-effect waves-light btn-flat btn-flat-large" title="Ablehnen"> <i class="material-icons center red-text">not_interested</i> </button> + {% endif %} </form> </p> </div> diff --git a/schoolapps/aub/templates/aub/index.html b/schoolapps/aub/templates/aub/index.html index 591970aa2..e004f9178 100755 --- a/schoolapps/aub/templates/aub/index.html +++ b/schoolapps/aub/templates/aub/index.html @@ -35,12 +35,16 @@ <form action="" method="POST" class="right"> {% csrf_token %} <input type="hidden" value="{{ aub.id }}" name="aub-id"> + {% if aub.status_id == 1 %} <button type="submit" name="edit" class="waves-effect waves-light btn-flat btn-flat-medium" title="Bearbeiten"> <i class="material-icons center green-text">create</i> </button> + {% endif %} + {% if aub.status_id == 1 or aub.status_id == 2 %} <button type="submit" onclick="return confirm('Wollen Sie den Antrag wirklich löschen?')" name="cancel" class="waves-effect waves-light btn-flat btn-flat-medium" title="Löschen"> <i class="material-icons center red-text">cancel</i> </button> + {% endif %} </form> </p> -- GitLab