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 514-519 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
514
('PatronDuplicateMatchingAddFields','surname|firstname|dateofbirth', NULL,'A list of fields separated by "|" to deduplicate patrons when created','Free'),
514
('PatronDuplicateMatchingAddFields','surname|firstname|dateofbirth', NULL,'A list of fields separated by "|" to deduplicate patrons when created','Free'),
515
('patronimages','0',NULL,'Enable patron images for the staff interface','YesNo'),
515
('patronimages','0',NULL,'Enable patron images for the staff interface','YesNo'),
516
('PatronRemovalDelay','',NULL,'Delay for removing anonymized patrons', 'Integer'),
516
('PatronRemovalDelay','',NULL,'Delay for removing anonymized patrons', 'Integer'),
517
('PatronSelfModificationMandatoryField','',NULL,'Name the fields you don\'t want to be required when a patron is editing their information via the OPAC.','free'),
517
('PatronSelfModificationBorrowerUnwantedField','',NULL,'Name the fields you don\'t want to display when a patron is editing their information via the OPAC.','free'),
518
('PatronSelfModificationBorrowerUnwantedField','',NULL,'Name the fields you don\'t want to display when a patron is editing their information via the OPAC.','free'),
518
('PatronSelfRegistration','0',NULL,'If enabled, patrons will be able to register themselves via the OPAC.','YesNo'),
519
('PatronSelfRegistration','0',NULL,'If enabled, patrons will be able to register themselves via the OPAC.','YesNo'),
519
('PatronSelfRegistrationAdditionalInstructions','','','A free text field to display additional instructions to newly self registered patrons.','free'),
520
('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 818-823 OPAC: Link Here
818
            - "days after account creation."
818
            - "days after account creation."
819
            - "<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
            - "<br><strong>NOTE:</strong> This system preference requires the <code>misc/cronjobs/cleanup_database.pl</code> cronjob. Ask your system administrator to schedule it."
820
        -
820
        -
821
            - "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:"
822
            - pref: PatronSelfModificationMandatoryField
823
              type: modalselect
824
              source: borrowers
825
              exclusions: password|cardnumber|dateexpiry|categorycode
826
        -
821
            - "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:"
827
            - "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:"
822
            - pref: PatronSelfRegistrationBorrowerMandatoryField
828
            - pref: PatronSelfRegistrationBorrowerMandatoryField
823
              type: modalselect
829
              type: modalselect
(-)a/opac/opac-memberentry.pl (-2 / +2 lines)
Lines 391-397 sub GetMandatoryFields { Link Here
391
391
392
    my %mandatory_fields;
392
    my %mandatory_fields;
393
393
394
    my $BorrowerMandatoryField =
394
    my $BorrowerMandatoryField = $action eq 'edit' || $action eq 'update' ?
395
      C4::Context->preference("PatronSelfModificationMandatoryField") :
395
      C4::Context->preference("PatronSelfRegistrationBorrowerMandatoryField");
396
      C4::Context->preference("PatronSelfRegistrationBorrowerMandatoryField");
396
397
397
    my @fields = split( /\|/, $BorrowerMandatoryField );
398
    my @fields = split( /\|/, $BorrowerMandatoryField );
398
- 

Return to bug 13188