Bug 18918: Disable CSV option if no CSV profiles exist

To test:
1) Confirm you have no MARC CSV profiles (tools -> csv profiles)
2) Go to Tools -> Export data
3) Select the CSV file format for biblios
4) Notice the CSV profile dropdown shows up but the dropdown is empty
5) Click the Export button, notice Koha breaks
6) Go back and apply the patch, refresh
7) Notice the CSV option is now disabled in the file format menu
8) If you hover over CSV, an appropriate message should show explaining
why it is disabled
9) Create a CSV profile for MARC
10) Go back to Export and you should be able to use CSV now without
problem

Sponsored-by: Catalyst IT

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Mason James <mtj@kohaaloha.com>
This commit is contained in:
Aleisha Amohia 2017-07-10 02:31:22 +00:00 committed by Mason James
parent c97e010603
commit 53fb660d4b
1 changed files with 5 additions and 1 deletions

View File

@ -168,7 +168,11 @@ $(document).ready(function() {
<select id="output_format" name="output_format">
<option value="iso2709">marc</option>
<option value="xml">xml</option>
<option value="csv">csv</option>
[% IF csv_profiles %]
<option value="csv">csv</option>
[% ELSE %]
<option value="csv" disabled data-toggle="tooltip" data-placement="left" title="You must create a CSV profile for MARC exports to use this option.">csv</option>
[% END %]
</select>
</li>
<li class="csv_profiles">