Back button goes to moderation screen

alt-html-css
Bob Mottram 2020-12-20 13:54:54 +00:00
parent 3a0644a2ae
commit 42531e476f
2 changed files with 7 additions and 2 deletions

View File

@ -5091,6 +5091,7 @@ class PubServer(BaseHTTPRequestHandler):
optionsProfileUrl = optionsProfileUrl.replace('.' + ext, '')
optionsProfileUrl = \
'/users/' + optionsProfileUrl + '/avatar.' + ext
backToPath = 'moderation'
if optionsPageNumber.isdigit():
pageNumber = int(optionsPageNumber)
optionsLink = None
@ -5136,7 +5137,8 @@ class PubServer(BaseHTTPRequestHandler):
toxAddress, jamiAddress,
PGPpubKey, PGPfingerprint,
emailAddress,
self.server.dormantMonths).encode('utf-8')
self.server.dormantMonths,
backToPath).encode('utf-8')
self._set_headers('text/html', len(msg),
cookie, callingDomain)
self._write(msg)

View File

@ -43,7 +43,8 @@ def htmlPersonOptions(defaultTimeline: str,
PGPpubKey: str,
PGPfingerprint: str,
emailAddress: str,
dormantMonths: int) -> str:
dormantMonths: int,
backToPath: str) -> str:
"""Show options for a person: view/follow/block/report
"""
optionsDomain, optionsPort = getDomainFromActor(optionsActor)
@ -225,6 +226,8 @@ def htmlPersonOptions(defaultTimeline: str,
backPath = '/'
if nickname:
backPath = '/users/' + nickname + '/' + defaultTimeline
if 'moderation' in backToPath:
backPath = '/users/' + nickname + '/moderation'
optionsStr += \
' <a href="' + backPath + '"><button type="button" ' + \
'class="buttonIcon" name="submitBack">' + translate['Go Back'] + \