Support removing donation link / custom donation test
This commit is contained in:
parent
b6bf38b85c
commit
26b0a7d75d
1 changed files with 24 additions and 10 deletions
|
@ -409,6 +409,20 @@ class UiWebsocketPlugin(object):
|
|||
</li>
|
||||
"""))
|
||||
|
||||
donate_key = site.content_manager.contents.get("content.json", {}).get("donate", True)
|
||||
if donate_key == False or donate_key == "":
|
||||
pass
|
||||
elif (type(donate_key) == str or type(donate_key) == unicode) and len(donate_key) > 0:
|
||||
escaped_donate_key = cgi.escape(donate_key, True)
|
||||
body.append(_(u"""
|
||||
<li>
|
||||
<label>{_[Donate]}</label><br>
|
||||
<div class='flex'>
|
||||
{escaped_donate_key}
|
||||
</div>
|
||||
</li>
|
||||
"""))
|
||||
else:
|
||||
site_address = self.site.address
|
||||
body.append(_(u"""
|
||||
<li>
|
||||
|
|
Loading…
Reference in a new issue