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

(-)a/installer/data/mysql/atomicupdate/bug_14658-add_PatronSelfModificationBorrowerUnwantedField_syspref.sql (+1 lines)
Line 0 Link Here
1
INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) SELECT 'PatronSelfModificationBorrowerUnwantedField',value,NULL,'Name the fields you don\'t want to display when a patron is editing their information via the OPAC.','free' FROM systempreferences WHERE variable = 'PatronSelfRegistrationBorrowerUnwantedField';
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 355-360 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
355
('OverduesBlockCirc','noblock','noblock|confirmation|block','When checking out an item should overdues block checkout, generate a confirmation dialogue, or allow checkout','Choice'),
355
('OverduesBlockCirc','noblock','noblock|confirmation|block','When checking out an item should overdues block checkout, generate a confirmation dialogue, or allow checkout','Choice'),
356
('OverduesBlockRenewing','allow','allow|blockitem|block','If any of patron checked out documents is late, should renewal be allowed, blocked only on overdue items or blocked on whatever checked out document','Choice'),
356
('OverduesBlockRenewing','allow','allow|blockitem|block','If any of patron checked out documents is late, should renewal be allowed, blocked only on overdue items or blocked on whatever checked out document','Choice'),
357
('patronimages','0',NULL,'Enable patron images for the Staff Client','YesNo'),
357
('patronimages','0',NULL,'Enable patron images for the Staff Client','YesNo'),
358
('PatronSelfModificationBorrowerUnwantedField','',NULL,'Name the fields you don\'t want to display when a patron is editing their information via the OPAC.','free'),
358
('PatronSelfRegistration','0',NULL,'If enabled, patrons will be able to register themselves via the OPAC.','YesNo'),
359
('PatronSelfRegistration','0',NULL,'If enabled, patrons will be able to register themselves via the OPAC.','YesNo'),
359
('PatronSelfRegistrationAdditionalInstructions','','','A free text field to display additional instructions to newly self registered patrons.','free'),
360
('PatronSelfRegistrationAdditionalInstructions','','','A free text field to display additional instructions to newly self registered patrons.','free'),
360
('PatronSelfRegistrationBorrowerMandatoryField','surname|firstname',NULL,'Choose the mandatory fields for a patron\'s account, when registering via the OPAC.','free'),
361
('PatronSelfRegistrationBorrowerMandatoryField','surname|firstname',NULL,'Choose the mandatory fields for a patron\'s account, when registering via the OPAC.','free'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (-2 / +7 lines)
Lines 673-679 OPAC: Link Here
673
              choices:
673
              choices:
674
                  yes: Allow
674
                  yes: Allow
675
                  no: "Don't allow"
675
                  no: "Don't allow"
676
            - "library patrons to register an account via the OPAC."
676
            - "library patrons to register or modify their account via the OPAC."
677
        -
677
        -
678
            - pref: PatronSelfRegistrationVerifyByEmail
678
            - pref: PatronSelfRegistrationVerifyByEmail
679
              choices:
679
              choices:
Lines 696-706 OPAC: Link Here
696
              class: multi
696
              class: multi
697
            - (separate columns with |)
697
            - (separate columns with |)
698
        -
698
        -
699
            - "The following <a href='http://schema.koha-community.org/tables/borrowers.html' target='blank'>database columns</a> will not appear on the patron entry screen:"
699
            - "The following <a href='http://schema.koha-community.org/tables/borrowers.html' target='blank'>database columns</a> will not appear on the patron self-registration screen:"
700
            - pref: PatronSelfRegistrationBorrowerUnwantedField
700
            - pref: PatronSelfRegistrationBorrowerUnwantedField
701
              class: multi
701
              class: multi
702
            - (separate columns with |)
702
            - (separate columns with |)
703
        -
703
        -
704
            - "The following <a href='http://schema.koha-community.org/tables/borrowers.html' target='blank'>database columns</a> will not appear on the patron self-modification screen:"
705
            - pref: PatronSelfModificationBorrowerUnwantedField
706
              class: multi
707
            - (separate columns with |)
708
        -
704
            - "Display the following additional instructions for patrons who self register via the OPAC ( HTML is allowed ):"
709
            - "Display the following additional instructions for patrons who self register via the OPAC ( HTML is allowed ):"
705
            - pref: PatronSelfRegistrationAdditionalInstructions
710
            - pref: PatronSelfRegistrationAdditionalInstructions
706
              type: htmlarea
711
              type: htmlarea
(-)a/opac/opac-memberentry.pl (-5 / +4 lines)
Lines 61-71 if ( $action eq q{} ) { Link Here
61
}
61
}
62
62
63
my $mandatory = GetMandatoryFields($action);
63
my $mandatory = GetMandatoryFields($action);
64
my $hidden = GetHiddenFields($mandatory);
65
64
66
$template->param(
65
$template->param(
67
    action            => $action,
66
    action            => $action,
68
    hidden            => $hidden,
67
    hidden            => GetHiddenFields( $mandatory, 'registration' ),
69
    mandatory         => $mandatory,
68
    mandatory         => $mandatory,
70
    member_titles     => GetTitles() || undef,
69
    member_titles     => GetTitles() || undef,
71
    branches          => GetBranchesLoop(),
70
    branches          => GetBranchesLoop(),
Lines 228-233 elsif ( $action eq 'edit' ) { #Display logged in borrower's data Link Here
228
    $template->param(
227
    $template->param(
229
        borrower  => $borrower,
228
        borrower  => $borrower,
230
        guarantor => scalar Koha::Borrowers->find($borrowernumber)->guarantor(),
229
        guarantor => scalar Koha::Borrowers->find($borrowernumber)->guarantor(),
230
        hidden => GetHiddenFields( $mandatory, 'modification' ),
231
    );
231
    );
232
232
233
    if (C4::Context->preference('OPACpatronimages')) {
233
    if (C4::Context->preference('OPACpatronimages')) {
Lines 251-261 $template->param( Link Here
251
output_html_with_http_headers $cgi, $cookie, $template->output, undef, { force_no_caching => 1 };
251
output_html_with_http_headers $cgi, $cookie, $template->output, undef, { force_no_caching => 1 };
252
252
253
sub GetHiddenFields {
253
sub GetHiddenFields {
254
    my ($mandatory) = @_;
254
    my ( $mandatory, $action ) = @_;
255
    my %hidden_fields;
255
    my %hidden_fields;
256
256
257
    my $BorrowerUnwantedField =
257
    my $BorrowerUnwantedField =
258
      C4::Context->preference("PatronSelfRegistrationBorrowerUnwantedField");
258
      C4::Context->preference( "PatronSelf" . ucfirst($action) . "BorrowerUnwantedField" );
259
259
260
    my @fields = split( /\|/, $BorrowerUnwantedField );
260
    my @fields = split( /\|/, $BorrowerUnwantedField );
261
    foreach (@fields) {
261
    foreach (@fields) {
262
- 

Return to bug 14658