From 6401ca4007e578d0e44d4a381c3beebc907c9463 Mon Sep 17 00:00:00 2001 From: dandds Date: Wed, 22 Aug 2018 15:04:12 -0400 Subject: [PATCH] make annual spending threshold available to request templates --- atst/domain/requests.py | 1 + atst/routes/requests/__init__.py | 6 ++++++ templates/requests/screen-1.html | 2 +- templates/requests/screen-4.html | 2 +- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/atst/domain/requests.py b/atst/domain/requests.py index a1102f92..80069f37 100644 --- a/atst/domain/requests.py +++ b/atst/domain/requests.py @@ -31,6 +31,7 @@ def deep_merge(source, destination: dict): class Requests(object): AUTO_APPROVE_THRESHOLD = 1000000 + ANNUAL_SPEND_THRESHOLD = 1000000 @classmethod def create(cls, creator, body): diff --git a/atst/routes/requests/__init__.py b/atst/routes/requests/__init__.py index 5a5a978f..aea193b7 100644 --- a/atst/routes/requests/__init__.py +++ b/atst/routes/requests/__init__.py @@ -1,7 +1,13 @@ from flask import Blueprint +from atst.domain.requests import Requests + requests_bp = Blueprint("requests", __name__) from . import index from . import requests_form from . import financial_verification + +@requests_bp.context_processor +def annual_spend_threshold(): + return { "annual_spend_threshold": Requests.ANNUAL_SPEND_THRESHOLD } diff --git a/templates/requests/screen-1.html b/templates/requests/screen-1.html index cc3c9c25..c4fa953d 100644 --- a/templates/requests/screen-1.html +++ b/templates/requests/screen-1.html @@ -65,7 +65,7 @@ -