From 8f1df47f7e4792c28f09effe32116ad55309aab9 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Tue, 14 Jan 2020 20:52:49 +0000 Subject: [PATCH] Revert "Bug 21232: Add a client-side check on biblionumber when creating a subscription" This reverts commit 9f312ebc91834dcf9a0355c2bf5704047786e35a. Signed-off-by: Lucas Gass --- .../en/modules/serials/subscription-add.tt | 1 - .../intranet-tmpl/prog/js/subscription-add.js | 30 ++----------------- 2 files changed, 2 insertions(+), 29 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt index 5c88594b94..e15aec3412 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt @@ -62,7 +62,6 @@ fieldset.rows table { clear: none; margin: 0; } () Required -
Subscriptions must be associated with a bibliographic record
Search for record [% IF ( CAN_user_editcatalogue ) %] diff --git a/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js b/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js index 47dea90d42..4c6bf22c29 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js +++ b/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js @@ -52,17 +52,12 @@ function Check_page1() { return false; } } - - var biblionumber = $("#biblionumber").val() - if ( biblionumber.length == 0 ) { + if ($("#biblionumber").val().length == 0) { alert( MSG_LINK_BIBLIO ); return false; } - var bib_exists = $("input[name='title']").val().length; - - if (!bib_exists) alert(_("Bibliographic record does not exist!")); - return bib_exists; + return true; } function Check_page2(){ @@ -699,25 +694,4 @@ $(document).ready(function() { e.preventDefault(); hidePredcitionPatternTest(); }); - - $("#biblionumber").on("change", function(){ - var biblionumber = $(this).val(); - $.ajax({ - url: "/api/v1/biblios/" + biblionumber, - type: "GET", - headers: { - Accept: "application/json", - }, - contentType: "application/json", - success: function (biblio) { - $("input[name='title']").val(biblio['title']); - $("#error_bib_not_exist").html(""); - }, - error: function (x) { - $("input[name='title']").val(''); - $("#error_bib_not_exist").html("This bibliographic record does not exist"); - } - }); - }); - }); -- 2.39.5