Bugzilla – Attachment 23628 Details for
Bug 11414
Marc modification template limitations should alert the user
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11414: Marc modification template limitations should alert the user
Bug-11414-Marc-modification-template-limitations-s.patch (text/plain), 2.33 KB, created by
Jonathan Druart
on 2013-12-18 11:25:39 UTC
(
hide
)
Description:
Bug 11414: Marc modification template limitations should alert the user
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2013-12-18 11:25:39 UTC
Size:
2.33 KB
patch
obsolete
>From 2535a48bee4f9859f66b7da2fb4e6aa045a3bae1 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 18 Dec 2013 12:18:52 +0100 >Subject: [PATCH] Bug 11414: Marc modification template limitations should > alert the user > >Test plan: >On the Marc modification tool: >add/edit a new action on a field and define a condition on the same >field. >Verify that you get a warning message in red. > >see bug 11413 for more information >--- > .../en/modules/tools/marc_modification_templates.tt | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt >index 569b7f8..871fa77 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt >@@ -11,11 +11,26 @@ $(document).ready(function() { > }); > $("span.match_regex_prefix" ).hide(); > $("span.match_regex_suffix" ).hide(); >+ >+ $("#conditional_field,#from_field").change(function(){ >+ updateWarnings(); // For 3.14.x branches only, if bug 11319 is not pushed into >+ }); > }); > //]]> > </script> > > <script> >+ >+function updateWarnings(){ >+ if ( $("#conditional_field").is(":visible") ) { >+ if ( $("#conditional_field").val() == $("#from_field").val() && $("#from_field").val().length > 0 ) { >+ $("#warning_multivalued").show(); >+ } else { >+ $("#warning_multivalued").hide(); >+ } >+ } >+} >+ > function onActionChange(selectObj) { > // get the index of the selected option > var idx = selectObj.selectedIndex; >@@ -400,6 +415,7 @@ function setSelectByValue( selectId, value ) { > <a name="modaction"></a> > <fieldset> > <legend id="modaction_legend">Add a new action</legend> >+ <div id="warning_multivalued" style="color:red; display:none;">You have chosen a condition on the same field as the original field. If your records contain multivalued fields it is highly recommended not to do that.</div> > > <select name="action" id="action" onchange="onActionChange(this);"> > <option value="delete_field">Delete</option> >-- >1.7.10.4
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 11414
:
23628
|
23737
|
23743