diff --git a/smash/web/templates/appointments/add.html b/smash/web/templates/appointments/add.html index 4c839d757e7069fa408a994898358c2b8fffda54..a931b3a52786dda2afa0a48caa5f3ed985fbe9f2 100644 --- a/smash/web/templates/appointments/add.html +++ b/smash/web/templates/appointments/add.html @@ -16,7 +16,13 @@ {% endblock styles %} {% block ui_active_tab %}'appointments'{% endblock ui_active_tab %} -{% block page_header %}New appointment for visit from {{visit_start}} to {{visit_end}}{% endblock page_header %} +{% block page_header %} +{% if isGeneral %} +New general appointment +{% else %} +New appointment for visit from {{visit_start}} to {{visit_end}} +{% endif %} +{% endblock page_header %} {% block page_description %}{% endblock page_description %} {% block title %}{{ block.super }} - Add new appointment{% endblock %} diff --git a/smash/web/views/appointment.py b/smash/web/views/appointment.py index eccf0a40c7055448e749e1cef25fd312af5ccfdf..e23a96bc67495b7bd44456b7784601b4acf8e42c 100644 --- a/smash/web/views/appointment.py +++ b/smash/web/views/appointment.py @@ -1,7 +1,7 @@ # coding=utf-8 import logging import re - +import datetime from django.contrib import messages from django.core.exceptions import ValidationError from django.shortcuts import get_object_or_404, redirect @@ -61,7 +61,9 @@ def appointment_add(request, visit_id=None): form = AppointmentAddForm(user=request.user) return wrap_response(request, 'appointments/add.html', - {'form': form, 'visitID': visit_id, 'visit_start': visit_start, 'visit_end': visit_end, 'full_list': APPOINTMENT_LIST_GENERIC}) + {'form': form, 'visitID': visit_id, 'isGeneral': visit_id is None, + 'visit_start': visit_start, 'visit_end': visit_end, + 'full_list': APPOINTMENT_LIST_GENERIC}) def appointment_edit(request, id):