Only include custom date inputs when rendered

This commit is contained in:
Peter Stockings
2026-09-06 16:45:37 +10:00
parent 86fade54f1
commit 1aa5d7418b
+1 -1
View File
@@ -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 %}"
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-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>
</div>
</div>