Bugzilla – Attachment 29501 Details for
Bug 11319
Marc modification templates improvements
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11319: Template modifications
PASSED-QA-Bug-11319-Template-modifications.patch (text/plain), 3.81 KB, created by
Kyle M Hall (khall)
on 2014-07-03 17:32:48 UTC
(
hide
)
Description:
Bug 11319: Template modifications
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2014-07-03 17:32:48 UTC
Size:
3.81 KB
patch
obsolete
>From 14342779a5da406e40c3f44652cfe0a8617eed53 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 11 Dec 2013 17:11:01 +0100 >Subject: [PATCH] [PASSED QA] Bug 11319: Template modifications > >This patch add template modifications for the restrictions: >- the source field is always mandatory >- on move and copy, the source and destination subfield should be both > filled or blank. >- on move and copy, the destination subfield should be filled. >- on update, the subfield value should be filled. > >Test plan: >Verify you are not able to create/modify template actions according to >these restrictions. > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > .../modules/tools/marc_modification_templates.tt | 28 +++++++++++++++++--- > 1 files changed, 24 insertions(+), 4 deletions(-) > >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 a9b9d3d..3df481b 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 >@@ -12,8 +12,28 @@ $(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 >+ $("#add_action").submit(function(){ >+ var action = $("#action").val(); >+ if ( action == 'move_field' || action == 'copy_field' ) { >+ if ( $("#from_subfield").val().length != $("#to_subfield").val().length ) { >+ alert(_("Both subfield values should be filled or empty.")); >+ return false; >+ } >+ if ( $("#to_field").val().length <= 0 ) { >+ alert(_("The destination should be filled.")); >+ return false; >+ } >+ } >+ if ( action == 'update_field' ) { >+ if ( $("#from_subfield").val().length <= 0 ) { >+ alert(_("The source subfield should be filled for update.")); >+ return false; >+ } >+ } >+ if ( $("#from_field").val().length <= 0 ) { >+ alert(_("The source field should be filled.")); >+ return false; >+ } > }); > }); > //]]> >@@ -431,14 +451,14 @@ function setSelectByValue( selectId, value ) { > </select> > </span> > >- field(s) <input type="text" name="from_field" id="from_field" size="3" maxlength="3" /> <input type="text" name="from_subfield" id="from_subfield" size="1" maxlength="1" /> >+ field(s) <input type="text" name="from_field" id="from_field" size="3" maxlength="3" /> <input type="text" name="from_subfield" id="from_subfield" size="1" maxlength="1" title="let blank for the entire field" /> > > <span name="with_value_block" id="with_value_block" style="display:none;"> > with value <input type="text" name="field_value" id="field_value" /> > </span> > > <span name="to_field_block" id="to_field_block" style="display:none;"> >- to field <input type="text" name="to_field" id="to_field" size="3" maxlength="3" /> <input type="text" name="to_subfield" id="to_subfield" size="1" maxlength="1" /> >+ to field <input type="text" name="to_field" id="to_field" size="3" maxlength="3" /> <input type="text" name="to_subfield" id="to_subfield" size="1" maxlength="1" title="let blank for the entire field" /> > > <span name="to_field_regex_block" id="to_field_regex_block"> > <sup> >-- >1.7.2.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 11319
:
23206
|
23414
|
23415
|
23416
|
23417
|
23418
|
23419
|
24650
|
25751
|
25752
|
25753
|
25754
|
25755
|
28988
|
28989
|
28990
|
28991
|
28992
|
29497
|
29498
|
29499
|
29500
|
29501
|
31343
|
33029
|
33030
|
33038
|
33039
|
33040
|
33041
|
33042
|
33043
|
33044