Bug fixes and improved handling of event editor.
This commit is contained in:
@@ -4,6 +4,12 @@
|
||||
{% block title %}{{ model.page_title }} {{ super() }}{% endblock %}
|
||||
|
||||
{% block page %}
|
||||
<script type="text/javascript">
|
||||
document.addEventListener("DOMContentLoaded", function(event) {
|
||||
EventEditor.updateControls();
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="text-center">
|
||||
<h1>{{ model.form_title }}</h1>
|
||||
|
||||
@@ -27,7 +33,7 @@
|
||||
{{ form.event_type.label(class_="form-control-label") }}
|
||||
</div>
|
||||
<div class="col-lg-10">
|
||||
{{ form.event_type(class_="form-control") }}
|
||||
{{ form.event_type(class_="form-control", onchange="EventEditor.updateControls()") }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -47,7 +53,7 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group row required">
|
||||
<div id="player_row" class="form-group row required">
|
||||
<div class="col-lg-2">
|
||||
{{ form.player.label(class_="form-control-label") }}
|
||||
</div>
|
||||
@@ -56,7 +62,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row required">
|
||||
<div id="enemy_row" class="form-group row required">
|
||||
<div class="col-lg-2">
|
||||
{{ form.enemy.label(class_="form-control-label") }}
|
||||
</div>
|
||||
@@ -75,14 +81,19 @@
|
||||
</div>
|
||||
|
||||
<div class="penalty-container">
|
||||
<h4>Penalties</h4>
|
||||
{% for penalty in form.penalties %}
|
||||
{{ penalty.hidden_tag() }}
|
||||
<div class="penalty-item">
|
||||
<div class="form-group row">
|
||||
{{ penalty.penalty_id }}
|
||||
{{ penalty.player_id }}
|
||||
{{ penalty.player }}
|
||||
<label class="form-control-label">{{ penalty.player.data }}</label>
|
||||
{{ penalty.drink }}
|
||||
<div class="col-lg-2">
|
||||
<label class="form-control-label">{{ penalty.player.data }}</label>
|
||||
</div>
|
||||
<div class="col-lg-10">
|
||||
{{ penalty.drink(class_="form-control") }}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user