parent
7567409574
commit
cca3146dc1
@ -0,0 +1,115 @@
|
||||
@using Blazorise.Components;
|
||||
@using System.ComponentModel.DataAnnotations;
|
||||
|
||||
<head>
|
||||
<link rel="stylesheet" href="css/composants/authentification/FormulaireConnexion.css" />
|
||||
</head>
|
||||
|
||||
<div class="connexion-container">
|
||||
|
||||
<h1 class="title-spacing"> S'inscrire </h1>
|
||||
|
||||
|
||||
<Validations @ref="Validations" Mode="ValidationMode.Manual" Model="Requete">
|
||||
|
||||
<div class="field-container">
|
||||
<Validation>
|
||||
<Field Horizontal>
|
||||
<FieldLabel ColumnSize="ColumnSize.Is2">Pseudo</FieldLabel>
|
||||
<FieldBody ColumnSize="ColumnSize.Is10">
|
||||
<TextEdit Placeholder="Entrez votre pseudo" @bind-Text="@Requete.Pseudo">
|
||||
<Feedback>
|
||||
<ValidationError />
|
||||
</Feedback>
|
||||
</TextEdit>
|
||||
</FieldBody>
|
||||
</Field>
|
||||
</Validation>
|
||||
</div>
|
||||
|
||||
<div class="field-container">
|
||||
<Validation>
|
||||
<Field Horizontal>
|
||||
<FieldLabel ColumnSize="ColumnSize.Is2">Prenom</FieldLabel>
|
||||
<FieldBody ColumnSize="ColumnSize.Is10">
|
||||
<TextEdit Placeholder="Entrez votre pseudo" @bind-Text="@Requete.Prenom">
|
||||
<Feedback>
|
||||
<ValidationError />
|
||||
</Feedback>
|
||||
</TextEdit>
|
||||
</FieldBody>
|
||||
</Field>
|
||||
</Validation>
|
||||
</div>
|
||||
|
||||
<div class="field-container">
|
||||
<Validation>
|
||||
<Field Horizontal>
|
||||
<FieldLabel ColumnSize="ColumnSize.Is2">Nom</FieldLabel>
|
||||
<FieldBody ColumnSize="ColumnSize.Is10">
|
||||
<TextEdit Placeholder="Entrez votre pseudo" @bind-Text="@Requete.Nom">
|
||||
<Feedback>
|
||||
<ValidationError />
|
||||
</Feedback>
|
||||
</TextEdit>
|
||||
</FieldBody>
|
||||
</Field>
|
||||
</Validation>
|
||||
</div>
|
||||
|
||||
<div class="field-container">
|
||||
<Validation>
|
||||
<Field Horizontal>
|
||||
<FieldLabel ColumnSize="ColumnSize.Is2">Mail</FieldLabel>
|
||||
<FieldBody ColumnSize="ColumnSize.Is10">
|
||||
<TextEdit Placeholder="Entrez votre pseudo" @bind-Text="@Requete.Mail">
|
||||
<Feedback>
|
||||
<ValidationError />
|
||||
</Feedback>
|
||||
</TextEdit>
|
||||
</FieldBody>
|
||||
</Field>
|
||||
</Validation>
|
||||
</div>
|
||||
|
||||
<div class="field-container">
|
||||
<Validation>
|
||||
<Field Horizontal>
|
||||
<FieldLabel ColumnSize="ColumnSize.Is2">Mot de passe</FieldLabel>
|
||||
<FieldBody ColumnSize="ColumnSize.Is10">
|
||||
<TextEdit Placeholder="Entrez votre mot de passe" @bind-Text="@Requete.MotDePasse">
|
||||
<Feedback>
|
||||
<ValidationError />
|
||||
</Feedback>
|
||||
</TextEdit>
|
||||
</FieldBody>
|
||||
</Field>
|
||||
</Validation>
|
||||
</div>
|
||||
|
||||
<div class="field-container">
|
||||
<Validation>
|
||||
<Field Horizontal>
|
||||
<FieldLabel ColumnSize="ColumnSize.Is2">Confirmer le mot de passe</FieldLabel>
|
||||
<FieldBody ColumnSize="ColumnSize.Is10">
|
||||
<TextEdit Placeholder="Entrez votre mot de passe" @bind-Text="@Requete.MotDePasseConfirmation">
|
||||
<Feedback>
|
||||
<ValidationError />
|
||||
</Feedback>
|
||||
</TextEdit>
|
||||
</FieldBody>
|
||||
</Field>
|
||||
</Validation>
|
||||
</div>
|
||||
|
||||
<div class="btn-container">
|
||||
<Button Class="btn-se-connecter" Clicked="@OnSubmit">S'inscrire</Button>
|
||||
<Button Class="btn-s-inscrire" Clicked="@OnAnnulation">Annuler</Button>
|
||||
</div>
|
||||
|
||||
|
||||
<label class="text-danger">@Erreur</label>
|
||||
|
||||
</Validations>
|
||||
|
||||
</div>
|
@ -1,7 +1,43 @@
|
||||
using Blazorise;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using VeraxShield.composants.formulaires.modeles;
|
||||
|
||||
namespace VeraxShield.composants.authentification
|
||||
{
|
||||
public partial class FormulaireConnexion
|
||||
public partial class FormulaireInscription
|
||||
{
|
||||
|
||||
[Parameter]
|
||||
public Validations Validations {get; set;}
|
||||
|
||||
public RequeteInscription Requete {get; set;}
|
||||
|
||||
[Inject]
|
||||
private NavigationManager NavigationManager {get; set;}
|
||||
|
||||
[Inject]
|
||||
private DonneurEtat DonneurEtat {get; set;}
|
||||
|
||||
public String Erreur {get; set; }
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
this.Requete = new RequeteInscription();
|
||||
await base.OnInitializedAsync();
|
||||
}
|
||||
|
||||
public async Task OnSubmit()
|
||||
{
|
||||
if (await this.Validations.ValidateAll())
|
||||
{
|
||||
await DonneurEtat.Inscription(this.Requete);
|
||||
NavigationManager.NavigateTo("/connexion");
|
||||
}
|
||||
}
|
||||
|
||||
public async Task OnAnnulation()
|
||||
{
|
||||
this.NavigationManager.NavigateTo("/connexion");
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
@using VeraxShield.composants.authentification;
|
||||
|
||||
@page "/inscription"
|
||||
|
||||
<head>
|
||||
<link rel="stylesheet" href="css/pages/authentification/Inscription.css" />
|
||||
</head>
|
||||
|
||||
<div class="centrer-composant">
|
||||
|
||||
<div class="formulaire-inscription">
|
||||
<FormulaireInscription />
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,20 @@
|
||||
.centrer-composant {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.formulaire-inscription {
|
||||
width: 53%;
|
||||
/* border: 2px solid black;
|
||||
border-radius: 10px; */
|
||||
/* padding: 20px; */
|
||||
}
|
||||
|
||||
body {
|
||||
background-image: url('/ressources/images/fondPages/fondConnexion.webp');
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
Loading…
Reference in new issue