From 452fe44b9799d9a13bdf1d61d54fbcfc4aa4c5b2 Mon Sep 17 00:00:00 2001 From: Thijs Kinkhorst <thijs@kinkhorst.com> Date: Mon, 29 Jul 2019 15:09:24 +0000 Subject: [PATCH] Unbreak hosted idp with usenewui: add post.twig template --- templates/post.twig | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 templates/post.twig diff --git a/templates/post.twig b/templates/post.twig new file mode 100644 index 000000000..68b2840c4 --- /dev/null +++ b/templates/post.twig @@ -0,0 +1,38 @@ +<!DOCTYPE html> +<html> + <head> + <script src="/{{ baseurlpath }}resources/post.js"></script> + <link rel="stylesheet" href="/{{ baseurlpath }}resources/post.css"> + </head> + <body> + + <noscript> + <p><strong>Note:</strong> + Since your browser does not support JavaScript, + you must press the button below once to proceed.</p> + </noscript> + + <form method="post" action="{{ destination }}"> + <!-- Need to add this element and call click method, because calling + submit() on the form causes failed submission if the form has another + element with name or id of submit. + See: https://developer.mozilla.org/en/DOM/form.submit#Specification --> + <input type="submit" id="postLoginSubmitButton"> + + {% for name, value in post %} + {% if value is iterable %} + {% for index, item in value %} + <input type="hidden" name="{{ name }}[{{ index }}]" value = "{{ value }}"> + {% endfor %} + {% else %} + <input type="hidden" name="{{ name }}" value = "{{ value }}"> + {% endif %} + {% endfor %} + + <noscript> + <button type="submit" class="btn">Continue</button> + </noscript> + </form> + + </body> +</html> -- GitLab