Bugzilla – Attachment 89357 Details for
Bug 21232
Problems when linking a subscription to a non-existing biblionumber
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21232: Add a client-side check on biblionumber when creating a subscription
Bug-21232-Add-a-client-side-check-on-biblionumber-.patch (text/plain), 1.31 KB, created by
Jonathan Druart
on 2019-05-05 14:19:46 UTC
(
hide
)
Description:
Bug 21232: Add a client-side check on biblionumber when creating a subscription
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2019-05-05 14:19:46 UTC
Size:
1.31 KB
patch
obsolete
>From f6f718d09909252a9aabe3a8eee79783155fd3b7 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Sat, 4 May 2019 13:08:58 -0400 >Subject: [PATCH] Bug 21232: Add a client-side check on biblionumber when > creating a subscription > >--- > koha-tmpl/intranet-tmpl/prog/js/subscription-add.js | 17 +++++++++++++++-- > 1 file changed, 15 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js b/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js >index 4c6bf22c29..9ec8d485c8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js >@@ -52,12 +52,25 @@ function Check_page1() { > return false; > } > } >- if ($("#biblionumber").val().length == 0) { >+ >+ var biblionumber = $("#biblionumber").val() >+ if ( biblionumber.length == 0 ) { > alert( MSG_LINK_BIBLIO ); > return false; > } > >- return true; >+ var bib_exists; >+ $.ajax({ >+ url: '/cgi-bin/koha/svc/bib/' + biblionumber, >+ async: false, >+ } >+ ).done( >+ function(){ bib_exists = true; } >+ ).fail ( >+ function(){ alert(_("Bibliographic record does not exist!")); bib_exists = false; } >+ ); >+ >+ return bib_exists; > } > > function Check_page2(){ >-- >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 21232
:
89357
|
96245
|
96489
|
96576