Link follow confirmation to search screen

master
Bob Mottram 2019-07-31 10:00:44 +01:00
parent 82a8032b6c
commit dffe45afda
2 changed files with 15 additions and 5 deletions

View File

@ -1363,6 +1363,7 @@ class PubServer(BaseHTTPRequestHandler):
return return
# remove any trailing slashes from the path # remove any trailing slashes from the path
if not self.path.endswith('confirm'):
self.path=self.path.replace('/outbox/','/outbox').replace('/inbox/','/inbox').replace('/shares/','/shares').replace('/sharedInbox/','/sharedInbox') self.path=self.path.replace('/outbox/','/outbox').replace('/inbox/','/inbox').replace('/shares/','/shares').replace('/sharedInbox/','/sharedInbox')
cookie=None cookie=None

View File

@ -768,6 +768,12 @@ def htmlProfileAfterSearch(baseDir: str,path: str,httpPrefix: str, \
profileStyle = cssFile.read().replace('image.png',profileBackgroundImage) profileStyle = cssFile.read().replace('image.png',profileBackgroundImage)
# url to return to
backUrl=path
if not backUrl.endswith('/inbox'):
backUrl+='/inbox'
print('************************ <form method="POST" action="'+backUrl+'/followconfirm">')
profileStr= \ profileStr= \
' <div class="hero-image">' \ ' <div class="hero-image">' \
' <div class="hero-text">' \ ' <div class="hero-text">' \
@ -778,10 +784,13 @@ def htmlProfileAfterSearch(baseDir: str,path: str,httpPrefix: str, \
' </div>' \ ' </div>' \
'</div>'+ \ '</div>'+ \
'<div class="container">\n' \ '<div class="container">\n' \
' <form method="POST" action="'+backUrl+'/followconfirm">' \
' <center>' \ ' <center>' \
' <a href="'+path+'"><button class="button"><span>Follow </span></button></a>' \ ' <input type="hidden" name="actor" value="'+personUrl+'">' \
' <a href="'+path+'"><button class="button"><span>Go Back </span></button></a>' \ ' <button type="submit" class="button" name="submitYes">Follow</button>' \
' <a href="'+backUrl+'"><button class="button">Go Back</button></a>' \
' </center>' \ ' </center>' \
' </form>' \
'</div>' '</div>'
result = [] result = []