Merge pull request #94 from zeronet-conservancy/disable-default-donating
custom donation addresses (in content.json) are still allowed and in fact improved later work should include other ways of donations that btc refs #74
This commit is contained in:
commit
653efa71ac
1 changed files with 7 additions and 14 deletions
|
@ -425,30 +425,23 @@ class UiWebsocketPlugin(object):
|
||||||
</li>
|
</li>
|
||||||
"""))
|
"""))
|
||||||
|
|
||||||
donate_key = site.content_manager.contents.get("content.json", {}).get("donate", True)
|
|
||||||
site_address = self.site.address
|
site_address = self.site.address
|
||||||
body.append(_("""
|
body.append(_("""
|
||||||
<li>
|
<li>
|
||||||
<label>{_[Site address]}</label><br>
|
<label>{_[Site address]}</label><br>
|
||||||
<div class='flex'>
|
<div class='flex'>
|
||||||
<span class='input text disabled'>{site_address}</span>
|
<span class='input text disabled'>{site_address}</span>
|
||||||
"""))
|
|
||||||
if donate_key == False or donate_key == "":
|
|
||||||
pass
|
|
||||||
elif (type(donate_key) == str or type(donate_key) == str) and len(donate_key) > 0:
|
|
||||||
body.append(_("""
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
"""))
|
||||||
|
donate_key = site.content_manager.contents.get("content.json", {}).get("donate", None)
|
||||||
|
if type(donate_key) is str and len(donate_key) > 0:
|
||||||
|
body.append(_("""
|
||||||
<li>
|
<li>
|
||||||
<label>{_[Donate]}</label><br>
|
<label>{_[Donate]}</label><br>
|
||||||
<div class='flex'>
|
<div class='flex'>
|
||||||
{donate_key}
|
{donate_key}
|
||||||
"""))
|
<a href='bitcoin:{donate_key}' class='button' id='button-donate'>{_[Donate]}</a>
|
||||||
else:
|
|
||||||
body.append(_("""
|
|
||||||
<a href='bitcoin:{site_address}' class='button' id='button-donate'>{_[Donate]}</a>
|
|
||||||
"""))
|
|
||||||
body.append(_("""
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
"""))
|
"""))
|
||||||
|
|
Loading…
Reference in a new issue