From bcce2625a8cb0b630d945c6849014049869e10ce Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Tue, 27 Nov 2018 12:01:36 +0100 Subject: Implemented AuthController for login * Moved /login functionality to AuthController * Refactored password handling logic to use the Authenticator --- resources/views/errors/405.twig | 5 ++ resources/views/macros/base.twig | 11 +++++ resources/views/pages/login.twig | 104 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 120 insertions(+) create mode 100644 resources/views/errors/405.twig create mode 100644 resources/views/macros/base.twig create mode 100644 resources/views/pages/login.twig (limited to 'resources/views') diff --git a/resources/views/errors/405.twig b/resources/views/errors/405.twig new file mode 100644 index 00000000..cbbb94ea --- /dev/null +++ b/resources/views/errors/405.twig @@ -0,0 +1,5 @@ +{% extends "errors/default.twig" %} + +{% block title %}{{ __("405: Method not allowed") }}{% endblock %} + +{% block content_headline_text %}{{ __("405: Method not allowed") }}{% endblock %} diff --git a/resources/views/macros/base.twig b/resources/views/macros/base.twig new file mode 100644 index 00000000..94287bd4 --- /dev/null +++ b/resources/views/macros/base.twig @@ -0,0 +1,11 @@ +{% macro angel() %} + +{% endmacro %} + +{% macro glyphicon(glyph) %} + +{% endmacro %} + +{% macro alert(message, type) %} +
{{ message }}
+{% endmacro %} diff --git a/resources/views/pages/login.twig b/resources/views/pages/login.twig new file mode 100644 index 00000000..75b98aa1 --- /dev/null +++ b/resources/views/pages/login.twig @@ -0,0 +1,104 @@ +{% extends "layouts/app.twig" %} +{% import 'macros/base.twig' as m %} + +{% block title %}{{ __('Login') }}{% endblock %} + +{% block content %} +
+
+
+

{{ __('Welcome to the %s!', [config('name') ~ m.angel() ~ (config('app_name')|upper) ])|raw }}

+
+
+ +
+ {% for name,date in { + (__('Buildup starts')): config('buildup_start'), + (__('Event starts')): config('event_start'), + (__('Event ends')): config('event_end'), + (__('Teardown ends')): config('teardown_end') + } if date %} + {% if date > date() %} + + {% endif %} + {% endfor %} +
+ +
+
+
+ +
{{ m.angel }} {{ __('Login') }}
+ +
+ {% for message in errors|default([]) %} + {{ m.alert(__(message), 'danger') }} + {% endfor %} + +
+ {{ csrf() }} +
+ +
+ +
+ +
+ +
+
+ + + {% if show_password_recovery|default(false) %} + + {{ __('I forgot my password') }} + + {% endif %} +
+
+ +
+
+ + + +
+
+
+ +
+
+

{{ __('Register') }}

+ {% if has_permission_to('register') and config('registration_enabled') %} +

{{ __('Please sign up, if you want to help us!') }}

+ + {% else %} + {{ m.alert(__('Registration is disabled.'), 'danger') }} + {% endif %} +
+ +
+

{{ __('What can I do?') }}

+

{{ __('Please read about the jobs you can do to help us.') }}

+ +
+
+ +
+{% endblock %} -- cgit v1.2.3-54-g00ecf