diff --git a/daemon.py b/daemon.py index c11e4c549..f6330eadf 100644 --- a/daemon.py +++ b/daemon.py @@ -5525,6 +5525,10 @@ class PubServer(BaseHTTPRequestHandler): commentsEnabled = False else: commentsEnabled = True + if not fields.get('privateEvent'): + privateEvent = False + else: + privateEvent = True if postType == 'newpost': messageJson = \ createPublicPost(self.server.baseDir, @@ -5744,7 +5748,7 @@ class PubServer(BaseHTTPRequestHandler): self.server.port, self.server.httpPrefix, mentionsStr + fields['message'], - fields['followersOnlyEvent'], + privateEvent, False, False, commentsEnabled, filename, attachmentMediaType, fields['imageDescription'], diff --git a/translations/ar.json b/translations/ar.json index 9968a7e63..0179e241b 100644 --- a/translations/ar.json +++ b/translations/ar.json @@ -258,5 +258,15 @@ "Notes": "ملاحظات", "Allow replies.": "السماح بالردود.", "Event": "حدث", - "Create an event": "أنشئ حدثًا" + "Create an event": "أنشئ حدثًا", + "Describe the event": "صف الحدث", + "Start Date": "تاريخ البدء", + "End Date": "تاريخ الانتهاء", + "Categories": "التصنيفات", + "This is a private event.": "هذا هو الحدث الخاص.", + "Allow anonymous participation.": "السماح بالمشاركة المجهولة.", + "Anyone can join": "يمكن لأي شخص الانضمام", + "Apply to join": "تقديم طلب للانضمام", + "Invitation only": "المدعوون فقط", + "Joining": "انضمام" } diff --git a/translations/ca.json b/translations/ca.json index 1f670ff2a..4e552fabc 100644 --- a/translations/ca.json +++ b/translations/ca.json @@ -258,5 +258,15 @@ "Notes": "Notes", "Allow replies.": "Permetre respostes.", "Event": "Esdeveniment", - "Create an event": "Crea un esdeveniment" + "Create an event": "Crea un esdeveniment", + "Describe the event": "Descriviu l’esdeveniment", + "Start Date": "Data d'inici", + "End Date": "Data de finalització", + "Categories": "Categories", + "This is a private event.": "Aquest és un esdeveniment privat.", + "Allow anonymous participation.": "Permet una participació anònima.", + "Anyone can join": "Qualsevol persona s’hi pot apuntar", + "Apply to join": "Sol·liciteu participar", + "Invitation only": "Només invitació", + "Joining": "Unir-se" } diff --git a/translations/cy.json b/translations/cy.json index 2d148bceb..c1a47db05 100644 --- a/translations/cy.json +++ b/translations/cy.json @@ -258,5 +258,15 @@ "Notes": "Nodiadau", "Allow replies.": "Caniatáu atebion.", "Event": "Digwyddiad", - "Create an event": "Creu digwyddiad" + "Create an event": "Creu digwyddiad", + "Describe the event": "Disgrifiwch y digwyddiad", + "Start Date": "Dyddiad cychwyn", + "End Date": "Dyddiad Gorffen", + "Categories": "Categorïau", + "This is a private event.": "Digwyddiad preifat yw hwn.", + "Allow anonymous participation.": "Caniatáu cyfranogiad dienw.", + "Anyone can join": "Gall unrhyw un ymuno", + "Apply to join": "Gwnewch gais i ymuno", + "Invitation only": "Gwahoddiad yn unig", + "Joining": "Yn ymuno" } diff --git a/translations/de.json b/translations/de.json index 16773b7ca..d3a67ebbb 100644 --- a/translations/de.json +++ b/translations/de.json @@ -258,5 +258,15 @@ "Notes": "Anmerkungen", "Allow replies.": "Antworten zulassen.", "Event": "Veranstaltung", - "Create an event": "Erstellen Sie ein Ereignis" + "Create an event": "Erstellen Sie ein Ereignis", + "Describe the event": "Beschreiben Sie das Ereignis", + "Start Date": "Anfangsdatum", + "End Date": "Endtermin", + "Categories": "Kategorien", + "This is a private event.": "Dies ist eine private Veranstaltung.", + "Allow anonymous participation.": "Anonyme Teilnahme zulassen.", + "Anyone can join": "Jeder kann mitmachen", + "Apply to join": "Sich anmelden um teilzunehmen", + "Invitation only": "Nur Einladungen", + "Joining": "Beitritt" } diff --git a/translations/en.json b/translations/en.json index 955c3f67d..f06e079aa 100644 --- a/translations/en.json +++ b/translations/en.json @@ -258,5 +258,15 @@ "Notes": "Notes", "Allow replies.": "Allow replies.", "Event": "Event", - "Create an event": "Create an event" + "Create an event": "Create an event", + "Describe the event": "Describe the event", + "Start Date": "Start Date", + "End Date": "End Date", + "Categories": "Categories", + "This is a private event.": "This is a private event.", + "Allow anonymous participation.": "Allow anonymous participation.", + "Anyone can join": "Anyone can join", + "Apply to join": "Apply to join", + "Invitation only": "Invitation only", + "Joining": "Joining" } diff --git a/translations/es.json b/translations/es.json index c960362c2..992e086c4 100644 --- a/translations/es.json +++ b/translations/es.json @@ -258,5 +258,15 @@ "Notes": "Notas", "Allow replies.": "Permitir respuestas.", "Event": "Evento", - "Create an event": "Crea un evento" + "Create an event": "Crea un evento", + "Describe the event": "Describe el evento", + "Start Date": "Fecha de inicio", + "End Date": "Fecha final", + "Categories": "Categorías", + "This is a private event.": "Este es un evento privado.", + "Allow anonymous participation.": "Permitir la participación anónima.", + "Anyone can join": "Cualquiera puede unirse", + "Apply to join": "Aplica para unirte", + "Invitation only": "Sólo con Invitación", + "Joining": "Unión" } diff --git a/translations/fr.json b/translations/fr.json index 003cef88f..2b0595501 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -258,5 +258,15 @@ "Notes": "Remarques", "Allow replies.": "Autoriser les réponses.", "Event": "un événement", - "Create an event": "Créer un événement" + "Create an event": "Créer un événement", + "Describe the event": "Décrivez l'événement", + "Start Date": "Date de début", + "End Date": "Date de fin", + "Categories": "Catégories", + "This is a private event.": "Ceci est un événement privé.", + "Allow anonymous participation.": "Autorisez la participation anonyme.", + "Anyone can join": "Tout le monde peut joindre", + "Apply to join": "Postuler pour rejoindre", + "Invitation only": "Invitation uniquement", + "Joining": "Joindre" } diff --git a/translations/ga.json b/translations/ga.json index 2e6981a58..012cd2573 100644 --- a/translations/ga.json +++ b/translations/ga.json @@ -258,5 +258,15 @@ "Notes": "Nótaí", "Allow replies.": "Ceadaigh freagraí.", "Event": "Imeacht", - "Create an event": "Cruthaigh imeacht" + "Create an event": "Cruthaigh imeacht", + "Describe the event": "Déan cur síos ar an ócáid", + "Start Date": "Dáta tosaigh", + "End Date": "Dáta deiridh", + "Categories": "Catagóirí", + "This is a private event.": "Is ócáid phríobháideach é seo.", + "Allow anonymous participation.": "Lig rannpháirtíocht gan ainm.", + "Anyone can join": "Is féidir le duine ar bith a bheith páirteach", + "Apply to join": "Déan iarratas ar bhallraíocht", + "Invitation only": "Cuireadh amháin", + "Joining": "Ag teacht le chéile" } diff --git a/translations/hi.json b/translations/hi.json index 85f5690a4..94f61656b 100644 --- a/translations/hi.json +++ b/translations/hi.json @@ -258,5 +258,15 @@ "Notes": "टिप्पणियाँ", "Allow replies.": "जवाब दें।", "Event": "प्रतिस्पर्धा", - "Create an event": "एक घटना बनाएँ" + "Create an event": "एक घटना बनाएँ", + "Describe the event": "घटना का वर्णन करें", + "Start Date": "आरंभ करने की तिथि", + "End Date": "अंतिम तिथि", + "Categories": "श्रेणियाँ", + "This is a private event.": "यह एक निजी कार्यक्रम है।", + "Allow anonymous participation.": "अनाम भागीदारी की अनुमति दें।", + "Anyone can join": "कोई भी शामिल हो सकता है", + "Apply to join": "जुड़ने के लिए आवेदन करें", + "Invitation only": "केवल आमंत्रण", + "Joining": "में शामिल होने से" } diff --git a/translations/it.json b/translations/it.json index 24c974117..a09cee381 100644 --- a/translations/it.json +++ b/translations/it.json @@ -258,5 +258,15 @@ "Notes": "Appunti", "Allow replies.": "Consenti risposte.", "Event": "Evento", - "Create an event": "Crea un evento" + "Create an event": "Crea un evento", + "Describe the event": "Descrivi l'evento", + "Start Date": "Data d'inizio", + "End Date": "Data di fine", + "Categories": "Categorie", + "This is a private event.": "Questo è un evento privato.", + "Allow anonymous participation.": "Consenti la partecipazione anonima.", + "Anyone can join": "Chiunque può partecipare", + "Apply to join": "Richiedi di partecipare", + "Invitation only": "Solo su invito", + "Joining": "Partecipare" } diff --git a/translations/ja.json b/translations/ja.json index f565dcef0..e20f14b75 100644 --- a/translations/ja.json +++ b/translations/ja.json @@ -258,5 +258,15 @@ "Notes": "ノート", "Allow replies.": "返信を許可します。", "Event": "イベント", - "Create an event": "イベントを作成する" + "Create an event": "イベントを作成する", + "Describe the event": "イベントについて説明する", + "Start Date": "開始日", + "End Date": "終了日", + "Categories": "カテゴリー", + "This is a private event.": "これはプライベートイベントです。", + "Allow anonymous participation.": "匿名参加を許可します。", + "Anyone can join": "誰でも参加できます", + "Apply to join": "参加を申し込む", + "Invitation only": "招待のみ", + "Joining": "接合" } diff --git a/translations/oc.json b/translations/oc.json index 264644983..7c9a8d627 100644 --- a/translations/oc.json +++ b/translations/oc.json @@ -254,5 +254,15 @@ "Notes": "Notes", "Allow replies.": "Allow replies.", "Event": "Event", - "Create an event": "Create an event" + "Create an event": "Create an event", + "Describe the event": "Describe the event", + "Start Date": "Start Date", + "End Date": "End Date", + "Categories": "Categories", + "This is a private event.": "This is a private event.", + "Allow anonymous participation.": "Allow anonymous participation.", + "Anyone can join": "Anyone can join", + "Apply to join": "Apply to join", + "Invitation only": "Invitation only", + "Joining": "Joining" } diff --git a/translations/pt.json b/translations/pt.json index f7cd8b5dd..605d44783 100644 --- a/translations/pt.json +++ b/translations/pt.json @@ -258,5 +258,15 @@ "Notes": "Notas", "Allow replies.": "Permitir respostas.", "Event": "Evento", - "Create an event": "Crie um evento" + "Create an event": "Crie um evento", + "Describe the event": "Descreva o evento", + "Start Date": "Data de início", + "End Date": "Data final", + "Categories": "Categorias", + "This is a private event.": "Este é um evento privado.", + "Allow anonymous participation.": "Permita a participação anônima.", + "Anyone can join": "Qualquer um pode participar", + "Apply to join": "Aplicar para participar", + "Invitation only": "Somente para convidados", + "Joining": "Juntando" } diff --git a/translations/ru.json b/translations/ru.json index e48c01d39..f85f966f2 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -258,5 +258,15 @@ "Notes": "Ноты", "Allow replies.": "Разрешить ответы.", "Event": "Мероприятие", - "Create an event": "Создать мероприятие" + "Create an event": "Создать мероприятие", + "Describe the event": "Опишите событие", + "Start Date": "Дата начала", + "End Date": "Дата окончания", + "Categories": "Категории", + "This is a private event.": "Это частное мероприятие.", + "Allow anonymous participation.": "Разрешить анонимное участие.", + "Anyone can join": "Каждый может присоединиться", + "Apply to join": "Подать заявку на присоединение", + "Invitation only": "Только приглашение", + "Joining": "Присоединение" } diff --git a/translations/zh.json b/translations/zh.json index 18bdeba70..c3319d02c 100644 --- a/translations/zh.json +++ b/translations/zh.json @@ -258,5 +258,15 @@ "Notes": "笔记", "Allow replies.": "允许回复。", "Event": "事件", - "Create an event": "建立活动" + "Create an event": "建立活动", + "Describe the event": "描述事件", + "Start Date": "开始日期", + "End Date": "结束日期", + "Categories": "分类目录", + "This is a private event.": "这是私人活动。", + "Allow anonymous participation.": "允许匿名参与。", + "Anyone can join": "任何人都可以加入", + "Apply to join": "申请加入", + "Invitation only": "仅邀请", + "Joining": "加盟" } diff --git a/webinterface.py b/webinterface.py index 465a4abfb..abb5fee78 100644 --- a/webinterface.py +++ b/webinterface.py @@ -1920,6 +1920,7 @@ def htmlNewPost(mediaInstance: bool, translate: {}, pathBase = path.replace('/newreport', '').replace('/newpost', '') pathBase = pathBase.replace('/newblog', '').replace('/newshare', '') pathBase = pathBase.replace('/newunlisted', '') + pathBase = pathBase.replace('/newevent', '') pathBase = pathBase.replace('/newreminder', '') pathBase = pathBase.replace('/newfollowers', '').replace('/newdm', '') @@ -1969,6 +1970,12 @@ def htmlNewPost(mediaInstance: bool, translate: {}, scopeIcon = 'scope_reminder.png' scopeDescription = translate['Reminder'] endpoint = 'newreminder' + elif path.endswith('/newevent'): + scopeIcon = 'scope_event.png' + scopeDescription = translate['Event'] + endpoint = 'newevent' + placeholderSubject = translate['Title'] + '...' + placeholderMessage = translate['Describe the event'] + '...' elif path.endswith('/newreport'): scopeIcon = 'scope_report.png' scopeDescription = translate['Report'] @@ -2029,12 +2036,25 @@ def htmlNewPost(mediaInstance: bool, translate: {}, endpoint != 'newquestion': dateAndLocation = '
' - dateAndLocation += \ - '

\n' + if endpoint == 'newevent': + # Event posts don't allow replies - they're just an announcement. + # They also have a few more checkboxes + dateAndLocation += \ + '

\n' + dateAndLocation += \ + '

' + \ + '

\n' + else: + dateAndLocation += \ + '

\n' - if not inReplyTo: + if not inReplyTo and endpoint != 'newevent': dateAndLocation += \ '

\n' - dateAndLocation += '\n' - dateAndLocation += '\n' - dateAndLocation += '

\n' + + if endpoint != 'newevent': + # select a date and time for this post + dateAndLocation += '\n' + dateAndLocation += '\n' + dateAndLocation += '

\n' + else: + # select start time for the event + dateAndLocation += '\n' + dateAndLocation += '\n' + dateAndLocation += '

\n' + # select end time for the event + dateAndLocation += \ + '

\n' + dateAndLocation += '\n' + dateAndLocation += '\n' + dateAndLocation += '

\n' + dateAndLocation += '
\n' dateAndLocation += '
\n' dateAndLocation += '
\n' dateAndLocation += '\n' + if endpoint == 'newevent': + dateAndLocation += '
\n' + dateAndLocation += '\n' dateAndLocation += '
\n' newPostForm = htmlHeader(cssFilename, newPostCSS)