alertowners
This commit is contained in:
@@ -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 %}
|
||||
|
||||
@@ -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> </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 %}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
<h2>{{ alert.name }}</h2>
|
||||
<p>{{ alert }}</p>
|
||||
<p>{{ alert.description }}</p>
|
||||
<p>Managed by {{ alert.manager.first_name }} {{ alert.manager.last_name }}</p>
|
||||
</li>
|
||||
<li class="rounder">
|
||||
<h2>Score</h2>
|
||||
|
||||
@@ -15,9 +15,11 @@
|
||||
{% for alert in alerts %}
|
||||
<li class="rounder" id="alert_{{ alert.id }}">
|
||||
<h2>{{ alert.name }}</h2>
|
||||
{% if alert.manager == request.user %}
|
||||
<a class="small" href="/rowers/alerts/{{ alert.id }}/edit/" title="Edit">
|
||||
<i class="fas fa-pencil-alt fa-fw"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
<a class="small" href="/rowers/alerts/{{ alert.id }}/delete/"
|
||||
title="Delete">
|
||||
<i class="fas fa-trash-alt fa-fw"></i>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
$('#id_workouttype').on('change', function(){
|
||||
$('#id_workouttype').on('change', function(){
|
||||
if (
|
||||
$(this).val() == 'water'
|
||||
|| $(this).val() == 'coastal'
|
||||
|
||||
Reference in New Issue
Block a user