Set registrations status from web interface

main
Bob Mottram 2022-12-05 14:34:19 +00:00
parent a200d65bf8
commit b02a56be19
28 changed files with 79 additions and 28 deletions

View File

@ -6357,6 +6357,24 @@ class PubServer(BaseHTTPRequestHandler):
set_config_param(base_dir, 'customSubmitText',
'')
# change registrations open status
registrations_open = False
if self.server.registration or \
get_config_param(base_dir,
"registration") == 'open':
registrations_open = True
if fields.get('regOpen'):
if fields['regOpen'] != registrations_open:
registrations_open = fields['regOpen']
set_config_param(base_dir, 'registration',
'open')
self.server.registration = True
else:
if registrations_open:
set_config_param(base_dir, 'registration',
'closed')
self.server.registration = False
# libretranslate URL
curr_libretranslate_url = \
get_config_param(base_dir,

View File

@ -605,5 +605,6 @@
"Reverse timelines": "عكس الجداول الزمنية",
"Moved": "انتقل",
"Move": "يتحرك",
"Inactive": "غير نشط"
"Inactive": "غير نشط",
"Registrations open": "التسجيلات مفتوحة"
}

View File

@ -605,5 +605,6 @@
"Reverse timelines": "বিপরীত সময়রেখা",
"Moved": "সরানো হয়েছে",
"Move": "সরান",
"Inactive": "নিষ্ক্রিয়"
"Inactive": "নিষ্ক্রিয়",
"Registrations open": "রেজিস্ট্রেশন খোলা"
}

View File

@ -605,5 +605,6 @@
"Reverse timelines": "Cronologia inversa",
"Moved": "Mogut",
"Move": "Moure's",
"Inactive": "Inactiu"
"Inactive": "Inactiu",
"Registrations open": "Inscripcions obertes"
}

View File

@ -605,5 +605,6 @@
"Reverse timelines": "Gwrthdroi llinellau amser",
"Moved": "Wedi symud",
"Move": "Symud",
"Inactive": "Anactif"
"Inactive": "Anactif",
"Registrations open": "Cofrestriadau yn agor"
}

View File

@ -605,5 +605,6 @@
"Reverse timelines": "Umgekehrte Zeitlinien",
"Moved": "Gerührt",
"Move": "Bewegen",
"Inactive": "Inaktiv"
"Inactive": "Inaktiv",
"Registrations open": "Anmeldungen geöffnet"
}

View File

@ -605,5 +605,6 @@
"Reverse timelines": "Αντίστροφα χρονοδιαγράμματα",
"Moved": "Μετακινήθηκε",
"Move": "Κίνηση",
"Inactive": "Αδρανής"
"Inactive": "Αδρανής",
"Registrations open": "Οι εγγραφές ανοίγουν"
}

View File

@ -605,5 +605,6 @@
"Reverse timelines": "Reverse timelines",
"Moved": "Moved",
"Move": "Move",
"Inactive": "Inactive"
"Inactive": "Inactive",
"Registrations open": "Registrations open"
}

View File

@ -605,5 +605,6 @@
"Reverse timelines": "Líneas de tiempo inversas",
"Moved": "Movida",
"Move": "Muevete",
"Inactive": "Αδρανής"
"Inactive": "Αδρανής",
"Registrations open": "Inscripciones abiertas"
}

View File

@ -605,5 +605,6 @@
"Reverse timelines": "جدول های زمانی معکوس",
"Moved": "منتقل شد",
"Move": "حرکت",
"Inactive": "غیر فعال"
"Inactive": "غیر فعال",
"Registrations open": "ثبت نام ها باز شد"
}

View File

@ -605,5 +605,6 @@
"Reverse timelines": "Chronologies inversées",
"Moved": "Déplacée",
"Move": "Déplacer",
"Inactive": "Inactive"
"Inactive": "Inactive",
"Registrations open": "Inscriptions ouvertes"
}

View File

@ -605,5 +605,6 @@
"Reverse timelines": "Amlínte droim ar ais",
"Moved": "Ar athraíodh a ionad",
"Move": "Bog",
"Inactive": "Neamhghníomhach"
"Inactive": "Neamhghníomhach",
"Registrations open": "Clárúcháin oscailte"
}

View File

@ -605,5 +605,6 @@
"Reverse timelines": "रिवर्स टाइमलाइन",
"Moved": "ले जाया गया",
"Move": "कदम",
"Inactive": "निष्क्रिय"
"Inactive": "निष्क्रिय",
"Registrations open": "पंजीकरण खुले हैं"
}

View File

@ -605,5 +605,6 @@
"Reverse timelines": "Invertire le tempistiche",
"Moved": "Mosso",
"Move": "Spostare",
"Inactive": "Non attivo"
"Inactive": "Non attivo",
"Registrations open": "Aperte le iscrizioni"
}

View File

@ -605,5 +605,6 @@
"Reverse timelines": "逆タイムライン",
"Moved": "移動しました",
"Move": "動く",
"Inactive": "非活性"
"Inactive": "非活性",
"Registrations open": "登録開始"
}

View File

@ -605,5 +605,6 @@
"Reverse timelines": "역방향 타임라인",
"Moved": "움직이는",
"Move": "이동하다",
"Inactive": "비활성"
"Inactive": "비활성",
"Registrations open": "등록 시작"
}

View File

@ -605,5 +605,6 @@
"Reverse timelines": "Reverse timelines",
"Moved": "Moved",
"Move": "Barkirin",
"Inactive": "Bêkar"
"Inactive": "Bêkar",
"Registrations open": "Qeydkirin vedibin"
}

View File

@ -605,5 +605,6 @@
"Reverse timelines": "Omgekeerde tijdlijnen",
"Moved": "Verhuisd",
"Move": "Beweging",
"Inactive": "Inactief"
"Inactive": "Inactief",
"Registrations open": "Inschrijvingen geopend"
}

View File

@ -601,5 +601,6 @@
"Reverse timelines": "Reverse timelines",
"Moved": "Moved",
"Move": "Move",
"Inactive": "Inactive"
"Inactive": "Inactive",
"Registrations open": "Registrations open"
}

View File

@ -605,5 +605,6 @@
"Reverse timelines": "Odwróć ramy czasowe",
"Moved": "Przeniósł",
"Move": "Przenosić",
"Inactive": "Nieaktywny"
"Inactive": "Nieaktywny",
"Registrations open": "Rejestracje otwarte"
}

View File

@ -605,5 +605,6 @@
"Reverse timelines": "Cronogramas reversos",
"Moved": "Mudou-se",
"Move": "Jogada",
"Inactive": "Inativa"
"Inactive": "Inativa",
"Registrations open": "inscrições abertas"
}

View File

@ -605,5 +605,6 @@
"Reverse timelines": "Обратные сроки",
"Moved": "Взолнованный",
"Move": "Шаг",
"Inactive": "Неактивный"
"Inactive": "Неактивный",
"Registrations open": "Регистрация открыта"
}

View File

@ -605,5 +605,6 @@
"Reverse timelines": "Обратные сроки",
"Moved": "Imehamishwa",
"Move": "Sogeza",
"Inactive": "Isiyotumika"
"Inactive": "Isiyotumika",
"Registrations open": "Usajili umefunguliwa"
}

View File

@ -605,5 +605,6 @@
"Reverse timelines": "Обратные сроки",
"Moved": "Etkilenmiş",
"Move": "Hareket",
"Inactive": "etkin değil"
"Inactive": "etkin değil",
"Registrations open": "kayıtlar açık"
}

View File

@ -605,5 +605,6 @@
"Reverse timelines": "Обратные сроки",
"Moved": "Переїхав",
"Move": "рухатися",
"Inactive": "Неактивний"
"Inactive": "Неактивний",
"Registrations open": "Реєстрація відкрита"
}

View File

@ -605,5 +605,6 @@
"Reverse timelines": "פאַרקערט טיימליינז",
"Moved": "אריבערגעפארן",
"Move": "מאַך",
"Inactive": "ינאַקטיוו"
"Inactive": "ינאַקטיוו",
"Registrations open": "רעדזשיסטריישאַנז עפענען"
}

View File

@ -605,5 +605,6 @@
"Reverse timelines": "倒转时间线",
"Moved": "אריבערגעפארן",
"Move": "移动",
"Inactive": "无效"
"Inactive": "无效",
"Registrations open": "注册开放"
}

View File

@ -1565,8 +1565,15 @@ def _html_edit_profile_instance(base_dir: str, translate: {},
' <label class="labels">' + \
translate['Instance Logo'] + '</label>' + \
' <input type="file" id="instanceLogo" name="instanceLogo"' + \
' accept="' + image_formats + '"><br>\n' + \
' <br><label class="labels">' + \
' accept="' + image_formats + '"><br>\n <br>\n'
registrations_open = False
if get_config_param(base_dir, "registration") == 'open':
registrations_open = True
instance_str += \
edit_text_field(translate['Registrations open'],
'regOpen', registrations_open)
instance_str += \
' <label class="labels">\n' + \
translate['Security'] + '</label><br>\n'
node_info_str = \