Fixed so that the download buttons on the report pages are disabled when there is no data.
This commit is contained in:
parent
7feb6da062
commit
56e972c371
@ -106,10 +106,17 @@ First written: 2023/3/8
|
|||||||
<span class="d-none d-md-inline">{{ report.period.desc|title }}</span>
|
<span class="d-none d-md-inline">{{ report.period.desc|title }}</span>
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a class="btn btn-primary" role="button" href="{{ report.csv_uri }}">
|
{% if report.has_data %}
|
||||||
|
<a class="btn btn-primary" role="button" href="{{ report.csv_uri }}">
|
||||||
<i class="fa-solid fa-download"></i>
|
<i class="fa-solid fa-download"></i>
|
||||||
<span class="d-none d-md-inline">{{ A_("Download") }}</span>
|
<span class="d-none d-md-inline">{{ A_("Download") }}</span>
|
||||||
</a>
|
</a>
|
||||||
|
{% else %}
|
||||||
|
<button class="btn btn-secondary" type="button" disabled="disabled">
|
||||||
|
<i class="fa-solid fa-download"></i>
|
||||||
|
<span class="d-none d-md-inline">{{ A_("Download") }}</span>
|
||||||
|
</button>
|
||||||
|
{% endif %}
|
||||||
{% if use_search %}
|
{% if use_search %}
|
||||||
<form class="btn btn-primary d-flex input-group" action="{{ url_for("accounting.report.search") }}" method="get" role="search" aria-labelledby="accounting-toolbar-search-label">
|
<form class="btn btn-primary d-flex input-group" action="{{ url_for("accounting.report.search") }}" method="get" role="search" aria-labelledby="accounting-toolbar-search-label">
|
||||||
<input id="accounting-toolbar-search" class="form-control form-control-sm" type="search" name="q" value="{{ request.args.q }}" placeholder=" " required="required">
|
<input id="accounting-toolbar-search" class="form-control form-control-sm" type="search" name="q" value="{{ request.args.q }}" placeholder=" " required="required">
|
||||||
|
Loading…
Reference in New Issue
Block a user