From 9c0640fb714e36004daaf73252923126543d7872 Mon Sep 17 00:00:00 2001
From: Adams Pierre David <57180807+adamspd@users.noreply.github.com>
Date: Tue, 21 Nov 2023 03:51:01 +0100
Subject: [PATCH] updated label in appointment page to be dynamic
---
appointment/models.py | 6 ++++--
appointment/templates/appointment/appointments.html | 2 +-
appointment/views.py | 8 ++++++--
requirements.txt | 6 +++---
4 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/appointment/models.py b/appointment/models.py
index c39dc8f..892020a 100644
--- a/appointment/models.py
+++ b/appointment/models.py
@@ -13,13 +13,13 @@
from babel.numbers import get_currency_symbol
from django.conf import settings
from django.core.exceptions import ValidationError
-from django.core.validators import MinValueValidator, MinLengthValidator, MaxLengthValidator
+from django.core.validators import MaxLengthValidator, MinLengthValidator, MinValueValidator
from django.db import models
from django.urls import reverse
from django.utils.translation import gettext_lazy as _
from phonenumber_field.modelfields import PhoneNumberField
-from appointment.utils.date_time import get_timestamp, get_weekday_num, convert_minutes_in_human_readable_format, \
+from appointment.utils.date_time import convert_minutes_in_human_readable_format, get_timestamp, get_weekday_num, \
time_difference
from appointment.utils.view_helpers import generate_random_id, get_locale
@@ -557,6 +557,8 @@ class Config(models.Model):
default="",
help_text=_("Name of your website."),
)
+ app_offered_by_label = models.CharField(max_length=255, default=_("Offered by"),
+ help_text=_("Label for `Offered by` on the appointment page"))
# meta data
created_at = models.DateTimeField(auto_now_add=True)
diff --git a/appointment/templates/appointment/appointments.html b/appointment/templates/appointment/appointments.html
index 551e5fd..5970d6d 100644
--- a/appointment/templates/appointment/appointments.html
+++ b/appointment/templates/appointment/appointments.html
@@ -51,7 +51,7 @@
{{ service.name }}
class="appointment-form">
{% csrf_token %}
-
+