From 38544a8afd4133f829ab849ca4fccc9bfe79361b Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 3 Nov 2021 12:53:49 +0000 Subject: [PATCH] Show date and time at top of new reminders --- webapp_create_post.py | 41 +++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/webapp_create_post.py b/webapp_create_post.py index 5b92ac602..a74850cc3 100644 --- a/webapp_create_post.py +++ b/webapp_create_post.py @@ -200,6 +200,24 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {}, """ replyStr = '' + isNewReminder = False + if path.endswith('/newreminder'): + isNewReminder = True + + # the date and time + dateAndTimeStr = \ + '

\n' + # select a date and time for this post + dateAndTimeStr += '\n' + dateAndTimeStr += '\n' + dateAndTimeStr += '

\n' + showPublicOnDropdown = True messageBoxHeight = 400 @@ -209,7 +227,7 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {}, if not path.endswith('/newshare') and not path.endswith('/newwanted'): if not path.endswith('/newreport'): - if not inReplyTo or path.endswith('/newreminder'): + if not inReplyTo or isNewReminder: newPostText = '

' + \ translate['Write your post text below.'] + '

\n' else: @@ -351,7 +369,7 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {}, scopeIcon = 'scope_dm.png' scopeDescription = translate['DM'] endpoint = 'newdm' - elif path.endswith('/newreminder'): + elif isNewReminder: scopeIcon = 'scope_reminder.png' scopeDescription = translate['Reminder'] endpoint = 'newreminder' @@ -563,18 +581,8 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {}, 'name="schedulePost">

\n' - dateAndLocation += \ - '

\n' - # select a date and time for this post - dateAndLocation += '\n' - dateAndLocation += '\n' - dateAndLocation += '

\n' + if not isNewReminder: + dateAndLocation += dateAndTimeStr dateAndLocation += '\n' dateAndLocation += '
\n' @@ -730,6 +738,11 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {}, if not shareDescription: shareDescription = '' + + # for reminders show the date and time at the top + if path.endswith('/newreminder'): + newPostForm += dateAndTimeStr + newPostForm += \ editTextField(placeholderSubject, 'subject', shareDescription) newPostForm += ''