first commit

This commit is contained in:
cedrick2711
2026-07-14 09:50:45 -04:00
commit 4fd27bacfd
43 changed files with 4427 additions and 0 deletions
+83
View File
@@ -0,0 +1,83 @@
{% extends "layouts/base.html" %}
{% block title %}Edit {{ user.full_name }} - TryoutPro{% endblock %}
{% block page_title %}Edit User{% endblock %}
{% block breadcrumb %}<span class="breadcrumb">Home / <a href="{{ url_for('users.list_users') }}">Users</a> / Edit</span>{% endblock %}
{% block content %}
<div class="card">
<div class="card-body">
<form method="POST" action="{{ url_for('users.edit_user', user_id=user.id) }}" class="form">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
<div class="form-row">
<div class="form-group col-6">
<label for="full_name">Full Name</label>
<input type="text" id="full_name" name="full_name" value="{{ user.full_name }}" required>
</div>
<div class="form-group col-6">
<label for="email">Email</label>
<input type="email" id="email" name="email" value="{{ user.email }}" required>
</div>
</div>
<div class="form-row">
<div class="form-group col-4">
<label for="phone">Phone</label>
<input type="tel" id="phone" name="phone" value="{{ user.phone or '' }}">
</div>
<div class="form-group col-4">
<label for="role">Role</label>
<select id="role" name="role" required>
{% for r in roles %}
<option value="{{ r }}" {% if user.role == r %}selected{% endif %}>{{ r | capitalize }}</option>
{% endfor %}
</select>
</div>
<div class="form-group col-4">
<label for="is_active_account">
<input type="checkbox" id="is_active_account" name="is_active_account" {% if user.is_active_account %}checked{% endif %}>
Active Account
</label>
</div>
</div>
<hr class="section-divider">
<h4 class="section-title"><i class="fas fa-gamepad"></i> E-Sports Profile</h4>
<div class="form-group">
<label>Games</label>
<div class="checkbox-grid">
{% for game in esport_games %}
{% set games_list = user.get_games_list() %}
<label class="checkbox-label">
<input type="checkbox" name="games" value="{{ game }}" {% if game in games_list %}checked{% endif %}>
<span>{{ game }}</span>
</label>
{% endfor %}
</div>
</div>
<div class="form-row">
<div class="form-group col-4">
<label for="trn_username">TRN (Tracker Network) Username</label>
<input type="text" id="trn_username" name="trn_username" value="{{ user.trn_username or '' }}" placeholder="Tracker Network username">
</div>
<div class="form-group col-4">
<label for="discord_username">Discord Username</label>
<input type="text" id="discord_username" name="discord_username" value="{{ user.discord_username or '' }}" placeholder="e.g. Name#1234">
</div>
<div class="form-group col-4">
<label for="league_os_profile">League OS Connection</label>
<input type="text" id="league_os_profile" name="league_os_profile" value="{{ user.league_os_profile or '' }}" placeholder="League OS profile link or ID">
</div>
</div>
<div class="form-group">
<label for="password">New Password <small>(leave blank to keep current)</small></label>
<input type="password" id="password" name="password" placeholder="Enter new password">
</div>
<div class="form-actions">
<a href="{{ url_for('users.list_users') }}" class="btn btn-secondary">Cancel</a>
<button type="submit" class="btn btn-primary">Update User</button>
</div>
</form>
</div>
</div>
{% endblock %}