[Koha-patches] [PATCH] selection of members fields to display
henridamien.laurent at biblibre.com
henridamien.laurent at biblibre.com
Thu Sep 24 09:50:46 CEST 2009
From: Henri-Damien LAURENT <henridamien.laurent at biblibre.com>
Adds a system preference Borrowerunused fields
This system preference contains the list of fieldnames which should not be displayed on Member input page
---
admin/systempreferences.pl | 1 +
installer/data/mysql/en/mandatory/sysprefs.sql | 1 +
.../1-Obligatoire/unimarc_standard_systemprefs.sql | 1 +
installer/data/mysql/updatedatabase.pl | 11 ++
.../prog/en/modules/members/memberentrygen.tmpl | 121 +++++++++++++++-----
members/memberentry.pl | 6 +
6 files changed, 111 insertions(+), 30 deletions(-)
diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl
index 2ce1874..047a7ed 100755
--- a/admin/systempreferences.pl
+++ b/admin/systempreferences.pl
@@ -187,6 +187,7 @@ $tabsysprefs{viewLabeledMARC} = "StaffClient";
$tabsysprefs{viewISBD} = "StaffClient";
# Patrons
+$tabsysprefs{BorrowerUnusedFields} = "Patrons";
$tabsysprefs{autoMemberNum} = "Patrons";
$tabsysprefs{checkdigit} = "Patrons";
$tabsysprefs{intranetreadinghistory} = "Patrons";
diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql
index 6f60fa7..8be96fa 100644
--- a/installer/data/mysql/en/mandatory/sysprefs.sql
+++ b/installer/data/mysql/en/mandatory/sysprefs.sql
@@ -262,3 +262,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
INSERT INTO systempreferences (variable,value,options,explanation,type)VALUES('DisplayOPACiconsXSLT', '1', '', 'If ON, displays the format, audience, type icons in XSLT MARC21 results and display pages.', 'YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AllowAllMessageDeletion','0','Allow any Library to delete any message','','YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type)VALUES('ShowPatronImageInWebBasedSelfCheck', '0', 'If ON, displays patron image when a patron uses web-based self-checkout', '', 'YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type)VALUES('BorrowerUnusedFields', '', 'Allow to input a list of undesired fields in Member input page Fill that with borrower table field names separated by , or | or ; ', '', 'Text');
diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
index bee360a..f440228 100644
--- a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
+++ b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
@@ -261,3 +261,4 @@ INSERT INTO systempreferences (variable,value,options,explanation,type)VALUES('H
INSERT INTO systempreferences (variable,value,options,explanation,type)VALUES('DisplayOPACiconsXSLT', '1', '', 'Si activé, affiche le format, le type de public et les icônes de type en XSLT (MARC21)).', 'YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AllowAllMessageDeletion','0','Allow any Library to delete any message','','YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type)VALUES('ShowPatronImageInWebBasedSelfCheck', '0', 'Si activé, affiche la photo de l''adhérent lors de l''utilisation de la console de prêt auto-contrôlé', '', 'YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type)VALUES('BorrowerUnusedFields', '', 'Entrez ici la liste des champs que vous ne souhaitez pas utiliser à la saisie des Adhérents (liste des noms des champs de la table borrowers séparés par ; ou , ou |)', '', 'Text');
diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl
index 10c3451..80fd1d8 100755
--- a/installer/data/mysql/updatedatabase.pl
+++ b/installer/data/mysql/updatedatabase.pl
@@ -2675,6 +2675,17 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
SetVersion ($DBversion);
}
+$DBversion = '3.01.00.062';
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ my $str;
+ $str=<<BORRUNUSEDFIELDS;
+INSERT INTO systempreferences (variable,value,explanation,options,type)VALUES('BorrowerUnusedFields', '', 'Allow to input a list of undesired fields in Member input page Fill that with borrower table field names separated by , or | or ; ', '', 'Text');
+BORRUNUSEDFIELDS
+ print "Upgrade to $DBversion done ( Added BorrowerUnusedFields system preference)\n";
+ $dbh->do($str);
+ SetVersion ($DBversion);
+}
+
=item DropAllForeignKeys($table)
Drop all foreign keys of the table $table
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl
index 20043c2..0304d74 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl
@@ -161,6 +161,7 @@
<fieldset class="rows" id="memberentry_identity">
<legend><!--TMPL_IF Name="I"-->Organization <!--TMPL_ELSE-->Patron <!--/TMPL_IF-->identity</legend>
<ol>
+ <!-- TMPL_UNLESS name="unusedtitle" -->
<!-- TMPL_UNLESS name="I" -->
<!-- TMPL_IF NAME="title_cgipopup" -->
<li>
@@ -174,8 +175,10 @@
<!-- TMPL_IF NAME="mandatorytitle" --><span class="required">Required</span><!-- /TMPL_IF -->
</li>
<!-- /TMPL_IF -->
- <!-- /TMPL_UNLESS -->
<li>
+ <!-- /TMPL_UNLESS -->
+ <!-- /TMPL_UNLESS -->
+ <!-- TMPL_UNLESS name="unusedsurname" -->
<!-- TMPL_IF NAME="mandatorysurname" -->
<label for="surname" class="required">
<!-- TMPL_ELSE -->
@@ -189,7 +192,9 @@
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="mandatorysurname" --><span class="required">Required</span><!-- /TMPL_IF -->
</li>
+ <!-- /TMPL_UNLESS -->
<!-- TMPL_UNLESS name="I" -->
+ <!-- TMPL_UNLESS name="unusedfirstname" -->
<li>
<!-- TMPL_IF NAME="mandatoryfirstname" -->
<label for="firstname" class="required">
@@ -200,6 +205,8 @@
<input type="text" id="firstname" name="firstname" size="20" value="<!-- TMPL_VAR NAME="firstname" -->" />
<!-- TMPL_IF NAME="mandatoryfirstname" --><span class="required">Required</span><!-- /TMPL_IF -->
</li>
+ <!-- /TMPL_UNLESS -->
+ <!-- TMPL_UNLESS name="unuseddateofbirth" -->
<li>
<!-- TMPL_IF NAME="mandatorydateofbirth" -->
<label for="dateofbirth" class="required">
@@ -227,6 +234,8 @@
<!-- TMPL_IF NAME="mandatorydateofbirth" --><span class="required">Required</span><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="ERROR_dateofbirth" --><span class="required">(Error)</span><!-- /TMPL_IF -->
</li>
+ <!-- /TMPL_UNLESS -->
+ <!-- TMPL_UNLESS name="unusedinitials" -->
<li>
<!-- TMPL_IF NAME="mandatoryinitials" -->
<label for="initials" class="required">
@@ -237,7 +246,9 @@
<input type="text" id="initials" name="initials" size="20" value="<!-- TMPL_VAR NAME="initials" -->" />
<!-- TMPL_IF NAME="mandatoryinitials" --><span class="required">Required</span><!-- /TMPL_IF -->
</li>
+ <!-- /TMPL_UNLESS -->
<!-- /TMPL_UNLESS -->
+ <!-- TMPL_UNLESS Name="unusedothernames"-->
<li>
<!-- TMPL_IF NAME="mandatoryothernames" -->
<label for="othernames" class="required">
@@ -249,7 +260,9 @@
<!-- TMPL_IF NAME="mandatoryothernames" --><span class="required">Required</span><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="I" --><input type="hidden" name="sex" value="N" /><!-- /TMPL_IF -->
</li>
+ <!-- /TMPL_UNLESS -->
<!--TMPL_UNLESS Name="I"-->
+ <!-- TMPL_UNLESS Name="unusedsex"-->
<li class="radio">
<!-- TMPL_IF NAME="female" -->
@@ -268,6 +281,7 @@
<label for="sex-none">N/A </label><input type="radio" name="sex" id="sex-none" value="" />
<!-- /TMPL_IF -->
</li>
+ <!-- /TMPL_UNLESS -->
<!--/TMPL_UNLESS-->
</ol>
</fieldset>
@@ -351,6 +365,7 @@
<!--/TMPL_IF-->
<fieldset class="rows">
<legend>Main address</legend><ol>
+ <!-- TMPL_UNLESS Name="unusedstreetnumber"-->
<li>
<!-- TMPL_IF NAME="mandatorystreetnumber" -->
<label for="streetnumber" class="required">
@@ -361,6 +376,7 @@
<input type="text" id="streetnumber" name="streetnumber" size="5" value="<!-- TMPL_VAR NAME="streetnumber" -->" />
<!-- TMPL_IF NAME="mandatorystreetnumber" --><span class="required">Required</span><!-- /TMPL_IF -->
</li>
+ <!-- /TMPL_UNLESS -->
<!-- TMPL_IF NAME="road_cgipopup" -->
<li>
<!-- TMPL_IF NAME="mandatorystreettype" -->
@@ -373,6 +389,7 @@
<!-- TMPL_IF NAME="mandatorystreettype" --><span class="required">Required</span><!-- /TMPL_IF -->
</li>
<!--/TMPL_IF-->
+ <!-- TMPL_UNLESS Name="unusedaddress"-->
<li>
<!-- TMPL_IF NAME="mandatoryaddress" -->
<label for="address" class="required">
@@ -383,6 +400,8 @@
<input type="text" id="address" name="address" size="35" value="<!-- TMPL_VAR NAME="address" -->" />
<!-- TMPL_IF NAME="mandatoryaddress" --><span class="required">Required</span><!-- /TMPL_IF -->
</li>
+ <!-- /TMPL_UNLESS -->
+ <!-- TMPL_UNLESS Name="unusedaddress2"-->
<li>
<!-- TMPL_IF NAME="mandatoryaddress2" -->
<label for="address2" class="required">
@@ -393,6 +412,8 @@
<input type="text" id="address2" name="address2" size="35" value="<!-- TMPL_VAR NAME="address2" -->" />
<!-- TMPL_IF NAME="mandatoryaddress2" --><span class="required">Required</span><!-- /TMPL_IF -->
</li>
+ <!-- /TMPL_UNLESS -->
+ <!-- TMPL_UNLESS Name="unusedcity"-->
<li>
<!-- TMPL_IF NAME="mandatorycity" -->
<label for="city" class="required">
@@ -405,6 +426,8 @@
<!-- TMPL_IF NAME="city_cgipopup" -->or <strong>choose</strong> <!-- TMPL_VAR NAME="citypopup" --><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="mandatorycity" --><span class="required">Required</span><!-- /TMPL_IF -->
</li>
+ <!-- /TMPL_UNLESS -->
+ <!-- TMPL_UNLESS Name="unusedzipcode"-->
<li>
<!-- TMPL_IF NAME="mandatoryzipcode" -->
<label for="zipcode" class="required">
@@ -415,7 +438,9 @@
<input type="text" name="zipcode" id="zipcode" size="10" value="<!-- TMPL_VAR NAME="zipcode" -->" />
<!-- TMPL_IF NAME="mandatoryzipcode" --><span class="required">Required</span><!-- /TMPL_IF -->
</li>
+ <!-- /TMPL_UNLESS -->
+ <!-- TMPL_UNLESS Name="unusedmandatoryzipcode"-->
<li>
<!-- TMPL_IF NAME="mandatorycountry" -->
<label for="country" class="required">
@@ -426,11 +451,13 @@
<input type="text" name="country" id="country" size="20" value="<!-- TMPL_VAR NAME="country" -->" />
<!-- TMPL_IF NAME="mandatorycountry" --><span class="required">Required</span><!-- /TMPL_IF -->
</li>
+ <!-- /TMPL_UNLESS -->
</ol>
</fieldset>
<fieldset class="rows" id="memberentry_contact">
- <legend>Contact</legend><ol>
+ <legend>Contact</legend><ol>
+ <!-- TMPL_UNLESS Name="unusedphone"-->
<li>
<!-- TMPL_IF NAME="mandatoryphone" -->
<label for="phone" class="required">
@@ -442,6 +469,8 @@
<!-- TMPL_IF NAME="mandatoryphone" --><span class="required">Required</span><!-- /TMPL_IF --><strong><em>Shows on transit slips</em></strong>
</li>
+ <!-- /TMPL_UNLESS -->
+ <!-- TMPL_UNLESS Name="unusedphonepro"-->
<li>
<!-- TMPL_IF NAME="mandatoryphonepro" -->
<label for="phonepro" class="required">
@@ -452,6 +481,8 @@
<input type="text" id="phonepro" name="phonepro" value="<!-- TMPL_VAR NAME="phonepro" -->" />
<!-- TMPL_IF NAME="mandatoryphonepro" --><span class="required">Required</span><!-- /TMPL_IF -->
</li>
+ <!-- /TMPL_UNLESS -->
+ <!-- TMPL_UNLESS Name="unusedmobile"-->
<li>
<!-- TMPL_IF NAME="mandatorymobile" -->
<label for="mobile" class="required">
@@ -462,6 +493,8 @@
<input type="text" id="mobile" name="mobile" value="<!-- TMPL_VAR NAME="mobile" -->" />
<!-- TMPL_IF NAME="mandatorymobile" --><span class="required">Required</span><!-- /TMPL_IF -->
</li>
+ <!-- /TMPL_UNLESS -->
+ <!-- TMPL_UNLESS Name="unusedemail"-->
<li>
<!-- TMPL_IF NAME="mandatoryemail" -->
<label for="email" class="required">
@@ -473,6 +506,8 @@
<!-- TMPL_IF NAME="mandatoryemail" --><span class="required">Required</span><!-- /TMPL_IF --><strong><em>Shows on transit slips</em></strong>
</li>
+ <!-- /TMPL_UNLESS -->
+ <!-- TMPL_UNLESS Name="unusedemailpro"-->
<li>
<!-- TMPL_IF NAME="mandatoryemailpro" -->
<label for="emailpro" class="required">
@@ -483,6 +518,8 @@
<input type="text" id="emailpro" name="emailpro" size="45" value="<!-- TMPL_VAR NAME="emailpro" -->" />
<!-- TMPL_IF NAME="mandatoryemailpro" --><span class="required">Required</span><!-- /TMPL_IF -->
</li>
+ <!-- /TMPL_UNLESS -->
+ <!-- TMPL_UNLESS Name="unusedfax"-->
<li>
<!-- TMPL_IF NAME="mandatoryfax" -->
<label for="fax" class="required">
@@ -493,6 +530,7 @@
<input type="text" id="fax" name="fax" value="<!-- TMPL_VAR NAME="fax" -->" />
<!-- TMPL_IF NAME="mandatoryfax" --><span class="required">Required</span><!-- /TMPL_IF -->
</li>
+ <!-- /TMPL_UNLESS -->
</ol>
</fieldset>
@@ -501,8 +539,10 @@
<!--/TMPL_IF -->
<!--TMPL_IF Name="step_6"-->
+ <!-- TMPL_UNLESS Name="unusedmemberentry_address"-->
<fieldset class="rows" id="memberentry_address">
<legend>Alternate address</legend><ol>
+ <!-- TMPL_UNLESS Name="unusedB_address"-->
<li>
<!-- TMPL_IF NAME="mandatoryB_address" -->
<label for="B_address" class="required">
@@ -513,6 +553,8 @@
<input type="text" id="B_address" name="B_address" size="40" value="<!-- TMPL_VAR NAME="B_address" -->" />
<!-- TMPL_IF NAME="mandatoryB_address" --><span class="required">Required</span><!-- /TMPL_IF -->
</li>
+ <!-- /TMPL_UNLESS -->
+ <!-- TMPL_UNLESS Name="unusedB_address2"-->
<li>
<!-- TMPL_IF NAME="mandatoryB_address2" -->
<label for="B_address2" class="required">
@@ -523,6 +565,8 @@
<input type="text" id="B_address2" name="B_address2" size="40" value="<!-- TMPL_VAR NAME="B_address2" -->" />
<!-- TMPL_IF NAME="mandatoryB_address2" --><span class="required">Required</span><!-- /TMPL_IF -->
</li>
+ <!-- /TMPL_UNLESS -->
+ <!-- TMPL_UNLESS Name="unusedB_city"-->
<li>
<!-- TMPL_IF NAME="mandatoryB_city" -->
<label for="B_city" class="required" >
@@ -533,6 +577,8 @@
<input type="text" id="B_city" name="B_city" size="20" value="<!-- TMPL_VAR NAME="B_city" -->" />
<!-- TMPL_IF NAME="mandatoryB_city" --><span class="required">Required</span><!-- /TMPL_IF -->
</li>
+ <!-- /TMPL_UNLESS -->
+ <!-- TMPL_UNLESS Name="unusedB_zipcode"-->
<li>
<!-- TMPL_IF NAME="mandatoryB_zipcode" -->
<label for="B_zipcode" class="required">
@@ -543,6 +589,8 @@
<input type="text" id="B_zipcode" name="B_zipcode" maxlength="10" size="10" value="<!-- TMPL_VAR NAME="B_zipcode" -->" />
<!-- TMPL_IF NAME="mandatoryB_zipcode" --><span class="required">Required</span><!-- /TMPL_IF -->
</li>
+ <!-- /TMPL_UNLESS -->
+ <!-- TMPL_UNLESS Name="unusedB_country"-->
<li>
<!-- TMPL_IF NAME="mandatoryB_country" -->
<label for="B_country" class="required">
@@ -553,7 +601,8 @@
<input type="text" id="B_country" name="B_country" size="20" value="<!-- TMPL_VAR NAME="B_country" -->" />
<!-- TMPL_IF NAME="mandatoryB_country" --><span class="required">Required</span><!-- /TMPL_IF -->
</li>
- <li>
+ <!-- /TMPL_UNLESS -->
+ <!-- TMPL_UNLESS Name="unusedB_phone"--><li>
<!-- TMPL_IF NAME="mandatoryB_phone" -->
<label for="B_phone" class="required">
<!--TMPL_ELSE-->
@@ -562,8 +611,8 @@
Phone: </label>
<input type="text" id="B_phone" name="B_phone" value="<!-- TMPL_VAR NAME="B_phone" -->" />
<!-- TMPL_IF NAME="mandatoryB_phone" --><span class="required">Required</span><!-- /TMPL_IF -->
- </li>
- <li>
+ </li><!-- /TMPL_UNLESS -->
+ <!-- TMPL_UNLESS Name="unusedB_email"--><li>
<!-- TMPL_IF NAME="mandatoryB_email" -->
<label for="B_email" class="required">
<!--TMPL_ELSE-->
@@ -571,8 +620,8 @@
<!-- /TMPL_IF-->
Email: </label>
<input type="text" id="B_email" name="B_email" size="45" value="<!-- TMPL_VAR NAME="B_email" -->" />
- <!-- TMPL_IF NAME="mandatoryB_email" --><span class="required">Required</span><!-- /TMPL_IF --> </li>
- <li>
+ <!-- TMPL_IF NAME="mandatoryB_email" --><span class="required">Required</span><!-- /TMPL_IF --> </li><!-- /TMPL_UNLESS -->
+ <!-- TMPL_UNLESS Name="unusedcontactnote"--><li>
<!-- TMPL_IF NAME="mandatorycontactnote" -->
<label for="contactnote" class="required">
<!--TMPL_ELSE-->
@@ -581,14 +630,24 @@
Contact note: </label>
<textarea id="contactnote" name="contactnote" cols="40" rows="2"><!-- TMPL_VAR NAME="contactnote" --></textarea>
<!-- TMPL_IF NAME="mandatorycontactnote" --><span class="required">Required</span><!-- /TMPL_IF -->
- </li>
+ </li><!-- /TMPL_UNLESS -->
</ol>
- </fieldset>
+ </fieldset> <!-- /TMPL_UNLESS -->
<!-- /TMPL_IF -->
<!--TMPL_IF Name="step_2"-->
- <fieldset class="rows" id="memberentry_altaddress">
+ <!-- TMPL_UNLESS Name="unusedmemberentry_altaddress"--> <fieldset class="rows" id="memberentry_altaddress">
<legend>Alternate Contact</legend><ol>
- <li>
+ <!-- TMPL_UNLESS Name="unusedcontactfirstname"--><li>
+ <!-- TMPL_IF NAME="mandatoryaltcontactfirstname" -->
+ <label for="altcontactfirstname" class="required">
+ <!-- TMPL_ELSE -->
+ <label for="altcontactfirstname">
+ <!-- /TMPL_IF -->
+ Firstname:</label>
+ <input type="text" name="altcontactfirstname" id="altcontactfirstname" value="<!-- TMPL_VAR NAME="altcontactfirstname" -->" />
+ <!-- TMPL_IF NAME="mandatoryaltcontactfirstname" --><span class="required">Required</span><!-- /TMPL_IF -->
+ </li><!-- /TMPL_UNLESS -->
+ <!-- TMPL_UNLESS Name="unusedcontactsurname"--><li>
<!-- TMPL_IF NAME="mandatoryaltcontactsurname" -->
<label for="altcontactsurname" class="required">
<!-- TMPL_ELSE -->
@@ -597,7 +656,8 @@
Surname:</label>
<input type="text" name="altcontactsurname" id="altcontactsurname" value="<!-- TMPL_VAR NAME="altcontactsurname" -->" />
<!-- TMPL_IF NAME="mandatoryaltcontactsurname" --><span class="required">Required</span><!-- /TMPL_IF -->
- </li>
+ </li><!-- /TMPL_UNLESS -->
+ <!-- TMPL_UNLESS Name="unusedaltcontactfirstname"--><li>
<li>
<!-- TMPL_IF NAME="mandatoryaltcontactfirstname" -->
<label for="altcontactfirstname" class="required">
@@ -607,8 +667,8 @@
First name:</label>
<input type="text" name="altcontactfirstname" id="altcontactfirstname" value="<!-- TMPL_VAR NAME="altcontactfirstname" -->" />
<!-- TMPL_IF NAME="mandatoryaltcontactfirstname" --><span class="required">Required</span><!-- /TMPL_IF -->
- </li>
- <li>
+ </li><!-- /TMPL_UNLESS -->
+ <!-- TMPL_UNLESS Name="unusedaltcontactaddress1"--><li>
<!-- TMPL_IF NAME="mandatoryaltcontactaddress1" -->
<label for="altcontactaddress1" class="required">
<!-- TMPL_ELSE -->
@@ -617,8 +677,8 @@
Address:</label>
<input type="text" name="altcontactaddress1" id="altcontactaddress1" value="<!-- TMPL_VAR NAME="altcontactaddress1" -->" size="40" />
<!-- TMPL_IF NAME="mandatoryaltcontactaddress1" --><span class="required">Required</span><!-- /TMPL_IF -->
- </li>
- <li>
+ </li><!-- /TMPL_UNLESS -->
+ <!-- TMPL_UNLESS Name="unusedcontactaddress2"--><li>
<!-- TMPL_IF NAME="mandatoryaltcontactaddress2" -->
<label for="altcontactaddress2" class="required">
<!-- TMPL_ELSE -->
@@ -627,8 +687,8 @@
Address 2:</label>
<input type="text" name="altcontactaddress2" id="altcontactaddress2" value="<!-- TMPL_VAR NAME="altcontactaddress2" -->" size="40" />
<!-- TMPL_IF NAME="mandatoryaltcontactaddress2" --><span class="required">Required</span><!-- /TMPL_IF -->
- </li>
- <li>
+ </li><!-- /TMPL_UNLESS -->
+ <!-- TMPL_UNLESS Name="unusedcontactaddress3"--><li>
<!-- TMPL_IF NAME="mandatoryaltcontactaddress3" -->
<label for="altcontactaddress3" class="required">
<!-- TMPL_ELSE -->
@@ -637,8 +697,8 @@
City, State:</label>
<input type="text" name="altcontactaddress3" id="altcontactaddress3" value="<!-- TMPL_VAR NAME="altcontactaddress3" -->" size="40" />
<!-- TMPL_IF NAME="mandatoryaltcontactaddress3" --><span class="required">Required</span><!-- /TMPL_IF -->
- </li>
- <li>
+ </li><!-- /TMPL_UNLESS -->
+ <!-- TMPL_UNLESS Name="unusedcontactzipcode"--><li>
<!-- TMPL_IF NAME="mandatoryaltcontactzipcode" -->
<label for="altcontactzipcode" class="required">
<!-- TMPL_ELSE -->
@@ -647,8 +707,8 @@
Zip/Postal code:</label>
<input type="text" name="altcontactzipcode" id="altcontactzipcode" value="<!-- TMPL_VAR NAME="altcontactzipcode" -->" size="5" />
<!-- TMPL_IF NAME="mandatoryaltcontactzipcode" --><span class="required">Required</span><!-- /TMPL_IF -->
- </li>
- <li>
+ </li><!-- /TMPL_UNLESS -->
+ <!-- TMPL_UNLESS Name="unusedaltcontactcountry"--><li>
<!-- TMPL_IF NAME="mandatoryaltcontactcountry" -->
<label for="altcontactcountry" class="required">
<!-- TMPL_ELSE -->
@@ -657,8 +717,8 @@
Country:</label>
<input type="text" name="altcontactcountry" id="altcontactcountry" value="<!-- TMPL_VAR NAME="altcontactcountry" -->" size="20" />
<!-- TMPL_IF NAME="mandatoryaltcontactcountry" --><span class="required">Required</span><!-- /TMPL_IF -->
- </li>
- <li>
+ </li><!-- /TMPL_UNLESS -->
+ <!-- TMPL_UNLESS Name="unusedaltcontactphone"--><li>
<!-- TMPL_IF NAME="mandatoryaltcontactphone" -->
<label for="altcontactphone" class="required">
<!-- TMPL_ELSE -->
@@ -667,9 +727,10 @@
Phone:</label>
<input type="text" name="altcontactphone" id="altcontactphone" value="<!-- TMPL_VAR NAME="altcontactphone" -->" />
<!-- TMPL_IF NAME="mandatoryaltcontactphone" --><span class="required">Required</span><!-- /TMPL_IF -->
- </li>
+ </li><!-- /TMPL_UNLESS -->
</ol>
- </fieldset>
+ </fieldset><!--/TMPL_UNLESS-->
+
<!-- TMPL_IF NAME="I" -->
@@ -740,7 +801,7 @@
<a href="/cgi-bin/koha/admin/categorie.pl">Please create one</a>
<!-- /TMPL_IF -->
</li>
- <li>
+ <!-- TMPL_UNLESS Name="unusedsort1"--><li>
<!-- TMPL_IF NAME="mandatorysort1" -->
<label for="sort1" class="required">
<!-- TMPL_ELSE -->
@@ -753,8 +814,8 @@
<input type="text" id="sort1" name="sort1" size="20" value="<!-- TMPL_VAR NAME="sort1" -->" />
<!-- TMPL_IF NAME="mandatorysort1" --><span class="required">Required</span><!-- /TMPL_IF -->
<!-- /TMPL_IF -->
- </li>
- <li>
+ </li><!-- /TMPL_UNLESS -->
+ <!-- TMPL_UNLESS Name="unusedsort2"--><li>
<!-- TMPL_IF NAME="mandatorysort2" -->
<label for="sort2" class="required">
<!-- TMPL_ELSE -->
@@ -767,7 +828,7 @@
<input type="text" id="sort2" name="sort2" size="20" value="<!-- TMPL_VAR NAME="sort2" -->" />
<!-- TMPL_IF NAME="mandatorysort2" --><span class="required">Required</span><!-- /TMPL_IF -->
<!-- /TMPL_IF -->
- </li>
+ </li><!--/TMPL_UNLESS-->
</ol>
</fieldset>
<fieldset class="rows" id="memberentry_subscription">
diff --git a/members/memberentry.pl b/members/memberentry.pl
index 2181378..1808d92 100755
--- a/members/memberentry.pl
+++ b/members/memberentry.pl
@@ -595,6 +595,12 @@ if (C4::Context->preference('ExtendedPatronAttributes')) {
$template->param(ExtendedPatronAttributes => 1);
patron_attributes_form($template, $borrowernumber);
}
+my $unusedfields=C4::Context->preference("BorrowerUnusedFields");
+my @fields_unused=split(/,|;|\|/,$unusedfields);
+foreach (@fields_unused) {
+ warn $_;
+ $template->param( "unused$_" => 1);
+}
if (C4::Context->preference('EnhancedMessagingPreferences')) {
if ($op eq 'add') {
--
1.6.0.4
More information about the Koha-patches
mailing list