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

(-)a/installer/data/mysql/atomicupdate/bug_3137_-_add_HideFieldsAddPatronForm_syspref.sql (+1 lines)
Line 0 Link Here
1
INSERT IGNORE INTO systempreferences (`variable`,`value`,`options`,`explanation`,`type`) VALUES ('HideFieldsAddPatronForm', '', NULL, 'Hide these fields by default when adding new patron. These fields can still be expanded.', 'Multiple');
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 180-185 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
180
('GoogleOpenIDConnectDefaultBranch',  '','','This branch code will be used to create Google OpenID Connect patrons.','Textarea'),
180
('GoogleOpenIDConnectDefaultBranch',  '','','This branch code will be used to create Google OpenID Connect patrons.','Textarea'),
181
('GoogleOpenIDConnectDefaultCategory','','','This category code will be used to create Google OpenID Connect patrons.','Textarea'),
181
('GoogleOpenIDConnectDefaultCategory','','','This category code will be used to create Google OpenID Connect patrons.','Textarea'),
182
('GoogleOpenIDConnectDomain', '', NULL, 'Restrict Google OpenID Connect to this domain (or subdomains of this domain). Leave blank for all Google domains', 'Free'),
182
('GoogleOpenIDConnectDomain', '', NULL, 'Restrict Google OpenID Connect to this domain (or subdomains of this domain). Leave blank for all Google domains', 'Free'),
183
('HideFieldsAddPatronForm', '', NULL, 'Hide these fields by default when adding new patron. These fields can still be expanded.', 'Multiple'),
183
('hidelostitems','0','','If ON, disables display of\"lost\" items in OPAC.','YesNo'),
184
('hidelostitems','0','','If ON, disables display of\"lost\" items in OPAC.','YesNo'),
184
('HidePatronName','0','','If this is switched on, patron\'s cardnumber will be shown instead of their name on the holds and catalog screens','YesNo'),
185
('HidePatronName','0','','If this is switched on, patron\'s cardnumber will be shown instead of their name on the holds and catalog screens','YesNo'),
185
('hide_marc','0',NULL,'If ON, disables display of MARC fields, subfield codes & indicators (still shows data)','YesNo'),
186
('hide_marc','0',NULL,'If ON, disables display of MARC fields, subfield codes & indicators (still shows data)','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref (+18 lines)
Lines 1-6 Link Here
1
Patrons:
1
Patrons:
2
    General:
2
    General:
3
     -
3
     -
4
         - When adding new patrons or editing existing patrons, hide the following fields from the form (can still be expanded later)
5
         - pref: HideFieldsAddPatronForm
6
           multiple:
7
             identity: "Organization/Patron identity"
8
             guarantor: Guarantor information
9
             primary_address: Main address
10
             primary_contact: Contact
11
             alt_address: Alternate address
12
             alt_contact: Alternate contact
13
             lib_mgmt: Library management
14
             lib_setup: Library set-up
15
             login: OPAC/Staff login
16
             flags: "Patron account flags (existing patrons)"
17
             debarments: "Patron restrictions (existing patrons)"
18
             housebound: Housebound roles
19
             additional: Additional attributes and identifiers
20
             messaging: Patron messaging preferences
21
     -
4
         - pref: AutoEmailOpacUser
22
         - pref: AutoEmailOpacUser
5
           choices:
23
           choices:
6
               yes: Send
24
               yes: Send
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (-8 / +102 lines)
Lines 10-15 Link Here
10
//<![CDATA[
10
//<![CDATA[
11
$(document).ready(function() {
11
$(document).ready(function() {
12
12
13
        $(".hidefield").hide();
14
        $("#toggle_hidden_fields").prop("checked", false);
15
16
        $("#toggle_hidden_fields").on("change",function(e){
17
            if ($("#toggle_hidden_fields").prop("checked") == true){
18
                $(".hidefield").show();
19
            } else {
20
                $(".hidefield").hide();
21
            }
22
        });
23
13
        $("#saverecord").css({ 'margin-left': 0 });
24
        $("#saverecord").css({ 'margin-left': 0 });
14
        var original_offset = $("#toolbar").position().top;
25
        var original_offset = $("#toolbar").position().top;
15
        var additional_height = $("#filters").height();
26
        var additional_height = $("#filters").height();
Lines 205-210 $(document).ready(function() { Link Here
205
		</div>
216
		</div>
206
	[% END %]
217
	[% END %]
207
218
219
[% SET fields_to_hide = Koha.Preference('HideFieldsAddPatronForm') %]
220
221
[% IF Koha.Preference('HideFieldsAddPatronForm') %]
222
<p id="selections">
223
    <input type="checkbox" id="toggle_hidden_fields" checked="checked" title="These fields are hidden by default by the HideFieldsAddPatronForm system preference"><strong>Show hidden fields:</strong>
224
    [% FOREACH field IN fields_to_hide.split(',') %]
225
        [% SWITCH field %]
226
            [% CASE 'identity' %] Organization/Patron identity |
227
            [% CASE 'guarantor' %] Guarantor information |
228
            [% CASE 'primary_address' %] Main address |
229
            [% CASE 'primary_contact' %] Contact |
230
            [% CASE 'alt_address' %] Alternate address |
231
            [% CASE 'alt_contact' %] Alternate contact |
232
            [% CASE 'lib_mgmt' %] Library management |
233
            [% CASE 'lib_setup' %] Library set-up |
234
            [% CASE 'login' %] OPAC/Staff login |
235
            [% CASE 'flags' %] Patron account flags |
236
            [% CASE 'debarments' %] Patron restrictions |
237
            [% CASE 'housebound' %] Housebound roles |
238
            [% CASE 'additional' %] Additional attributes and identifiers |
239
            [% CASE 'messaging' %] Patron messaging preferences |
240
        [% END %]
241
    [% END %]
242
</p>
243
[% END %]
208
244
209
<div id="toolbar" class="btn-toolbar">
245
<div id="toolbar" class="btn-toolbar">
210
[% UNLESS ( check_member ) %]
246
[% UNLESS ( check_member ) %]
Lines 249-257 $(document).ready(function() { Link Here
249
285
250
[% IF ( step_1 ) %]
286
[% IF ( step_1 ) %]
251
[%UNLESS notitle && nosurname && nofirstname && nodateofbirth && noinitials && noothernames &&nosex %]
287
[%UNLESS notitle && nosurname && nofirstname && nodateofbirth && noinitials && noothernames &&nosex %]
252
	<fieldset class="rows" id="memberentry_identity">
288
[% IF fields_to_hide.search('identity') %]
289
    <fieldset class="rows hidefield" id="memberentry_identity">
290
[% ELSE %]
291
    <fieldset class="rows" id="memberentry_identity">
292
[% END %]
253
		<legend id="identity_lgd">[% IF ( I ) %]Organization [% ELSE %]Patron [% END %]identity</legend>
293
		<legend id="identity_lgd">[% IF ( I ) %]Organization [% ELSE %]Patron [% END %]identity</legend>
254
		<ol>
294
    <ol>
255
		[% UNLESS ( I ) %]
295
		[% UNLESS ( I ) %]
256
        [% UNLESS notitle %]
296
        [% UNLESS notitle %]
257
        [% IF Koha.Preference('BorrowersTitles') %]
297
        [% IF Koha.Preference('BorrowersTitles') %]
Lines 386-392 $(document).ready(function() { Link Here
386
    [% UNLESS step_6 %]
426
    [% UNLESS step_6 %]
387
        <input type="hidden" name="branchcode" value="[% branchcode %]" />
427
        <input type="hidden" name="branchcode" value="[% branchcode %]" />
388
    [% END %]
428
    [% END %]
389
    <fieldset id="memberentry_guarantor" class="rows">
429
    [% IF fields_to_hide.search('guarantor') %]
430
        <fieldset id="memberentry_guarantor" class="rows hidefield">
431
    [% ELSE %]
432
        <fieldset id="memberentry_guarantor" class="rows">
433
    [% END %]
390
        <legend id="guarantor_lgd">Guarantor information</legend>
434
        <legend id="guarantor_lgd">Guarantor information</legend>
391
        <ol>
435
        <ol>
392
[% IF ( P ) %]
436
[% IF ( P ) %]
Lines 482-496 $(document).ready(function() { Link Here
482
526
483
[% END %]
527
[% END %]
484
[% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
528
[% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
529
[% IF fields_to_hide.search('primary_address') %]
530
    <fieldset class="hidefield">
531
[% ELSE %]
485
    [% IF Koha.Preference( 'AddressFormat' ) %]
532
    [% IF Koha.Preference( 'AddressFormat' ) %]
486
        [% INCLUDE "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
533
        [% INCLUDE "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
487
    [% ELSE %]
534
    [% ELSE %]
488
        [% INCLUDE 'member-main-address-style-us.inc' %]
535
        [% INCLUDE 'member-main-address-style-us.inc' %]
489
    [% END %]
536
    [% END %]
537
[% END %]
538
[% IF fields_to_hide.search('primary_address') %]</fieldset>[% END %]
490
[% END # nostreet && nocity etc group%]
539
[% END # nostreet && nocity etc group%]
491
540
492
[% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
541
[% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
542
[% IF fields_to_hide.search('primary_contact') %]
543
  <fieldset class="rows hidefield" id="memberentry_contact">
544
[% ELSE %]
493
  <fieldset class="rows" id="memberentry_contact">
545
  <fieldset class="rows" id="memberentry_contact">
546
[% END %]
494
    <legend id="contact_lgd">Contact</legend><ol>
547
    <legend id="contact_lgd">Contact</legend><ol>
495
        [% UNLESS nophone %]
548
        [% UNLESS nophone %]
496
      <li>
549
      <li>
Lines 575-601 $(document).ready(function() { Link Here
575
[% IF ( step_6 ) %]
628
[% IF ( step_6 ) %]
576
629
577
    [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
630
    [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
631
        [% IF fields_to_hide.search('alt_address') %]
632
            <fieldset class="hidefield">
633
        [% ELSE %]
578
        [% IF Koha.Preference( 'AddressFormat' ) %]
634
        [% IF Koha.Preference( 'AddressFormat' ) %]
579
            [% INCLUDE "member-alt-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
635
            [% INCLUDE "member-alt-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
580
        [% ELSE %]
636
        [% ELSE %]
581
            [% INCLUDE 'member-alt-address-style-us.inc' %]
637
            [% INCLUDE 'member-alt-address-style-us.inc' %]
582
        [% END %]
638
        [% END %]
639
        [% END %]
640
        [% IF fields_to_hide.search('alt_address') %]</fieldset>[% END %]
583
    [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
641
    [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
584
[% END %]
642
[% END %]
585
[% IF ( step_2 ) %]
643
[% IF ( step_2 ) %]
586
    [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
644
    [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
645
        [% IF fields_to_hide.search('alt_contact') %]
646
            <fieldset class="hidefield">
647
        [% ELSE %]
587
        [% IF Koha.Preference( 'AddressFormat' ) %]
648
        [% IF Koha.Preference( 'AddressFormat' ) %]
588
            [% INCLUDE "member-alt-contact-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
649
            [% INCLUDE "member-alt-contact-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
589
        [% ELSE %]
650
        [% ELSE %]
590
            [% INCLUDE 'member-alt-contact-style-us.inc' %]
651
            [% INCLUDE 'member-alt-contact-style-us.inc' %]
591
        [% END %]
652
        [% END %]
653
        [% END %]
654
        [% IF fields_to_hide.search('alt_contact') %]</fieldset>[% END %]
592
    [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
655
    [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
593
656
594
[% END %]
657
[% END %]
595
[% IF ( step_3 ) %]
658
[% IF ( step_3 ) %]
596
659
597
  [% SET autoMemberNum = Koha.Preference('autoMemberNum') %]
660
  [% SET autoMemberNum = Koha.Preference('autoMemberNum') %]
598
  <fieldset class="rows" id="memberentry_library_management">
661
  [% IF fields_to_hide.search('lib_mgmt') %]
662
    <fieldset class="rows hidefield" id="memberentry_library_management">
663
  [% ELSE %]
664
    <fieldset class="rows" id="memberentry_library_management">
665
  [% END %]
599
    <legend id="library_management_lgd">Library management</legend><ol>
666
    <legend id="library_management_lgd">Library management</legend><ol>
600
      [% UNLESS nocardnumber %]
667
      [% UNLESS nocardnumber %]
601
        <li>
668
        <li>
Lines 746-752 $(document).ready(function() { Link Here
746
   </ol>
813
   </ol>
747
  </fieldset>
814
  </fieldset>
748
    [% UNLESS nodateenrolled &&  noopacnote && noborrowernotes %]
815
    [% UNLESS nodateenrolled &&  noopacnote && noborrowernotes %]
749
	<fieldset class="rows" id="memberentry_subscription">
816
  [% IF fields_to_hide.search('lib_setup') %]
817
    <fieldset class="rows hidefield" id="memberentry_subscription">
818
  [% ELSE %]
819
    <fieldset class="rows" id="memberentry_subscription">
820
  [% END %]
750
	<legend id="library_setup_lgd">Library set-up</legend><ol>
821
	<legend id="library_setup_lgd">Library set-up</legend><ol>
751
        [% UNLESS nodateenrolled %]
822
        [% UNLESS nodateenrolled %]
752
		<li>
823
		<li>
Lines 825-831 $(document).ready(function() { Link Here
825
    [% END # hide fieldset %]
896
    [% END # hide fieldset %]
826
897
827
    [% UNLESS nouserid && nopassword %]
898
    [% UNLESS nouserid && nopassword %]
828
	<fieldset class="rows" id="memberentry_userid">
899
    [% IF fields_to_hide.search('login') %]
900
      <fieldset class="rows hidefield" id="memberentry_userid">
901
    [% ELSE %]
902
      <fieldset class="rows" id="memberentry_userid">
903
    [% END %]
829
        <legend id="opac_staff_login_lgd">OPAC/Staff login</legend><ol>
904
        <legend id="opac_staff_login_lgd">OPAC/Staff login</legend><ol>
830
        [% UNLESS nouserid %]
905
        [% UNLESS nouserid %]
831
		<li>
906
		<li>
Lines 947-953 $(document).ready(function() { Link Here
947
        [% END # hide fieldset %][% END %]
1022
        [% END # hide fieldset %][% END %]
948
		<!--this zones are not necessary in modif mode -->
1023
		<!--this zones are not necessary in modif mode -->
949
        [% UNLESS ( opadd || opduplicate ) %]
1024
        [% UNLESS ( opadd || opduplicate ) %]
950
        <fieldset class="rows" id="memberentry_account_flags">
1025
        [% IF fields_to_hide.search('flags') %]
1026
          <fieldset class="rows hidefield" id="memberentry_account_flags">
1027
        [% ELSE %]
1028
          <fieldset class="rows" id="memberentry_account_flags">
1029
        [% END %]
951
            <legend id="account_flags_lgd">Patron account flags</legend>
1030
            <legend id="account_flags_lgd">Patron account flags</legend>
952
			<ol class="radio">
1031
			<ol class="radio">
953
			[% FOREACH flagloo IN flagloop %]
1032
			[% FOREACH flagloo IN flagloop %]
Lines 980-986 $(document).ready(function() { Link Here
980
			</ol>
1059
			</ol>
981
			</fieldset>
1060
			</fieldset>
982
1061
1062
            [% IF fields_to_hide.search('restrictions') %]
1063
              <fieldset class="rows hidefield" id="memberentry_restrictions">
1064
            [% ELSE %]
983
              <fieldset class="rows" id="memberentry_restrictions">
1065
              <fieldset class="rows" id="memberentry_restrictions">
1066
            [% END %]
984
                <legend id="restrictions_lgd">Patron restrictions</legend>
1067
                <legend id="restrictions_lgd">Patron restrictions</legend>
985
1068
986
                [% IF ( debarments ) %]
1069
                [% IF ( debarments ) %]
Lines 1044-1050 $(document).ready(function() { Link Here
1044
1127
1045
[% IF ( step_4 ) %]
1128
[% IF ( step_4 ) %]
1046
[% IF Koha.Preference('HouseboundModule') %]
1129
[% IF Koha.Preference('HouseboundModule') %]
1130
[% IF fields_to_hide.search('housebound') %]
1131
  <fieldset class="rows hidefield" id="memberentry_housebound_roles">
1132
[% ELSE %]
1047
  <fieldset class="rows" id="memberentry_housebound_roles">
1133
  <fieldset class="rows" id="memberentry_housebound_roles">
1134
[% END %]
1048
    <legend id="housebound_roles">Housebound roles</legend>
1135
    <legend id="housebound_roles">Housebound roles</legend>
1049
    <ol class="radio">
1136
    <ol class="radio">
1050
      <li>
1137
      <li>
Lines 1093-1099 $(document).ready(function() { Link Here
1093
  </fieldset>
1180
  </fieldset>
1094
[% END # hide fieldset %]
1181
[% END # hide fieldset %]
1095
[% IF ( ExtendedPatronAttributes ) %][% UNLESS ( no_patron_attribute_types ) %]
1182
[% IF ( ExtendedPatronAttributes ) %][% UNLESS ( no_patron_attribute_types ) %]
1183
[% IF fields_to_hide.search('additional') %]
1184
  <fieldset class="rows hidefield" id="memberentry_patron_attributes">
1185
[% ELSE %]
1096
  <fieldset class="rows" id="memberentry_patron_attributes">
1186
  <fieldset class="rows" id="memberentry_patron_attributes">
1187
[% END %]
1097
    <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
1188
    <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
1098
    <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1189
    <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1099
    [% FOREACH pa_loo IN patron_attributes %]
1190
    [% FOREACH pa_loo IN patron_attributes %]
Lines 1137-1143 $(document).ready(function() { Link Here
1137
[% END %][% END %][% END %]
1228
[% END %][% END %][% END %]
1138
1229
1139
[% IF ( step_5 ) %][% IF ( EnhancedMessagingPreferences ) %]
1230
[% IF ( step_5 ) %][% IF ( EnhancedMessagingPreferences ) %]
1231
[% IF fields_to_hide.search('messaging') %]
1232
  <fieldset class="rows hidefield" id="memberentry_messaging_prefs">
1233
[% ELSE %]
1140
  <fieldset class="rows" id="memberentry_messaging_prefs">
1234
  <fieldset class="rows" id="memberentry_messaging_prefs">
1235
[% END %]
1141
    <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1236
    <legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend>
1142
    [% IF ( opadd ) %]
1237
    [% IF ( opadd ) %]
1143
    <!-- handle changing prefs if creating new patron and changing
1238
    <!-- handle changing prefs if creating new patron and changing
1144
- 

Return to bug 3137