From a96094235fae4faf8b96b113f9003a278a9474f6 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 27 Jun 2021 21:18:15 +0100 Subject: [PATCH] Function for checkboxes on edit profile screen --- webapp_profile.py | 69 ++++++++++++++++++++++++++--------------------- 1 file changed, 39 insertions(+), 30 deletions(-) diff --git a/webapp_profile.py b/webapp_profile.py index 27fb2e562..785ab5a16 100644 --- a/webapp_profile.py +++ b/webapp_profile.py @@ -1728,9 +1728,44 @@ def _htmlEditProfileContactInfo(nickname: str, 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 """ + editProfileForm = '
\n' + editProfileForm += \ + ' ' + translate['Approve follower requests'] + '
\n' + editProfileForm += \ + ' ' + translate['This is a bot account'] + '
\n' + editProfileForm += \ + ' ' + \ + translate['This is a group account'] + '
\n' + editProfileForm += \ + ' ' + \ + translate['Only people I follow can send me DMs'] + '
\n' + editProfileForm += \ + ' ' + \ + translate['Remove Twitter posts'] + '
\n' + editProfileForm += \ + ' ' + \ + translate['Notify when posts are liked'] + '
\n' + editProfileForm += \ + ' ' + \ + translate["Don't show the Like button"] + '
\n' + editProfileForm += '
\n' + return editProfileForm def htmlEditProfile(cssCache: {}, translate: {}, baseDir: str, path: str, @@ -1972,36 +2007,10 @@ def htmlEditProfile(cssCache: {}, translate: {}, baseDir: str, path: str, editProfileForm += ' \n' # Option checkboxes - editProfileForm += '
\n' editProfileForm += \ - ' ' + translate['Approve follower requests'] + '
\n' - editProfileForm += \ - ' ' + translate['This is a bot account'] + '
\n' - editProfileForm += \ - ' ' + \ - translate['This is a group account'] + '
\n' - editProfileForm += \ - ' ' + \ - translate['Only people I follow can send me DMs'] + '
\n' - editProfileForm += \ - ' ' + \ - translate['Remove Twitter posts'] + '
\n' - editProfileForm += \ - ' ' + \ - translate['Notify when posts are liked'] + '
\n' - editProfileForm += \ - ' ' + \ - translate["Don't show the Like button"] + '
\n' - editProfileForm += '
\n' + _htmlEditProfileOptions(manuallyApprovesFollowers, + isBot, isGroup, followDMs, removeTwitter, + notifyLikes, hideLikeButton, translate) # Contact information editProfileForm += \