muizenval

Observe mouse traps remotely
Log | Files | Refs

admin_user.html (2326B)


      1 {% extends "layout.html" %}
      2 {% block content %}
      3 <div class="media">
      4     <img class="rounded-circle account-img" src="{{ image_file }}">
      5     <div class="media-body">
      6         <h2 class="account-heading">{{ user.username }}</h2>
      7         <p class="text-secondary">{{ user.email }}</p>
      8     </div>
      9 </div>
     10 <form method="POST" action="">
     11     {{ form.hidden_tag() }}
     12     <fieldset class="form-group">
     13         <legend class="border-bottom mb-4">Rechten bewerken!</legend>
     14         <div class="form-group">
     15             {{ form.type.label(class="form-control-label") }}
     16             {% if form.type.errors %}
     17             {{ form.type(class="form-control form-control-lg is-invalid") }}
     18             <div class="invalid-feedback">
     19                 {% for error in form.type.errors %}
     20                 <span>{{ error }}</span>
     21                 {% endfor %}
     22             </div>
     23             {% else %}
     24             {{ form.type(class="form-control form-control-lg") }}
     25             {% endif %}
     26         </div>
     27     </fieldset>
     28     <div class="form-group">
     29         <button type="button" class="btn btn-danger" data-toggle="modal" data-target="#deleteModal">Verwijderen</button>
     30         <a class="btn btn-danger" href="{{ url_for('reset_user', user_id=user.id) }}">Wachtwoord
     31             resetten</a>
     32         <br><br>
     33         {{ form.submit(class="btn btn-outline-info") }}
     34     </div>
     35 </form>
     36 <!-- Modal -->
     37 <div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel"
     38     aria-hidden="true">
     39     <div class="modal-dialog" role="document">
     40         <div class="modal-content">
     41             <div class="modal-header">
     42                 <h5 class="modal-title" id="deleteModalLabel">Profiel verwijderen?</h5>
     43                 <button type="button" class="close" data-dismiss="modal" aria-label="Close">
     44                     <span aria-hidden="true">&times;</span>
     45                 </button>
     46             </div>
     47             <div class="modal-footer">
     48                 <button type="button" class="btn btn-secondary" data-dismiss="modal">Sluiten</button>
     49                 <form action="{{ url_for('delete_user', user_id=user.id) }}" method="POST">
     50                     <input class="btn btn-danger" type="submit" value="Delete">
     51                 </form>
     52             </div>
     53         </div>
     54     </div>
     55 </div>
     56 {% endblock content %}