Check that lists are enabled

main
Bob Mottram 2021-10-21 20:03:26 +01:00
parent 9ecb745d3d
commit 48d3235b8f
1 changed files with 12 additions and 11 deletions

View File

@ -1677,17 +1677,18 @@ def _htmlEditProfileFiltering(baseDir: str, nickname: str, domain: str,
200, '', False) 200, '', False)
CWlistsStr = '' CWlistsStr = ''
print('CWlistsStr 0: ' + str(CWlists)) if listsEnabled:
for name, item in CWlists.items(): print('CWlistsStr 0: ' + str(CWlists))
print('CWlistsStr: ' + name) for name, item in CWlists.items():
variableName = 'list' + name.replace(' ', '').replace("'", '') print('CWlistsStr: ' + name)
if name in listsEnabled: variableName = 'list' + name.replace(' ', '').replace("'", '')
listIsEnabled = True if name in listsEnabled:
else: listIsEnabled = True
listIsEnabled = False else:
if translate.get(name): listIsEnabled = False
name = translate[name] if translate.get(name):
CWlistsStr += editCheckBox(name, variableName, listIsEnabled) name = translate[name]
CWlistsStr += editCheckBox(name, variableName, listIsEnabled)
if CWlistsStr: if CWlistsStr:
idx = 'Add content warnings for the following sites' idx = 'Add content warnings for the following sites'
editProfileForm += \ editProfileForm += \