2020-11-10 10:25:21 +00:00
|
|
|
__filename__ = "webapp_suspended.py"
|
|
|
|
__author__ = "Bob Mottram"
|
|
|
|
__license__ = "AGPL3+"
|
2021-01-26 10:07:42 +00:00
|
|
|
__version__ = "1.2.0"
|
2020-11-10 10:25:21 +00:00
|
|
|
__maintainer__ = "Bob Mottram"
|
2021-09-10 16:14:50 +00:00
|
|
|
__email__ = "bob@libreserver.org"
|
2020-11-10 10:25:21 +00:00
|
|
|
__status__ = "Production"
|
2021-06-15 15:08:12 +00:00
|
|
|
__module_group__ = "Web Interface"
|
2020-11-10 10:25:21 +00:00
|
|
|
|
|
|
|
import os
|
2021-01-11 19:46:21 +00:00
|
|
|
from utils import getConfigParam
|
2020-11-12 17:05:38 +00:00
|
|
|
from webapp_utils import htmlHeaderWithExternalStyle
|
2020-11-10 10:25:21 +00:00
|
|
|
from webapp_utils import htmlFooter
|
|
|
|
|
|
|
|
|
2021-12-25 16:17:53 +00:00
|
|
|
def htmlSuspended(cssCache: {}, base_dir: str) -> str:
|
2020-11-10 10:25:21 +00:00
|
|
|
"""Show the screen for suspended accounts
|
|
|
|
"""
|
|
|
|
suspendedForm = ''
|
2021-12-25 16:17:53 +00:00
|
|
|
cssFilename = base_dir + '/epicyon-suspended.css'
|
|
|
|
if os.path.isfile(base_dir + '/suspended.css'):
|
|
|
|
cssFilename = base_dir + '/suspended.css'
|
2020-11-10 10:25:21 +00:00
|
|
|
|
2021-01-11 19:46:21 +00:00
|
|
|
instanceTitle = \
|
2021-12-25 16:17:53 +00:00
|
|
|
getConfigParam(base_dir, 'instanceTitle')
|
2021-11-07 10:38:11 +00:00
|
|
|
suspendedForm = \
|
|
|
|
htmlHeaderWithExternalStyle(cssFilename, instanceTitle, None)
|
2021-07-06 12:50:38 +00:00
|
|
|
suspendedForm += \
|
|
|
|
'<div><center>\n' + \
|
|
|
|
' <p class="screentitle">Account Suspended</p>\n' + \
|
|
|
|
' <p>See <a href="/terms">Terms of Service</a></p>\n' + \
|
|
|
|
'</center></div>\n'
|
2020-11-12 17:05:38 +00:00
|
|
|
suspendedForm += htmlFooter()
|
2020-11-10 10:25:21 +00:00
|
|
|
return suspendedForm
|