Less message box height for media instance

main
Bob Mottram 2019-11-28 17:35:32 +00:00
parent 5fecb6410e
commit 299b135129
2 changed files with 11 additions and 8 deletions

View File

@ -2192,7 +2192,8 @@ class PubServer(BaseHTTPRequestHandler):
self.path.endswith('/newreport') or \ self.path.endswith('/newreport') or \
self.path.endswith('/newquestion') or \ self.path.endswith('/newquestion') or \
self.path.endswith('/newshare')): self.path.endswith('/newshare')):
msg=htmlNewPost(self.server.translate, \ msg=htmlNewPost(self.server.mediaInstance, \
self.server.translate, \
self.server.baseDir, \ self.server.baseDir, \
self.path,inReplyToUrl, \ self.path,inReplyToUrl, \
replyToList, \ replyToList, \
@ -4914,7 +4915,7 @@ class PubServer(BaseHTTPRequestHandler):
if self.server.debug: if self.server.debug:
print('Sending DM to '+optionsActor) print('Sending DM to '+optionsActor)
reportPath=self.path.replace('/personoptions','')+'/newdm' reportPath=self.path.replace('/personoptions','')+'/newdm'
msg=htmlNewPost(self.server.translate, \ msg=htmlNewPost(False,self.server.translate, \
self.server.baseDir, \ self.server.baseDir, \
reportPath,None, \ reportPath,None, \
[optionsActor],None, \ [optionsActor],None, \
@ -4955,7 +4956,7 @@ class PubServer(BaseHTTPRequestHandler):
if self.server.debug: if self.server.debug:
print('Reporting '+optionsActor) print('Reporting '+optionsActor)
reportPath=self.path.replace('/personoptions','')+'/newreport' reportPath=self.path.replace('/personoptions','')+'/newreport'
msg=htmlNewPost(self.server.translate, \ msg=htmlNewPost(False,self.server.translate, \
self.server.baseDir, \ self.server.baseDir, \
reportPath,None,[], \ reportPath,None,[], \
postUrl,pageNumber).encode() postUrl,pageNumber).encode()

View File

@ -913,7 +913,7 @@ def htmlSuspended(baseDir: str) -> str:
suspendedForm+=htmlFooter() suspendedForm+=htmlFooter()
return suspendedForm return suspendedForm
def htmlNewPost(translate: {},baseDir: str, \ def htmlNewPost(mediaInstance: bool,translate: {},baseDir: str, \
path: str,inReplyTo: str, \ path: str,inReplyTo: str, \
mentions: [], \ mentions: [], \
reportUrl: str,pageNumber: int) -> str: reportUrl: str,pageNumber: int) -> str:
@ -1108,10 +1108,12 @@ def htmlNewPost(translate: {},baseDir: str, \
newPostForm+=' <input type="text" name="subject">' newPostForm+=' <input type="text" name="subject">'
newPostForm+='' newPostForm+=''
newPostForm+=' <br><label class="labels">'+placeholderMessage+'</label>' newPostForm+=' <br><label class="labels">'+placeholderMessage+'</label>'
if endpoint!='newquestion': messageBoxHeight=400
newPostForm+=' <textarea id="message" name="message" style="height:400px">'+mentionsStr+'</textarea>' if mediaInstance:
else: messageBoxHeight=200
newPostForm+=' <textarea id="message" name="message" style="height:100px">'+mentionsStr+'</textarea>' if endpoint=='newquestion':
messageBoxHeight=100
newPostForm+=' <textarea id="message" name="message" style="height:'+str(messageBoxHeight)+'px">'+mentionsStr+'</textarea>'
newPostForm+=extraFields+dateAndLocation newPostForm+=extraFields+dateAndLocation
newPostForm+=' <div class="container">' newPostForm+=' <div class="container">'
newPostForm+=' <label class="labels">'+translate['Image description']+'</label>' newPostForm+=' <label class="labels">'+translate['Image description']+'</label>'