Show filtered words on moderator info screen

merge-requests/8/head
Bob Mottram 2020-12-19 11:33:38 +00:00
parent c447f90ec9
commit cc2b9735fc
1 changed files with 16 additions and 0 deletions

View File

@ -185,6 +185,22 @@ def htmlModerationInfo(cssCache: {}, translate: {},
blockedStr + '</textarea>'
infoForm += '</div>'
infoShown = True
filtersFilename = baseDir + '/accounts/filters.txt'
if os.path.isfile(filtersFilename):
with open(filtersFilename, "r") as f:
filteredStr = f.read()
infoForm += '<div class="container">'
infoForm += \
' <br><b>' + \
translate['Filtered words'] + '</b>'
infoForm += \
' <textarea id="message" ' + \
'name="filtered" style="height:700px">' + \
filteredStr + '</textarea>'
infoForm += '</div>'
infoShown = True
if not infoShown:
infoForm += \
'<center><p>' + \