Bugzilla – Attachment 99287 Details for
Bug 14647
When exporting records, the file name extension should match the selected export format
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14647: Make the file name extension dynamic on exporting records
Bug-14647-Make-the-file-name-extension-dynamic-on-.patch (text/plain), 2.86 KB, created by
Katrin Fischer
on 2020-02-19 22:45:57 UTC
(
hide
)
Description:
Bug 14647: Make the file name extension dynamic on exporting records
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2020-02-19 22:45:57 UTC
Size:
2.86 KB
patch
obsolete
>From f5ee6f6dc07dadcf54d6a7f38e24fa5cc7491076 Mon Sep 17 00:00:00 2001 >From: Gus <gel1163@stacmail.net> >Date: Tue, 19 Jan 2016 23:33:14 +0000 >Subject: [PATCH] Bug 14647: Make the file name extension dynamic on exporting > records > >Test - >1. go to cgi-bin/koha/tools/export.pl >2. Check that both tabs ("Export bibliographic records & Rxport authority records") do the following >3. In Output format >4. When changing "File format" from dropdown it update "file name" >5. Still works with user inputted names > >Works as expected. > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > .../intranet-tmpl/prog/en/modules/tools/export.tt | 25 +++++++++++++++++++--- > 1 file changed, 22 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt >index 5df6fb16bd..ba7e3f3e77 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt >@@ -210,14 +210,14 @@ > <fieldset class="rows"> > <legend>Output format</legend> > <ol><li> >- <label for="output_format">File format: </label> >- <select id="output_format" name="output_format"> >+ <label for="output_format_auth">File format: </label> >+ <select id="output_format_auth" name="output_format_auth"> > <option value="marc">marc</option> > <option value="xml">xml</option> > </select> > </li> > <li> >- <label for="filename">File name:</label><input id="filename" type="text" name="filename" value="koha.mrc" /> >+ <label for="filename_auth">File name:</label><input id="filename_auth" type="text" name="filename_auth" value="koha.mrc" /> > </li></ol> > </fieldset> > <input type="hidden" name="op" value="export" /> >@@ -316,6 +316,25 @@ > e.preventDefault(); > $(".branch_select").prop("checked",0); > }); >+ >+ $('#output_format').change(function(){ >+ var filename = $('#filename').val(); >+ var file_name = filename.split("."); >+ var extension = $(this).val(); >+ if (extension == "iso2709") { >+ extension = "mrc"; >+ } >+ $('#filename').val(file_name[0] + "." + extension); >+ }); >+ $('#output_format_auth').change(function(){ >+ var filename_auth = $('#filename_auth').val(); >+ var file_name_auth = filename_auth.split("."); >+ var extension = $(this).val(); >+ if (extension == "iso2709") { >+ extension = "mrc"; >+ } >+ $('#filename_auth').val(file_name_auth[0] + "." + extension); >+ }); > }); > </script> > [% END %] >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14647
:
46956
|
46963
|
47047
|
47048
|
47275
|
64943
|
98541
|
98542
|
98627
|
98631
|
98632
|
98633
| 99287 |
99288
|
99289
|
99290