summaryrefslogtreecommitdiff
path: root/resources
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2019-07-21 13:32:45 +0200
committerGitHub <noreply@github.com>2019-07-21 13:32:45 +0200
commitd4d4b409b6fd96ca297af323936b8922d45b6eda (patch)
tree6c8efa1a1e429f3965820838796cb4b97cd2df11 /resources
parentd5bf7fd065a5ea93dea9fd55e6ac225ee062a3db (diff)
parent51a3c6eb44a5dbdf9d7a3cfac678f0d29b0d3eef (diff)
Merge pull request #622 from MyIgel/controllers
AuthController (login, logout), use templating, replaced gettext, input validation
Diffstat (limited to 'resources')
-rw-r--r--resources/lang/de_DE.UTF-8/LC_MESSAGES/default.mobin46271 -> 0 bytes
-rw-r--r--resources/lang/de_DE/default.mobin0 -> 46206 bytes
-rw-r--r--resources/lang/de_DE/default.po (renamed from resources/lang/de_DE.UTF-8/LC_MESSAGES/default.po)33
-rw-r--r--resources/lang/en_US/default.mobin0 -> 770 bytes
-rw-r--r--resources/lang/en_US/default.po32
-rw-r--r--resources/lang/pt_BR.UTF.8/LC_MESSAGES/pt_BR.mobin41256 -> 0 bytes
-rw-r--r--resources/lang/pt_BR/default.mobin0 -> 41129 bytes
-rw-r--r--resources/lang/pt_BR/default.po (renamed from resources/lang/pt_BR.UTF.8/LC_MESSAGES/pt_BR.po)14
-rw-r--r--resources/views/errors/405.twig5
-rw-r--r--resources/views/macros/base.twig11
-rw-r--r--resources/views/pages/login.twig104
11 files changed, 178 insertions, 21 deletions
diff --git a/resources/lang/de_DE.UTF-8/LC_MESSAGES/default.mo b/resources/lang/de_DE.UTF-8/LC_MESSAGES/default.mo
deleted file mode 100644
index 35ad80b7..00000000
--- a/resources/lang/de_DE.UTF-8/LC_MESSAGES/default.mo
+++ /dev/null
Binary files differ
diff --git a/resources/lang/de_DE/default.mo b/resources/lang/de_DE/default.mo
new file mode 100644
index 00000000..fb93d590
--- /dev/null
+++ b/resources/lang/de_DE/default.mo
Binary files differ
diff --git a/resources/lang/de_DE.UTF-8/LC_MESSAGES/default.po b/resources/lang/de_DE/default.po
index d5a7b993..1f0372af 100644
--- a/resources/lang/de_DE.UTF-8/LC_MESSAGES/default.po
+++ b/resources/lang/de_DE/default.po
@@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Engelsystem\n"
"POT-Creation-Date: 2019-04-28 15:23+0200\n"
-"PO-Revision-Date: 2019-06-12 16:07+0200\n"
+"PO-Revision-Date: 2019-06-13 11:54+0200\n"
"Last-Translator: msquare <msquare@notrademark.de>\n"
"Language-Team: \n"
"Language: de_DE\n"
@@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.8.11\n"
-"X-Poedit-KeywordsList: __;_e;translate;translatePlural;gettext;gettext_noop\n"
+"X-Poedit-KeywordsList: __;_e;translate;translatePlural\n"
"X-Poedit-Basepath: ../../../..\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-SourceCharset: UTF-8\n"
@@ -541,7 +541,7 @@ msgstr "Du kannst Dich nicht selber löschen."
#: includes/controller/users_controller.php:78
#: includes/pages/guest_login.php:410
-msgid "Your password is incorrect. Please try it again."
+msgid "Your password is incorrect. Please try it again."
msgstr "Dein Passwort stimmt nicht. Bitte probiere es nochmal."
#: includes/controller/users_controller.php:87
@@ -1529,19 +1529,20 @@ msgstr "Nachname"
msgid "Entry required!"
msgstr "Pflichtfeld!"
-#: includes/pages/guest_login.php:414
-msgid "Please enter a password."
-msgstr "Gib bitte ein Passwort ein."
+#~ msgid "auth.no-password"
+#~ msgstr "Gib bitte ein Passwort ein."
#: includes/pages/guest_login.php:418
-msgid ""
-"No user was found with that Nickname. Please try again. If you are still "
-"having problems, ask a Dispatcher."
+msgid "auth.not-found"
msgstr ""
-"Es wurde kein Engel mit diesem Namen gefunden. Probiere es bitte noch "
-"einmal. Wenn das Problem weiterhin besteht, frage einen Dispatcher."
+"Es wurde kein Engel gefunden. Probiere es bitte noch einmal. Wenn das Problem "
+"weiterhin besteht, melde dich im Himmel."
+
+#~ msgid "auth.no-nickname"
+#~ msgstr "Gib bitte einen Nick an."
-#: includes/pages/guest_login.php:451 includes/view/User_view.php:130
+#: includes/pages/guest_login.php:481
+#: includes/view/User_view.php:122
msgid "I forgot my password"
msgstr "Passwort vergessen"
@@ -2357,7 +2358,7 @@ msgid ""
"I have my own car with me and am willing to use it for the event (You'll get "
"reimbursed for fuel)"
msgstr ""
-"Ich habe mein eigenes Auto dabei und möchte würde es zum Fahren für das "
+"Ich habe mein eigenes Auto dabei und möchte es zum Fahren für das "
"Event verwenden (Du wirst für Spritkosten entschädigt)"
#: includes/view/UserDriverLicenses_view.php:30
@@ -2762,3 +2763,9 @@ msgid ""
msgstr ""
"Diese Seite existiert nicht oder Du hast keinen Zugriff. Melde Dich an um "
"Zugriff zu erhalten!"
+
+msgid "validation.password.required"
+msgstr "Bitte gib ein Passwort an."
+
+msgid "validation.login.required"
+msgstr "Bitte gib einen Loginnamen an."
diff --git a/resources/lang/en_US/default.mo b/resources/lang/en_US/default.mo
new file mode 100644
index 00000000..7ef9c3b2
--- /dev/null
+++ b/resources/lang/en_US/default.mo
Binary files differ
diff --git a/resources/lang/en_US/default.po b/resources/lang/en_US/default.po
new file mode 100644
index 00000000..54847e61
--- /dev/null
+++ b/resources/lang/en_US/default.po
@@ -0,0 +1,32 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: Engelsystem 2.0\n"
+"POT-Creation-Date: 2017-12-29 19:01+0100\n"
+"PO-Revision-Date: 2019-06-04 23:41+0200\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.8.11\n"
+"X-Poedit-KeywordsList: _;gettext;gettext_noop\n"
+"X-Poedit-Basepath: .\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Poedit-SourceCharset: UTF-8\n"
+"Last-Translator: \n"
+"Language: en_US\n"
+"X-Poedit-SearchPath-0: .\n"
+
+#~ msgid "auth.no-nickname"
+#~ msgstr "Please enter a nickname."
+
+#~ msgid "auth.no-password"
+#~ msgstr "Please enter a password."
+
+msgid "auth.not-found"
+msgstr "No user was found. Please try again. If you are still having problems, ask Heaven."
+
+msgid "validation.password.required"
+msgstr "The password is required."
+
+msgid "validation.login.required"
+msgstr "The login name is required."
diff --git a/resources/lang/pt_BR.UTF.8/LC_MESSAGES/pt_BR.mo b/resources/lang/pt_BR.UTF.8/LC_MESSAGES/pt_BR.mo
deleted file mode 100644
index 95251feb..00000000
--- a/resources/lang/pt_BR.UTF.8/LC_MESSAGES/pt_BR.mo
+++ /dev/null
Binary files differ
diff --git a/resources/lang/pt_BR/default.mo b/resources/lang/pt_BR/default.mo
new file mode 100644
index 00000000..8b864156
--- /dev/null
+++ b/resources/lang/pt_BR/default.mo
Binary files differ
diff --git a/resources/lang/pt_BR.UTF.8/LC_MESSAGES/pt_BR.po b/resources/lang/pt_BR/default.po
index e7307e5d..b9bf420d 100644
--- a/resources/lang/pt_BR.UTF.8/LC_MESSAGES/pt_BR.po
+++ b/resources/lang/pt_BR/default.po
@@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Engelsystem 2.0\n"
"POT-Creation-Date: 2017-04-25 05:23+0200\n"
-"PO-Revision-Date: 2018-10-05 15:35+0200\n"
+"PO-Revision-Date: 2018-11-27 00:29+0100\n"
"Last-Translator: samba <samba@autistici.org>\n"
"Language-Team: \n"
"Language: pt_BR\n"
@@ -477,7 +477,7 @@ msgstr "Você não pode se deletar."
#: includes/controller/users_controller.php:61
#: includes/pages/guest_login.php:315
-msgid "Your password is incorrect. Please try it again."
+msgid "Your password is incorrect. Please try it again."
msgstr "Sua senha está incorreta. Por favor, tente novamente."
#: includes/controller/users_controller.php:71
@@ -1420,19 +1420,17 @@ msgid "Entry required!"
msgstr "Campo necessário!"
#: includes/pages/guest_login.php:319
-msgid "Please enter a password."
+msgid "auth.no-password"
msgstr "Por favor digite uma senha."
#: includes/pages/guest_login.php:323
-msgid ""
-"No user was found with that Nickname. Please try again. If you are still "
-"having problems, ask a Dispatcher."
+msgid "auth.not-found"
msgstr ""
-"Nenhum usuário com esse apelido foi encontrado. Por favor tente novamente. \n"
+"Nenhum usuário foi encontrado. Por favor tente novamente. \n"
"Se você continuar com problemas, pergunte a um Dispatcher."
#: includes/pages/guest_login.php:327
-msgid "Please enter a nickname."
+msgid "auth.no-nickname"
msgstr "Por favor digite um apelido."
#: includes/pages/guest_login.php:358 includes/view/User_view.php:101
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() %}
+ <span class="icon-icon_angel"></span>
+{% endmacro %}
+
+{% macro glyphicon(glyph) %}
+ <span class="glyphicon glyphicon-{{ glyph }}"></span>
+{% endmacro %}
+
+{% macro alert(message, type) %}
+ <div class="alert alert-{{ type|default('info') }}">{{ message }}</div>
+{% 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 %}
+ <div class="col-md-12">
+ <div class="row">
+ <div class="col-sm-12 text-center">
+ <h2>{{ __('Welcome to the %s!', [config('name') ~ m.angel() ~ (config('app_name')|upper) ])|raw }}</h2>
+ </div>
+ </div>
+
+ <div class="row">
+ {% 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() %}
+ <div class="col-sm-3 text-center hidden-xs">
+ <h4>{{ name }}</h4>
+ <span class="moment-countdown text-big" data-timestamp="{{ date.getTimestamp }}">%c</span>
+ <small>{{ date.format(__('Y-m-d')) }}</small>
+ </div>
+ {% endif %}
+ {% endfor %}
+ </div>
+
+ <div class="row">
+ <div class="col-sm-6 col-sm-offset-3 col-md-4 col-md-offset-4">
+ <div class="panel panel-primary first">
+
+ <div class="panel-heading">{{ m.angel }} {{ __('Login') }}</div>
+
+ <div class="panel-body">
+ {% for message in errors|default([]) %}
+ {{ m.alert(__(message), 'danger') }}
+ {% endfor %}
+
+ <form action="" enctype="multipart/form-data" method="post">
+ {{ csrf() }}
+ <div class="form-group">
+ <input class="form-control" id="form_nick"
+ type="text" name="login" value="" placeholder="{{ __('Nick') }}">
+ </div>
+
+ <div class="form-group">
+ <input class="form-control" id="form_password"
+ type="password" name="password" value="" placeholder="{{ __('Password') }}">
+ </div>
+
+ <div class="form-group">
+ <div class="btn-group">
+ <button class="btn btn-primary" type="submit" name="submit">
+ {{ __('Login') }}
+ </button>
+
+ {% if show_password_recovery|default(false) %}
+ <a href="{{ url('user-password-recovery') }}" class="btn btn-default ">
+ {{ __('I forgot my password') }}
+ </a>
+ {% endif %}
+ </div>
+ </div>
+
+ </form>
+ </div>
+
+ <div class="panel-footer">
+ {{ m.glyphicon('info-sign') }} {{ __('Please note: You have to activate cookies!') }}
+ </div>
+
+ </div>
+ </div>
+ </div>
+
+ <div class="row">
+ <div class="col-sm-6 text-center">
+ <h2>{{ __('Register') }}</h2>
+ {% if has_permission_to('register') and config('registration_enabled') %}
+ <p>{{ __('Please sign up, if you want to help us!') }}</p>
+ <div class="form-group">
+ <a href="{{ url('register') }}" class="btn btn-default">{{ __('Register') }} &raquo;</a>
+ </div>
+ {% else %}
+ {{ m.alert(__('Registration is disabled.'), 'danger') }}
+ {% endif %}
+ </div>
+
+ <div class="col-sm-6 text-center">
+ <h2>{{ __('What can I do?') }}</h2>
+ <p>{{ __('Please read about the jobs you can do to help us.') }}</p>
+ <div class="form-group">
+ <a href="{{ url('angeltypes', {'action': 'about'}) }}" class="btn btn-default">
+ {{ __('Teams/Job description') }} &raquo;
+ </a>
+ </div>
+ </div>
+ </div>
+
+ </div>
+{% endblock %}