mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-13 13:03:01 +00:00
templates/login.html: allow adding extra HTML Input Attributes for Username and Password field
With this change, if we set ``` {% block username_input_attribs %}pattern="[a-z0-9]+" placeholder="do not use email address, use your username"{% endblock username_input_attribs %} ``` We will get the following generated code ``` <input id="username_input" type="text" autocapitalize="off" autocorrect="off" autocomplete="username" class="form-control" name="username" val="" tabindex="1" autofocus="autofocus" pattern="[a-z0-9]+" placeholder="do not use email address, use your username" />
This commit is contained in:
@@ -43,13 +43,19 @@
|
|||||||
class="form-control"
|
class="form-control"
|
||||||
name="username"
|
name="username"
|
||||||
val="{{ username }}"
|
val="{{ username }}"
|
||||||
autofocus="autofocus" />
|
autofocus="autofocus"
|
||||||
|
{# allow adding extra HTML Input Attributes (pattern, placeholder, title, minlenght, maxlenght, ...) #}
|
||||||
|
{% block username_input_attribs %}{% endblock username_input_attribs %}
|
||||||
|
/>
|
||||||
<label for='password_input'>Password:</label>
|
<label for='password_input'>Password:</label>
|
||||||
<input type="password"
|
<input type="password"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
autocomplete="current-password"
|
autocomplete="current-password"
|
||||||
name="password"
|
name="password"
|
||||||
id="password_input" />
|
id="password_input"
|
||||||
|
{# allow adding extra HTML Input Attributes (pattern, placeholder, title, minlenght, maxlenght, ...) #}
|
||||||
|
{% block password_input_attribs %}{% endblock password_input_attribs %}
|
||||||
|
/>
|
||||||
{% if authenticator.request_otp %}
|
{% if authenticator.request_otp %}
|
||||||
<label for='otp_input'>{{ authenticator.otp_prompt }}</label>
|
<label for='otp_input'>{{ authenticator.otp_prompt }}</label>
|
||||||
<input class="form-control"
|
<input class="form-control"
|
||||||
|
Reference in New Issue
Block a user