Skip to content

Commit 1f19484

Browse files
author
tailor
committed
[project @ Have the auto-submit html wrapper hide the continue button via javascript]
1 parent 3b858d8 commit 1f19484

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

‎openid/oidutil.py‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,23 @@
2121
'elementtree.ElementTree',
2222
]
2323

24-
def autoSubmitHTML(form):
24+
def autoSubmitHTML(form, title='OpenID transaction in progress'):
2525
return """
2626
<html>
27+
<head>
28+
<title>%s</title>
29+
</head>
2730
<body onload="document.forms[0].submit();">
2831
%s
32+
<script>
33+
var elements = document.forms[0].elements;
34+
for (var i = 0; i < elements.length; i++) {
35+
elements[i].style.display = "none";
36+
}
37+
</script>
2938
</body>
3039
</html>
31-
"""%form
40+
""" % (title, form)
3241

3342
def importElementTree(module_names=None):
3443
"""Find a working ElementTree implementation, trying the standard

0 commit comments

Comments
 (0)