Only include custom date inputs when rendered
This commit is contained in:
@@ -74,7 +74,7 @@ M{% for value, position in lower_points %}{{ (((position * vb_width) + margin) |
|
|||||||
<button class="progress-action {% if forecast_enabled %}is-active{% endif %}"
|
<button class="progress-action {% if forecast_enabled %}is-active{% endif %}"
|
||||||
aria-pressed="{{ 'true' if forecast_enabled else 'false' }}"
|
aria-pressed="{{ 'true' if forecast_enabled else 'false' }}"
|
||||||
hx-get="{{ url_for('get_exercise_progress_for_user', person_id=person_id, exercise_id=exercise_id, epoch=selected_epoch, forecast='false' if forecast_enabled else 'true', forecast_weeks=forecast_weeks, forecast_reps=forecast_target_reps) }}"
|
hx-get="{{ url_for('get_exercise_progress_for_user', person_id=person_id, exercise_id=exercise_id, epoch=selected_epoch, forecast='false' if forecast_enabled else 'true', forecast_weeks=forecast_weeks, forecast_reps=forecast_target_reps) }}"
|
||||||
hx-include="#svg-plot-{{ unique_id }} [name='min_date'], #svg-plot-{{ unique_id }} [name='max_date']"
|
{% if selected_epoch == 'Custom' %}hx-include="#svg-plot-{{ unique_id }} [name='min_date'], #svg-plot-{{ unique_id }} [name='max_date']"{% endif %}
|
||||||
hx-target="#svg-plot-{{ unique_id }}" hx-swap="outerHTML">Forecast {{ 'on' if forecast_enabled else 'off' }}</button>
|
hx-target="#svg-plot-{{ unique_id }}" hx-swap="outerHTML">Forecast {{ 'on' if forecast_enabled else 'off' }}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user