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

View File

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