Aug 7 - Update External Inspector invitation

This commit is contained in:
2026-08-07 14:59:40 -04:00
parent c686d12e64
commit 9f32ea8286
5 changed files with 149 additions and 14 deletions
+21 -3
View File
@@ -55,10 +55,17 @@
</td>
<td>{{ user.created_at.strftime('%Y-%m-%d') }}</td>
<td>
{% if user.active %}
<span class="badge bg-success">Active</span>
{% else %}
{% if not user.active %}
<span class="badge bg-secondary">Disabled</span>
{% elif not user.password_set %}
{# phase51 — invited but has not chosen a password yet;
the login route refuses them until they do. #}
<span class="badge bg-warning text-dark"
title="Invitation sent — this person has not set their password yet">
<i class="bi bi-envelope"></i> Invite pending
</span>
{% else %}
<span class="badge bg-success">Active</span>
{% endif %}
</td>
<td>
@@ -71,6 +78,17 @@
<i class="bi bi-briefcase"></i>
</a>
{% endif %}
{% if not user.password_set %}
<form method="POST" action="{{ url_for('auth.resend_invite', user_id=user.id) }}"
class="d-inline"
onsubmit="return confirm('Resend the invitation email to {{ user.email }}? The previous link will stop working.');">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<button type="submit" class="btn btn-sm btn-outline-warning"
title="Resend invitation email">
<i class="bi bi-envelope-arrow-up"></i>
</button>
</form>
{% endif %}
{% if user.id != current_user.id %}
<form method="POST" action="{{ url_for('auth.toggle_active', user_id=user.id) }}" class="d-inline">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">