From d2381eb389a65b8bf45f79228e22481f840ef8e1 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 27 Jun 2021 21:11:41 +0100 Subject: [PATCH] Function for contact info on edit profile screen --- webapp_profile.py | 147 +++++++++++++++++++++++++++------------------- 1 file changed, 88 insertions(+), 59 deletions(-) diff --git a/webapp_profile.py b/webapp_profile.py index b548e9524..27fb2e562 100644 --- a/webapp_profile.py +++ b/webapp_profile.py @@ -1651,6 +1651,88 @@ def _htmlEditProfileBackground(newsInstance: bool, translate: {}) -> str: return editProfileForm +def _htmlEditProfileContactInfo(nickname: str, + emailAddress: str, + xmppAddress: str, + matrixAddress: str, + ssbAddress: str, + toxAddress: str, + briarAddress: str, + jamiAddress: str, + cwtchAddress: str, + PGPfingerprint: str, + PGPpubKey: str, + translate: {}) -> str: + """Contact Information section of edit profile screen + """ + editProfileForm = '
' + \ + translate['Contact Details'] + '\n' + editProfileForm += '
' + editProfileForm += '
\n' + editProfileForm += \ + ' \n' + editProfileForm += \ + '
\n' + editProfileForm += \ + ' \n' + editProfileForm += '
\n' + editProfileForm += \ + ' \n' + + editProfileForm += '
\n' + editProfileForm += \ + ' \n' + + editProfileForm += '
\n' + editProfileForm += \ + ' \n' + + editProfileForm += '
\n' + editProfileForm += \ + ' \n' + + editProfileForm += '
\n' + editProfileForm += \ + ' \n' + + editProfileForm += '
\n' + editProfileForm += \ + ' \n' + + editProfileForm += \ + '
\n' + editProfileForm += \ + ' \n' + editProfileForm += \ + '
\n' + editProfileForm += \ + ' \n' + editProfileForm += '
\n' + editProfileForm += '
\n' + return editProfileForm + + +def _htmlEditProfileOptions(translate: {}) -> str: + """option checkboxes section of edit profile screen + """ + + def htmlEditProfile(cssCache: {}, translate: {}, baseDir: str, path: str, domain: str, port: int, httpPrefix: str, defaultTimeline: str, theme: str, @@ -1922,66 +2004,13 @@ def htmlEditProfile(cssCache: {}, translate: {}, baseDir: str, path: str, editProfileForm += ' \n' # Contact information - editProfileForm += '
' + \ - translate['Contact Details'] + '\n' - editProfileForm += '
' - editProfileForm += '
\n' editProfileForm += \ - ' \n' - editProfileForm += \ - '
\n' - editProfileForm += \ - ' \n' - editProfileForm += '
\n' - editProfileForm += \ - ' \n' - - editProfileForm += '
\n' - editProfileForm += \ - ' \n' - - editProfileForm += '
\n' - editProfileForm += \ - ' \n' - - editProfileForm += '
\n' - editProfileForm += \ - ' \n' - - editProfileForm += '
\n' - editProfileForm += \ - ' \n' - - editProfileForm += '
\n' - editProfileForm += \ - ' \n' - - editProfileForm += \ - '
\n' - editProfileForm += \ - ' \n' - editProfileForm += \ - '
\n' - editProfileForm += \ - ' \n' - editProfileForm += '
\n' - editProfileForm += '
\n' + _htmlEditProfileContactInfo(nickname, emailAddress, + xmppAddress, matrixAddress, + ssbAddress, toxAddress, + briarAddress, jamiAddress, + cwtchAddress, PGPfingerprint, + PGPpubKey, translate) # Customize images and banners editProfileForm += _htmlEditProfileBackground(newsInstance, translate)