Private
Public Access
1
0

alertowners

This commit is contained in:
Sander Roosendaal
2019-10-02 17:25:05 +02:00
parent 20f2d2cbe0
commit 2631419265
5 changed files with 52 additions and 4 deletions

View File

@@ -29,6 +29,7 @@
<ul class="main-content">
<li class="grid_2">
<h2>Alert {{ alert.name }} for {{ alert.rower.user.first_name }}</h2>
<p>Alert managed by {{ alert.manager.first_name }} {{ alert.manager.last_name }}</p>
<p>
{{ formset.management_form }}
{% csrf_token %}
@@ -51,9 +52,11 @@
</li>
</ul>
</form>
{% endblock %}
{% block scripts %}
<!-- Include formset plugin - including jQuery dependency -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="/static/js/jquery.formset.js"></script>
<script>
$('.fav-formset').formset({
@@ -61,10 +64,29 @@
deleteText: '<div><p>&nbsp;</p></div><div>remove</div>'
});
</script>
<script>
$( document ).ready(function() {
$('#id_workouttype').on('change', function(){
if (
$(this).val() == 'water'
|| $(this).val() == 'coastal'
|| $(this).val() == 'c-boat'
|| $(this).val() == 'churchboat'
) {
$('#id_boattype').toggle(true);
} else {
$('#id_boattype').toggle(false);
$('#id_boattype').val('1x');
}
});
$('#id_workouttype').change();
});
</script>
{% endblock %}
{% block sidebar %}
{% include 'menu_analytics.html' %}
{% endblock %}