init project cleaned

This commit is contained in:
2023-01-05 11:21:32 +01:00
commit bc98268740
54 changed files with 3861 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
{% extends 'base.html.twig' %}
{% block title %}Rénitialisation mot de passe{% endblock %}
{% block body %}
<head>
<!-- Custom -->
</head>
<body>
{% include "header.html.twig"%}
<main>
<div class="my-5 modal position-static d-block" tabindex="-1" role="dialog" id="modalSignup">
<div class="modal-dialog" role="document">
<div class="modal-content rounded-5 border-0">
<div class="modal-header p-5 pb-4 border-bottom-0">
<h2 class="fw-bold mb-0">Choisir un nouveau mot de passe</h2>
</div>
{# Message changement ok #}
{% if message_changement is defined %}<div class="text-success font-weight-bold ps-5 pe-5">{{ message_changement }}</div>{% endif %}
<div class="modal-body p-5 pt-0">
{% include 'forms/user/change_password.html.twig' %}
</div>
</div>
</div>
</div>
</main>
{% include "footer.html.twig"%}
</body>
{% endblock %}

View File

@@ -0,0 +1,32 @@
{% extends 'base.html.twig' %}
{% block title %}Mot de passe oublié{% endblock %}
{% block body %}
<head>
<!-- Custom -->
</head>
<body>
{% include "header.html.twig"%}
<main>
<div class="my-5 modal position-static d-block" tabindex="-1" role="dialog" id="modalSignup">
<div class="modal-dialog" role="document">
<div class="modal-content rounded-5 border-0">
<div class="modal-header p-5 pb-4 border-bottom-0">
<!-- <h5 class="modal-title">Modal title</h5> -->
<h2 class="fw-bold mb-0">Mot de passe oublié</h2>
</div>
{# Message mail envoyé ou pas#}
{% if message_password is defined %}<div class="text-success font-weight-bold ps-5 pe-5">{{ message_password }}</div>{% endif %}
{% if message_mail_nok is defined %}<div class="text-danger font-weight-bold ps-5 pe-5">{{ message_mail_nok }}</div>{% endif %}
<div class="modal-body p-5 pt-0">
{% include 'forms/user/forgotpassword.html.twig' %}
</div>
</div>
</div>
</div>
</main>
{% include "footer.html.twig"%}
</body>
{% endblock %}

30
templates/user/login.html.twig Executable file
View File

@@ -0,0 +1,30 @@
{% extends 'base.html.twig' %}
{% block title %}Connexion{% endblock %}
{% block body %}
<head>
<!-- Custom -->
</head>
<body>
{% include "header.html.twig"%}
<main>
<div class="my-5 modal position-static d-block" tabindex="-1" role="dialog" id="modalSignup">
<div class="modal-dialog" role="document">
<div class="modal-content rounded-5 border-0">
<div class="modal-header p-5 pb-4 border-bottom-0">
<!-- <h5 class="modal-title">Modal title</h5> -->
<h2 class="fw-bold mb-0">Connexion</h2>
</div>
<div class="modal-body p-5 pt-0">
{% include 'forms/user/login.html.twig' %}
</div>
</div>
</div>
</div>
</main>
{% include "footer.html.twig"%}
</body>
{% endblock %}

View File

@@ -0,0 +1,75 @@
{% extends 'base.html.twig' %}
{% block title %}{{user.username}}{% endblock %}
{% block body %}
<head>
<!-- Custom -->
</head>
<body>
{% include 'header.html.twig' %}
<main>
<div class="d-flex flex-column justify-content-center align-items-center">
<h2 class="fw-bold mt-3">Profil</h2>
<form action="/profile/{{user.id}}" class="w-75" method="post" enctype="multipart/form-data">
{# Username #}
<div class="form-floating mt-3">
<input class="form-control" name="username" type="text" placeholder="JohnDoe" value="{{user.username}}">
<label for="username">Nom d'utilisateur</label>
</div>
{# Email #}
<div class="form-floating mt-3">
<input class="form-control" name="email" type="email" placeholder = "mail@example.com" value="{{user.email}}">
<label for="username">Email</label>
</div>
{# Password #}
<div class="form-floating mt-3">
<input class="form-control rounded-4" name="password" type="password" placeholder="mdp">
<label for="password">Mot de passe</label>
</div>
{# Error message #}
{% if message_register is defined %}<div class="text-danger font-weight-bold mt-3">{{ message_register }}</div>{% endif %}
{# Password again #}
<div class="form-floating mt-3">
<input class="form-control" name="repassword" type="password" placeholder="mdp" >
<label for="repassword">Confirmez le mot de passe</label>
</div>
{# Image #}
<div class="form-group mt-3 w-50" style="float:left">
<label for="image">Image</label>
<input class="form-control" name="image" type="file">
</div>
<div class ="w-50 ps-4" style="float:right">
<img src="{{user.image}}" alt="Image de profil" height="128" class="mt-3">
</div>
{# Submit #}
<button class="mt-3 mb-3 btn btn-lg rounded-4 btn-primary" type="submit">Modifier</button>
{# Delete #}
<a class=" btn btn-lg ms-3 rounded-4 btn-danger" href="/delete/{{user.id}}" comfirm="Êtes vous sure de vouloir supprimer votre compte ?">Supprimer le compte</a
</form>
{# Message profil maj #}
{% if message_profile is defined %}<div class="text-success font-weight-bold">{{ message_profile }}</div>{% endif %}
</div>
{% if user.google == "" %}
<p class="text-center mt-3">AJOUTER GOOGLE AU COMPTE</p>
<div id="g_id_onload"
data-client_id="723424966880-015kn0qncavlgbj4j3k1ggs3arn7tdkd.apps.googleusercontent.com"
data-login_uri="/auth/{{user.id}}"
data-auto_prompt="false">
</div>
<div class="g_id_signin d-flex justify-content-center mb-2"
data-type="standard"
data-size="large"
data-theme="filled_black"
data-text="sign_in_with"
data-shape="rectangular"
data-logo_alignment="left">
</div>
{% endif %}
</main>
{% include "footer.html.twig"%}
</body>
{% endblock %}

View File

@@ -0,0 +1,31 @@
{% extends 'base.html.twig' %}
{% block title %}Inscription{% endblock %}
{% block body %}
<head>
<!-- Custom -->
</head>
<body>
{% include "header.html.twig"%}
<main>
<div class="my-5 modal position-static d-block" tabindex="-1" role="dialog" id="modalSignup">
<div class="modal-dialog" role="document">
<div class="modal-content rounded-5 border-0">
<div class="modal-header p-5 pb-4 border-bottom-0">
<!-- <h5 class="modal-title">Modal title</h5> -->
<h2 class="fw-bold mb-0">Inscription</h2>
</div>
<div class="modal-body p-5 pt-0">
{% include 'forms/user/register.html.twig' %}
</div>
</div>
</div>
</div>
</main>
{% include "footer.html.twig"%}
</body>
{% endblock %}

View File

@@ -0,0 +1,28 @@
{% extends 'base.html.twig' %}
{% block title %}Inscription{% endblock %}
{% block body %}
<head>
<!-- Custom -->
</head>
<body>
{% include "header.html.twig"%}
<main>
<div class="my-5 modal position-static d-block" tabindex="-1" role="dialog" id="modalSignup">
<div class="modal-dialog" role="document">
<div class="modal-content rounded-5 border-0">
<div class="modal-header p-5 pb-4 border-bottom-0">
<h2 class="fw-bold mb-0">Inscription via Google</h2>
<img src="/static/img/Google_logo.png" alt="Google_logo" height="50" >
</div>
<div class="modal-body p-5 pt-0">
{% include 'forms/user/register_google.html.twig' %}
</div>
</div>
</div>
</div>
</main>
{% include "footer.html.twig"%}
</body>
{% endblock %}

View File

@@ -0,0 +1,37 @@
{% extends 'base.html.twig' %}
{% block title %}Administration utilisateurs{% endblock %}
{% block body %}
<head>
<!-- Custom -->
<link href="/static/dashboard/dashboard.css" rel="stylesheet">
</head>
{% include 'header.html.twig' %}
{# {% include 'forms/video' %} #}
<div class="card m-4">
<table class="table table-striped table-bordered">
<thead class="text-uppercase">
<tr>
<th scope="col" style="max-width: 80px">Image</th>
<th scope="col" class="w-100">Username<a class="btn btn-primary mdi mdi-account-plus" href="/add_user"></a></th>
</tr>
</thead>
<tbody>
{% for user in users %}
<tr>
<td><img src="{{user.image}}" alt="" style="max-width: 80px"></td>
{% if user.password == "" %}
<td>
<button class="btn btn-primary mdi mdi-content-copy copy-input" input="#copyKey{{user.id}}"></button>
<input type="text" value="{{uri}}/register/{{ user.username }}" id="copyKey{{user.id}}">
</td>
{% else %}
<td>{{user.username}}</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}

View File

@@ -0,0 +1,15 @@
{% extends 'base.html.twig' %}
{% block title %}Compte supprimé{% endblock %}
{% block body %}
<div class="text-center pt-5" style="height:100vh;">
<h1>Votre compte a bien été supprimé</h1>
<hr class="mx-5 mb-4">
<a href="/" class="btn btn-primary btn-lg mdi mdi-arrow-left">&nbsp;Accueil</a>
</div>
{% endblock %}