Share description in new post

main
Bob Mottram 2020-12-07 10:39:45 +00:00
parent 4fe227f5a0
commit 31365514ea
2 changed files with 13 additions and 6 deletions

View File

@ -1856,7 +1856,7 @@ class PubServer(BaseHTTPRequestHandler):
baseDir, baseDir,
httpPrefix, httpPrefix,
reportPath, None, reportPath, None,
[optionsActor], None, [optionsActor], None, None,
pageNumber, pageNumber,
chooserNickname, chooserNickname,
domain, domain,
@ -1925,7 +1925,7 @@ class PubServer(BaseHTTPRequestHandler):
baseDir, baseDir,
httpPrefix, httpPrefix,
reportPath, None, [], reportPath, None, [],
postUrl, pageNumber, None, postUrl, pageNumber,
chooserNickname, chooserNickname,
domain, domain,
domainFull, domainFull,
@ -8961,7 +8961,7 @@ class PubServer(BaseHTTPRequestHandler):
httpPrefix, httpPrefix,
path, inReplyToUrl, path, inReplyToUrl,
replyToList, replyToList,
shareDescription, shareDescription, None,
replyPageNumber, replyPageNumber,
nickname, domain, nickname, domain,
domainFull, domainFull,

View File

@ -167,6 +167,7 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {},
baseDir: str, httpPrefix: str, baseDir: str, httpPrefix: str,
path: str, inReplyTo: str, path: str, inReplyTo: str,
mentions: [], mentions: [],
shareDescription: str,
reportUrl: str, pageNumber: int, reportUrl: str, pageNumber: int,
nickname: str, domain: str, nickname: str, domain: str,
domainFull: str, domainFull: str,
@ -612,7 +613,7 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {},
dropdownReportSuffix += '?mention=' + mentionedActor dropdownReportSuffix += '?mention=' + mentionedActor
dropDownContent = '' dropDownContent = ''
if not reportUrl: if not reportUrl and not shareDescription:
dropDownContent = \ dropDownContent = \
htmlNewPostDropDown(scopeIcon, scopeDescription, htmlNewPostDropDown(scopeIcon, scopeDescription,
replyStr, replyStr,
@ -630,7 +631,9 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {},
dropdownEventSuffix, dropdownEventSuffix,
dropdownReportSuffix) dropdownReportSuffix)
else: else:
mentionsStr = 'Re: ' + reportUrl + '\n\n' + mentionsStr if not shareDescription:
# reporting a post to moderator
mentionsStr = 'Re: ' + reportUrl + '\n\n' + mentionsStr
newPostForm += \ newPostForm += \
'<form enctype="multipart/form-data" method="POST" ' + \ '<form enctype="multipart/form-data" method="POST" ' + \
@ -678,7 +681,11 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {},
newPostForm += \ newPostForm += \
' <label class="labels">' + placeholderSubject + '</label><br>' ' <label class="labels">' + placeholderSubject + '</label><br>'
newPostForm += ' <input type="text" name="subject">' if not shareDescription:
shareDescription = ''
newPostForm += \
' <input type="text" name="subject" value="' + \
shareDescription + '">'
newPostForm += '' newPostForm += ''
selectedStr = ' selected' selectedStr = ' selected'