You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
70 lines
2.5 KiB
70 lines
2.5 KiB
5 years ago
|
{% extends 'base.html' %}
|
||
|
{% import 'bootstrap/wtf.html' as wtf %}
|
||
|
|
||
|
{% block head %}
|
||
5 years ago
|
{{ super() }}
|
||
5 years ago
|
<link rel="stylesheet" href="{{ url_for('static', filename='assets/bootstrap/bootstrap-datetimepicker.min.css') }}">
|
||
4 years ago
|
<script src="{{ url_for('static', filename='assets/utils.js') }}"></script>
|
||
5 years ago
|
{% endblock %}
|
||
|
|
||
|
{% block app_content %}
|
||
4 years ago
|
<h1>{{ title }}</h1>
|
||
5 years ago
|
|
||
|
<div class="col-md-4 col-sm-6 col-xs-8">
|
||
|
<hr>
|
||
|
<form action="" method="post" class="form" role="form">
|
||
5 years ago
|
{{ form.hidden_tag() }}
|
||
5 years ago
|
{{ form.timezone }}
|
||
|
{{ wtf.form_field(form.game_name, class='form-control') }}
|
||
|
|
||
|
{{ form.start_time.label }}
|
||
|
<div class="form-group row">
|
||
|
<div class="col-sm-7">
|
||
|
{{ form.start_time }}
|
||
|
</div>
|
||
|
<div class="col-sm-5 align-self-center">
|
||
|
{{ wtf.form_field(form.start_time_disabled, class='form-control') }}
|
||
|
</div>
|
||
5 years ago
|
</div>
|
||
5 years ago
|
|
||
|
{{ form.end_time.label }}
|
||
|
<div class="form-group row">
|
||
|
<div class="col-sm-7">
|
||
|
{{ form.end_time }}
|
||
|
</div>
|
||
|
<div class="col-sm-5 align-self-center">
|
||
|
{{ wtf.form_field(form.end_time_disabled, class='form-control') }}
|
||
|
</div>
|
||
|
</div>
|
||
5 years ago
|
{{ wtf.form_field(form.submit, class='btn btn-primary') }}
|
||
5 years ago
|
</form>
|
||
|
<hr>
|
||
|
</div>
|
||
|
|
||
5 years ago
|
{% endblock %}
|
||
|
|
||
|
{% block scripts %}
|
||
5 years ago
|
{{ super() }}
|
||
|
<!-- TODO: Scripts downloaden naar repo? -->
|
||
|
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment-with-locales.min.js"></script>
|
||
|
<script type="text/javascript" src="https://momentjs.com/downloads/moment-timezone-with-data.js"></script>
|
||
|
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/js/bootstrap-datetimepicker.min.js"></script>
|
||
|
<script type="text/javascript">
|
||
5 years ago
|
$(function () {
|
||
4 years ago
|
// Datetime pickers
|
||
4 years ago
|
$('#timezone')[0].value = moment.tz.guess();
|
||
4 years ago
|
var date = moment()
|
||
|
createDateTimePicker('#datetimepicker_start', "#start_time_disabled", date)
|
||
|
date.add(1, 'hour');
|
||
|
createDateTimePicker('#datetimepicker_end', "#end_time_disabled", date)
|
||
|
|
||
5 years ago
|
$("#datetimepicker_start").on("dp.change", function (e) {
|
||
|
$('#datetimepicker_end').data("DateTimePicker").minDate(e.date);
|
||
|
});
|
||
|
$("#datetimepicker_end").on("dp.change", function (e) {
|
||
|
$('#datetimepicker_start').data("DateTimePicker").maxDate(e.date);
|
||
|
});
|
||
5 years ago
|
});
|
||
5 years ago
|
</script>
|
||
5 years ago
|
{% endblock %}
|