Change behavior of back button if not logged in

merge-requests/21/head
Bob Mottram 2021-02-23 17:58:52 +00:00
parent 9145ac0801
commit 4e6d9d2d45
1 changed files with 10 additions and 4 deletions

View File

@ -321,10 +321,16 @@ def htmlPersonOptions(defaultTimeline: str,
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'] + \
'</button></a>\n'
if authorized:
optionsStr += \
' <a href="' + backPath + '"><button type="button" ' + \
'class="buttonIcon" name="submitBack">' + translate['Go Back'] + \
'</button></a>\n'
else:
optionsStr += \
' <a href="' + originPathStr + '"><button type="button" ' + \
'class="buttonIcon" name="submitBack">' + translate['Go Back'] + \
'</button></a>\n'
if authorized:
optionsStr += \
' <button type="submit" class="button" name="submitView">' + \