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

(-)a/installer/data/mysql/atomicupdate/bug_13188_add_PatronSelfModificationMandatoryField_syspref.perl (+7 lines)
Line 0 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
   $dbh->do(q{
4
    INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('PatronSelfModificationMandatoryField','', NULL,'Define the required fields when a patron is editing their information via the OPAC.','multiple');
5
    });
6
    NewVersion($DBversion, 13188, "Allow configuration of required fields when a patron is editing their information via the OPAC");
7
}
(-)a/installer/data/mysql/mandatory/sysprefs.sql (+1 lines)
Lines 499-504 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
499
('PatronDuplicateMatchingAddFields','surname|firstname|dateofbirth', NULL,'A list of fields separated by "|" to deduplicate patrons when created','Free'),
499
('PatronDuplicateMatchingAddFields','surname|firstname|dateofbirth', NULL,'A list of fields separated by "|" to deduplicate patrons when created','Free'),
500
('patronimages','0',NULL,'Enable patron images for the staff interface','YesNo'),
500
('patronimages','0',NULL,'Enable patron images for the staff interface','YesNo'),
501
('PatronRemovalDelay','',NULL,'Delay for removing anonymized patrons', 'Integer'),
501
('PatronRemovalDelay','',NULL,'Delay for removing anonymized patrons', 'Integer'),
502
('PatronSelfModificationMandatoryField','',NULL,'Name the fields you don\'t want to be required when a patron is editing their information via the OPAC.','free'),
502
('PatronSelfModificationBorrowerUnwantedField','',NULL,'Name the fields you don\'t want to display when a patron is editing their information via the OPAC.','free'),
503
('PatronSelfModificationBorrowerUnwantedField','',NULL,'Name the fields you don\'t want to display when a patron is editing their information via the OPAC.','free'),
503
('PatronSelfRegistration','0',NULL,'If enabled, patrons will be able to register themselves via the OPAC.','YesNo'),
504
('PatronSelfRegistration','0',NULL,'If enabled, patrons will be able to register themselves via the OPAC.','YesNo'),
504
('PatronSelfRegistrationAdditionalInstructions','','','A free text field to display additional instructions to newly self registered patrons.','free'),
505
('PatronSelfRegistrationAdditionalInstructions','','','A free text field to display additional instructions to newly self registered patrons.','free'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (+6 lines)
Lines 817-822 OPAC: Link Here
817
            - "days after account creation."
817
            - "days after account creation."
818
            - "<br><strong>NOTE:</strong> This system preference requires the <code>misc/cronjobs/cleanup_database.pl</code> cronjob. Ask your system administrator to schedule it."
818
            - "<br><strong>NOTE:</strong> This system preference requires the <code>misc/cronjobs/cleanup_database.pl</code> cronjob. Ask your system administrator to schedule it."
819
        -
819
        -
820
            - "The following <a href='http://schema.koha-community.org/__VERSION__/tables/borrowers.html' target='blank'>database columns</a> must be filled in on the patron modification screen:"
821
            - pref: PatronSelfModificationMandatoryField
822
              type: modalselect
823
              source: borrowers
824
              exclusions: password|cardnumber|dateexpiry|categorycode
825
        -
820
            - "The following <a href='http://schema.koha-community.org/__VERSION__/tables/borrowers.html' target='blank'>database columns</a> must be filled in on the patron entry screen:"
826
            - "The following <a href='http://schema.koha-community.org/__VERSION__/tables/borrowers.html' target='blank'>database columns</a> must be filled in on the patron entry screen:"
821
            - pref: PatronSelfRegistrationBorrowerMandatoryField
827
            - pref: PatronSelfRegistrationBorrowerMandatoryField
822
              type: modalselect
828
              type: modalselect
(-)a/opac/opac-memberentry.pl (-2 / +2 lines)
Lines 389-395 sub GetMandatoryFields { Link Here
389
389
390
    my %mandatory_fields;
390
    my %mandatory_fields;
391
391
392
    my $BorrowerMandatoryField =
392
    my $BorrowerMandatoryField = $action eq 'edit' || $action eq 'update' ?
393
      C4::Context->preference("PatronSelfModificationMandatoryField") :
393
      C4::Context->preference("PatronSelfRegistrationBorrowerMandatoryField");
394
      C4::Context->preference("PatronSelfRegistrationBorrowerMandatoryField");
394
395
395
    my @fields = split( /\|/, $BorrowerMandatoryField );
396
    my @fields = split( /\|/, $BorrowerMandatoryField );
396
- 

Return to bug 13188