Option to disable replies on posts

merge-requests/30/head
Bob Mottram 2020-08-21 20:51:35 +01:00
parent 109caa2d5d
commit b619533866
17 changed files with 38 additions and 16 deletions

View File

@ -5490,11 +5490,13 @@ class PubServer(BaseHTTPRequestHandler):
fields['subject'] = None fields['subject'] = None
if not fields.get('replyTo'): if not fields.get('replyTo'):
fields['replyTo'] = None fields['replyTo'] = None
if not fields.get('schedulePost'): if not fields.get('schedulePost'):
fields['schedulePost'] = False fields['schedulePost'] = False
else: else:
fields['schedulePost'] = True fields['schedulePost'] = True
print('DEBUG: shedulePost ' + str(fields['schedulePost'])) print('DEBUG: shedulePost ' + str(fields['schedulePost']))
if not fields.get('eventDate'): if not fields.get('eventDate'):
fields['eventDate'] = None fields['eventDate'] = None
if not fields.get('eventTime'): if not fields.get('eventTime'):
@ -5520,7 +5522,7 @@ class PubServer(BaseHTTPRequestHandler):
if fields.get('mentions'): if fields.get('mentions'):
mentionsStr = fields['mentions'].strip() + ' ' mentionsStr = fields['mentions'].strip() + ' '
commentsEnabled = True commentsEnabled = True
if fields.get('commentsEnabled'): if 'commentsEnabled' in fields:
commentsEnabled = fields['commentsEnabled'] commentsEnabled = fields['commentsEnabled']
if postType == 'newpost': if postType == 'newpost':
messageJson = \ messageJson = \

View File

@ -255,5 +255,6 @@
"Liked by": "نال إعجاب", "Liked by": "نال إعجاب",
"Solidaric": "تضامن", "Solidaric": "تضامن",
"YouTube Replacement Domain": "استبدال نطاق يوتيوب", "YouTube Replacement Domain": "استبدال نطاق يوتيوب",
"Notes": "ملاحظات" "Notes": "ملاحظات",
"Allow replies.": "السماح بالردود."
} }

View File

@ -255,5 +255,6 @@
"Liked by": "M'agrada", "Liked by": "M'agrada",
"Solidaric": "Solidaritat", "Solidaric": "Solidaritat",
"YouTube Replacement Domain": "Domini de substitució de YouTube", "YouTube Replacement Domain": "Domini de substitució de YouTube",
"Notes": "Notes" "Notes": "Notes",
"Allow replies.": "Permetre respostes."
} }

View File

@ -255,5 +255,6 @@
"Liked by": "Hoffi", "Liked by": "Hoffi",
"Solidaric": "Undod", "Solidaric": "Undod",
"YouTube Replacement Domain": "Parth Amnewid YouTube", "YouTube Replacement Domain": "Parth Amnewid YouTube",
"Notes": "Nodiadau" "Notes": "Nodiadau",
"Allow replies.": "Caniatáu atebion."
} }

View File

@ -255,5 +255,6 @@
"Liked by": "Gefallen von", "Liked by": "Gefallen von",
"Solidaric": "Solidarität", "Solidaric": "Solidarität",
"YouTube Replacement Domain": "YouTube-Ersatzdomain", "YouTube Replacement Domain": "YouTube-Ersatzdomain",
"Notes": "Anmerkungen" "Notes": "Anmerkungen",
"Allow replies.": "Antworten zulassen."
} }

View File

@ -255,5 +255,6 @@
"Liked by": "Liked by", "Liked by": "Liked by",
"Solidaric": "Solidaric", "Solidaric": "Solidaric",
"YouTube Replacement Domain": "YouTube Replacement Domain", "YouTube Replacement Domain": "YouTube Replacement Domain",
"Notes": "Notes" "Notes": "Notes",
"Allow replies.": "Allow replies."
} }

View File

@ -255,5 +255,6 @@
"Liked by": "Apreciado por", "Liked by": "Apreciado por",
"Solidaric": "Solidaridad", "Solidaric": "Solidaridad",
"YouTube Replacement Domain": "Dominio de reemplazo de YouTube", "YouTube Replacement Domain": "Dominio de reemplazo de YouTube",
"Notes": "Notas" "Notes": "Notas",
"Allow replies.": "Permitir respuestas."
} }

View File

@ -255,5 +255,6 @@
"Liked by": "Aimé par", "Liked by": "Aimé par",
"Solidaric": "Solidarité", "Solidaric": "Solidarité",
"YouTube Replacement Domain": "Domaine de remplacement YouTube", "YouTube Replacement Domain": "Domaine de remplacement YouTube",
"Notes": "Remarques" "Notes": "Remarques",
"Allow replies.": "Autoriser les réponses."
} }

View File

@ -255,5 +255,6 @@
"Liked by": "Thaitin", "Liked by": "Thaitin",
"Solidaric": "Dlúthpháirtíocht", "Solidaric": "Dlúthpháirtíocht",
"YouTube Replacement Domain": "Fearann Athsholáthair YouTube", "YouTube Replacement Domain": "Fearann Athsholáthair YouTube",
"Notes": "Nótaí" "Notes": "Nótaí",
"Allow replies.": "Ceadaigh freagraí."
} }

View File

@ -255,5 +255,6 @@
"Liked by": "द्वारा पसंद किया गया", "Liked by": "द्वारा पसंद किया गया",
"Solidaric": "एकजुटता", "Solidaric": "एकजुटता",
"YouTube Replacement Domain": "YouTube रिप्लेसमेंट डोमेन", "YouTube Replacement Domain": "YouTube रिप्लेसमेंट डोमेन",
"Notes": "टिप्पणियाँ" "Notes": "टिप्पणियाँ",
"Allow replies.": "जवाब दें।"
} }

View File

@ -255,5 +255,6 @@
"Liked by": "Mi è piaciuto", "Liked by": "Mi è piaciuto",
"Solidaric": "Solidarietà", "Solidaric": "Solidarietà",
"YouTube Replacement Domain": "Dominio sostitutivo di YouTube", "YouTube Replacement Domain": "Dominio sostitutivo di YouTube",
"Notes": "Appunti" "Notes": "Appunti",
"Allow replies.": "Consenti risposte."
} }

View File

@ -255,5 +255,6 @@
"Liked by": "好き", "Liked by": "好き",
"Solidaric": "連帯", "Solidaric": "連帯",
"YouTube Replacement Domain": "YouTube交換ドメイン", "YouTube Replacement Domain": "YouTube交換ドメイン",
"Notes": "ノート" "Notes": "ノート",
"Allow replies.": "返信を許可します。"
} }

View File

@ -251,5 +251,6 @@
"Liked by": "Liked by", "Liked by": "Liked by",
"Solidaric": "Solidaric", "Solidaric": "Solidaric",
"YouTube Replacement Domain": "YouTube Replacement Domain", "YouTube Replacement Domain": "YouTube Replacement Domain",
"Notes": "Notes" "Notes": "Notes",
"Allow replies.": "Allow replies."
} }

View File

@ -255,5 +255,6 @@
"Liked by": "Curtida por", "Liked by": "Curtida por",
"Solidaric": "Solidariedade", "Solidaric": "Solidariedade",
"YouTube Replacement Domain": "Domínio de substituição do YouTube", "YouTube Replacement Domain": "Domínio de substituição do YouTube",
"Notes": "Notas" "Notes": "Notas",
"Allow replies.": "Permitir respostas."
} }

View File

@ -255,5 +255,6 @@
"Liked by": "Понравилось", "Liked by": "Понравилось",
"Solidaric": "солидарность", "Solidaric": "солидарность",
"YouTube Replacement Domain": "Запасной домен YouTube", "YouTube Replacement Domain": "Запасной домен YouTube",
"Notes": "Ноты" "Notes": "Ноты",
"Allow replies.": "Разрешить ответы."
} }

View File

@ -255,5 +255,6 @@
"Liked by": "喜欢的人", "Liked by": "喜欢的人",
"Solidaric": "团结互助", "Solidaric": "团结互助",
"YouTube Replacement Domain": "YouTube替换域", "YouTube Replacement Domain": "YouTube替换域",
"Notes": "笔记" "Notes": "笔记",
"Allow replies.": "允许回复。"
} }

View File

@ -2029,6 +2029,11 @@ def htmlNewPost(mediaInstance: bool, translate: {},
endpoint != 'newquestion': endpoint != 'newquestion':
dateAndLocation = '<div class="container">' dateAndLocation = '<div class="container">'
dateAndLocation += \
'<p><input type="checkbox" class="profilecheckbox" ' + \
'name="commentsEnabled" checked><label class="labels"> ' + \
translate['Allow replies.'] + '</label></p>\n'
if not inReplyTo: if not inReplyTo:
dateAndLocation += \ dateAndLocation += \
'<p><input type="checkbox" class="profilecheckbox" ' + \ '<p><input type="checkbox" class="profilecheckbox" ' + \