Update register.html

This commit is contained in:
augustin64 2023-03-04 19:48:37 +01:00
parent d5a59248ab
commit 46684a0f7e
2 changed files with 5 additions and 1 deletions

View File

@ -68,6 +68,7 @@ def add_user():
# Success, go to the login page.
user = User(name=username)
try:
if album_uuid != "":
user.join_album(album_uuid)
flash(f"Utilisateur {username} créé")
return redirect("/albums")

View File

@ -12,6 +12,8 @@
<input type="password" name="password" id="password" required>
<input type="submit" value="Créer un compte">
</form>
{% if g.user.access_level == 1 %}
<!-- Uniquement pour /add-user -->
<label for="album_uuid">Ajouter à un album: </label>
<select name="album_uuid" id="album_uuid" form="add-user-form">
<option value="">Aucun</option>
@ -19,4 +21,5 @@
<option value="{{ album['uuid'] }}">{{ album["name"] }}</option>
{% endfor %}
</select>
{% endif %}
{% endblock %}