Bugzilla – Attachment 181379 Details for
Bug 39707
Fix JS error when placing a request
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39707: Fix JS error when requesting an article - OPAC
Bug-39707-Fix-JS-error-when-requesting-an-article-.patch (text/plain), 4.14 KB, created by
Marcel de Rooy
on 2025-04-23 14:27:15 UTC
(
hide
)
Description:
Bug 39707: Fix JS error when requesting an article - OPAC
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2025-04-23 14:27:15 UTC
Size:
4.14 KB
patch
obsolete
>From e0a0602c2f86e23bb7dbae4c25919503a1bfdeeb Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 23 Apr 2025 10:35:46 +0200 >Subject: [PATCH] Bug 39707: Fix JS error when requesting an article - OPAC >Content-Type: text/plain; charset=utf-8 > >Caused by a bad conflict resolution when bug 36081 was pushed > >Uncaught SyntaxError: missing ) after argument list > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > .../en/modules/opac-request-article.tt | 56 +++++++------------ > 1 file changed, 20 insertions(+), 36 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-request-article.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-request-article.tt >index dada97a058..aee903109f 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-request-article.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-request-article.tt >@@ -257,44 +257,28 @@ > [% BLOCK jsinclude %] > <script> > $(document).ready( function() { >- allow_submit = false; >- $('#place-article-request').on('submit', function( event ){ >- if ( ! allow_submit ) { >- event.preventDefault(); >- >- [% IF article_request_type == 'item_only' %] >- if ( ! $("input:radio[name='itemnumber']").is(":checked") ) { >- alert( _("Please select a specific item for this article request.") ); >- return 0; >- } >- [% END %] >+ allow_submit = false; >+ $('#place-article-request').on('submit', function( event ){ >+ if ( ! allow_submit ) { >+ event.preventDefault(); >+ >+ [% IF article_request_type == 'item_only' %] >+ if ( ! $("input:radio[name='itemnumber']").is(":checked") ) { >+ alert( _("Please select a specific item for this article request.") ); >+ return 0; >+ } >+ [% END %] > >- var mandatory_fields = "[% mandatory_fields | html %]"; >- var m = new Array(); >- if ( mandatory_fields ) m = mandatory_fields.split(","); >- var f = new Array(); >- >- for (i = 0; i < m.length; i++) { >- if ( ! $("#" + m[i]).val() ) { >- f.push( m[i] ); >- } >- } >- >- if ( f.length ) { >- alert( _("The following fields are required and not filled in: ") + f.join(", ") ); >- return 0; >- } >- >- // Check if all fields are blank >- if( m.length == 0 && $('#title').val()=='' && $('#author').val()=='' && $('#volume').val()=='' && $('#issue').val()=='' && $('#date').val()=='' && $('#pages').val()=='' && $('#chapters').val()=='' && $('#patron_notes').val()=='' && !$('input[name="toc_request"]').prop('checked') ) { >- alert( _("Please fill in at least one field.") ); >- return 0; >- } >- >- allow_submit = true; >- $('#place-article-request').submit(); >+ var mandatory_fields = "[% mandatory_fields | html %]"; >+ var m = new Array(); >+ if ( mandatory_fields ) m = mandatory_fields.split(","); >+ var f = new Array(); >+ >+ for (i = 0; i < m.length; i++) { >+ if ( ! $("#" + m[i]).val() ) { >+ f.push( m[i] ); > } >- }); >+ } > > // Initialize format(s) > var supported_formats = "[% Koha.Preference('ArticleRequestsSupportedFormats') | $raw %]"; >-- >2.39.5
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 39707
:
181347
|
181379
|
181673