Merge remote branch 'kc/new/bug_4838' into kcmaster
[koha_gimpoz] / cataloguing / value_builder / unimarc_field_225a.pl
index 1a86819..acd02e1 100755 (executable)
@@ -14,9 +14,9 @@
 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 # A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License along with
-# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
-# Suite 330, Boston, MA  02111-1307 USA
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 =head1 SYNOPSIS
 
@@ -42,6 +42,7 @@ It need :
 =cut
 
 use strict;
+#use warnings; FIXME - Bug 2505
 use C4::Auth;
 use CGI;
 use C4::Context;
@@ -81,6 +82,9 @@ sub plugin_javascript {
             var inputs = document.getElementsByTagName('input');
             
             for(var i=0 , len=inputs.length ; i \< len ; i++ ){
+                if(inputs[i].id.match(/^tag_010_subfield_a_.*/)){
+                    isbn_found = inputs[i].value;
+                }
                 if(inputs[i].id.match(/^tag_210_subfield_c_.*/)){
                     editor_found = inputs[i].value;
                 }
@@ -113,7 +117,7 @@ sub plugin {
             query           => $input,
             type            => "intranet",
             authnotrequired => 0,
-            flagsrequired   => { editcatalogue => 1 },
+            flagsrequired   => { editcatalogue => '*' },
             debug           => 1,
         }
     );