From e9fc5c04e75f1444fdb26d2fc2228605b82f5807 Mon Sep 17 00:00:00 2001 From: Colin Campbell Date: Tue, 9 Jul 2013 11:18:49 +0100 Subject: [PATCH] Bug 10507: improve warning about duplicate patron attribute value If a warning about a duplicated patron attribute is returned, the value was being passed back for display in the warning message with the same name as the variable in errors As the message is displayed in the context of errors the error value 1 was being displayed not the value duplicated as intended. Pass the value to the template with a unique name. Signed-off-by: Owen Leonard I fixed another tiny typo while signing off: "is already in use" instead of "is already is use." Signed-off-by: Kyle M Hall Passes koha-qa.pl, works as advertised. Signed-off-by: Galen Charlton (cherry picked from commit 2614e07e1e2e6386b5f91e65f127940072e54d4d) Signed-off-by: Tomas Cohen Arazi (cherry picked from commit b3bf4592a534a5c9824bdd54c6c0b354c3d34f61) Signed-off-by: Bernardo Gonzalez Kriegel (cherry picked from commit b3bf4592a534a5c9824bdd54c6c0b354c3d34f61) --- .../intranet-tmpl/prog/en/modules/members/memberentrygen.tt | 2 +- members/memberentry.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt index 6c788dd43e..93f3413ced 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -175,7 +175,7 @@ [% END %] [% IF ( ERROR_extended_unique_id_failed ) %]
  • The attribute value - [% ERROR_extended_unique_id_failed %] is already is use by another patron record.
  • + [% ERROR_extended_unique_id_failed_value %] is already in use by another patron record. [% END %] diff --git a/members/memberentry.pl b/members/memberentry.pl index c7c534b0d4..ab5165e84c 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -315,7 +315,7 @@ if ($op eq 'save' || $op eq 'insert'){ foreach my $attr (@$extended_patron_attributes) { unless (C4::Members::Attributes::CheckUniqueness($attr->{code}, $attr->{value}, $borrowernumber)) { push @errors, "ERROR_extended_unique_id_failed"; - $template->param(ERROR_extended_unique_id_failed => "$attr->{code}/$attr->{value}"); + $template->param(ERROR_extended_unique_id_failed_value => "$attr->{code}/$attr->{value}"); } } } -- 2.39.5