Update report and routine done form
This commit is contained in:
parent
b90ea23e2d
commit
7daf0a70dc
|
@ -95,9 +95,24 @@
|
|||
$(function(){
|
||||
blackDashboard.initDateTimePicker();
|
||||
|
||||
$('#id_routine_type').change(function(){
|
||||
if($(this).children(':selected').val() == 99) {
|
||||
$('#id_routine_label').append(' <span class="text-danger"><b>*</b></span>');
|
||||
} else {
|
||||
my_string = $('#id_routine_label').text();
|
||||
new_string = my_string.replace(' *', '');
|
||||
$('#id_routine_label').text(new_string);
|
||||
}
|
||||
});
|
||||
|
||||
$('#id_number_of_successes').change(function(){
|
||||
$('#id_number_of_try').val($('#id_number_of_successes').val());
|
||||
});
|
||||
|
||||
$('#id_number_of_try').change(function(){
|
||||
if($('#id_number_of_successes').val() > $('#id_number_of_try').val())
|
||||
$('#id_number_of_successes').val($('#id_number_of_try').val());
|
||||
})
|
||||
});
|
||||
|
||||
const csrf_token = "{{ csrf_token|escapejs }}";
|
||||
|
|
|
@ -5,33 +5,39 @@
|
|||
{% block content %}
|
||||
<div class="card mb-0">
|
||||
<div class="card-header">
|
||||
<h3 class="mb-0"><a href="{% url 'gymnast_details_tab' gymnast.id 'scores' %}">{{ gymnast }}</a></h3>
|
||||
<h3 class="mb-0"><a href="{% url 'gymnast_details' gymnast.id %}">{{ gymnast }}</a></h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p>
|
||||
Generate report for
|
||||
<select id="select_season">
|
||||
{% for season in season_list %}
|
||||
<option value="{{ season }}" {% if selected_season|stringformat:"s" == season %}selected{% endif %}>{{ season }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<span id="week_management"> week
|
||||
<select id="select_week_number">
|
||||
<option value="">---</option>
|
||||
{% for week_number in week_number_list %}
|
||||
<option value="{{ week_number }}">{{ week_number }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</span>
|
||||
|
||||
<span id="span_button_generate">
|
||||
<a href="" id="pdf_link">
|
||||
<button type="button" class="btn btn-icon btn-warning mr-2">
|
||||
<i class="far fa-download"></i>
|
||||
</button>
|
||||
</a>
|
||||
</span>
|
||||
</p>
|
||||
<form class="form-horizontal" id="form" name="form">
|
||||
<div class="form-group row">
|
||||
<label for="select_season" class="col-7 col-sm-4 col-md-5 col-lg-5 col-xl-5 col-form-label">Generate report for</label>
|
||||
<div class="col-7 col-sm-4 col-md-2 col-lg-2 col-xl-2">
|
||||
<select id="select_season" class="selectpicker">
|
||||
{% for season in season_list %}
|
||||
<option value="{{ season }}" {% if selected_season|stringformat:"s" == season %}selected{% endif %}>{{ season }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<label id="week_management" for="select_week_number" class="col-md-1 col-form-label">week</label>
|
||||
<div class="col-4 col-sm-4 col-md-2 col-lg-2 col-xl-2">
|
||||
<select id="select_week_number" class="selectpicker">
|
||||
<option value="">---</option>
|
||||
{% for week_number in week_number_list %}
|
||||
<option value="{{ week_number }}">{{ week_number }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-5 col-sm-5 col-md-2 col-lg-2 col-xl-2">
|
||||
<span id="span_button_generate">
|
||||
<a href="" id="pdf_link">
|
||||
<button type="button" class="btn btn-icon btn-warning mt-0">
|
||||
<i class="far fa-download"></i>
|
||||
</button>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue