[Koha] new patron page customization, default library loation
Owen Leonard
oleonard at myacpl.org
Tue Jun 23 08:06:03 NZST 2009
> Can anyone tell me how I can disable/hide data entry fields on the new
> patron page?
We do a little bit of this with javascript. In System Preferences look
for the intranetuserjs system pref. Then use a little jquery to hide
lines based on the ID of the input field. Paste the following into
intranetuserjs:
$(document).ready(function(){
$("#entryform #initials").parent().remove();
});
That bit of code looks for an element with ID "entryform," (the patron
entry form) and looks for an element with ID "initials" inside the
form. Then it removes that element's "parent," the list item
containing that form field.
You'll have to view the source of the page to find out what the input
field's ID is. For example:
<input type="text" value="" size="20" name="othernames" id="othernames"/>
If you used "othernames" in the code above it would hide the line
labeled "Other name." Note that you can add as many lines as you want:
$(document).ready(function(){
$("#entryform #initials").parent().remove();
$("#entryform #othernames").parent().remove();
$("#entryform #altcontactaddress1").parent().remove();
$("#entryform #altcontactaddress2").parent().remove();
$("#entryform #altcontactaddress3").parent().remove();
$("#entryform #altcontactzipcode").parent().remove();
});
-- Owen
--
Web Developer
Athens County Public Libraries
http://www.myacpl.org
More information about the Koha
mailing list