From a9ff03c2bf9a36d71fbbc15b08d213a31700dc94 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 14 Apr 2015 11:23:21 +0200 Subject: [PATCH] Bug 8399: No need to truncate the marc field text to 22 chars MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The text for the marc field are truncated to 22 chars when displaying an error on mandatory fields. This limitation is useless and this patch removes it. Test plan: Create a mandatory subfield and set a long text (more than 22 chars) edit or add an authority, click on save. You should get the error displayed with the full text Note that this patch modifies the same code for biblio. Test plan is the same for biblio. Signed-off-by: Andreas Hedström Mace Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- authorities/authorities.pl | 3 +-- cataloguing/addbiblio.pl | 3 +-- .../intranet-tmpl/prog/en/modules/authorities/authorities.tt | 4 ++-- .../intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt | 4 ++-- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/authorities/authorities.pl b/authorities/authorities.pl index 8357e2d188..16910c8e2d 100755 --- a/authorities/authorities.pl +++ b/authorities/authorities.pl @@ -175,8 +175,7 @@ sub create_input { my %subfield_data = ( tag => $tag, subfield => $id_subfield, - marc_lib => substr( $tagslib->{$tag}->{$subfield}->{lib}, 0, 22 ), - marc_lib_plain => $tagslib->{$tag}->{$subfield}->{lib}, + marc_lib => $tagslib->{$tag}->{$subfield}->{lib}, tag_mandatory => $tagslib->{$tag}->{mandatory}, mandatory => $tagslib->{$tag}->{$subfield}->{mandatory}, repeatable => $tagslib->{$tag}->{$subfield}->{repeatable}, diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index 71195c03db..890db0f946 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -322,8 +322,7 @@ sub create_input { my %subfield_data = ( tag => $tag, subfield => $id_subfield, - marc_lib => substr( $tagslib->{$tag}->{$subfield}->{lib}, 0, 22 ), - marc_lib_plain => $tagslib->{$tag}->{$subfield}->{lib}, + marc_lib => $tagslib->{$tag}->{$subfield}->{lib}, tag_mandatory => $tagslib->{$tag}->{mandatory}, mandatory => $tagslib->{$tag}->{$subfield}->{mandatory}, repeatable => $tagslib->{$tag}->{$subfield}->{repeatable}, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt index 31939b42b6..de0d2ab056 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt @@ -319,7 +319,7 @@ function confirmnotdup(redirect){ Move Up [% END %] [% ELSE %][% END %] - [% subfield_loo.marc_lib_plain %] + [% subfield_loo.marc_lib %] [% IF ( subfield_loo.mandatory ) %]*[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt index 7c6b48d80d..3bc00d5912 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt @@ -597,7 +597,7 @@ function Changefwk(FwkList) { Move Up [% END %] [% ELSE %][% END %] - [% subfield_loo.marc_lib_plain %] + [% subfield_loo.marc_lib %] [% IF ( subfield_loo.mandatory ) %]*[% END %] -- 2.20.1