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 513-518 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
513
('PatronDuplicateMatchingAddFields','surname|firstname|dateofbirth', NULL,'A list of fields separated by "|" to deduplicate patrons when created','Free'),
513
('PatronDuplicateMatchingAddFields','surname|firstname|dateofbirth', NULL,'A list of fields separated by "|" to deduplicate patrons when created','Free'),
514
('patronimages','0',NULL,'Enable patron images for the staff interface','YesNo'),
514
('patronimages','0',NULL,'Enable patron images for the staff interface','YesNo'),
515
('PatronRemovalDelay','',NULL,'Delay for removing anonymized patrons', 'Integer'),
515
('PatronRemovalDelay','',NULL,'Delay for removing anonymized patrons', 'Integer'),
516
('PatronSelfModificationMandatoryField','',NULL,'Name the fields you don\'t want to be required 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'),
517
('PatronSelfModificationBorrowerUnwantedField','',NULL,'Name the fields you don\'t want to display when a patron is editing their information via the OPAC.','free'),
517
('PatronSelfRegistration','0',NULL,'If enabled, patrons will be able to register themselves via the OPAC.','YesNo'),
518
('PatronSelfRegistration','0',NULL,'If enabled, patrons will be able to register themselves via the OPAC.','YesNo'),
518
('PatronSelfRegistrationAdditionalInstructions','','','A free text field to display additional instructions to newly self registered patrons.','free'),
519
('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 823-828 OPAC: Link Here
823
              class: integer
823
              class: integer
824
            - "days after account creation."
824
            - "days after account creation."
825
            - "<br><strong>NOTE:</strong> This system preference requires the <code>misc/cronjobs/cleanup_database.pl</code> cronjob. Ask your system administrator to schedule it."
825
            - "<br><strong>NOTE:</strong> This system preference requires the <code>misc/cronjobs/cleanup_database.pl</code> cronjob. Ask your system administrator to schedule it."
826
        -
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 modification screen:"
828
            - pref: PatronSelfModificationMandatoryField
829
              type: modalselect
830
              source: borrowers
831
              exclusions: password|cardnumber|dateexpiry|categorycode
826
        -
832
        -
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:"
833
            - "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:"
828
            - pref: PatronSelfRegistrationBorrowerMandatoryField
834
            - 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