mirror of https://gitlab.com/bashrc2/epicyon
Combine sections
parent
62fc264a51
commit
ea734f37ab
|
@ -1217,10 +1217,9 @@ def htmlEditProfile(cssCache: {}, translate: {}, baseDir: str, path: str,
|
||||||
if os.path.isfile(baseDir + '/epicyon.css'):
|
if os.path.isfile(baseDir + '/epicyon.css'):
|
||||||
cssFilename = baseDir + '/epicyon.css'
|
cssFilename = baseDir + '/epicyon.css'
|
||||||
|
|
||||||
moderatorsStr = ''
|
|
||||||
themesDropdown = ''
|
themesDropdown = ''
|
||||||
instanceStr = ''
|
instanceStr = ''
|
||||||
editorsStr = ''
|
roleAssignStr = ''
|
||||||
peertubeStr = ''
|
peertubeStr = ''
|
||||||
|
|
||||||
adminNickname = getConfigParam(baseDir, 'admin')
|
adminNickname = getConfigParam(baseDir, 'admin')
|
||||||
|
@ -1352,40 +1351,39 @@ def htmlEditProfile(cssCache: {}, translate: {}, baseDir: str, path: str,
|
||||||
'<option value="' + themeName +
|
'<option value="' + themeName +
|
||||||
'" selected>')
|
'" selected>')
|
||||||
|
|
||||||
# moderators section
|
# Role assignments section
|
||||||
moderators = ''
|
moderators = ''
|
||||||
moderatorsFile = baseDir + '/accounts/moderators.txt'
|
moderatorsFile = baseDir + '/accounts/moderators.txt'
|
||||||
if os.path.isfile(moderatorsFile):
|
if os.path.isfile(moderatorsFile):
|
||||||
with open(moderatorsFile, "r") as f:
|
with open(moderatorsFile, "r") as f:
|
||||||
moderators = f.read()
|
moderators = f.read()
|
||||||
moderatorsStr = '<div class="container">'
|
# site moderators
|
||||||
moderatorsStr += ' <b><label class="labels">' + \
|
roleAssignStr = '<div class="container">'
|
||||||
|
roleAssignStr += ' <b><label class="labels">' + \
|
||||||
translate['Moderators'] + '</label></b><br>\n'
|
translate['Moderators'] + '</label></b><br>\n'
|
||||||
moderatorsStr += ' ' + \
|
roleAssignStr += ' ' + \
|
||||||
translate['A list of moderator nicknames. One per line.']
|
translate['A list of moderator nicknames. One per line.']
|
||||||
moderatorsStr += \
|
roleAssignStr += \
|
||||||
' <textarea id="message" name="moderators" placeholder="' + \
|
' <textarea id="message" name="moderators" placeholder="' + \
|
||||||
translate['List of moderator nicknames'] + \
|
translate['List of moderator nicknames'] + \
|
||||||
'..." style="height:200px" spellcheck="false">' + \
|
'..." style="height:200px" spellcheck="false">' + \
|
||||||
moderators + '</textarea>'
|
moderators + '</textarea>'
|
||||||
moderatorsStr += ' </div>\n'
|
|
||||||
|
|
||||||
# site editors section
|
# site editors
|
||||||
editors = ''
|
editors = ''
|
||||||
editorsFile = baseDir + '/accounts/editors.txt'
|
editorsFile = baseDir + '/accounts/editors.txt'
|
||||||
if os.path.isfile(editorsFile):
|
if os.path.isfile(editorsFile):
|
||||||
with open(editorsFile, "r") as f:
|
with open(editorsFile, "r") as f:
|
||||||
editors = f.read()
|
editors = f.read()
|
||||||
editorsStr = '<div class="container">'
|
roleAssignStr += ' <b><label class="labels">' + \
|
||||||
editorsStr += ' <b><label class="labels">' + \
|
|
||||||
translate['Site Editors'] + '</label></b><br>\n'
|
translate['Site Editors'] + '</label></b><br>\n'
|
||||||
editorsStr += ' ' + \
|
roleAssignStr += ' ' + \
|
||||||
translate['A list of editor nicknames. One per line.']
|
translate['A list of editor nicknames. One per line.']
|
||||||
editorsStr += \
|
roleAssignStr += \
|
||||||
' <textarea id="message" name="editors" placeholder="" ' + \
|
' <textarea id="message" name="editors" placeholder="" ' + \
|
||||||
'style="height:200px" spellcheck="false">' + \
|
'style="height:200px" spellcheck="false">' + \
|
||||||
editors + '</textarea>'
|
editors + '</textarea>'
|
||||||
editorsStr += ' </div>\n'
|
roleAssignStr += ' </div>\n'
|
||||||
|
|
||||||
# Video section
|
# Video section
|
||||||
peertubeStr = ' <div class="container">\n'
|
peertubeStr = ' <div class="container">\n'
|
||||||
|
@ -1737,8 +1735,8 @@ def htmlEditProfile(cssCache: {}, translate: {}, baseDir: str, path: str,
|
||||||
editProfileForm += ' <label class="labels">' + \
|
editProfileForm += ' <label class="labels">' + \
|
||||||
translate[idx] + '</label>\n'
|
translate[idx] + '</label>\n'
|
||||||
editProfileForm += skillsStr
|
editProfileForm += skillsStr
|
||||||
editProfileForm += themesDropdown + moderatorsStr
|
editProfileForm += themesDropdown + roleAssignStr
|
||||||
editProfileForm += editorsStr + peertubeStr + instanceStr
|
editProfileForm += peertubeStr + instanceStr
|
||||||
editProfileForm += ' <div class="container">\n'
|
editProfileForm += ' <div class="container">\n'
|
||||||
editProfileForm += ' <b><label class="labels">' + \
|
editProfileForm += ' <b><label class="labels">' + \
|
||||||
translate['Danger Zone'] + '</label></b><br>\n'
|
translate['Danger Zone'] + '</label></b><br>\n'
|
||||||
|
|
Loading…
Reference in New Issue