173 lines
6.5 KiB
HTML
173 lines
6.5 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}Team Dashboard{% endblock %}
|
|
{% block head %}
|
|
<style type="text/css">
|
|
section:not(first-child) {
|
|
margin-top: 15px;
|
|
}
|
|
section:last-child {
|
|
margin-bottom: 30px;
|
|
}
|
|
td:last-child, th:last-child {
|
|
text-align: right;
|
|
}
|
|
form {
|
|
margin-top: 30px;
|
|
margin-bottom: 25px;
|
|
}
|
|
.bigger {
|
|
font-size: medium;
|
|
}
|
|
h4 {
|
|
font-weight: 400;
|
|
}
|
|
th {
|
|
font-weight: normal;
|
|
}
|
|
td, h5 {
|
|
font-weight: 300;
|
|
}
|
|
</style>
|
|
{% endblock %}
|
|
{% block content %}
|
|
<h2>{{ team.name }}</h2>
|
|
<section>
|
|
<div class="row">
|
|
<div class="col s12">
|
|
<div class="card blue darken-1">
|
|
<div class="card-content white-text">
|
|
<span class="card-title">Team key: <code>{{ team.key }}</code></span>
|
|
<p>Share this with your teammates, and keep it in a safe place. <strong>You need your team key
|
|
in order to log in.</strong> If you lose it, an organizer can send it to your team email,
|
|
which is shown below.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% if not team.email_confirmed %}
|
|
<div class="row">
|
|
<div class="col s12">
|
|
<div class="card red darken-2">
|
|
<div class="card-content white-text">
|
|
<span class="card-title">Email unconfirmed</span>
|
|
<p>It looks like you haven't confirmed your email yet. Check the email you used for registration;
|
|
the system should have sent you an email confirmation key. Paste it below:</p>
|
|
<form action="{{ url_for('confirm_email') }}" method="POST">
|
|
<div class="input-field">
|
|
<label for="confirmation-key" class="white-text">Confirmation key</label>
|
|
<input required id="confirmation-key" name="confirmation_key" type="text" />
|
|
</div>
|
|
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}" />
|
|
<button class="btn waves-effect waves-light" type="submit">Confirm email</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
<h4>Team information</h4>
|
|
<p>Your score is currently {{ team_score }}. <a href="{{ url_for('challenges') }}">Go solve more challenges!</a></p>
|
|
<p>Your team email is <code>{{ team.email }}</code>, and you are affiliated with
|
|
{{ team.affiliation }}.</p>
|
|
<p>Your team is currently marked {{ "eligible" if team.eligible else "ineligible" }}.</p>
|
|
</section>
|
|
<section>
|
|
<h4>Edit information</h4>
|
|
<form method="POST">
|
|
<div class="input-field">
|
|
<label for="team-name">Team Name</label>
|
|
<input required maxlength="50" id="team-name" name="team_name" type="text" value="{{ team.name }}" />
|
|
</div>
|
|
<div class="input-field">
|
|
<label for="team-email">Team Email</label>
|
|
<input required id="team-email" name="team_email" type="email" value="{{ team.email }}" />
|
|
</div>
|
|
<div class="input-field">
|
|
<label for="affiliation">Affiliation</label>
|
|
<input required id="affiliation" name="affiliation" type="text" value="{{ team.affiliation }}" />
|
|
</div>
|
|
{% if not team.eligibility_locked %}
|
|
<p>{{ config.eligibility }}</p>
|
|
<p>If you do not meet these requirements, you are still welcome to play, but you
|
|
will not be eligible for prizes. By checking the "Eligibility Certification"
|
|
checkbox below, you are certifying that you meet the prize eligibility
|
|
requirement. We may request appropriate documentation to verify your eligibility
|
|
status before sending you prizes.</p>
|
|
<input id="team-eligibility" name="team_eligibility" type="checkbox"{% if team.eligible %} checked="checked"{% endif %}/>
|
|
<label for="team-eligibility">Eligibility Certification</label>
|
|
{% endif %}
|
|
<input name="_csrf_token" type="hidden" value="{{ csrf_token() }}" />
|
|
<br /><br />
|
|
<button class="btn waves-effect waves-light" type="submit">Update team</button>
|
|
</form>
|
|
</section>
|
|
<section>
|
|
<h4>Score calculation</h4>
|
|
{% if team_solves.count() %}
|
|
<h5>Solved problems</h5>
|
|
<div class="row">
|
|
<div class="col s10 offset-s1">
|
|
<table>
|
|
<thead>
|
|
<tr><th>Name</th><th>Category</th><th>Time</th><th>Value</th></tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for solve in team_solves %}
|
|
<tr>
|
|
<td>{{ solve.challenge.name }}</td>
|
|
<td>{{ solve.challenge.category }}</td>
|
|
<td><abbr class="time" title="{{ solve.time }}">{{ solve.time }}</abbr></td>
|
|
<td>{{ solve.challenge.points }}</td>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
<p>No problems have been solved.</p>
|
|
{% endif %}
|
|
{% if team_adjustments.count() %}
|
|
<h5>Score adjustments</h5>
|
|
<div class="row">
|
|
<div class="col s10 offset-s1">
|
|
<table>
|
|
<thead>
|
|
<tr><th>Reason</th><th>Value</th></tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for adj in team_adjustments %}
|
|
<tr>
|
|
<td>{{ adj.reason }}</td>
|
|
<td>{{ adj.value }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
<p>No score adjustments have been made.</p>
|
|
{% endif %}
|
|
</section>
|
|
<div id="firstlogin" class="modal">
|
|
<div class="modal-content">
|
|
<h4>Welcome to {{ config.ctf_name }}!</h4>
|
|
<p>Hi, {{ team.name }}! Welcome to {{ config.ctf_name }}, {{ config.tagline }}.</p>
|
|
|
|
<p>First off, please check the email you signed up with. You must confirm your account to solve problems. If needed, you can change the Team Email or resend confirmation on this page.</p>
|
|
|
|
<p>Your Team Key will be under Login Information. It was also sent to your team email. This is the only way to log in, so distribute it to your team members.</p>
|
|
|
|
<p>Once that's done, we recommend you read the Rules and FAQ. Then, do some Practice to warm up for the competition, or join the Chat to meet your fellow competitors and ask questions. The competition will begin soon enough, but in the meanwhile, explore the site!</p>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat">Dismiss</a>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
{% block postscript %}
|
|
{% if first_login %}
|
|
<script>$("#firstlogin").openModal();</script>
|
|
{% endif %}
|
|
{% endblock %}
|