<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 %]
[% 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>
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,
,
{
name => "categorycode",
- lib => "Category",
type => "select",
option => \@categories_option,
mandatory => ( grep /categorycode/, @mandatoryFields ) ? 1 : 0,
,
{
name => "sort1",
- lib => "Sort 1",
type => @sort1_option ? "select" : "text",
option => \@sort1_option,
mandatory => ( grep /sort1/, @mandatoryFields ) ? 1 : 0,
,
{
name => "sort2",
- lib => "Sort 2",
type => @sort2_option ? "select" : "text",
option => \@sort2_option,
mandatory => ( grep /sort2/, @mandatoryFields ) ? 1 : 0,
,
{
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,
}