diff options
author | MrArmonius <mrarmonius@gmail.com> | 2021-07-30 00:04:17 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-08-16 12:54:08 +0200 |
commit | a2a484daba1ef42d82f596a989caf203ee9a370f (patch) | |
tree | a3ec45738fa59448dd99d6dd5e69172f18043e90 /templates | |
parent | 0ca6a159b215967a6d13b9bad5c008983e032c3f (diff) | |
download | guichet-a2a484daba1ef42d82f596a989caf203ee9a370f.tar.gz guichet-a2a484daba1ef42d82f596a989caf203ee9a370f.zip |
Add profile image front-end and back-end
Correct when empty result
The image showed when the result was empty. Now if the `dn == ""` then we
write in the column image just `""`
Diffstat (limited to 'templates')
-rw-r--r-- | templates/directory.html | 1 | ||||
-rw-r--r-- | templates/profile.html | 16 |
2 files changed, 14 insertions, 3 deletions
diff --git a/templates/directory.html b/templates/directory.html index e91354d..f9bad61 100644 --- a/templates/directory.html +++ b/templates/directory.html @@ -19,6 +19,7 @@ <table class="table mt-4"> <thead> + <th scope="col">Profil image</th> <th scope="col">Identifiant</th> <th scope="col">Nom complet</th> <th scope="col">Email</th> diff --git a/templates/profile.html b/templates/profile.html index 5445d6d..92e229a 100644 --- a/templates/profile.html +++ b/templates/profile.html @@ -5,7 +5,10 @@ <h4>Modifier mon profil</h4> <a class="ml-auto btn btn-info" href="/">Retour</a> </div> - +<h5>Photo de profil</h5> +<object data="/image/{{ .Status.Info.DN}}/full" class=".img-thumbnail"> + <img src="/image/unknown_profile/full" alt="Stack Overflow logo and icons and such"> +</object> {{if .ErrorMessage}} <div class="alert alert-danger mt-4">Impossible d'effectuer la modification. <div style="font-size: 0.8em">{{ .ErrorMessage }}</div> @@ -16,7 +19,7 @@ Profil enregistré. </div> {{end}} - <form method="POST" class="mt-4"> + <form method="POST" class="mt-4" enctype="multipart/form-data"> <div class="form-group"> <label>Nom d'utilisateur:</label> <input type="text" disabled="true" class="form-control" value="{{ .Status.Info.Username }}" /> @@ -43,12 +46,19 @@ </div> <div class="form-group form-check"> {{if .Visibility}} - <input class="form-check-input" name="visibility" type="checkbox" id="visibility" checked> + <input class="form-check-input" name="visibility" type="checkbox" id="visibility" value="on" checked> {{else}} <input class="form-check-input" name="visibility" type="checkbox" id="visibility"> {{end}} <label class="form-check-label" for="visibility">Apparaît sur l'annuaire</label> </div> + <div class="form-group input-group mb-3"> + <div class="form-group custom-file"> + <input type="file" name="image" class="custom-file-input" id="image"> + <label class="custom-file-label" for="image">Choose picture (jpeg, jpg or png)</label> + </div> + </div> <button type="submit" class="btn btn-primary">Enregistrer les modifications</button> </form> + <script src="/static/javascript/minio.js"></script> {{end}} |