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

Return to bug 13188