admin change for users and add campaign button

This commit is contained in:
Yisroel Baum 2024-09-24 12:39:42 +03:00
parent 7ada4b2a6f
commit d6c532ea49

View file

@ -15,7 +15,8 @@
<th>First Name</th> <th>First Name</th>
<th>Last Name</th> <th>Last Name</th>
<th>Email</th> <th>Email</th>
<th>User Type</th> <th>Is Admin?</th>
<th>Change Admin Status</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -25,7 +26,18 @@
<td>{{user.first_name}}</td> <td>{{user.first_name}}</td>
<td>{{user.last_name}}</td> <td>{{user.last_name}}</td>
<td>{{user.email}}</td> <td>{{user.email}}</td>
<td>{{user.user_type}}</td> <td id="{{user.id}}-admin-status">{% if user.user_type == 'Admin' %}True{%else%}False{%endif%}</td>
<td>
<label class="switch">
<input
type="checkbox"
value="{{user.id}}"
id="admin-checkbox-{{user.id}}"
class="change-admin-btn"
{%if user.user_type == 'Admin'%}checked{%endif%}>
<span class="slider round"></span>
</label>
</td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
@ -33,8 +45,10 @@
</div> </div>
<div class="container my-4 px-5"> <div class="container my-4 px-5">
<h2 class="text-center">Campaigns</h2> <div class="d-flex justify-content-center align-items-center">
<h2 class="me-3">Campaigns</h2>
<a href="{{url_for('campaigns.add_campaign')}}" class="btn btn-primary">New Campaign</a>
</div>
<table class="table table-bordered table-striped"> <table class="table table-bordered table-striped">
<thead class="table-dark"> <thead class="table-dark">
<tr> <tr>