summaryrefslogtreecommitdiff
path: root/src/application/templates/old/login.twig
diff options
context:
space:
mode:
Diffstat (limited to 'src/application/templates/old/login.twig')
-rw-r--r--src/application/templates/old/login.twig51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/application/templates/old/login.twig b/src/application/templates/old/login.twig
new file mode 100644
index 0000000..cbbb929
--- /dev/null
+++ b/src/application/templates/old/login.twig
@@ -0,0 +1,51 @@
+{% set title = __("Log in") %}
+{% set formId = "login" %}
+{% set formError = getAndClearFormError(formId) %}
+
+{% extends "base.twig" %}
+
+{% block content %}
+
+<hr color="silver" noshade>
+<h1>{{ __("Log in") }}</h1>
+
+{% if formError %}
+ {% include "components/alert_error.twig" with { message: formError } %}
+{% endif %}
+<form action="{{ g.server.REQUEST_URI }}" method="post">
+ <input type="hidden" name="form_id" value="{{ formId }}">
+
+ <label for="i_username">{{ __("Username:") }}</label><br>
+ <input type="text" id="i_username" name="username" value="{{ lastFormField(formId, "username") }}" required><br>
+ <br>
+ <label for="i_password">{{ __("Password:") }}</label><br>
+ <input type="password" id="i_password" name="password" required><br>
+ <br>
+ <button type="submit">{{ __("Log in") }}</button>
+ <a href="?_action=pwreset">{{ __("I forgot my password") }}</a>
+
+ {% if constant("REGISTRATION_ENABLED") %}
+ <br><br>
+ <table border="1" bordercolor="green" cellspacing="0" cellpadding="4">
+ <tr>
+ <td>
+ {{ __("Don't have an account? %link%Register now%/link%", {
+ "link": '<a href="?_action=register">',
+ "/link": '</a>',
+ }) }}
+ </td>
+ </tr>
+ </table>
+ {% endif %}
+</form>
+
+{% endblock %}
+
+{% block scripts %}
+{{ parent() }}
+<script type="text/javascript">
+$(function() {
+ $("#i_username").focus();
+});
+</script>
+{% endblock %}