From 5af5f5cd270568cf6611bfe285d76ba6d643f5f2 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 6 Jul 2021 11:18:56 +0100 Subject: [PATCH] Tidying --- webapp_profile.py | 153 +++++++++++++++++++++++----------------------- 1 file changed, 78 insertions(+), 75 deletions(-) diff --git a/webapp_profile.py b/webapp_profile.py index eced71548..3439b834b 100644 --- a/webapp_profile.py +++ b/webapp_profile.py @@ -1601,64 +1601,66 @@ def _htmlEditProfileFiltering(baseDir: str, nickname: str, domain: str, def _htmlEditProfileChangePassword(translate: {}) -> str: """Change password section of edit profile screen """ - editProfileForm = '
' + \ - translate['Change Password'] + '\n' - editProfileForm += '
\n' - editProfileForm += \ + editProfileForm = \ + '
' + \ + translate['Change Password'] + '\n' + \ + '
\n' + \ '
\n' - editProfileForm += '
\n' - editProfileForm += \ + '
\n' + \ + '
\n' + \ '
\n' - editProfileForm += \ - ' \n' - editProfileForm += '
\n' + '
\n' + \ + ' \n' + \ + '
\n' return editProfileForm def _htmlEditProfileBackground(newsInstance: bool, translate: {}) -> str: """Background images section of edit profile screen """ - editProfileForm = '
' + \ - translate['Background Images'] + '\n' - editProfileForm += '
\n' idx = 'The files attached below should be no larger than ' + \ '10MB in total uploaded at once.' - editProfileForm += \ + editProfileForm = \ + '
' + \ + translate['Background Images'] + '\n' + \ + '
\n' + \ '

\n' if not newsInstance: imageFormats = getImageFormats() editProfileForm += \ ' \n' - editProfileForm += ' \n' + translate['Background image'] + '\n' + \ + ' \n' - editProfileForm += '
\n' - editProfileForm += ' \n' + editProfileForm += \ + '
\n' + \ + ' \n' - editProfileForm += '
\n' - editProfileForm += ' \n' + editProfileForm += \ + '
\n' + \ + ' \n' - editProfileForm += '
\n' - editProfileForm += ' \n' + editProfileForm += \ + '
\n' + \ + ' \n' - editProfileForm += '
\n' - editProfileForm += ' \n' + editProfileForm += \ + '
\n' + \ + ' \n' editProfileForm += '
\n' return editProfileForm @@ -1696,48 +1698,45 @@ def _htmlEditProfileContactInfo(nickname: str, ' \n' - editProfileForm += '
\n' editProfileForm += \ + '
\n' + \ ' \n' - editProfileForm += '
\n' editProfileForm += \ + '
\n' + \ ' \n' - editProfileForm += '
\n' editProfileForm += \ + '
\n' + \ ' \n' - editProfileForm += '
\n' editProfileForm += \ + '
\n' + \ ' \n' - editProfileForm += '
\n' editProfileForm += \ + '
\n' + \ ' \n' editProfileForm += \ '
\n' - editProfileForm += \ + translate['PGP Fingerprint'] + '
\n' + \ ' \n' - editProfileForm += \ - '
\n' - editProfileForm += \ + PGPfingerprint + '">\n' + \ + '
\n' + \ ' \n' - editProfileForm += '
\n' - editProfileForm += '
\n' + translate['Following'] + '
\n' + \ + ' \n' return editProfileForm @@ -1790,30 +1789,32 @@ def _htmlEditProfileMain(displayNickname: str, bioStr: str, imageFormats = getImageFormats() editProfileForm = '
\n' - editProfileForm += ' \n' + editProfileForm += \ + ' \n' + \ '
\n' + editProfileForm += \ - ' \n' - editProfileForm += \ + ' \n' + \ ' \n' + editProfileForm += \ ' \n' - editProfileForm += \ - ' \n' + '\n' + \ + ' \n' occupationName = '' if actorJson.get('hasOccupation'): occupationName = getOccupationName(actorJson) - editProfileForm += '
\n' editProfileForm += \ + '
\n' + \ ' \n' @@ -1827,27 +1828,29 @@ def _htmlEditProfileMain(displayNickname: str, bioStr: str, ctr += 1 alsoKnownAsStr += altActor - editProfileForm += '
\n' editProfileForm += \ + '
\n' + \ ' \n' - editProfileForm += '
\n' editProfileForm += \ + '
\n' + \ ' \n' - editProfileForm += '
\n' + editProfileForm += \ + '
\n' + \ ' \n' - editProfileForm += '
\n' + editProfileForm += \ + '
\n' + \ ' \n' - editProfileForm += '
\n' + blogAddress + '">\n' + \ + ' \n' return editProfileForm @@ -1858,8 +1861,8 @@ def _htmlEditProfileTopBanner(baseDir: str, """top banner on edit profile screen """ editProfileForm = \ - '' - editProfileForm += '' + \ + '\n' editProfileForm += \ @@ -2157,7 +2160,7 @@ def _individualFollowAsHtml(translate: {}, '?options=' + followUrl + \ ';1;' + avatarUrl + '">\n' - if b == 'unfollow': + elif b == 'unfollow': buttonsStr += \ '