init project cleaned
This commit is contained in:
16
templates/forms/user/change_password.html.twig
Normal file
16
templates/forms/user/change_password.html.twig
Normal file
@@ -0,0 +1,16 @@
|
||||
<form class="" action="/change_password/{{user.password}}" method="post" enctype="multipart/form-data">
|
||||
{# Error message #}
|
||||
{% if message_error is defined %}<div class="text-danger text-center font-weight-bold mb-3">{{ message_error }}</div>{% endif %}
|
||||
{# Password #}
|
||||
<div class="form-floating mt-3">
|
||||
<input class="form-control rounded-4" name="password" type="password" placeholder="mdp" required>
|
||||
<label for="password">Mot de passe</label>
|
||||
</div>
|
||||
{# Password again #}
|
||||
<div class="form-floating mt-3">
|
||||
<input class="form-control" name="repassword" type="password" placeholder="mdp" required>
|
||||
<label for="repassword">Confirmez le mot de passe</label>
|
||||
</div>
|
||||
{# Submit button #}
|
||||
<button class="w-100 mb-2 btn btn-lg rounded-4 btn-primary mt-3" type="submit">Envoyer</button>
|
||||
</form>
|
||||
13
templates/forms/user/forgotpassword.html.twig
Normal file
13
templates/forms/user/forgotpassword.html.twig
Normal file
@@ -0,0 +1,13 @@
|
||||
<form class="" action="/forgotpassword" method="post" enctype="multipart/form-data">
|
||||
{# Email #}
|
||||
<div class="form-floating mt-3 mb-3">
|
||||
<input class="form-control" name="email" type="email" placeholder="JohnDoe" required>
|
||||
<label for="email">Email</label>
|
||||
</div>
|
||||
{# Submit button #}
|
||||
<button class="w-100 mb-2 btn btn-lg rounded-4 btn-primary" type="submit">Envoyer</button>
|
||||
{# Forgot password #}
|
||||
<a href="/login" class="text-muted fs-6">Se connecter</a><br>
|
||||
{# Register #}
|
||||
<a href="/register" class="text-muted fs-6">Créer un compte</a>
|
||||
</form>
|
||||
43
templates/forms/user/login.html.twig
Normal file
43
templates/forms/user/login.html.twig
Normal file
@@ -0,0 +1,43 @@
|
||||
<form class="" action="/login" method="post">
|
||||
{% if message_login is defined %}<div class="text-danger text-center font-weight-bold mb-3">{{ message_login }}</div>{% endif %}
|
||||
{# Email #}
|
||||
<div class="form-floating mb-3">
|
||||
<input name="username" type="text" class="form-control rounded-4" id="floatingUser" placeholder="name@example.com">
|
||||
<label for="floatingUser">Nom d'utilisateur ou Email</label>
|
||||
</div>
|
||||
{# Password #}
|
||||
<div class="form-floating mb-3">
|
||||
<input name="password" type="password" class="form-control rounded-4" id="floatingPassword" placeholder="Password">
|
||||
<label for="floatingPassword">Mot de passe</label>
|
||||
</div>
|
||||
{# Error message #}
|
||||
{# Submit button #}
|
||||
<button class="w-100 mb-3 btn btn-lg rounded-4 btn-primary" type="submit">Se connecter</button>
|
||||
{# Forgot password #}
|
||||
<a href="/forgotpassword" class="color-hover">Mot de passe oublié ?</a><br>
|
||||
{# Register #}
|
||||
<a href="/register" class="color-hover">Créer un compte</a>
|
||||
{# Divider #}
|
||||
<hr class="my-4">
|
||||
{# Third party #}
|
||||
<h2 class="fs-5 fw-bold mb-3 text-center">Ou</h2>
|
||||
{# Google #}
|
||||
<div id="g_id_onload"
|
||||
data-client_id="723424966880-015kn0qncavlgbj4j3k1ggs3arn7tdkd.apps.googleusercontent.com"
|
||||
data-login_uri="/auth"
|
||||
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>
|
||||
{# GitHub #}
|
||||
<button class=" w-100 py-2 mb-2 btn btn-outline-secondary rounded-4" type="submit">
|
||||
<span class="mdi mdi-github"></span>
|
||||
Se connecter avec GitHub
|
||||
</button>
|
||||
</form>
|
||||
78
templates/forms/user/register.html.twig
Normal file
78
templates/forms/user/register.html.twig
Normal file
@@ -0,0 +1,78 @@
|
||||
<form class="" action="/register" method="post" enctype="multipart/form-data">
|
||||
{# Error message #}
|
||||
{% if message_register is defined %}<div class="text-danger font-weight-bold mt-3">{{ message_register }}</div>{% endif %}
|
||||
{# UserName #}
|
||||
<div class="form-floating mt-3">
|
||||
<input class="form-control" name="username" type="text" placeholder="JohnDoe" required>
|
||||
<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" required>
|
||||
<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" required>
|
||||
<label for="password">Mot de passe</label>
|
||||
</div>
|
||||
{# Password again #}
|
||||
<div class="form-floating mt-3">
|
||||
<input class="form-control" name="repassword" type="password" placeholder="mdp" required>
|
||||
<label for="repassword">Confirmez le mot de passe</label>
|
||||
</div>
|
||||
{# Image #}
|
||||
<div class="form-group mt-3">
|
||||
<label for="input-image" class="input-label-img d-flex">
|
||||
<input name="image" type="file" accept="image/png, image/jpg, image/gif, image/jpeg"/>
|
||||
<span>Image de profil </span>
|
||||
</label>
|
||||
{# <label class="" for="image">Image</label>
|
||||
<input class="form-control" name="image" type="file"> #}
|
||||
</div>
|
||||
{# Submit button #}
|
||||
<button class="w-100 mt-3 mb-3 btn btn-lg rounded-4 btn-primary" type="submit">S'inscrire</button>
|
||||
{# Login #}
|
||||
<a href="/forgotpassword" class="color-hover">Mot de passe oublié ?</a><br>
|
||||
<a href="/login" class="color-hover">Se connecter</a>
|
||||
{# Divider #}
|
||||
<hr class="my-4">
|
||||
{# Third-Party #}
|
||||
<h2 class="fs-5 fw-bold mb-3 text-center">Ou</h2>
|
||||
{# Google #}
|
||||
<div id="g_id_onload"
|
||||
data-client_id="723424966880-015kn0qncavlgbj4j3k1ggs3arn7tdkd.apps.googleusercontent.com"
|
||||
data-login_uri="/auth"
|
||||
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>
|
||||
{# GitHub #}
|
||||
<button class=" w-100 py-2 mb-2 btn btn-outline-secondary rounded-4" type="submit">
|
||||
<span class="mdi mdi-github"></span>
|
||||
Se connecter avec GitHub
|
||||
</button>
|
||||
</form>
|
||||
|
||||
{# CSS #}
|
||||
<style media= "screen" >
|
||||
.input-label-img {
|
||||
border: 1px solid #ccc;
|
||||
display: inline-block;
|
||||
padding: 6px 12px;
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
border-radius: 0.25rem;
|
||||
height: calc(3.5rem + 2px);
|
||||
padding: 1rem 0.75rem;
|
||||
}
|
||||
.input-label-img > input {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
26
templates/forms/user/register_google.html.twig
Normal file
26
templates/forms/user/register_google.html.twig
Normal file
@@ -0,0 +1,26 @@
|
||||
<form class="" action="/register_google/{{registrable_user.username}}" method="post" enctype="multipart/form-data">
|
||||
{# Email #}
|
||||
<div class="form-floating mt-3">
|
||||
<input class="form-control" name="email" type="email" value ={{registrable_user.email}} placeholder = "mail@example.com" disabled >
|
||||
<label for="username">Email</label>
|
||||
</div>
|
||||
{# UserName #}
|
||||
<div class="form-floating mt-3">
|
||||
<input class="form-control" name="username" type="text" placeholder="JohnDoe" value ={{registrable_user.email}} required>
|
||||
<label for="username">Nom d'utilisateur</label>
|
||||
</div>
|
||||
{# Password #}
|
||||
<div class="form-floating mt-3">
|
||||
<input class="form-control rounded-4" name="password" type="password" placeholder="mdp" required>
|
||||
<label for="password">Mot de passe</label>
|
||||
</div>
|
||||
{# Error message #}
|
||||
{% if message is defined %}<div class="text-danger font-weight-bold mt-3">{{ message }}</div>{% endif %}
|
||||
{# Password again #}
|
||||
<div class="form-floating mt-3">
|
||||
<input class="form-control" name="repassword" type="password" placeholder="mdp" required>
|
||||
<label for="repassword">Confirmez le mot de passe</label>
|
||||
</div>
|
||||
{# Submit button #}
|
||||
<button class="w-100 mt-3 mb-3 btn btn-lg rounded-4 btn-primary" type="submit">S'inscrire</button>
|
||||
</form>
|
||||
Reference in New Issue
Block a user