hack-wpi-python/templates/dashboard.html
2018-01-09 15:24:12 -05:00

87 lines
3.2 KiB
HTML

{% include 'header.html' %}
<script src="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.css">
<div class="contact-section" style="height: 100%;">
<div class="container">
<div class="row" style="margin-top: 10%;">
<h1>Hi {{ name }}!</h1>
{% if waitlisted %}
<h1>You are waitlisted, if space opens up we ill let you know...</h1>
{% else %}
<h1>You are fully registered! We look forward to seeing you!</h1>
The schedule is <a href="https://docs.google.com/spreadsheets/d/1Hkuf6kMPEC-fqasOpS85AtOasJRn74ilPMnCgBwGgV0/edit?usp=sharing">here</a>
<br>
<a href="https://www.google.com/maps/place/WPI+Student+Campus+Center/@42.2744758,-71.8105159,17z/data=!4m8!1m2!2m1!1scc+wpi!3m4!1s0x89e40658927aa83f:0x953412a0addf6184!8m2!3d42.2747714!4d-71.8084429">Location in Google Maps</a>
The event will take place in Odeum Hall on the second floor of the Campus Center building
<br>
You can park at the <a href="https://www.google.com/maps/place/Hackfeld+Lot/@42.274131,-71.8112764,16.88z/data=!4m5!3m4!1s0x89e406f433008cd5:0xba67db4fec56e85c!8m2!3d42.2728874!4d-71.8128909">Hackfeld Lot</a>. Please make sure to print and put this <a href="../static/parking_placecard.pdf">placecard</a>.
<br>
Let us know if you have any questions by sending them to hack@wpi.edu
{% endif %}
<br>
<a href="#" id="drop-link"><p class="sub-button btn waves-effect waves-light grey darken-1">Drop Application if you can't make it :(</p></a>
{% if admin %}
<br>
<a href="/admin"><p class="btn">Admin Dashboard</p></a>
{% endif %}
<br>
Please sit tight, while we improve the UI of this page :P (Or we'll do it next year)
</div>
</div>
</div>
<script>
let errColor = '#E74C3C'
$(document).ready(() => {
$('#drop-link'
).click((e) => {
e.preventDefault()
let id = {{ id }}
drop(id)
})
})
const drop = (id) =>
{
swal({
title: 'Drop your application?',
text: 'Are you sure you wish to drop your application? This cannot be undone. (patiently wait after clicking the button)',
type: 'warning',
showCancelButton: true,
closeOnConfirm: false,
confirmButtonText: 'Yes, drop!',
confirmButtonColor: errColor
}, () => {
$.get('/drop?mlh_id=' + id, (data) => {
let title = ''
let msg = ''
let type = ''
if (data.status === 'success'
)
{
title = 'Dropped!'
msg = 'Your application was successfully dropped!'
type = 'success'
}
else
{
title = 'Error!'
msg = JSON.stringify(data)
type = 'error'
}
swal(title, msg, type)
if (data.status === 'success') {
setTimeout(() => {window.location = '/'
},
5000
)
}
})
})
}
</script>
{% include 'footer.html' %}