first commit

This commit is contained in:
2023-07-20 11:56:10 +02:00
parent 08c221d3d5
commit f624b15207
341 changed files with 64075 additions and 103 deletions

View File

@@ -0,0 +1,34 @@
{% extends "base.html.twig" %}
{% block body %}
<div class="text-center">
{% if app.user %}
<a class="btn btn-primary" href="{{path("app_logout")}}" title="Connexion">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-6 h-6" style="width:25px; padding-right:5px">
<path fill-rule="evenodd" d="M7.5 3.75A1.5 1.5 0 006 5.25v13.5a1.5 1.5 0 001.5 1.5h6a1.5 1.5 0 001.5-1.5V15a.75.75 0 011.5 0v3.75a3 3 0 01-3 3h-6a3 3 0 01-3-3V5.25a3 3 0 013-3h6a3 3 0 013 3V9A.75.75 0 0115 9V5.25a1.5 1.5 0 00-1.5-1.5h-6zm5.03 4.72a.75.75 0 010 1.06l-1.72 1.72h10.94a.75.75 0 010 1.5H10.81l1.72 1.72a.75.75 0 11-1.06 1.06l-3-3a.75.75 0 010-1.06l3-3a.75.75 0 011.06 0z" clip-rule="evenodd" />
</svg>
Logout
</a>
{% else %}
<a class="btn btn-primary" href="{{path("app_login")}}" title="Connexion">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-6 h-6" style="width:25px; padding-right:5px">
<path fill-rule="evenodd" d="M7.5 3.75A1.5 1.5 0 006 5.25v13.5a1.5 1.5 0 001.5 1.5h6a1.5 1.5 0 001.5-1.5V15a.75.75 0 011.5 0v3.75a3 3 0 01-3 3h-6a3 3 0 01-3-3V5.25a3 3 0 013-3h6a3 3 0 013 3V9A.75.75 0 0115 9V5.25a1.5 1.5 0 00-1.5-1.5h-6zm10.72 4.72a.75.75 0 011.06 0l3 3a.75.75 0 010 1.06l-3 3a.75.75 0 11-1.06-1.06l1.72-1.72H9a.75.75 0 010-1.5h10.94l-1.72-1.72a.75.75 0 010-1.06z" clip-rule="evenodd" />
</svg>
Login
</a>
{% endif %}
</div>
{% if app.user %}
<div class="card mt-5" style="max-width:600px; margin:auto;">
<div class="card-body">
<b>Avatar</b> = {{ app.user.avatar }}<br>
<b>login</b> = {{ app.user.username }}<br>
<b>firstname</b> = {{ app.user.firstname }}<br>
<b>lastname</b> = {{ app.user.lastname }}<br>
<b>email</b> = {{ app.user.email }}<br>
</div>
</div>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,37 @@
{% extends "base.html.twig" %}
{% block body %}
<div style="text-align:center">
{% if mode=="SQL" %}
{% set route="app_hydra_checkloginsql" %}
{% else %}
{% set route="app_hydra_checkloginldap" %}
{% endif %}
{{ form_start(form, {'action': path(route), 'method': 'POST'}) }}
<div class="card homecard mb-3" style="width:400px; margin:auto; text-align: left;">
<div class="card-body">
{% if error is defined and not error is empty %}
<div class='alert alert-danger' style='margin: 5px 0px'>
{{ error }}
</div>
{% endif %}
{{ form_row(form.username) }}
{{ form_row(form.password) }}
{{ form_row(form.submit) }}
</div>
</div>
{{ form_end(form) }}
</div>
{% endblock %}
{% block localscript %}
<script>
$(document).ready(function() {
$("#login_username").focus();
});
</script>
{% endblock %}

View File

@@ -0,0 +1,23 @@
{% extends "base.html.twig" %}
{% block body %}
<div style="text-align:center">
{{ form_start(form, {'action': path('app_loginldapcheck'), 'method': 'POST'}) }}
<div class="card homecard mb-3" style="width:400px; margin:auto; text-align: left;">
<div class="card-body">
{{ form_row(form.username) }}
{{ form_row(form.password) }}
{{ form_row(form.submit) }}
</div>
</div>
{{ form_end(form) }}
</div>
{% endblock %}
{% block localscript %}
<script>
$(document).ready(function() {
$("#login_username").focus();
});
</script>
{% endblock %}

View File

@@ -0,0 +1,35 @@
{% extends "base.html.twig" %}
{% block body %}
<div style="text-align:center">
<form action="{{ path('app_login') }}" method="post">
<div class="card homecard mb-3" style="width:400px; margin:auto">
<div class="card-body">
{% if error %}
<div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
{% endif %}
<label for="username">Login</label>
<input type="text" id="username" name="_username" value="{{ last_username }}" class="form-control" style="margin-bottom:15px;" />
<label for="password">Password</label>
<input type="password" id="password" name="_password" class="form-control" style="margin-bottom:15px;" />
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
<input type="submit" name="login" class="btn btn-success form-control" />
</div>
</div>
</form>
</div>
{% endblock %}
{% block localscript %}
<script>
$(document).ready(function() {
$("#username").focus();
});
</script>
{% endblock %}