Development

This commit is contained in:
Matthew Grotke 2026-06-02 12:49:39 -04:00
parent 59ac3c5973
commit 3d0dc265ba
31 changed files with 1093 additions and 2794 deletions

View file

@ -1,12 +1,13 @@
import json
from flask import session
import sanitize
from config_utils import collect_layout_tokens
def collect_tokens(cfg):
tokens = collect_layout_tokens(cfg)
blank = [{'value': '', 'label': '-- Select timezone --'}]
return {
'PREF_EMAIL': session.get('email_address', ''),
'PREF_TIMEZONE': session.get('timezone', ''),
'TIMEZONE_OPTIONS': json.dumps(blank + [{'value': tz, 'label': tz} for tz in sanitize.VALID_TIMEZONES]),
}
tokens['PREF_EMAIL'] = session.get('email_address', '')
tokens['PREF_TIMEZONE'] = session.get('timezone', '')
tokens['TIMEZONE_OPTIONS'] = json.dumps(blank + [{'value': tz, 'label': tz} for tz in sanitize.VALID_TIMEZONES])
return tokens