This patch removes the declaration of interface labels
from the script and puts it in the template where the
labels can be translated. The labels have been modified
to match those used on the patron entry form.
---
.../prog/en/modules/tools/modborrowers.tt | 29 ++++++++++++++++++--
tools/modborrowers.pl | 11 --------
2 files changed, 27 insertions(+), 13 deletions(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt
b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt
index 618d056..8f33fe6 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt
@@ -237,7 +237,32 @@
<ol>
[% FOREACH field IN fields %]
<li>
- <label style="width:20em;">[%
field.lib %]</label>
+ <label style="width:20em;">
+ [% SWITCH ( field.name ) %]
+ [% CASE 'surname' %]
+ Surname:
+ [% CASE 'firstname' %]
+ First name:
+ [% CASE 'branchcode' %]
+ Library:
+ [% CASE 'categorycode' %]
+ Category
+ [% CASE 'sort1' %]
+ Sort 1:
+ [% CASE 'sort2' %]
+ Sort 2:
+ [% CASE 'dateenrolled' %]
+ Registration date:
+ [% CASE 'dateexpiry' %]
+ Expiry date:
+ [% CASE 'debarred' %]
+ Restricted:
+ [% CASE 'debarredcomment' %]
+ Restriction comment:
+ [% CASE 'borrowernotes' %]
+ Circulation note:
+ [% END %]
+ </label>
[% IF field.mandatory %]
<input type="checkbox"
title="This field is mandatory" name="disable_input" value="[% field.name %]"
readonly="readonly" onclick="return false;" />
[% ELSE %]
@@ -265,7 +290,7 @@
[% END %]
[% IF ( patron_attributes_codes ) %]
<li class="attributes">
- <label
style="width:20em;">Attribute
+ <label
style="width:20em;">Attribute:
<select
name="patron_attributes">
[% FOREACH pac IN
patron_attributes_codes %]
<option value="[%
pac.attribute_code %]" data-type="[% pac.type %]" data-category="[%
pac.category_lib %]">[% pac.attribute_lib %]</option>
diff --git a/tools/modborrowers.pl b/tools/modborrowers.pl
index 50bb668..a2c27c6 100755
--- a/tools/modborrowers.pl
+++ b/tools/modborrowers.pl
@@ -155,21 +155,18 @@ if ( $op eq 'show' ) {
my @fields = (
{
name => "surname",
- lib => "Surname",
type => "text",
mandatory => ( grep /surname/, @mandatoryFields ) ? 1 : 0
}
,
{
name => "firstname",
- lib => "Firstname",
type => "text",
mandatory => ( grep /surname/, @mandatoryFields ) ? 1 : 0,
}
,
{
name => "branchcode",
- lib => "Branchname",
type => "select",
option => \@branches_option,
mandatory => ( grep /branchcode/, @mandatoryFields ) ? 1 : 0,
@@ -177,7 +174,6 @@ if ( $op eq 'show' ) {
,
{
name => "categorycode",
- lib => "Category",
type => "select",
option => \@categories_option,
mandatory => ( grep /categorycode/, @mandatoryFields ) ? 1 : 0,
@@ -185,7 +181,6 @@ if ( $op eq 'show' ) {
,
{
name => "sort1",
- lib => "Sort 1",
type => @sort1_option ? "select" : "text",
option => \@sort1_option,
mandatory => ( grep /sort1/, @mandatoryFields ) ? 1 : 0,
@@ -193,7 +188,6 @@ if ( $op eq 'show' ) {
,
{
name => "sort2",
- lib => "Sort 2",
type => @sort2_option ? "select" : "text",
option => \@sort2_option,
mandatory => ( grep /sort2/, @mandatoryFields ) ? 1 : 0,
@@ -201,35 +195,30 @@ if ( $op eq 'show' ) {
,
{
name => "dateenrolled",
- lib => "Date enrolled",
type => "date",
mandatory => ( grep /dateenrolled/, @mandatoryFields ) ? 1 : 0,
}
,
{
name => "dateexpiry",
- lib => "Date expiry",
type => "date",
mandatory => ( grep /dateexpiry/, @mandatoryFields ) ? 1 : 0,
}
,
{
name => "debarred",
- lib => "Debarred",
type => "date",
mandatory => ( grep /debarred/, @mandatoryFields ) ? 1 : 0,
}
,
{
name => "debarredcomment",
- lib => "Debarred comment",
type => "text",
mandatory => ( grep /debarredcomment/, @mandatoryFields ) ? 1 : 0,
}
,
{
name => "borrowernotes",
- lib => "Borrower Notes",
type => "text",
mandatory => ( grep /borrowernotes/, @mandatoryFields ) ? 1 : 0,
}
--
1.7.9.5
_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/