pywallter/templates/profil.html

93 lines
4.7 KiB
HTML
Raw Normal View History

2020-11-29 02:05:19 +01:00
{% extends 'up_squelette.html' %}
{% block navbar %}
<!-- Fixed navbar -->
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<!--<li class="active"><a href="/blog/">Blog</a></li>-->
</div>
<div class="navbar-collapse collapse">
2022-07-10 15:09:03 +02:00
<ul class="nav navbar-nav">
<li><a href="/post-it/"><span class="glyphicon glyphicon-globe" aria-hidden="true"></span> Tableau des post-it !</a></li>
<li><a href="/filesupload/"><span class="glyphicon glyphicon-cloud-upload" aria-hidden="true"></span> Upload</a></li>
<li><a href="/view/"><span class="glyphicon glyphicon-cloud-download" aria-hidden="true"></span> Fichiers</a></li>
<li><a href="/gallery/"><span class="glyphicon glyphicon-eye-open" aria-hidden="true"></span> Gallerie</a></li>
<li><a href="/logs/"><span class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span> Logs</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-home" aria-hidden="true"></span> <span id="majuscule">{{ session['username'] }} <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="/profil/{{ session['username'] }}"><span class="glyphicon glyphicon-user" aria-hidden="true"></span> Profil</a></li>
<li><a href="/parametres/"><span class="glyphicon glyphicon-cog" aria-hidden="true"></span> Paramètres</a></li>
<li class="divider"></li>
2020-11-29 02:05:19 +01:00
<!--<li class="dropdown-header">Nav header</li>-->
2022-07-10 15:09:03 +02:00
<li><a href="/logout/"><span class="glyphicon glyphicon-off" aria-hidden="true"></span> Déconnexion</a></li>
</ul>
</li>
</ul>
2020-11-29 02:05:19 +01:00
<ul class="nav navbar-nav navbar-right">
<li><a href="/logout/"><span class="glyphicon glyphicon-off" aria-hidden="true"></span> Exit</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
{% endblock %}
{% block main %}
<!--<div class="page-header">
<h1>Profil</h1>
</div>-->
<div class="row">
<div class="col-sm-3"></div>
<div class="col-sm-6">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Informations personnelles</h3>
</div>
<div class="panel-body">
<form method="POST" action="" enctype="multipart/form-data">
2022-07-10 15:09:03 +02:00
<div id="fic">
<label> Photo de profil </label>
<input type="file" name="fic" id="fic"/><br>
<img id="fic" src="/static/usersprofil/{{ profil['avatar'] }}" class="img-rounded" alt=""/>
</div>
<br>
<label>Nom </label>
<input type="text" name="nom" id="nom" value="{{ profil['nom'] }}" class="form-control"><br />
<label>Prenom </label>
<input type="text" name="prenom" id="prenom" value="{{ profil['prenom'] }}" class="form-control"><br />
<label> Age </label>
<input type="text" name="age" value="{{ profil['age'] }}" class="form-control"><br />
<label> Mail de secours </label>
<input type="text" name="mail_rescue" id="mail_rescue" value="{{ profil['mail_rescue'] }}" class="form-control"><br />
2020-11-29 02:05:19 +01:00
<button id="tada" class="btn btn-default btn-primary" type="submit">Envoyer</button>
</form>
{# on affiche les messages d'erreur puis les messages de succes #}
{% for categorie in ['error', 'succes'] %}
{% with msgs = get_flashed_messages(category_filter=[categorie]) %}
{% if msgs %}
<div class="flashed {{ categorie }}">
{% for m in msgs %}
<p>{{ m|safe }}</p>
{% endfor %}
</div>
{% endif %}
{% endwith %}
{% endfor %}
</div>
</div>
</div>
</div>
{% endblock %}