Revert "Bug 21232: Add a client-side check on biblionumber when creating a subscription"

This reverts commit 9f312ebc91.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Lucas Gass 2020-01-14 20:52:49 +00:00
parent 09509b53b0
commit 8f1df47f7e
2 changed files with 2 additions and 29 deletions

View File

@ -62,7 +62,6 @@ fieldset.rows table { clear: none; margin: 0; }
<label for="biblionumber" class="required">Record:</label>
<input type="text" name="biblionumber" id="biblionumber" value="[% bibnum | html %]" size="8" />
(<input type="text" name="title" value="[% bibliotitle | html %]" disabled="disabled" readonly="readonly" />) <span class="required" title="Subscriptions must be associated with a bibliographic record">Required</span>
<span id="error_bib_not_exist"></span>
<div class="hint">Subscriptions must be associated with a bibliographic record</div>
<div class="inputnote"> <a href="#" id="record_search"><i class="fa fa-search"></i> Search for record</a>
[% IF ( CAN_user_editcatalogue ) %]

View File

@ -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");
}
});
});
});