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

@@ -53,9 +53,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({
@@ -64,9 +66,30 @@
});
</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 %}