Bugzilla – Attachment 142159 Details for
Bug 19361
Linking an authorised value category to a field in a framework can lose data
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19361: Fix advanced cataloging editor dropdowns
Bug-19361-Fix-advanced-cataloging-editor-dropdowns.patch (text/plain), 2.39 KB, created by
Nick Clemens (kidclamp)
on 2022-10-19 14:38:11 UTC
(
hide
)
Description:
Bug 19361: Fix advanced cataloging editor dropdowns
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2022-10-19 14:38:11 UTC
Size:
2.39 KB
patch
obsolete
>From ba3757751f66803866e781ae4c8c4f8dbdc94a9f Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 19 Oct 2022 14:37:34 +0000 >Subject: [PATCH] Bug 19361: Fix advanced cataloging editor dropdowns > >--- > .../intranet-tmpl/prog/en/includes/cateditor-ui.inc | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc >index 18cafecbb2..8f1ea839eb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc >@@ -99,8 +99,8 @@ require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr > return $result[0]; > }, > postCreate: function() { >- var value = defaultvalue; > var widget = this; >+ var value = widget.text || defaultvalue; > > $.each( authvals, function() { > if ( this.value == widget.text ) { >@@ -112,9 +112,18 @@ require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr > > $( '<select></select>' ).appendTo( this.node ); > var $node = $( this.node ).find( 'select' ); >+ var matched = false; > $.each( authvals, function( undef, authval ) { >- $node.append( '<option value="' + authval.value + '"' + (authval.value == value ? ' selected="selected"' : '') + '>' + authval.lib + '</option>' ); >+ selected = ''; >+ if (authval.value == value){ >+ matched=true; >+ selected = ' selected="selected" '; >+ }; >+ $node.append( '<option value="' + authval.value + '"' + selected + '>' + authval.lib + '</option>' ); > } ); >+ if( !matched ){ >+ $node.append( '<option value="' + value + '" selected="selected">' + value + _(' (Not in authorised values list) ') + '</option>' ); >+ } > $node.val( this.text ); > > $node.change( $.proxy( function() { >-- >2.30.2
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 19361
:
67385
|
67652
|
67655
|
67657
|
67658
|
67955
|
105848
|
142158
|
142159
|
142208
|
142209
|
148377
|
148378
|
148379
|
148380