From b0e9dff453781a4ea03cd643dae79e9cf554b0c5 Mon Sep 17 00:00:00 2001 From: Wolfgang Knopki <wolfgang.knopki@hft-stuttgart.de> Date: Fri, 13 Nov 2020 13:50:25 +0100 Subject: [PATCH] admin field, global css Login-clean --- mymodule/themes/fancytheme/core/loginuserpass.twig | 8 ++------ mymodule/themes/fancytheme/default/base.twig | 1 + 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/mymodule/themes/fancytheme/core/loginuserpass.twig b/mymodule/themes/fancytheme/core/loginuserpass.twig index db2943d..d7e745f 100644 --- a/mymodule/themes/fancytheme/core/loginuserpass.twig +++ b/mymodule/themes/fancytheme/core/loginuserpass.twig @@ -1,9 +1,5 @@ {% extends "@core/base.twig" %} -{% block preload %} - <link rel="stylesheet" type="text/css" href="/css/Login-Form-Clean.css"> -{% endblock %} - {% block postload %} <script src="{{ asset('js/loginuserpass.js', 'core') }}"></script> {% endblock %} @@ -20,8 +16,8 @@ <form method="post"> <h2 class="sr-only">Login Form</h2> <div class="illustration"><img src="/img/M4_LAB_LOGO.png" width="130"></div> - {%- if 'admin' in app.request.query.get("AuthState") -%} - <div class="form-group"><input id="username" class="form-control" type="email" name="username" placeholder="E-Mail-Adresse"></div> + {%- if 'admin' in attribute(queryParams, "AuthState") -%} + <div class="form-group"><input id="username" class="form-control" type="text" name="username" placeholder="Administrator"></div> {%- else -%} <div class="form-group"><input id="username" class="form-control" type="email" name="username" placeholder="E-Mail-Adresse"></div> {%- endif -%} diff --git a/mymodule/themes/fancytheme/default/base.twig b/mymodule/themes/fancytheme/default/base.twig index 16034b3..48f3bb7 100644 --- a/mymodule/themes/fancytheme/default/base.twig +++ b/mymodule/themes/fancytheme/default/base.twig @@ -8,6 +8,7 @@ <link rel="stylesheet" href="{{ asset("css/stylesheet.css") }}"> <link rel="stylesheet" href="/css/bootstrap.min.css"> <link rel="stylesheet" href="/css/m4lab.css"> + <link rel="stylesheet" href="/css/Login-Form-Clean.css"> <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css" integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay" crossorigin="anonymous"> <link rel="icon" href="{{ asset("icons/favicon.ico") }}"> {% if isRTL %} -- GitLab