mirror of https://gitlab.com/bashrc2/epicyon
Function for checkboxes on edit profile screen
parent
d2381eb389
commit
a96094235f
|
@ -1728,9 +1728,44 @@ def _htmlEditProfileContactInfo(nickname: str,
|
||||||
return editProfileForm
|
return editProfileForm
|
||||||
|
|
||||||
|
|
||||||
def _htmlEditProfileOptions(translate: {}) -> str:
|
def _htmlEditProfileOptions(manuallyApprovesFollowers: str,
|
||||||
|
isBot: str, isGroup: str,
|
||||||
|
followDMs: str, removeTwitter: str,
|
||||||
|
notifyLikes: str, hideLikeButton: str,
|
||||||
|
translate: {}) -> str:
|
||||||
"""option checkboxes section of edit profile screen
|
"""option checkboxes section of edit profile screen
|
||||||
"""
|
"""
|
||||||
|
editProfileForm = ' <div class="container">\n'
|
||||||
|
editProfileForm += \
|
||||||
|
' <input type="checkbox" class="profilecheckbox" ' + \
|
||||||
|
'name="approveFollowers" ' + manuallyApprovesFollowers + \
|
||||||
|
'> ' + translate['Approve follower requests'] + '<br>\n'
|
||||||
|
editProfileForm += \
|
||||||
|
' <input type="checkbox" ' + \
|
||||||
|
'class="profilecheckbox" name="isBot" ' + \
|
||||||
|
isBot + '> ' + translate['This is a bot account'] + '<br>\n'
|
||||||
|
editProfileForm += \
|
||||||
|
' <input type="checkbox" ' + \
|
||||||
|
'class="profilecheckbox" name="isGroup" ' + isGroup + '> ' + \
|
||||||
|
translate['This is a group account'] + '<br>\n'
|
||||||
|
editProfileForm += \
|
||||||
|
' <input type="checkbox" class="profilecheckbox" ' + \
|
||||||
|
'name="followDMs" ' + followDMs + '> ' + \
|
||||||
|
translate['Only people I follow can send me DMs'] + '<br>\n'
|
||||||
|
editProfileForm += \
|
||||||
|
' <input type="checkbox" class="profilecheckbox" ' + \
|
||||||
|
'name="removeTwitter" ' + removeTwitter + '> ' + \
|
||||||
|
translate['Remove Twitter posts'] + '<br>\n'
|
||||||
|
editProfileForm += \
|
||||||
|
' <input type="checkbox" class="profilecheckbox" ' + \
|
||||||
|
'name="notifyLikes" ' + notifyLikes + '> ' + \
|
||||||
|
translate['Notify when posts are liked'] + '<br>\n'
|
||||||
|
editProfileForm += \
|
||||||
|
' <input type="checkbox" class="profilecheckbox" ' + \
|
||||||
|
'name="hideLikeButton" ' + hideLikeButton + '> ' + \
|
||||||
|
translate["Don't show the Like button"] + '<br>\n'
|
||||||
|
editProfileForm += ' </div>\n'
|
||||||
|
return editProfileForm
|
||||||
|
|
||||||
|
|
||||||
def htmlEditProfile(cssCache: {}, translate: {}, baseDir: str, path: str,
|
def htmlEditProfile(cssCache: {}, translate: {}, baseDir: str, path: str,
|
||||||
|
@ -1972,36 +2007,10 @@ def htmlEditProfile(cssCache: {}, translate: {}, baseDir: str, path: str,
|
||||||
editProfileForm += ' </div>\n'
|
editProfileForm += ' </div>\n'
|
||||||
|
|
||||||
# Option checkboxes
|
# Option checkboxes
|
||||||
editProfileForm += ' <div class="container">\n'
|
|
||||||
editProfileForm += \
|
editProfileForm += \
|
||||||
' <input type="checkbox" class="profilecheckbox" ' + \
|
_htmlEditProfileOptions(manuallyApprovesFollowers,
|
||||||
'name="approveFollowers" ' + manuallyApprovesFollowers + \
|
isBot, isGroup, followDMs, removeTwitter,
|
||||||
'> ' + translate['Approve follower requests'] + '<br>\n'
|
notifyLikes, hideLikeButton, translate)
|
||||||
editProfileForm += \
|
|
||||||
' <input type="checkbox" ' + \
|
|
||||||
'class="profilecheckbox" name="isBot" ' + \
|
|
||||||
isBot + '> ' + translate['This is a bot account'] + '<br>\n'
|
|
||||||
editProfileForm += \
|
|
||||||
' <input type="checkbox" ' + \
|
|
||||||
'class="profilecheckbox" name="isGroup" ' + isGroup + '> ' + \
|
|
||||||
translate['This is a group account'] + '<br>\n'
|
|
||||||
editProfileForm += \
|
|
||||||
' <input type="checkbox" class="profilecheckbox" ' + \
|
|
||||||
'name="followDMs" ' + followDMs + '> ' + \
|
|
||||||
translate['Only people I follow can send me DMs'] + '<br>\n'
|
|
||||||
editProfileForm += \
|
|
||||||
' <input type="checkbox" class="profilecheckbox" ' + \
|
|
||||||
'name="removeTwitter" ' + removeTwitter + '> ' + \
|
|
||||||
translate['Remove Twitter posts'] + '<br>\n'
|
|
||||||
editProfileForm += \
|
|
||||||
' <input type="checkbox" class="profilecheckbox" ' + \
|
|
||||||
'name="notifyLikes" ' + notifyLikes + '> ' + \
|
|
||||||
translate['Notify when posts are liked'] + '<br>\n'
|
|
||||||
editProfileForm += \
|
|
||||||
' <input type="checkbox" class="profilecheckbox" ' + \
|
|
||||||
'name="hideLikeButton" ' + hideLikeButton + '> ' + \
|
|
||||||
translate["Don't show the Like button"] + '<br>\n'
|
|
||||||
editProfileForm += ' </div>\n'
|
|
||||||
|
|
||||||
# Contact information
|
# Contact information
|
||||||
editProfileForm += \
|
editProfileForm += \
|
||||||
|
|
Loading…
Reference in New Issue