Style of delete post confirmation screen

master
Bob Mottram 2019-08-27 14:19:42 +01:00
parent a2ec26c7d4
commit af02d7a021
1 changed files with 17 additions and 16 deletions

View File

@ -1681,24 +1681,25 @@ def htmlDeletePost(session,baseDir: str,messageId: str, \
if not os.path.isfile(baseDir+'/accounts/delete-background.png'): if not os.path.isfile(baseDir+'/accounts/delete-background.png'):
copyfile(baseDir+'/img/delete-background.png',baseDir+'/accounts/delete-background.png') copyfile(baseDir+'/img/delete-background.png',baseDir+'/accounts/delete-background.png')
deletePostStr=None
with open(baseDir+'/epicyon-profile.css', 'r') as cssFile: with open(baseDir+'/epicyon-profile.css', 'r') as cssFile:
profileStyle = cssFile.read() profileStyle = cssFile.read()
deletePostStr=htmlHeader(profileStyle) deletePostStr=htmlHeader(profileStyle)
deletePostStr='<script>'+contentWarningScript()+'</script>' deletePostStr+='<script>'+contentWarningScript()+'</script>'
deletePostStr+= \ deletePostStr+= \
individualPostAsHtml(baseDir,session,wfRequest,personCache, \ individualPostAsHtml(baseDir,session,wfRequest,personCache, \
nickname,domain,port,postJsonObject,None,True,False, \ nickname,domain,port,postJsonObject,None,True,False, \
httpPrefix,projectVersion,False,False) httpPrefix,projectVersion,False,False)
deletePostStr+='<center>' deletePostStr+='<center>'
deletePostStr+=' <p class="followText">Delete this post?</p>' deletePostStr+=' <p class="followText">Delete this post?</p>'
deletePostStr+= \ deletePostStr+= \
' <form method="POST" action="'+actor+'/rmpost">' \ ' <form method="POST" action="'+actor+'/rmpost">' \
' <input type="hidden" name="messageId" value="'+messageId+'">' \ ' <input type="hidden" name="messageId" value="'+messageId+'">' \
' <button type="submit" class="button" name="submitYes">Yes</button>' \ ' <button type="submit" class="button" name="submitYes">Yes</button>' \
' <a href="'+actor+'/inbox'+'"><button class="button">No</button></a>' \ ' <a href="'+actor+'/inbox'+'"><button class="button">No</button></a>' \
' </form>' ' </form>'
deletePostStr+='</center>' deletePostStr+='</center>'
deletePostStr+=htmlFooter() deletePostStr+=htmlFooter()
return deletePostStr return deletePostStr
def htmlFollowConfirm(baseDir: str,originPathStr: str,followActor: str,followProfileUrl: str) -> str: def htmlFollowConfirm(baseDir: str,originPathStr: str,followActor: str,followProfileUrl: str) -> str: