hack-wpi-python/goathacks/templates/dashboard.html
2022-12-06 15:01:55 -05:00

101 lines
4.3 KiB
HTML

{% extends 'base.html' %}
{% block content %}
<script src="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.js"></script>
<script>
function drop(id) {
if(window.confirm("Are you sure you wish to drop your application? This cannot be undone. (patiently wait after clicking the button)")) {
window.location.href = "/admin/drop/" + id;
}
}
function resumeChange() {
let val = document.getElementById('resume').value;
val = val.split(/\\|\//gi).slice(-1)[0]
document.getElementById('filename').setAttribute('value', val);
}
</script>
<div class="contact-section" style="height: 100%;">
<div class="container">
<div class="row center justify-content-center" style="margin-top: 10%;">
<h1>Hi {{ current_user.first_name }}!</h1>
{% if current_user.waitlisted %}
<h2>You are waitlisted, if space opens up we will let you know</h2>
{% else %}
<h2>You are fully registered! We look forward to seeing you!</h2>
Let us know if you have any questions by sending them to <a href="mailto:hack@wpi.edu">hack@wpi.edu</a>
<br>
<br>
Forgot to upload your resume while registering? No worries, submit it below.
</div>
<div class="row center justify-content-center">
<h5>Make sure to join the Discord and enter your shirt size below!</h5>
<p>(Please note that due to COVID-19 constraints, we can't guarantee that all participants will receive Hack@WPI t-shirts this year but we are trying to find a way!)</p>
<a href="https://discord.gg/G3pseHPRNv" style="margin: 5px;"
class="btn btn-lg btn-primary btn-invert">Discord</a>
</div>
<div class="row center justify-content-center" style="background-color: #974355; padding: 20; margin-left: 20; margin-right: 20; border-radius: 5px;">
<form method="post">
{{ form.csrf_token }}
<br>
<p><b>Optional Info:</b></p>
<div>
<p>Shirt Size (Currently selected: {{current_user.shirt_size}})</p>
{% for subfield in form.shirt_size %}
{{subfield}}{{subfield.label}}
{% endfor %}
<p>Special Needs/Accommodations:</p>
<input type="text" name="accomodations"
id="special_needs" value="{{ current_user.accomodations }}">
</div>
<br><br>
<input name="save" class="btn btn-lg btn-primary btn-invert" type="submit" value="Save"/>
<br><br><br>
</form>
</div>
<div class="row center justify-content-center">
<form method="post" action="{{url_for('dashboard.resume')}}" enctype="multipart/form-data">
{{ resform.csrf_token }}
<p><b>If you'd like, add your resume to send to sponsors... </b></p>
<div class="file-field input-field">
<div class="btn">
<span>File</span>
<input id="resume" name="resume" type="file" oninput="resumeChange()"/>
</div>
<div class="file-path-wrapper white-text">
<input disabled id="filename" class="file-path validate white-text" type="text">
</div>
</div>
<input name="submit" class="btn btn-lg btn-primary btn-invert" type="submit" value="Submit"/>
</form>
{% endif %}
<br>
</div>
{% if current_user.is_admin %}
<br>
<div class="row justify-content-center">
<a href="/admin"><p class="btn">Admin Dashboard</p></a>
</div>
{% endif %}
<br>
</div>
<br>
<br>
<center><a onclick="drop('{{current_user.id}}')" id="drop-link"><p class="btn">Drop Application if you can't make it :(</p></a></center>
</div>
<script>
let errColor = '#E74C3C'
$(document).ready(() => {
$('#drop-link').click((e) => {
e.preventDefault()
let id = {{ id }}
drop(id)
})
})
</script>
{% endblock %}