changed trigger for button appearance in footer from blacklist to whitelist: buttons now have to be requested explicitly.
This commit is contained in:
parent
bcab27acf1
commit
a921e193de
3 changed files with 4 additions and 4 deletions
|
@ -31,7 +31,7 @@ def debug(req,form, optstr = ""):
|
|||
else:
|
||||
req.write("Debug: "+optstr+"<br>\n")
|
||||
|
||||
def footer(req,form):
|
||||
def footer(req,form,display_buttons=0):
|
||||
"""return html footer"""
|
||||
try:
|
||||
username=form["username"]
|
||||
|
@ -39,7 +39,7 @@ def footer(req,form):
|
|||
except: #not logged in
|
||||
username = ""
|
||||
sessionid = ""
|
||||
if ((username != "") and (sessionid != "")) and ("logout" not in form.keys()):
|
||||
if display_buttons:
|
||||
data = """
|
||||
<form method="post">
|
||||
<input type="hidden" name="sessionid" value="%s">
|
||||
|
|
2
login.py
2
login.py
|
@ -97,7 +97,7 @@ def game_overview_form(req,form):
|
|||
""" % (sessionid, username)
|
||||
else:
|
||||
data+= "Sorry, all your game slots are in use."
|
||||
data+=helper.footer(req,form)
|
||||
data+=helper.footer(req,form,1)
|
||||
req.write(data)
|
||||
|
||||
def login_form(req,form):
|
||||
|
|
|
@ -81,7 +81,7 @@ def main(req,form):
|
|||
#print goban
|
||||
data += goban.display_goban(gobandict,req,form)
|
||||
data += login.navigation_bar(req,form)
|
||||
data += helper.footer(req,form)
|
||||
data += helper.footer(req,form,1)
|
||||
req.write(data)
|
||||
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue