More checks on visibility of items on person options

merge-requests/30/head
Bob Mottram 2021-02-23 17:51:48 +00:00
parent 2d86165795
commit 9145ac0801
1 changed files with 78 additions and 74 deletions

View File

@ -227,6 +227,7 @@ def htmlPersonOptions(defaultTimeline: str,
optionsStr += ' <input type="hidden" name="avatarUrl" value="' + \
optionsProfileUrl + '">\n'
if authorized:
if originPathStr == '/users/' + nickname:
if optionsNickname:
handle = optionsNickname + '@' + optionsDomainFull
petname = getPetName(baseDir, nickname, domain, handle)
@ -265,7 +266,8 @@ def htmlPersonOptions(defaultTimeline: str,
optionsNickname + '@' + optionsDomain + '/.nonewswire'
checkboxStr = \
' <input type="checkbox" ' + \
'class="profilecheckbox" name="postsToNews" checked> ' + \
'class="profilecheckbox" ' + \
'name="postsToNews" checked> ' + \
translate['Allow news posts'] + \
'\n <button type="submit" class="buttonsmall" ' + \
'name="submitPostToNews">' + \
@ -276,11 +278,13 @@ def htmlPersonOptions(defaultTimeline: str,
newswirePostsPermitted = True
optionsStr += checkboxStr
# whether blogs created by this account are moderated on the newswire
# whether blogs created by this account are moderated on
# the newswire
if newswirePostsPermitted:
moderatedFilename = \
baseDir + '/accounts/' + \
optionsNickname + '@' + optionsDomain + '/.newswiremoderated'
optionsNickname + '@' + \
optionsDomain + '/.newswiremoderated'
checkboxStr = \
' <input type="checkbox" ' + \
'class="profilecheckbox" name="modNewsPosts" checked> ' + \