fix: show non-standard config values for app info configure email
this page is currently showing some basic email sender/recips etc. but the config keys traditionally used by rattail are different than wuttjamaican..so for now we must "translate"
This commit is contained in:
parent
3a9bf69aa7
commit
d67eb2f1cc
|
@ -81,15 +81,56 @@ class AppInfoView(WuttaAppInfoView):
|
|||
""" """
|
||||
simple_settings = super().configure_get_simple_settings()
|
||||
|
||||
# TODO: the update home page redirect setting is off by
|
||||
# default for wuttaweb, but on for tailbone
|
||||
for setting in simple_settings:
|
||||
|
||||
# TODO: the update home page redirect setting is off by
|
||||
# default for wuttaweb, but on for tailbone
|
||||
if setting['name'] == 'wuttaweb.home_redirect_to_login':
|
||||
value = self.config.get_bool('wuttaweb.home_redirect_to_login')
|
||||
if value is None:
|
||||
value = self.config.get_bool('tailbone.login_is_home', default=True)
|
||||
setting['default'] = value
|
||||
break
|
||||
setting['value'] = value
|
||||
|
||||
# TODO: sending email is off by default for wuttjamaican,
|
||||
# but on for rattail
|
||||
elif setting['name'] == 'rattail.mail.send_emails':
|
||||
value = self.config.get_bool('rattail.mail.send_emails', default=True)
|
||||
setting['value'] = value
|
||||
|
||||
# TODO: email defaults have different config keys in rattail
|
||||
elif setting['name'] == 'rattail.email.default.sender':
|
||||
value = self.config.get('rattail.email.default.sender')
|
||||
if value is None:
|
||||
value = self.config.get('rattail.mail.default.from')
|
||||
setting['value'] = value
|
||||
|
||||
# TODO: email defaults have different config keys in rattail
|
||||
elif setting['name'] == 'rattail.email.default.subject':
|
||||
value = self.config.get('rattail.email.default.subject')
|
||||
if value is None:
|
||||
value = self.config.get('rattail.mail.default.subject')
|
||||
setting['value'] = value
|
||||
|
||||
# TODO: email defaults have different config keys in rattail
|
||||
elif setting['name'] == 'rattail.email.default.to':
|
||||
value = self.config.get('rattail.email.default.to')
|
||||
if value is None:
|
||||
value = self.config.get('rattail.mail.default.to')
|
||||
setting['value'] = value
|
||||
|
||||
# TODO: email defaults have different config keys in rattail
|
||||
elif setting['name'] == 'rattail.email.default.cc':
|
||||
value = self.config.get('rattail.email.default.cc')
|
||||
if value is None:
|
||||
value = self.config.get('rattail.mail.default.cc')
|
||||
setting['value'] = value
|
||||
|
||||
# TODO: email defaults have different config keys in rattail
|
||||
elif setting['name'] == 'rattail.email.default.bcc':
|
||||
value = self.config.get('rattail.email.default.bcc')
|
||||
if value is None:
|
||||
value = self.config.get('rattail.mail.default.bcc')
|
||||
setting['value'] = value
|
||||
|
||||
# nb. these are no longer used (deprecated), but we keep
|
||||
# them defined here so the tool auto-deletes them
|
||||
|
|
Loading…
Reference in a new issue