ajouter affichage erreur inscription

This commit is contained in:
Yasder5 2026-02-11 18:21:19 +01:00
parent 9d3ff72100
commit 7ea2d1add5
9 changed files with 81 additions and 35 deletions

View file

@ -1,18 +1,18 @@
<?php
/* Smarty version 5.7.0, created on 2026-02-11 16:40:19
/* Smarty version 5.7.0, created on 2026-02-11 17:20:34
from 'file:views/inscription.tpl' */
/* @var \Smarty\Template $_smarty_tpl */
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
'version' => '5.7.0',
'unifunc' => 'content_698cb0f3a8c260_72571411',
'unifunc' => 'content_698cba62a72df8_61715147',
'has_nocache_code' => false,
'file_dependency' =>
array (
'184f81453f2b8e9c87b8f61bf5df178eaf9a1be4' =>
array (
0 => 'views/inscription.tpl',
1 => 1770649781,
1 => 1770830431,
2 => 'file',
),
),
@ -20,18 +20,18 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
array (
),
))) {
function content_698cb0f3a8c260_72571411 (\Smarty\Template $_smarty_tpl) {
function content_698cba62a72df8_61715147 (\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'D:\\projetphp\\views';
$_smarty_tpl->getInheritance()->init($_smarty_tpl, true);
?>
<?php
$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_268185928698cb0f3a8a4d2_62245512', "content");
$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_1012653795698cba62a6b7c0_71138616', "content");
$_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir);
}
/* {block "content"} */
class Block_268185928698cb0f3a8a4d2_62245512 extends \Smarty\Runtime\Block
class Block_1012653795698cba62a6b7c0_71138616 extends \Smarty\Runtime\Block
{
public function callBlock(\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'D:\\projetphp\\views';
@ -43,7 +43,7 @@ $_smarty_current_dir = 'D:\\projetphp\\views';
<main class="container py-5">
<!-- Centrage horizontal du formulaire -->
<div class="row justify-content-center">
<div class="row justify-content-center position-relative">
<div class="col-12 col-md-10 col-lg-6">
<!-- Carte contenant le formulaire d'inscription -->
@ -56,7 +56,21 @@ $_smarty_current_dir = 'D:\\projetphp\\views';
<p class="text-secondary mb-4">
Créez votre compte utilisateur.
</p>
<?php if (((true && ($_smarty_tpl->hasVariable('arrError') && null !== ($_smarty_tpl->getValue('arrError') ?? null))) && $_smarty_tpl->getSmarty()->getModifierCallback('count')($_smarty_tpl->getValue('arrError')) > 0)) {?>
<div class="alert alert-danger">
<?php
$_from = $_smarty_tpl->getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('arrError'), 'strError');
$foreach0DoElse = true;
foreach ($_from ?? [] as $_smarty_tpl->getVariable('strError')->value) {
$foreach0DoElse = false;
?>
<p><?php echo $_smarty_tpl->getValue('strError');?>
</p>
<?php
}
$_smarty_tpl->getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>
</div>
<?php }?>
<!-- Formulaire d'inscription -->
<!-- Les données seront traitées côté serveur en PHP via la méthode POST -->
<form method="POST">
@ -134,6 +148,19 @@ $_smarty_current_dir = 'D:\\projetphp\\views';
required
>
</div>
<!-- Champ : confirmer le mot de passe -->
<div class="col-12">
<label class="form-label" for="pwd_confirm">
Confirmer le Mot de passe *
</label>
<input
class="form-control"
type="password"
id="pwd_confirm"
name="pwd_confirm"
required
>
</div>
<!-- Champ optionnel : numéro de téléphone -->
<div class="col-12">