Ajouter du javascript

Et ajout de la gestion du fichier des utilisateurs ajoutés en ligne
This commit is contained in:
2026-03-02 20:47:22 +01:00
parent 70a28837fe
commit ce87beb55a
6 changed files with 46 additions and 18 deletions

View File

@@ -3,6 +3,14 @@
<head>
<img src="{{ url_for('static', filename='img/logo.jpg') }}" alt="Logo" width="160">
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
<script>
function added_user(Identifiant){
if (Identifiant){
alert("L'utilisateur " + Identifiant + " à été ajouté");
}
}
added_user("{{added_user}}");
</script>
<meta charset="utf-8">
<title>Accueil</title>
</head>
@@ -17,12 +25,14 @@
<li><a href="{{ url_for('cherche') }}">Rechercher un numéro</a></li>
<li><a href="{{ url_for('ajout') }}">Ajouter un contact</a></li>
</ul>
<h1>Ajouter un utilisateur</h1>
{% if Identifiant == "Alban" %}
<h1>Ajouter un utilisateur</h1>
<form action="{{ url_for('result_add_user') }}" method="post">
<label>Identifiant : <input name="Identifiant" required></label><br>
<label>Mot_de_passe : <input name="Mot_de_passe" required></label><br>
<button type="submit">Ajouter</button>
</form>
{% endif %}
<p><a href="{{ url_for('user_search') }}">Se connecter avec un autre identifiant</a></p>
</body>
</html>

View File

@@ -3,9 +3,7 @@
<head><meta charset="utf-8"><title>Utilisateur ajouté</title></head>
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
<body>
<h1>L'utilisateur {{Identifiant}} à été ajouté</h1>
<p><a href="{{ url_for('index') }}">Retour accueil</a></p>
<p><a href="{{ url_for('add_user') }}">ajouter un autre utilisateur</a></p>
<h1>L'utilisateur {{Identifiant}} à été ajouté</h1>
<p><a href="{{ url_for('user_search') }}">Se connecter avec un autre identifiant</a></p>
</body>
</html>