Rearrange welcome profile

main
Bob Mottram 2021-02-25 12:24:26 +00:00
parent 5787565961
commit c62283c60a
1 changed files with 19 additions and 17 deletions

View File

@ -71,6 +71,25 @@ def htmlWelcomeProfile(baseDir: str, nickname: str, domain: str,
profileForm += 'accept="' + imageFormats + '">\n' profileForm += 'accept="' + imageFormats + '">\n'
profileForm += '</center>\n' profileForm += '</center>\n'
actorFilename = baseDir + '/accounts/' + nickname + '@' + domain + '.json'
actorJson = loadJson(actorFilename)
displayNickname = actorJson['name']
profileForm += ' <label class="labels">' + \
translate['Nickname'] + '</label><br>\n'
profileForm += ' <input type="text" name="displayNickname" value="' + \
displayNickname + '"><br>\n'
profileForm += '<center>\n'
bioStr = \
actorJson['summary'].replace('<p>', '').replace('</p>', '')
profileForm += ' <label class="labels">' + \
translate['Your bio'] + '</label><br>\n'
profileForm += ' <textarea id="message" name="bio" ' + \
'style="height:200px">' + bioStr + '</textarea>\n'
profileForm += '</center>\n'
profileForm += '<div class="container">' + profileText + '</div>\n' profileForm += '<div class="container">' + profileText + '</div>\n'
profileForm += ' <div class="container next">\n' profileForm += ' <div class="container next">\n'
profileForm += \ profileForm += \
@ -82,23 +101,6 @@ def htmlWelcomeProfile(baseDir: str, nickname: str, domain: str,
profileForm += ' </div>\n' profileForm += ' </div>\n'
profileForm += '</div>\n' profileForm += '</div>\n'
actorFilename = baseDir + '/accounts/' + nickname + '@' + domain + '.json'
actorJson = loadJson(actorFilename)
displayNickname = actorJson['name']
profileForm += ' <label class="labels">' + \
translate['Nickname'] + '</label>\n'
profileForm += ' <input type="text" name="displayNickname" value="' + \
displayNickname + '"><br>\n'
profileForm += '<center>\n'
bioStr = \
actorJson['summary'].replace('<p>', '').replace('</p>', '')
profileForm += ' <label class="labels">' + \
translate['Your bio'] + '</label>\n'
profileForm += ' <textarea id="message" name="bio" ' + \
'style="height:200px">' + bioStr + '</textarea>\n'
profileForm += '</center>\n'
profileForm += '</form>\n' profileForm += '</form>\n'
profileForm += htmlFooter() profileForm += htmlFooter()
return profileForm return profileForm