From ec370b47cd50ed1c90c854bfd1e7f9e971bbf456 Mon Sep 17 00:00:00 2001 From: Yingtong Li Date: Thu, 19 Oct 2023 20:01:35 +1100 Subject: [PATCH] Allow customising ticketing fee name --- selfserv/settings.example.py | 1 + sstreasury/jinja2/sstreasury/budget_edit.html | 1 + sstreasury/jinja2/sstreasury/budget_print.html | 9 +++++++-- sstreasury/jinja2/sstreasury/budget_view.html | 1 + sstreasury/static/sstreasury/budget.js | 2 +- 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/selfserv/settings.example.py b/selfserv/settings.example.py index 329c657..0dced78 100644 --- a/selfserv/settings.example.py +++ b/selfserv/settings.example.py @@ -39,6 +39,7 @@ AVAILABLE_APPROVERS = [ ] BUDGET_ENABLE_VOTING = True +TICKETING_FEE_NAME = 'Fee' TICKETING_FEE_PROPORTION = 0.0175 # Previous default was (1-1/1.01884) TICKETING_FEE_FIXED = 0.30 # Previous default was 0.8133/1.01884 diff --git a/sstreasury/jinja2/sstreasury/budget_edit.html b/sstreasury/jinja2/sstreasury/budget_edit.html index 4c84fc4..c5c37c2 100644 --- a/sstreasury/jinja2/sstreasury/budget_edit.html +++ b/sstreasury/jinja2/sstreasury/budget_edit.html @@ -255,6 +255,7 @@ } }); + const ticketingFeeName = JSON.parse({{ import('json').dumps(import('json').dumps(settings.TICKETING_FEE_NAME))|safe }}); const ticketingFeeProportion = {{ settings.TICKETING_FEE_PROPORTION }}; const ticketingFeeFixed = {{ settings.TICKETING_FEE_FIXED }}; const editing = true; diff --git a/sstreasury/jinja2/sstreasury/budget_print.html b/sstreasury/jinja2/sstreasury/budget_print.html index 60c370a..7958762 100644 --- a/sstreasury/jinja2/sstreasury/budget_print.html +++ b/sstreasury/jinja2/sstreasury/budget_print.html @@ -2,7 +2,8 @@ {# Society Self-Service - Copyright © 2018–2020 Yingtong Li (RunasSudo) + Copyright © 2018-2023 Yingtong Li (RunasSudo) + Copyright © 2023 MUMUS Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by @@ -156,9 +157,13 @@