Add attendee type management and staff codes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-25 07:17:47 +00:00
parent dec6446d7d
commit 64ab1d0412
16 changed files with 844 additions and 78 deletions
+2 -31
View File
@@ -5,17 +5,10 @@
{% block content %}
<div class="auth-container">
<div class="auth-box">
<h2>{{ 'login'|t }}</h2>
<div class="user-type-tabs">
<button type="button" class="tab-btn" data-type="breakout_organizer">{{ 'presenter'|t }}</button>
<button type="button" class="tab-btn" data-type="staff">{{ 'staff'|t }}</button>
<button type="button" class="tab-btn" data-type="attendee">{{ 'visitor'|t }}</button>
<button type="button" class="tab-btn" data-type="organizer">{{ 'organizer'|t }}</button>
</div>
<h2>{{ 'organizer_login'|t }}</h2>
<form method="POST" action="{{ url_for('login') }}">
<input type="hidden" name="user_type" id="user_type" value="attendee">
<input type="hidden" name="user_type" value="organizer">
<div class="form-group">
<label for="email">{{ 'email'|t }}</label>
@@ -36,26 +29,4 @@
</p>
</div>
</div>
<script>
document.querySelectorAll('.tab-btn').forEach(btn => {
btn.addEventListener('click', function() {
document.querySelectorAll('.tab-btn').forEach(b => b.classList.remove('active'));
this.classList.add('active');
document.getElementById('user_type').value = this.dataset.type;
});
});
// Pre-select tab based on passed default_type
const params = new URLSearchParams(window.location.search);
const type = params.get('type');
if (type) {
const btn = document.querySelector(`.tab-btn[data-type="${type}"]`);
if (btn) {
document.querySelectorAll('.tab-btn').forEach(b => b.classList.remove('active'));
btn.classList.add('active');
document.getElementById('user_type').value = type;
}
}
</script>
{% endblock %}