Bugzilla – Attachment 35790 Details for
Bug 11395
Batch modifications for records
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11395: Raise an alert if control field is used
Bug-11395-Raise-an-alert-if-control-field-is-used.patch (text/plain), 1.96 KB, created by
Tomás Cohen Arazi (tcohen)
on 2015-02-10 13:55:36 UTC
(
hide
)
Description:
Bug 11395: Raise an alert if control field is used
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2015-02-10 13:55:36 UTC
Size:
1.96 KB
patch
obsolete
>From 57f33a16098840afa05ca8e82e91911c1910543c Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 3 Sep 2014 15:08:39 +0200 >Subject: [PATCH] Bug 11395: Raise an alert if control field is used > >If a control field is used with a copy or move action, the interface >should block the user in some cases: >- If a control field is used with a regular field >- The subfield should be empty > >Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> >--- > .../prog/en/modules/tools/marc_modification_templates.tt | 10 ++++++++++ > 1 file changed, 10 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 d42e0ad..9f561db 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 >@@ -23,6 +23,16 @@ $(document).ready(function() { > alert(_("The destination should be filled.")); > return false; > } >+ if ( ( $("#to_field").val() <= 10 && $("#to_subfield").val().length > 0 ) || >+ ( $("#from_field").val() <= 10 && $("#from_subfield").val().length > 0 ) ) { >+ alert(_("If the field is a control field, the subfield should be empty")); >+ return false; >+ } >+ if ( ( $("#from_field").val() <= 10 && $("#to_subfield").val().length == 0 ) || >+ ( $("#to_field").val() <= 10 && $("#from_subfield").val().length == 0 ) ) { >+ alert(_("A control field cannot be used with a regular field.")); >+ return false; >+ } > } > if ( action == 'update_field' ) { > if ( $("#from_subfield").val().length <= 0 ) { >-- >1.9.1
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 11395
:
23502
|
23503
|
23504
|
23505
|
23506
|
23507
|
23508
|
23592
|
24634
|
26072
|
26981
|
28978
|
28999
|
29000
|
29001
|
29002
|
29003
|
29004
|
29056
|
29509
|
29569
|
31344
|
32181
|
32182
|
32184
|
32239
|
32240
|
32241
|
32242
|
32243
|
32244
|
32245
|
32246
|
32247
|
32248
|
32249
|
33145
|
33146
|
33147
|
33148
|
33149
|
33150
|
33151
|
33152
|
33153
|
33154
|
33155
|
34393
|
34394
|
34395
|
34396
|
34397
|
34398
|
34399
|
34400
|
34401
|
34402
|
34552
|
34553
|
34554
|
34555
|
34556
|
34557
|
34558
|
34559
|
34560
|
34561
|
34562
|
35783
|
35784
|
35785
|
35786
|
35787
|
35788
|
35789
|
35790
|
35791
|
35792
|
36295
|
36296
|
36297
|
36298
|
36299
|
36300
|
36301
|
36302
|
36303
|
36304