From 1c6cc1f268dd956fc39ff1c2821ec36eb5fa4533 Mon Sep 17 00:00:00 2001
From: Piotr Gawron <piotr.gawron@uni.lu>
Date: Tue, 12 Dec 2017 11:57:07 +0100
Subject: [PATCH] appointment view contain information about subject vouchers

---
 smash/web/templates/appointments/edit.html | 7 ++++++-
 smash/web/views/appointment.py             | 1 -
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/smash/web/templates/appointments/edit.html b/smash/web/templates/appointments/edit.html
index 44a3ca27..dc1df827 100644
--- a/smash/web/templates/appointments/edit.html
+++ b/smash/web/templates/appointments/edit.html
@@ -35,7 +35,7 @@
         </div>
         <div class="box box-info">
 
-            <form method="post" action="" enctype="multipart/form-data"  class="form-horizontal">
+            <form method="post" action="" enctype="multipart/form-data" class="form-horizontal">
                 {% csrf_token %}
                 <fieldset>
                     <div class="box-header with-border">
@@ -136,6 +136,11 @@
                 </div><!-- /.box-footer -->
             </form>
         </div>
+
+        {% if appointment.visit.subject.study.columns.vouchers %}
+            {% include 'includes/subject_vouchers_box.html' with subject=appointment.visit.subject %}
+        {% endif %}
+
         {% include 'includes/mail_templates_box.html' with instance_id=appointment.id %}
         {% if appointment.visit %}
             {% include 'includes/contact_attempts_box.html' with subject=appointment.visit.subject contact_attempts=contact_attempts appointment_id=appointment.id %}
diff --git a/smash/web/views/appointment.py b/smash/web/views/appointment.py
index 6d64acd4..fac01b5a 100644
--- a/smash/web/views/appointment.py
+++ b/smash/web/views/appointment.py
@@ -139,7 +139,6 @@ def appointment_edit(request, id):
         'appointment_form': appointment_form,
         'study_subject_form': study_subject_form,
         'subject_form': subject_form,
-        'id': id,
         'appointment': the_appointment,
         'contact_attempts': contact_attempts,
         'mail_templates': MailTemplate.get_appointment_mail_templates(languages)
-- 
GitLab