Bug 15965: Koha to MARC mapping - table changes with selection of drop down menu
authorAleisha <aleishaamohia@hotmail.com>
Thu, 3 Mar 2016 02:20:47 +0000 (02:20 +0000)
committerBrendan A Gallagher <brendan@bywatersolutions.com>
Mon, 7 Mar 2016 17:35:58 +0000 (17:35 +0000)
EDIT: Removing JS line

To test:

1) Go to Admin -> Koha to MARC Mapping
2) Test selecting biblio / biblioitems / items
3) Confirm the table content changes and behaves as it should which each
   selection

Sponsored-by: Catalyst IT
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tt

index b8f0a0c..d328172 100644 (file)
@@ -4,7 +4,17 @@
 [% IF ( else ) %]Koha to MARC mapping [% tagfield %][% END %]</title>
 
 [% INCLUDE 'doc-head-close.inc' %]
+<script type="text/javascript">
+//<![CDATA[
+$(document).ready(function() {
+    $('#tablename').change(function() {
+            $('#koha2marc').submit();
+    });
+});
+//]]>
+</script>
 </head>
+
 <body id="admin_koha2marclinks" class="admin">
 [% INCLUDE 'header.inc' %]
 [% INCLUDE 'cat-search.inc' %]
@@ -70,7 +80,7 @@
 [% IF ( else ) %]
 
 <h1>Koha to MARC mapping [% tagfield %]</h1>
-<form action="[% script_name %]" method="post">
+<form action="[% script_name %]" method="post" id="koha2marc">
 <p>
     <select name="tablename" id="tablename" size="1">
     [% FOREACH value IN tablename.values %]
@@ -81,7 +91,6 @@
         [% END %]
     [% END %]
     </select>
-    <input type="submit" value="OK" />
 </p>
 </form>
 <table>