Adding new event screen

merge-requests/8/head
Bob Mottram 2020-08-22 14:40:48 +01:00
parent f095ff958f
commit 385b37ed4a
17 changed files with 231 additions and 27 deletions

View File

@ -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'],

View File

@ -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": "انضمام"
}

View File

@ -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 lesdeveniment",
"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 shi pot apuntar",
"Apply to join": "Sol·liciteu participar",
"Invitation only": "Només invitació",
"Joining": "Unir-se"
}

View File

@ -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"
}

View File

@ -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"
}

View File

@ -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"
}

View File

@ -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"
}

View File

@ -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"
}

View File

@ -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"
}

View File

@ -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": "में शामिल होने से"
}

View File

@ -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"
}

View File

@ -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": "接合"
}

View File

@ -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"
}

View File

@ -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"
}

View File

@ -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": "Присоединение"
}

View File

@ -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": "加盟"
}

View File

@ -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 = '<div class="container">'
dateAndLocation += \
'<p><input type="checkbox" class="profilecheckbox" ' + \
'name="commentsEnabled" checked><label class="labels"> ' + \
translate['Allow replies.'] + '</label></p>\n'
if endpoint == 'newevent':
# Event posts don't allow replies - they're just an announcement.
# They also have a few more checkboxes
dateAndLocation += \
'<p><input type="checkbox" class="profilecheckbox" ' + \
'name="privateEvent"><label class="labels"> ' + \
translate['This is a private event.'] + '</label></p>\n'
dateAndLocation += \
'<p><input type="checkbox" class="profilecheckbox" ' + \
'name="anonymousParticipationEnabled">' + \
'<label class="labels"> ' + \
translate['Allow anonymous participation.'] + '</label></p>\n'
else:
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 and endpoint != 'newevent':
dateAndLocation += \
'<p><input type="checkbox" class="profilecheckbox" ' + \
'name="schedulePost"><label class="labels"> ' + \
@ -2044,17 +2064,47 @@ def htmlNewPost(mediaInstance: bool, translate: {},
'<p><img loading="lazy" alt="" title="" ' + \
'class="emojicalendar" src="/' + \
iconsDir + '/calendar.png"/>\n'
dateAndLocation += '<label class="labels">' + \
translate['Date'] + ': </label>\n'
dateAndLocation += '<input type="date" name="eventDate">\n'
dateAndLocation += '<label class="labelsright">' + \
translate['Time'] + ':'
dateAndLocation += '<input type="time" name="eventTime"></label></p>\n'
if endpoint != 'newevent':
# select a date and time for this post
dateAndLocation += '<label class="labels">' + \
translate['Date'] + ': </label>\n'
dateAndLocation += '<input type="date" name="eventDate">\n'
dateAndLocation += '<label class="labelsright">' + \
translate['Time'] + ':'
dateAndLocation += \
'<input type="time" name="eventTime"></label></p>\n'
else:
# select start time for the event
dateAndLocation += '<label class="labels">' + \
translate['Start Date'] + ': </label>\n'
dateAndLocation += '<input type="date" name="eventDate">\n'
dateAndLocation += '<label class="labelsright">' + \
translate['Time'] + ':'
dateAndLocation += \
'<input type="time" name="eventTime"></label></p>\n'
# select end time for the event
dateAndLocation += \
'<p><img loading="lazy" alt="" title="" ' + \
'class="emojicalendar" src="/' + \
iconsDir + '/calendar.png"/>\n'
dateAndLocation += '<label class="labels">' + \
translate['End Date'] + ': </label>\n'
dateAndLocation += '<input type="date" name="endDate">\n'
dateAndLocation += '<label class="labelsright">' + \
translate['End Time'] + ':'
dateAndLocation += \
'<input type="time" name="endTime"></label></p>\n'
dateAndLocation += '</div>\n'
dateAndLocation += '<div class="container">\n'
dateAndLocation += '<br><label class="labels">' + \
translate['Location'] + ': </label>\n'
dateAndLocation += '<input type="text" name="location">\n'
if endpoint == 'newevent':
dateAndLocation += '<br><label class="labels">' + \
translate['Categories'] + ': </label>\n'
dateAndLocation += '<input type="text" name="category">\n'
dateAndLocation += '</div>\n'
newPostForm = htmlHeader(cssFilename, newPostCSS)