Bugzilla – Attachment 32003 Details for
Bug 13027
Typo RoutlingListNote
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.84 KB, created by
Marcel de Rooy
on 2014-10-06 11:12:02 UTC
(
hide
)
Description:
Bug 11395: Raise an alert if control field is used
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2014-10-06 11:12:02 UTC
Size:
1.84 KB
patch
obsolete
>From 4f168a9b14cd693e4fa70931bbd41ebfcd7be226 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 >Content-Type: text/plain; charset=utf-8 > >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 >--- > .../modules/tools/marc_modification_templates.tt | 10 ++++++++++ > 1 files changed, 10 insertions(+), 0 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 9a1befb..222de22 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.7.7.6
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 13027
:
32002
|
32003
|
32411
|
32423