- Main address
+
+
+ Main address
+
[% IF Koha.Preference( 'AddressFormat' ) %]
[% PROCESS "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }" %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
@@ -24,12 +24,27 @@
[% t("Patrons") | html %] ›
[% t("Koha") | html %]
[% END %]
-
-[% INCLUDE 'doc-head-close.inc' %]
+
+fieldset legend i {
+ color: #4C7AA8;
+ font-size: 80%;
+ padding-right: .2rem;
+}
+
+legend.collapsed i.fa.fa-caret-down::before {
+ content: "\f0da";
+}
+[% END %]
@@ -199,7 +214,7 @@ legend:hover {
[% SET fieldstohide = Koha.Preference('CollapseFieldsPatronAddForm') %]
[% IF Koha.Preference('CollapseFieldsPatronAddForm') %][% UNLESS step %]
- Show collapsed fields:
+ Show collapsed fields:
[% FOREACH field IN fieldstohide.split(',') %]
[% SWITCH field %]
[% CASE 'identity' %] Patron identity |
@@ -270,7 +285,10 @@ legend:hover {
[% IF ( step_1 ) %]
[% UNLESS notitle && nosurname && nofirstname && nomiddle_name && nodateofbirth && noinitials && noothernames &&nosex && nopronouns %]
- [% IF ( patron_category.category_type == 'I' ) %]Organization [% ELSE %]Patron [% END %]identity
+
+
+ [% IF ( patron_category.category_type == 'I' ) %]Organization [% ELSE %]Patron [% END %]identity
+
[% UNLESS ( patron_category.category_type == 'I' ) %]
[% UNLESS notitle %]
@@ -465,7 +483,10 @@ legend:hover {
[% SET possible_relationships = Koha.Preference('borrowerRelationship') %]
- Patron guarantor
+
+
+ Patron guarantor
+
[% FOREACH r IN relationships %]
@@ -627,7 +648,10 @@ legend:hover {
[% UNLESS nocontactname && nocontactfirstname && norelationship %]
- Non-patron guarantor
+
+
+ Non-patron guarantor
+
[% UNLESS nocontactname %]
@@ -691,7 +715,10 @@ legend:hover {
[% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
- Contact information
+
+
+ Contact information
+
[% UNLESS nophone %]
@@ -880,7 +907,10 @@ legend:hover {
[% IF ( step_3 ) %]
[% SET autoMemberNum = Koha.Preference('autoMemberNum') %]
- Library management
+
+
+ Library management
+
[% UNLESS nocardnumber %]
@@ -1111,7 +1141,11 @@ legend:hover {
[% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
- Library setup
+
+
+ Library setup
+
+
[% UNLESS nodateenrolled %]
[% IF ( mandatorydateenrolled ) %]
@@ -1197,7 +1231,10 @@ legend:hover {
[% UNLESS nouserid && nopassword && !CanUpdatePasswordExpiration %]
- OPAC/Staff interface login
+
+
+ OPAC/Staff interface login
+
[% UNLESS nouserid %]
@@ -1353,7 +1390,10 @@ legend:hover {
[% UNLESS ( opadd || opduplicate || ( nogonenoaddress && nolost ) ) %]
- Patron account flags
+
+
+ Patron account flags
+
Setting a value here will prevent patron from circulating materials and placing holds on the OPAC
[% UNLESS nogonenoaddress %]
@@ -1429,7 +1469,10 @@ legend:hover {
[% END %]
- Patron restrictions
+
+
+ Patron restrictions
+
[% IF ( patron.restrictions.count ) %]
@@ -1518,7 +1561,10 @@ legend:hover {
[% IF ( step_7 ) %]
[% IF Koha.Preference('HouseboundModule') %]
- Housebound roles
+
+
+ Housebound roles
+
@@ -1559,7 +1605,10 @@ legend:hover {
[% IF Koha.Preference('ExtendedPatronAttributes') %]
[% UNLESS ( no_patron_attribute_types ) %]
- Additional attributes and identifiers
+
+
+ Additional attributes and identifiers
+
[% FOREACH pa_loo IN patron_attributes %]
@@ -1619,7 +1668,10 @@ legend:hover {
[% IF ( step_5 ) %]
[% IF ( EnhancedMessagingPreferences ) %]
- Patron messaging preferences
+
+
+ Patron messaging preferences
+
@@ -1691,92 +1743,105 @@ legend:hover {
}
}
var Sticky;
+
function showHideFields(){
+ $("#messaging_prefs_loading, #guarantor_template").hide();
[% UNLESS step == 1 %]
[% IF fieldstohide.match('identity') %]
- $("#memberentry_identity").find('legend').nextAll().toggle();
+ togglePanel( $("#identity_lgd") );
[% END %]
[% IF show_guarantor || guarantor %]
[% IF fieldstohide.match('guarantor') %]
- $("#memberentry_guarantor").find('legend').nextAll().toggle();
- $("#guarantor_template").toggle();
+ togglePanel( $("#patron_guarantor_lgd") );
[% END %]
[% IF fieldstohide.match('nonpatron_guarantor') %]
- $("#non_patron_guarantor").find('legend').nextAll().toggle();
+ togglePanel( $("#non_patron_guarantor_lgd") );
[% END %]
[% END %]
[% IF fieldstohide.match('primary_address') %]
- $("#memberentry_mainaddress").find('legend').nextAll().toggle();
+ togglePanel( $("#main_address_lgd") );
[% END %]
[% IF fieldstohide.match('primary_contact') %]
- $("#memberentry_contact").find('legend').nextAll().toggle();
+ togglePanel( $("#contact_lgd") );
[% END %]
[% END %]
[% UNLESS step == 6 %]
[% IF fieldstohide.match('alt_address') %]
- $("#memberentry_address").find('legend').nextAll().toggle();
+ togglePanel( $("#alt_address_lgd") );
[% END %]
[% END %]
[% UNLESS step == 2 %]
[% IF fieldstohide.match('alt_contact') %]
- $("#memberentry_altaddress").find('legend').nextAll().toggle();
+ togglePanel( $("#alt_contact_lgd") );
[% END %]
[% END %]
[% UNLESS step == 3 %]
[% IF fieldstohide.match('lib_mgmt') %]
- $("#memberentry_library_management").find('legend').nextAll().toggle();
+ togglePanel( $("#library_management_lgd") );
[% END %]
[% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
[% IF fieldstohide.match('lib_setup') %]
- $("#memberentry_subscription").find('legend').nextAll().toggle();
+ togglePanel( $("#library_setup_lgd") );
[% END %]
[% END %]
[% UNLESS nouserid && nopassword %]
[% IF fieldstohide.match('login') %]
- $("#memberentry_userid").find('legend').nextAll().toggle();
+ togglePanel( $("#opac_staff_login_lgd") );
[% END %]
[% END %]
[% UNLESS ( opadd || opduplicate ) %]
[% IF fieldstohide.match('flags') %]
- $("#memberentry_account_flags").find('legend').nextAll().toggle();
+ togglePanel( $("#account_flags_lgd") );
[% END %]
[% END %]
[% IF fieldstohide.match('debarments') %]
- $("#memberentry_restrictions").find('legend').nextAll().toggle();
+ togglePanel( $("#restrictions_lgd") );
[% END %]
[% END %]
[% UNLESS step == 7 %]
[% IF Koha.Preference('HouseboundModule') %]
[% IF fieldstohide.match('housebound') %]
- $("#memberentry_housebound_roles").find('legend').nextAll().toggle();
+ togglePanel( $("#housebound_roles") );
[% END %]
[% END %]
[% END %]
[% UNLESS step == 4 %]
[% IF Koha.Preference('ExtendedPatronAttributes') %]
[% IF fieldstohide.match('additional') %]
- $("#memberentry_patron_attributes").find('legend').nextAll().toggle();
+ togglePanel( $("#patron_attributes_lgd") );
[% END %]
[% END %]
[% END %]
[% UNLESS step == 5 %]
[% IF Koha.Preference('EnhancedMessagingPreferences') %]
[% IF fieldstohide.match('messaging') %]
- $("#memberentry_messaging_prefs").find('legend').nextAll().toggle();
+ togglePanel( $("#patron_messaging_prefs_lgd") );
$("#messaging_prefs_loading").toggle();
[% END %]
[% END %]
[% END %]
}
+ function togglePanel( node ){
+ var panel = node.nextAll();
+ if(panel.is(":visible")){
+ node.addClass("collapsed").removeClass("expanded").attr("title", __("Click to expand this section") );
+ panel.hide();
+ } else {
+ node.addClass("expanded").removeClass("collapsed").attr("title", __("Click to collapse this section") );
+ panel.show();
+ panel.find("input, select, textarea").eq(0).focus();
+ }
+ }
+
$(document).ready(function() {
showHideFields();
$("#toggle_hidden_fields").change(function(){
showHideFields();
});
- $("legend").click(function(){
- $(this).nextAll().toggle();
+ $(".collapsed,.expanded").on("click",function(){
+ togglePanel( $(this) );
$("#messaging_prefs_loading").hide();
$("#guarantor_template").hide();
});
--