View | Details | Raw Unified | Return to bug 35511
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style.inc (-1 / +4 lines)
Lines 2-8 Link Here
2
[% USE AuthorisedValues %]
2
[% USE AuthorisedValues %]
3
[% BLOCK 'alt-address-style' %]
3
[% BLOCK 'alt-address-style' %]
4
    <fieldset class="rows" id="memberentry_address">
4
    <fieldset class="rows" id="memberentry_address">
5
        <legend id="alt_address_lgd">Alternate address</legend>
5
        <legend class="expanded" id="alt_address_lgd">
6
            <i class="fa fa-caret-down"></i>
7
            Alternate address
8
        </legend>
6
        <ol>
9
        <ol>
7
            [% IF Koha.Preference( 'AddressFormat' ) %]
10
            [% IF Koha.Preference( 'AddressFormat' ) %]
8
                [% PROCESS "member-alt-address-style-${ Koha.Preference( 'AddressFormat' ) }" %]
11
                [% PROCESS "member-alt-address-style-${ Koha.Preference( 'AddressFormat' ) }" %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-contact-style.inc (-1 / +4 lines)
Lines 1-7 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% BLOCK 'alt-contact-style' %]
2
[% BLOCK 'alt-contact-style' %]
3
    <fieldset class="rows" id="memberentry_altaddress">
3
    <fieldset class="rows" id="memberentry_altaddress">
4
        <legend id="alt_contact_lgd">Alternate contact</legend>
4
        <legend class="expanded" id="alt_contact_lgd">
5
            <i class="fa fa-caret-down"></i>
6
            Alternate contact
7
        </legend>
5
        <ol>
8
        <ol>
6
            [% IF Koha.Preference( 'AddressFormat' ) %]
9
            [% IF Koha.Preference( 'AddressFormat' ) %]
7
                [% PROCESS "member-alt-contact-style-${ Koha.Preference( 'AddressFormat' ) }" %]
10
                [% PROCESS "member-alt-contact-style-${ Koha.Preference( 'AddressFormat' ) }" %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style.inc (-1 / +4 lines)
Lines 2-8 Link Here
2
[% USE AuthorisedValues %]
2
[% USE AuthorisedValues %]
3
[% BLOCK 'main-address-style' %]
3
[% BLOCK 'main-address-style' %]
4
    <fieldset class="rows" id="memberentry_mainaddress">
4
    <fieldset class="rows" id="memberentry_mainaddress">
5
        <legend id="main_address_lgd">Main address</legend>
5
        <legend class="expanded" id="main_address_lgd">
6
            <i class="fa fa-caret-down"></i>
7
            Main address
8
        </legend>
6
        <ol>
9
        <ol>
7
            [% IF Koha.Preference( 'AddressFormat' ) %]
10
            [% IF Koha.Preference( 'AddressFormat' ) %]
8
                [% PROCESS "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }" %]
11
                [% PROCESS "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }" %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (-36 / +100 lines)
Lines 25-36 Link Here
25
    [% t("Patrons") | html %] &rsaquo;
25
    [% t("Patrons") | html %] &rsaquo;
26
    [% t("Koha") | html %]
26
    [% t("Koha") | html %]
27
[% END %]</title>
27
[% END %]</title>
28
<style>
28
[% INCLUDE 'doc-head-close.inc' %]
29
legend:hover {
29
<style>[% FILTER collapse %]
30
fieldset legend {
31
    border: 1px solid #FFF;
32
    padding: .7em;
33
}
34
fieldset legend:hover {
35
    border: 1px solid #6FAF44;
30
    cursor: pointer;
36
    cursor: pointer;
31
}
37
}
32
</style>
38
33
[% INCLUDE 'doc-head-close.inc' %]
39
fieldset legend i {
40
    color: #4C7AA8;
41
    font-size: 80%;
42
    padding-right: .2rem;
43
}
44
45
legend.collapsed i.fa.fa-caret-down::before {
46
    content: "\f0da";
47
}
48
[% END %]</style>
34
</head>
49
</head>
35
50
36
<body id="pat_memberentrygen" class="pat">
51
<body id="pat_memberentrygen" class="pat">
Lines 200-206 legend:hover { Link Here
200
                        [% SET fieldstohide = Koha.Preference('CollapseFieldsPatronAddForm') %]
215
                        [% SET fieldstohide = Koha.Preference('CollapseFieldsPatronAddForm') %]
201
                        [% IF Koha.Preference('CollapseFieldsPatronAddForm') %][% UNLESS step %]
216
                        [% IF Koha.Preference('CollapseFieldsPatronAddForm') %][% UNLESS step %]
202
                            <p id="selections">
217
                            <p id="selections">
203
                                <input type="checkbox" id="toggle_hidden_fields" title="These fields are collapsed by default by the CollapseFieldsPatronAddForm system preference"><strong>Show collapsed fields:</strong>
218
                                <label><input type="checkbox" id="toggle_hidden_fields" title="These fields are collapsed by default by the CollapseFieldsPatronAddForm system preference"><strong>Show collapsed fields:</strong></label>
204
                                [% FOREACH field IN fieldstohide.split(',') %]
219
                                [% FOREACH field IN fieldstohide.split(',') %]
205
                                    [% SWITCH field %]
220
                                    [% SWITCH field %]
206
                                        [% CASE 'identity' %] <span>Patron identity</span> |
221
                                        [% CASE 'identity' %] <span>Patron identity</span> |
Lines 271-277 legend:hover { Link Here
271
                            [% IF ( step_1 ) %]
286
                            [% IF ( step_1 ) %]
272
                                [% UNLESS notitle && nosurname && nofirstname && nomiddle_name && nodateofbirth && noinitials && noothernames &&nosex && nopronouns %]
287
                                [% UNLESS notitle && nosurname && nofirstname && nomiddle_name && nodateofbirth && noinitials && noothernames &&nosex && nopronouns %]
273
                                    <fieldset class="rows" id="memberentry_identity">
288
                                    <fieldset class="rows" id="memberentry_identity">
274
                                        <legend id="identity_lgd">[% IF ( patron_category.category_type == 'I' ) %]<span>Organization [% ELSE %]Patron [% END %]identity</span></legend>
289
                                        <legend class="expanded" id="identity_lgd">
290
                                            <i class="fa fa-caret-down" title="Collapse this section"></i>
291
                                            [% IF ( patron_category.category_type == 'I' ) %]<span>Organization [% ELSE %]Patron [% END %]identity</span>
292
                                        </legend>
275
                                        <ol>
293
                                        <ol>
276
                                            [% UNLESS ( patron_category.category_type == 'I' ) %]
294
                                            [% UNLESS ( patron_category.category_type == 'I' ) %]
277
                                                [% UNLESS notitle %]
295
                                                [% UNLESS notitle %]
Lines 466-472 legend:hover { Link Here
466
                                    [% SET possible_relationships = Koha.Preference('borrowerRelationship') %]
484
                                    [% SET possible_relationships = Koha.Preference('borrowerRelationship') %]
467
                                    <div id="memberentry_guarantor_anchor">
485
                                    <div id="memberentry_guarantor_anchor">
468
                                        <fieldset id="memberentry_guarantor" class="rows">
486
                                        <fieldset id="memberentry_guarantor" class="rows">
469
                                            <legend>Patron guarantor</legend>
487
                                            <legend class="expanded" id="patron_guarantor_lgd">
488
                                                <i class="fa fa-caret-down"></i>
489
                                                Patron guarantor
490
                                            </legend>
470
491
471
                                            <div id="guarantor_relationships">
492
                                            <div id="guarantor_relationships">
472
                                                [% FOREACH r IN relationships %]
493
                                                [% FOREACH r IN relationships %]
Lines 628-634 legend:hover { Link Here
628
649
629
                                    [% UNLESS nocontactname && nocontactfirstname && norelationship %]
650
                                    [% UNLESS nocontactname && nocontactfirstname && norelationship %]
630
                                        <fieldset class="rows" id="non_patron_guarantor">
651
                                        <fieldset class="rows" id="non_patron_guarantor">
631
                                            <legend>Non-patron guarantor</legend>
652
                                            <legend class="expanded" id="non_patron_guarantor_lgd">
653
                                                <i class="fa fa-caret-down"></i>
654
                                                Non-patron guarantor
655
                                            </legend>
632
                                            <ol>
656
                                            <ol>
633
                                                [% UNLESS nocontactname %]
657
                                                [% UNLESS nocontactname %]
634
                                                    <li>
658
                                                    <li>
Lines 692-698 legend:hover { Link Here
692
716
693
                                [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
717
                                [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
694
                                    <fieldset class="rows" id="memberentry_contact">
718
                                    <fieldset class="rows" id="memberentry_contact">
695
                                        <legend id="contact_lgd">Contact information</legend>
719
                                        <legend class="expanded" id="contact_lgd">
720
                                            <i class="fa fa-caret-down"></i>
721
                                            Contact information
722
                                        </legend>
696
                                        <ol>
723
                                        <ol>
697
                                            [% UNLESS nophone %]
724
                                            [% UNLESS nophone %]
698
                                                <li>
725
                                                <li>
Lines 881-887 legend:hover { Link Here
881
                            [% IF ( step_3 ) %]
908
                            [% IF ( step_3 ) %]
882
                                [% SET autoMemberNum = Koha.Preference('autoMemberNum') %]
909
                                [% SET autoMemberNum = Koha.Preference('autoMemberNum') %]
883
                                <fieldset class="rows" id="memberentry_library_management">
910
                                <fieldset class="rows" id="memberentry_library_management">
884
                                    <legend id="library_management_lgd">Library management</legend>
911
                                    <legend class="expanded" id="library_management_lgd">
912
                                        <i class="fa fa-caret-down"></i>
913
                                        Library management
914
                                    </legend>
885
                                    <ol>
915
                                    <ol>
886
                                        [% UNLESS nocardnumber %]
916
                                        [% UNLESS nocardnumber %]
887
                                            <li>
917
                                            <li>
Lines 1112-1118 legend:hover { Link Here
1112
1142
1113
                                [% UNLESS nodateenrolled &&  noopacnote && noborrowernotes %]
1143
                                [% UNLESS nodateenrolled &&  noopacnote && noborrowernotes %]
1114
                                    <fieldset class="rows" id="memberentry_subscription">
1144
                                    <fieldset class="rows" id="memberentry_subscription">
1115
                                        <legend id="library_setup_lgd">Library setup</legend><ol>
1145
                                        <legend class="expanded" id="library_setup_lgd">
1146
                                            <i class="fa fa-caret-down"></i>
1147
                                            Library setup
1148
                                        </legend>
1149
                                        <ol>
1116
                                        [% UNLESS nodateenrolled %]
1150
                                        [% UNLESS nodateenrolled %]
1117
                                            <li>
1151
                                            <li>
1118
                                                [% IF ( mandatorydateenrolled ) %]
1152
                                                [% IF ( mandatorydateenrolled ) %]
Lines 1198-1204 legend:hover { Link Here
1198
1232
1199
                                [% UNLESS nouserid && nopassword && !CanUpdatePasswordExpiration %]
1233
                                [% UNLESS nouserid && nopassword && !CanUpdatePasswordExpiration %]
1200
                                    <fieldset class="rows" id="memberentry_userid">
1234
                                    <fieldset class="rows" id="memberentry_userid">
1201
                                        <legend id="opac_staff_login_lgd">OPAC/Staff interface login</legend>
1235
                                        <legend class="expanded" id="opac_staff_login_lgd">
1236
                                            <i class="fa fa-caret-down"></i>
1237
                                            OPAC/Staff interface login
1238
                                        </legend>
1202
                                        <ol>
1239
                                        <ol>
1203
                                            [% UNLESS nouserid %]
1240
                                            [% UNLESS nouserid %]
1204
                                                <li>
1241
                                                <li>
Lines 1354-1360 legend:hover { Link Here
1354
                                <!--this zones are not necessary in modif mode -->
1391
                                <!--this zones are not necessary in modif mode -->
1355
                                [% UNLESS ( op == 'add_form' || op == 'duplicate' || ( nogonenoaddress && nolost ) ) %]
1392
                                [% UNLESS ( op == 'add_form' || op == 'duplicate' || ( nogonenoaddress && nolost ) ) %]
1356
                                    <fieldset class="rows" id="memberentry_account_flags">
1393
                                    <fieldset class="rows" id="memberentry_account_flags">
1357
                                        <legend id="account_flags_lgd">Patron account flags</legend>
1394
                                        <legend class="expanded" id="account_flags_lgd">
1395
                                            <i class="fa fa-caret-down"></i>
1396
                                            Patron account flags
1397
                                        </legend>
1358
                                        <p>Setting a value here will prevent patron from circulating materials and placing holds on the OPAC</p>
1398
                                        <p>Setting a value here will prevent patron from circulating materials and placing holds on the OPAC</p>
1359
                                        <ol class="radio">
1399
                                        <ol class="radio">
1360
                                            [% UNLESS nogonenoaddress %]
1400
                                            [% UNLESS nogonenoaddress %]
Lines 1430-1436 legend:hover { Link Here
1430
                                    </fieldset> <!-- /#memberentry_account_flags -->
1470
                                    </fieldset> <!-- /#memberentry_account_flags -->
1431
                                [% END %]
1471
                                [% END %]
1432
                                    <fieldset class="rows" id="memberentry_restrictions">
1472
                                    <fieldset class="rows" id="memberentry_restrictions">
1433
                                        <legend id="restrictions_lgd">Patron restrictions</legend>
1473
                                        <legend class="expanded" id="restrictions_lgd">
1474
                                            <i class="fa fa-caret-down"></i>
1475
                                            Patron restrictions
1476
                                        </legend>
1434
                                        [% IF ( patron.restrictions.count ) %]
1477
                                        [% IF ( patron.restrictions.count ) %]
1435
                                            <table>
1478
                                            <table>
1436
                                                <thead>
1479
                                                <thead>
Lines 1519-1525 legend:hover { Link Here
1519
                            [% IF ( step_7 ) %]
1562
                            [% IF ( step_7 ) %]
1520
                                [% IF Koha.Preference('HouseboundModule') %]
1563
                                [% IF Koha.Preference('HouseboundModule') %]
1521
                                    <fieldset class="rows" id="memberentry_housebound_roles">
1564
                                    <fieldset class="rows" id="memberentry_housebound_roles">
1522
                                        <legend id="housebound_roles">Housebound roles</legend>
1565
                                        <legend class="expanded" id="housebound_roles">
1566
                                            <i class="fa fa-caret-down"></i>
1567
                                            Housebound roles
1568
                                        </legend>
1523
                                        <ol class="radio">
1569
                                        <ol class="radio">
1524
                                            <li>
1570
                                            <li>
1525
                                                <label class="radio" for="housebound_chooser">
1571
                                                <label class="radio" for="housebound_chooser">
Lines 1560-1566 legend:hover { Link Here
1560
                                [% IF Koha.Preference('ExtendedPatronAttributes') %]
1606
                                [% IF Koha.Preference('ExtendedPatronAttributes') %]
1561
                                    [% UNLESS ( no_patron_attribute_types ) %]
1607
                                    [% UNLESS ( no_patron_attribute_types ) %]
1562
                                        <fieldset class="rows" id="memberentry_patron_attributes">
1608
                                        <fieldset class="rows" id="memberentry_patron_attributes">
1563
                                            <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
1609
                                            <legend class="expanded" id="patron_attributes_lgd">
1610
                                                <i class="fa fa-caret-down"></i>
1611
                                                Additional attributes and identifiers
1612
                                            </legend>
1564
                                            <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1613
                                            <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1565
                                            [% FOREACH pa_loo IN patron_attributes %]
1614
                                            [% FOREACH pa_loo IN patron_attributes %]
1566
                                                <ol class="attributes_table">
1615
                                                <ol class="attributes_table">
Lines 1620-1626 legend:hover { Link Here
1620
                            [% IF ( step_5 ) %]
1669
                            [% IF ( step_5 ) %]
1621
                                [% IF ( EnhancedMessagingPreferences ) %]
1670
                                [% IF ( EnhancedMessagingPreferences ) %]
1622
                                    <fieldset class="rows" id="memberentry_messaging_prefs">
1671
                                    <fieldset class="rows" id="memberentry_messaging_prefs">
1623
                                        <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1672
                                        <legend class="expanded" id="patron_messaging_prefs_lgd">
1673
                                            <i class="fa fa-caret-down"></i>
1674
                                            Patron messaging preferences
1675
                                        </legend>
1624
                                        <div id="messaging_prefs_loading" class="form-message" style="display:none">
1676
                                        <div id="messaging_prefs_loading" class="form-message" style="display:none">
1625
                                            <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading new messaging defaults
1677
                                            <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading new messaging defaults
1626
                                        </div>
1678
                                        </div>
Lines 1691-1782 legend:hover { Link Here
1691
            }
1743
            }
1692
        }
1744
        }
1693
        var Sticky;
1745
        var Sticky;
1746
1694
        function showHideFields(){
1747
        function showHideFields(){
1748
            $("#messaging_prefs_loading, #guarantor_template").hide();
1695
            [% UNLESS step == 1 %]
1749
            [% UNLESS step == 1 %]
1696
                [% IF fieldstohide.match('identity') %]
1750
                [% IF fieldstohide.match('identity') %]
1697
                    $("#memberentry_identity").find('legend').nextAll().toggle();
1751
                    togglePanel( $("#identity_lgd") );
1698
                [% END %]
1752
                [% END %]
1699
                [% IF show_guarantor || guarantor %]
1753
                [% IF show_guarantor || guarantor %]
1700
                    [% IF fieldstohide.match('guarantor') %]
1754
                    [% IF fieldstohide.match('guarantor') %]
1701
                        $("#memberentry_guarantor").find('legend').nextAll().toggle();
1755
                        togglePanel( $("#patron_guarantor_lgd") );
1702
                        $("#guarantor_template").toggle();
1703
                    [% END %]
1756
                    [% END %]
1704
                    [% IF fieldstohide.match('nonpatron_guarantor') %]
1757
                    [% IF fieldstohide.match('nonpatron_guarantor') %]
1705
                        $("#non_patron_guarantor").find('legend').nextAll().toggle();
1758
                        togglePanel( $("#non_patron_guarantor_lgd") );
1706
                    [% END %]
1759
                    [% END %]
1707
                [% END %]
1760
                [% END %]
1708
                [% IF fieldstohide.match('primary_address') %]
1761
                [% IF fieldstohide.match('primary_address') %]
1709
                    $("#memberentry_mainaddress").find('legend').nextAll().toggle();
1762
                    togglePanel( $("#main_address_lgd") );
1710
                [% END %]
1763
                [% END %]
1711
                [% IF fieldstohide.match('primary_contact') %]
1764
                [% IF fieldstohide.match('primary_contact') %]
1712
                    $("#memberentry_contact").find('legend').nextAll().toggle();
1765
                    togglePanel( $("#contact_lgd") );
1713
                [% END %]
1766
                [% END %]
1714
            [% END %]
1767
            [% END %]
1715
            [% UNLESS step == 6 %]
1768
            [% UNLESS step == 6 %]
1716
                [% IF fieldstohide.match('alt_address') %]
1769
                [% IF fieldstohide.match('alt_address') %]
1717
                    $("#memberentry_address").find('legend').nextAll().toggle();
1770
                    togglePanel( $("#alt_address_lgd") );
1718
                [% END %]
1771
                [% END %]
1719
            [% END %]
1772
            [% END %]
1720
            [% UNLESS step == 2 %]
1773
            [% UNLESS step == 2 %]
1721
                [% IF fieldstohide.match('alt_contact') %]
1774
                [% IF fieldstohide.match('alt_contact') %]
1722
                    $("#memberentry_altaddress").find('legend').nextAll().toggle();
1775
                    togglePanel( $("#alt_contact_lgd") );
1723
                [% END %]
1776
                [% END %]
1724
            [% END %]
1777
            [% END %]
1725
            [% UNLESS step == 3 %]
1778
            [% UNLESS step == 3 %]
1726
                [% IF fieldstohide.match('lib_mgmt') %]
1779
                [% IF fieldstohide.match('lib_mgmt') %]
1727
                        $("#memberentry_library_management").find('legend').nextAll().toggle();
1780
                    togglePanel( $("#library_management_lgd") );
1728
                [% END %]
1781
                [% END %]
1729
                [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
1782
                [% UNLESS nodateenrolled && noopacnote && noborrowernotes %]
1730
                    [% IF fieldstohide.match('lib_setup') %]
1783
                    [% IF fieldstohide.match('lib_setup') %]
1731
                        $("#memberentry_subscription").find('legend').nextAll().toggle();
1784
                        togglePanel( $("#library_setup_lgd") );
1732
                    [% END %]
1785
                    [% END %]
1733
                [% END %]
1786
                [% END %]
1734
                [% UNLESS nouserid && nopassword %]
1787
                [% UNLESS nouserid && nopassword %]
1735
                    [% IF fieldstohide.match('login') %]
1788
                    [% IF fieldstohide.match('login') %]
1736
                        $("#memberentry_userid").find('legend').nextAll().toggle();
1789
                        togglePanel( $("#opac_staff_login_lgd") );
1737
                    [% END %]
1790
                    [% END %]
1738
                [% END %]
1791
                [% END %]
1739
                [% UNLESS ( op == 'add_form' || op == 'duplicate' ) %]
1792
                [% UNLESS ( op == 'add_form' || op == 'duplicate' ) %]
1740
                    [% IF fieldstohide.match('flags') %]
1793
                    [% IF fieldstohide.match('flags') %]
1741
                        $("#memberentry_account_flags").find('legend').nextAll().toggle();
1794
                        togglePanel( $("#account_flags_lgd") );
1742
                    [% END %]
1795
                    [% END %]
1743
                [% END %]
1796
                [% END %]
1744
                [% IF fieldstohide.match('debarments') %]
1797
                [% IF fieldstohide.match('debarments') %]
1745
                    $("#memberentry_restrictions").find('legend').nextAll().toggle();
1798
                    togglePanel( $("#restrictions_lgd") );
1746
                [% END %]
1799
                [% END %]
1747
            [% END %]
1800
            [% END %]
1748
            [% UNLESS step == 7 %]
1801
            [% UNLESS step == 7 %]
1749
                [% IF Koha.Preference('HouseboundModule') %]
1802
                [% IF Koha.Preference('HouseboundModule') %]
1750
                    [% IF fieldstohide.match('housebound') %]
1803
                    [% IF fieldstohide.match('housebound') %]
1751
                        $("#memberentry_housebound_roles").find('legend').nextAll().toggle();
1804
                        togglePanel( $("#housebound_roles") );
1752
                    [% END %]
1805
                    [% END %]
1753
                [% END %]
1806
                [% END %]
1754
            [% END %]
1807
            [% END %]
1755
            [% UNLESS step == 4 %]
1808
            [% UNLESS step == 4 %]
1756
                [% IF Koha.Preference('ExtendedPatronAttributes') %]
1809
                [% IF Koha.Preference('ExtendedPatronAttributes') %]
1757
                    [% IF fieldstohide.match('additional') %]
1810
                    [% IF fieldstohide.match('additional') %]
1758
                        $("#memberentry_patron_attributes").find('legend').nextAll().toggle();
1811
                        togglePanel( $("#patron_attributes_lgd") );
1759
                    [% END %]
1812
                    [% END %]
1760
                [% END %]
1813
                [% END %]
1761
            [% END %]
1814
            [% END %]
1762
            [% UNLESS step == 5 %]
1815
            [% UNLESS step == 5 %]
1763
                [% IF Koha.Preference('EnhancedMessagingPreferences') %]
1816
                [% IF Koha.Preference('EnhancedMessagingPreferences') %]
1764
                    [% IF fieldstohide.match('messaging') %]
1817
                    [% IF fieldstohide.match('messaging') %]
1765
                        $("#memberentry_messaging_prefs").find('legend').nextAll().toggle();
1818
                        togglePanel( $("#patron_messaging_prefs_lgd") );
1766
                        $("#messaging_prefs_loading").toggle();
1819
                        $("#messaging_prefs_loading").toggle();
1767
                    [% END %]
1820
                    [% END %]
1768
                [% END %]
1821
                [% END %]
1769
            [% END %]
1822
            [% END %]
1770
        }
1823
        }
1771
1824
1825
        function togglePanel( node ){
1826
            var panel = node.nextAll();
1827
            if(panel.is(":visible")){
1828
                node.addClass("collapsed").removeClass("expanded").attr("title", __("Click to expand this section") );
1829
                panel.hide();
1830
            } else {
1831
                node.addClass("expanded").removeClass("collapsed").attr("title", __("Click to collapse this section") );
1832
                panel.show();
1833
                panel.find("input, select, textarea").eq(0).focus();
1834
            }
1835
        }
1836
1772
        $(document).ready(function() {
1837
        $(document).ready(function() {
1773
            showHideFields();
1838
            showHideFields();
1774
            $("#toggle_hidden_fields").change(function(){
1839
            $("#toggle_hidden_fields").change(function(){
1775
                showHideFields();
1840
                showHideFields();
1776
            });
1841
            });
1777
1842
1778
            $("legend").click(function(){
1843
            $(".collapsed,.expanded").on("click",function(){
1779
                $(this).nextAll().toggle();
1844
                togglePanel( $(this) );
1780
                $("#messaging_prefs_loading").hide();
1845
                $("#messaging_prefs_loading").hide();
1781
                $("#guarantor_template").hide();
1846
                $("#guarantor_template").hide();
1782
            });
1847
            });
1783
- 

Return to bug 35511