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

(-)a/installer/data/mysql/atomicupdate/bug_25090-add_PatronSelfRegistrationVerificationRecipient_syspref.sql (+2 lines)
Line 0 Link Here
1
INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES ('PatronSelfRegistrationVerificationRecipient', 'RegisteringPatron', 'PatronSelfRegistrationVerificationRecipientAddress|BranchEmailAddress|KohaAdminEmailAddress|RegisteringPatron', 'Choose email address that self registering users verification email will be sent to.', 'Choice');
2
INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES ('PatronSelfRegistrationVerificationRecipientAddress', '', '', 'If you choose PatronSelfRegistrationVerificationRecipientAddress you have to enter a valid email address:', 'free');
(-)a/installer/data/mysql/atomicupdate/bug_25090-add_STAFF_VER_OPAC_REG_notice.perl (+36 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 `letter` (module, code, name, title, content, is_html, message_transport_type) VALUES ('members', 'STAFF_VER_OPAC_REG', 'New patron Opac Self-Registration to verify', 'Verify new Opac patron self registration', '<h3>Opac self registration pending verification</h3>
5
<p><h4>Submitted Opac patron self registration:<h4>
6
    <ul>
7
    <li><<borrower_modifications.cardnumber>></li>
8
    <li><<borrower_modifications.title>> <<borrower_modifications.firstname>> <<borrower_modifications.surname>></li>
9
    <li>Physical address: <<borrower_modifications.streetnumber>> <<borrower_modifications.streettype>> <<borrower_modifications.address>> <<borrower_modifications.address2>>, <<borrower_modifications.city>>, <<borrower_modifications.state>> <<borrower_modifications.zipcode>>, <<borrower_modifications.country>></li>
10
    <li>Email: <<borrower_modifications.email>></li>
11
    <li>Phone: <<borrower_modifications.phone>></li>
12
    <li>Mobile: <<borrower_modifications.mobile>></li>
13
    <li>Fax: <<borrower_modifications.fax>></li>
14
    <li>Secondary email: <<borrower_modifications.emailpro>></li>
15
    <li>Secondary phone:<<borrower_modifications.phonepro>></li>
16
    <li>Home library: <<borrower_modifications.branchcode>></li>
17
    <li>Temporary patron category: <<borrower_modifications.categorycode>></li>
18
    </ul>
19
    </p>
20
    <p>
21
    If you wish to create a Koha patron account thereby giving this patron Opac access please click on this verification link:
22
    </p>
23
24
    <p>
25
    <<OPACBaseURL>>/cgi-bin/koha/opac-registration-verify.pl?token=<<borrower_modifications.verification_token>>&approved=1
26
    </p>
27
28
    <p>
29
    If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly.
30
    </p>
31
    </p>', 1, 'email')
32
    });
33
34
    SetVersion( $DBversion );
35
    print "Upgrade to $DBversion done (Bug XXXXX - description)\n";
36
}
(-)a/installer/data/mysql/de-DE/mandatory/sample_notices.sql (+28 lines)
Lines 386-388 INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, Link Here
386
    </tr>
386
    </tr>
387
</tfoot>
387
</tfoot>
388
</table>', 'print', 'default');
388
</table>', 'print', 'default');
389
390
INSERT IGNORE INTO `letter` (module, code, name, title, content, is_html, message_transport_type) VALUES ('members', 'STAFF_VER_OPAC_REG', 'New patron Opac Self-Registration to verify', 'Verify new Opac patron self registration', '<h3>Opac self registration pending verification</h3>
391
<p><h4>Submitted Opac patron self registration:<h4>
392
    <ul>
393
    <li><<borrower_modifications.cardnumber>></li>
394
    <li><<borrower_modifications.title>> <<borrower_modifications.firstname>> <<borrower_modifications.surname>></li>
395
    <li>Physical address: <<borrower_modifications.streetnumber>> <<borrower_modifications.streettype>> <<borrower_modifications.address>> <<borrower_modifications.address2>>, <<borrower_modifications.city>>, <<borrower_modifications.state>> <<borrower_modifications.zipcode>>, <<borrower_modifications.country>></li>
396
    <li>Email: <<borrower_modifications.email>></li>
397
    <li>Phone: <<borrower_modifications.phone>></li>
398
    <li>Mobile: <<borrower_modifications.mobile>></li>
399
    <li>Fax: <<borrower_modifications.fax>></li>
400
    <li>Secondary email: <<borrower_modifications.emailpro>></li>
401
    <li>Secondary phone:<<borrower_modifications.phonepro>></li>
402
    <li>Home library: <<borrower_modifications.branchcode>></li>
403
    <li>Temporary patron category: <<borrower_modifications.categorycode>></li>
404
    </ul>
405
    </p>
406
    <p>
407
    If you wish to create a Koha patron account thereby giving this patron Opac access please click on this verification link:
408
    <p>
409
    <p>
410
    <<OPACBaseURL>>/cgi-bin/koha/opac-registration-verify.pl?token=<<borrower_modifications.verification_token>>&approved=1
411
    </p>
412
    <p>
413
    If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly.
414
    </p>', 1, 'email');
415
416
(-)a/installer/data/mysql/en/mandatory/sample_notices.yml (+33 lines)
Lines 736-741 tables: Link Here
736
            - "If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly."
736
            - "If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly."
737
737
738
        - module: members
738
        - module: members
739
          code: STAFF_VER_OPAC_REG
740
          branchode: ""
741
          name: "New patron Opac Self-Registration to verify"
742
          is_html: 1
743
          title: "Verify new Opac patron self registration"
744
          message_transport_type: email
745
          lang: default
746
          content:
747
              - "<h3>Opac self registration pending verification</h3>"
748
              - "<p><h4>Submitted Opac patron self registration:<h4>"
749
              - "<ul>"
750
              - "<li><<borrower_modifications.cardnumber>></li>"
751
              - "<li><<borrower_modifications.title>> <<borrower_modifications.firstname>> <<borrower_modifications.surname>></li>"
752
              - "<li>Physical address: <<borrower_modifications.streetnumber>> <<borrower_modifications.streettype>> <<borrower_modifications.address>> <<borrower_modifications.address2>>, <<borrower_modifications.city>>, <<borrower_modifications.state>> <<borrower_modifications.zipcode>>, <<borrower_modifications.country>></li>"
753
              - "<li>Email: <<borrower_modifications.email>></li>"
754
              - "<li>Phone: <<borrower_modifications.phone>></li>"
755
              - "<li>Mobile: <<borrower_modifications.mobile>></li>"
756
              - "<li>Fax: <<borrower_modifications.fax>></li>"
757
              - "<li>Secondary email: <<borrower_modifications.emailpro>></li>"
758
              - "<li>Secondary phone:<<borrower_modifications.phonepro>></li>"
759
              - "<li>Home library: <<borrower_modifications.branchcode>></li>"
760
              - "<li>Temporary patron category: <<borrower_modifications.categorycode>></li>"
761
              - "</ul>"
762
              - "</p>"
763
              - "<p>"
764
              - "If you wish to create a Koha patron account thereby giving this patron Opac access please click on this verification link:"
765
              - "<p>"
766
              - "<<OPACBaseURL>>/cgi-bin/koha/opac-registration-verify.pl?token=<<borrower_modifications.verification_token>>&approved=1"
767
              - "</p>"
768
              - "If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly."
769
              - "</p>"
770
771
        - module: members
739
          code: PASSWORD_RESET
772
          code: PASSWORD_RESET
740
          branchcode: ""
773
          branchcode: ""
741
          name: "Online password reset"
774
          name: "Online password reset"
(-)a/installer/data/mysql/es-ES/mandatory/sample_notices.sql (+27 lines)
Lines 378-380 INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, Link Here
378
    </tr>
378
    </tr>
379
</tfoot>
379
</tfoot>
380
</table>', 'print', 'default');
380
</table>', 'print', 'default');
381
382
INSERT IGNORE INTO `letter` (module, code, name, title, content, is_html, message_transport_type) VALUES ('members', 'STAFF_VER_OPAC_REG', 'New patron Opac Self-Registration to verify', 'Verify new Opac patron self registration', '<h3>Opac self registration pending verification</h3>
383
<p><h4>Submitted Opac patron self registration:<h4>
384
    <ul>
385
    <li><<borrower_modifications.cardnumber>></li>
386
    <li><<borrower_modifications.title>> <<borrower_modifications.firstname>> <<borrower_modifications.surname>></li>
387
    <li>Physical address: <<borrower_modifications.streetnumber>> <<borrower_modifications.streettype>> <<borrower_modifications.address>> <<borrower_modifications.address2>>, <<borrower_modifications.city>>, <<borrower_modifications.state>> <<borrower_modifications.zipcode>>, <<borrower_modifications.country>></li>
388
    <li>Email: <<borrower_modifications.email>></li>
389
    <li>Phone: <<borrower_modifications.phone>></li>
390
    <li>Mobile: <<borrower_modifications.mobile>></li>
391
    <li>Fax: <<borrower_modifications.fax>></li>
392
    <li>Secondary email: <<borrower_modifications.emailpro>></li>
393
    <li>Secondary phone:<<borrower_modifications.phonepro>></li>
394
    <li>Home library: <<borrower_modifications.branchcode>></li>
395
    <li>Temporary patron category: <<borrower_modifications.categorycode>></li>
396
    </ul>
397
    </p>
398
    <p>
399
    If you wish to create a Koha patron account thereby giving this patron Opac access please click on this verification link:
400
    <p>
401
    <p>
402
    <<OPACBaseURL>>/cgi-bin/koha/opac-registration-verify.pl?token=<<borrower_modifications.verification_token>>&approved=1
403
    </p>
404
    <p>
405
    If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly.
406
    </p>', 1, 'email');
407
(-)a/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql (+27 lines)
Lines 268-270 INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, Link Here
268
    </tr>
268
    </tr>
269
</tfoot>
269
</tfoot>
270
</table>', 'print', 'default');
270
</table>', 'print', 'default');
271
272
273
INSERT IGNORE INTO `letter` (module, code, name, title, content, is_html, message_transport_type) VALUES ('members', 'STAFF_VER_OPAC_REG', 'New patron Opac Self-Registration to verify', 'Verify new Opac patron self registration', '<h3>Opac self registration pending verification</h3>
274
<p><h4>Submitted Opac patron self registration:<h4>
275
    <ul>
276
    <li><<borrower_modifications.cardnumber>></li>
277
    <li><<borrower_modifications.title>> <<borrower_modifications.firstname>> <<borrower_modifications.surname>></li>
278
    <li>Physical address: <<borrower_modifications.streetnumber>> <<borrower_modifications.streettype>> <<borrower_modifications.address>> <<borrower_modifications.address2>>, <<borrower_modifications.city>>, <<borrower_modifications.state>> <<borrower_modifications.zipcode>>, <<borrower_modifications.country>></li>
279
    <li>Email: <<borrower_modifications.email>></li>
280
    <li>Phone: <<borrower_modifications.phone>></li>
281
    <li>Mobile: <<borrower_modifications.mobile>></li>
282
    <li>Fax: <<borrower_modifications.fax>></li>
283
    <li>Secondary email: <<borrower_modifications.emailpro>></li>
284
    <li>Secondary phone:<<borrower_modifications.phonepro>></li>
285
    <li>Home library: <<borrower_modifications.branchcode>></li>
286
    <li>Temporary patron category: <<borrower_modifications.categorycode>></li>
287
    </ul>
288
    </p>
289
    <p>
290
    If you wish to create a Koha patron account thereby giving this patron Opac access please click on this verification link:
291
    <p>
292
    <p>
293
    <<OPACBaseURL>>/cgi-bin/koha/opac-registration-verify.pl?token=<<borrower_modifications.verification_token>>&approved=1
294
    </p>
295
    <p>
296
    If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly.
297
    </p>', 1, 'email');
(-)a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql (+26 lines)
Lines 379-381 INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, Link Here
379
    </tr>
379
    </tr>
380
</tfoot>
380
</tfoot>
381
</table>', 'print', 'default');
381
</table>', 'print', 'default');
382
383
INSERT IGNORE INTO `letter` (module, code, name, title, content, is_html, message_transport_type) VALUES ('members', 'STAFF_VER_OPAC_REG', 'New patron Opac Self-Registration to verify', 'Verify new Opac patron self registration', '<h3>Opac self registration pending verification</h3>
384
<p><h4>Submitted Opac patron self registration:<h4>
385
    <ul>
386
    <li><<borrower_modifications.cardnumber>></li>
387
    <li><<borrower_modifications.title>> <<borrower_modifications.firstname>> <<borrower_modifications.surname>></li>
388
    <li>Physical address: <<borrower_modifications.streetnumber>> <<borrower_modifications.streettype>> <<borrower_modifications.address>> <<borrower_modifications.address2>>, <<borrower_modifications.city>>, <<borrower_modifications.state>> <<borrower_modifications.zipcode>>, <<borrower_modifications.country>></li>
389
    <li>Email: <<borrower_modifications.email>></li>
390
    <li>Phone: <<borrower_modifications.phone>></li>
391
    <li>Mobile: <<borrower_modifications.mobile>></li>
392
    <li>Fax: <<borrower_modifications.fax>></li>
393
    <li>Secondary email: <<borrower_modifications.emailpro>></li>
394
    <li>Secondary phone:<<borrower_modifications.phonepro>></li>
395
    <li>Home library: <<borrower_modifications.branchcode>></li>
396
    <li>Temporary patron category: <<borrower_modifications.categorycode>></li>
397
    </ul>
398
    </p>
399
    <p>
400
    If you wish to create a Koha patron account thereby giving this patron Opac access please click on this verification link:
401
    <p>
402
    <p>
403
    <<OPACBaseURL>>/cgi-bin/koha/opac-registration-verify.pl?token=<<borrower_modifications.verification_token>>&approved=1
404
    </p>
405
    <p>
406
    If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly.
407
    </p>', 1, 'email');
(-)a/installer/data/mysql/it-IT/necessari/notices.sql (+27 lines)
Lines 382-384 INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, Link Here
382
    </tr>
382
    </tr>
383
</tfoot>
383
</tfoot>
384
</table>', 'print', 'default');
384
</table>', 'print', 'default');
385
386
INSERT IGNORE INTO `letter` (module, code, name, title, content, is_html, message_transport_type) VALUES ('members', 'STAFF_VER_OPAC_REG', 'New patron Opac Self-Registration to verify', 'Verify new Opac patron self registration', '<h3>Opac self registration pending verification</h3>
387
<p><h4>Submitted Opac patron self registration:<h4>
388
    <ul>
389
    <li><<borrower_modifications.cardnumber>></li>
390
    <li><<borrower_modifications.title>> <<borrower_modifications.firstname>> <<borrower_modifications.surname>></li>
391
    <li>Physical address: <<borrower_modifications.streetnumber>> <<borrower_modifications.streettype>> <<borrower_modifications.address>> <<borrower_modifications.address2>>, <<borrower_modifications.city>>, <<borrower_modifications.state>> <<borrower_modifications.zipcode>>, <<borrower_modifications.country>></li>
392
    <li>Email: <<borrower_modifications.email>></li>
393
    <li>Phone: <<borrower_modifications.phone>></li>
394
    <li>Mobile: <<borrower_modifications.mobile>></li>
395
    <li>Fax: <<borrower_modifications.fax>></li>
396
    <li>Secondary email: <<borrower_modifications.emailpro>></li>
397
    <li>Secondary phone:<<borrower_modifications.phonepro>></li>
398
    <li>Home library: <<borrower_modifications.branchcode>></li>
399
    <li>Temporary patron category: <<borrower_modifications.categorycode>></li>
400
    </ul>
401
    </p>
402
    <p>
403
    If you wish to create a Koha patron account thereby giving this patron Opac access please click on this verification link:
404
    <p>
405
    <p>
406
    <<OPACBaseURL>>/cgi-bin/koha/opac-registration-verify.pl?token=<<borrower_modifications.verification_token>>&approved=1
407
    </p>
408
    <p>
409
    If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly.
410
    </p>', 1, 'email');
411
(-)a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql (+27 lines)
Lines 398-400 INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, Link Here
398
    </tr>
398
    </tr>
399
</tfoot>
399
</tfoot>
400
</table>', 'print', 'default');
400
</table>', 'print', 'default');
401
402
403
INSERT IGNORE INTO `letter` (module, code, name, title, content, is_html, message_transport_type) VALUES ('members', 'STAFF_VER_OPAC_REG', 'New patron Opac Self-Registration to verify', 'Verify new Opac patron self registration', '<h3>Opac self registration pending verification</h3>
404
<p><h4>Submitted Opac patron self registration:<h4>
405
    <ul>
406
    <li><<borrower_modifications.cardnumber>></li>
407
    <li><<borrower_modifications.title>> <<borrower_modifications.firstname>> <<borrower_modifications.surname>></li>
408
    <li>Physical address: <<borrower_modifications.streetnumber>> <<borrower_modifications.streettype>> <<borrower_modifications.address>> <<borrower_modifications.address2>>, <<borrower_modifications.city>>, <<borrower_modifications.state>> <<borrower_modifications.zipcode>>, <<borrower_modifications.country>></li>
409
    <li>Email: <<borrower_modifications.email>></li>
410
    <li>Phone: <<borrower_modifications.phone>></li>
411
    <li>Mobile: <<borrower_modifications.mobile>></li>
412
    <li>Fax: <<borrower_modifications.fax>></li>
413
    <li>Secondary email: <<borrower_modifications.emailpro>></li>
414
    <li>Secondary phone:<<borrower_modifications.phonepro>></li>
415
    <li>Home library: <<borrower_modifications.branchcode>></li>
416
    <li>Temporary patron category: <<borrower_modifications.categorycode>></li>
417
    </ul>
418
    </p>
419
    <p>
420
    If you wish to create a Koha patron account thereby giving this patron Opac access please click on this verification link:
421
    <p>
422
    <p>
423
    <<OPACBaseURL>>/cgi-bin/koha/opac-registration-verify.pl?token=<<borrower_modifications.verification_token>>&approved=1
424
    </p>
425
    <p>
426
    If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly.
427
    </p>', 1, 'email');
(-)a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql (+26 lines)
Lines 376-378 INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, Link Here
376
    </tr>
376
    </tr>
377
</tfoot>
377
</tfoot>
378
</table>', 'print', 'default');
378
</table>', 'print', 'default');
379
380
INSERT IGNORE INTO `letter` (module, code, name, title, content, is_html, message_transport_type) VALUES ('members', 'STAFF_VER_OPAC_REG', 'New patron Opac Self-Registration to verify', 'Verify new Opac patron self registration', '<h3>Opac self registration pending verification</h3>
381
<p><h4>Submitted Opac patron self registration:<h4>
382
    <ul>
383
    <li><<borrower_modifications.cardnumber>></li>
384
    <li><<borrower_modifications.title>> <<borrower_modifications.firstname>> <<borrower_modifications.surname>></li>
385
    <li>Physical address: <<borrower_modifications.streetnumber>> <<borrower_modifications.streettype>> <<borrower_modifications.address>> <<borrower_modifications.address2>>, <<borrower_modifications.city>>, <<borrower_modifications.state>> <<borrower_modifications.zipcode>>, <<borrower_modifications.country>></li>
386
    <li>Email: <<borrower_modifications.email>></li>
387
    <li>Phone: <<borrower_modifications.phone>></li>
388
    <li>Mobile: <<borrower_modifications.mobile>></li>
389
    <li>Fax: <<borrower_modifications.fax>></li>
390
    <li>Secondary email: <<borrower_modifications.emailpro>></li>
391
    <li>Secondary phone:<<borrower_modifications.phonepro>></li>
392
    <li>Home library: <<borrower_modifications.branchcode>></li>
393
    <li>Temporary patron category: <<borrower_modifications.categorycode>></li>
394
    </ul>
395
    </p>
396
    <p>
397
    If you wish to create a Koha patron account thereby giving this patron Opac access please click on this verification link:
398
    <p>
399
    <p>
400
    <<OPACBaseURL>>/cgi-bin/koha/opac-registration-verify.pl?token=<<borrower_modifications.verification_token>>&approved=1
401
    </p>
402
    <p>
403
    If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly.
404
    </p>', 1, 'email');
(-)a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql (+26 lines)
Lines 378-380 INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, Link Here
378
    </tr>
378
    </tr>
379
</tfoot>
379
</tfoot>
380
</table>', 'print', 'default');
380
</table>', 'print', 'default');
381
382
INSERT IGNORE INTO `letter` (module, code, name, title, content, is_html, message_transport_type) VALUES ('members', 'STAFF_VER_OPAC_REG', 'New patron Opac Self-Registration to verify', 'Verify new Opac patron self registration', '<h3>Opac self registration pending verification</h3>
383
<p><h4>Submitted Opac patron self registration:<h4>
384
    <ul>
385
    <li><<borrower_modifications.cardnumber>></li>
386
    <li><<borrower_modifications.title>> <<borrower_modifications.firstname>> <<borrower_modifications.surname>></li>
387
    <li>Physical address: <<borrower_modifications.streetnumber>> <<borrower_modifications.streettype>> <<borrower_modifications.address>> <<borrower_modifications.address2>>, <<borrower_modifications.city>>, <<borrower_modifications.state>> <<borrower_modifications.zipcode>>, <<borrower_modifications.country>></li>
388
    <li>Email: <<borrower_modifications.email>></li>
389
    <li>Phone: <<borrower_modifications.phone>></li>
390
    <li>Mobile: <<borrower_modifications.mobile>></li>
391
    <li>Fax: <<borrower_modifications.fax>></li>
392
    <li>Secondary email: <<borrower_modifications.emailpro>></li>
393
    <li>Secondary phone:<<borrower_modifications.phonepro>></li>
394
    <li>Home library: <<borrower_modifications.branchcode>></li>
395
    <li>Temporary patron category: <<borrower_modifications.categorycode>></li>
396
    </ul>
397
    </p>
398
    <p>
399
    If you wish to create a Koha patron account thereby giving this patron Opac access please click on this verification link:
400
    <p>
401
    <p>
402
    <<OPACBaseURL>>/cgi-bin/koha/opac-registration-verify.pl?token=<<borrower_modifications.verification_token>>&approved=1
403
    </p>
404
    <p>
405
    If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly.
406
    </p>', 1, 'email');
(-)a/installer/data/mysql/sysprefs.sql (+2 lines)
Lines 492-497 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
492
('PatronSelfRegistrationExpireTemporaryAccountsDelay','0',NULL,'If PatronSelfRegistrationDefaultCategory is enabled, this system preference controls how long a patron can have a temporary status before the account is deleted automatically. It is an integer value representing a number of days to wait before deleting a temporary patron account. Setting it to 0 disables the deleting of temporary accounts.','Integer'),
492
('PatronSelfRegistrationExpireTemporaryAccountsDelay','0',NULL,'If PatronSelfRegistrationDefaultCategory is enabled, this system preference controls how long a patron can have a temporary status before the account is deleted automatically. It is an integer value representing a number of days to wait before deleting a temporary patron account. Setting it to 0 disables the deleting of temporary accounts.','Integer'),
493
('PatronSelfRegistrationLibraryList','',NULL,'Only display libraries listed. If empty, all libraries are displayed.','Free'),
493
('PatronSelfRegistrationLibraryList','',NULL,'Only display libraries listed. If empty, all libraries are displayed.','Free'),
494
('PatronSelfRegistrationPrefillForm','1',NULL,'Display password and prefill login form after a patron has self registered','YesNo'),
494
('PatronSelfRegistrationPrefillForm','1',NULL,'Display password and prefill login form after a patron has self registered','YesNo'),
495
('PatronSelfRegistrationVerificationRecipient', 'RegisteringPatron', 'PatronSelfRegistrationVerificationRecipientAddress|BranchEmailAddress|KohaAdminEmailAddress|RegisteringPatron', 'Choose email address that self registering users verification email will be sent to', 0, 'Choice'),
496
('PatronSelfRegistrationVerificationRecipientAddress', '', '', 'If you choose PatronSelfRegistrationVerificationRecipientAddress you have to enter a valid email address:', 'free'),
495
('PatronSelfRegistrationVerifyByEmail','0',NULL,'If enabled, any patron attempting to register themselves via the OPAC will be required to verify themselves via email to activate his or her account.','YesNo'),
497
('PatronSelfRegistrationVerifyByEmail','0',NULL,'If enabled, any patron attempting to register themselves via the OPAC will be required to verify themselves via email to activate his or her account.','YesNo'),
496
('PatronsPerPage','20','20','Number of Patrons Per Page displayed by default','Integer'),
498
('PatronsPerPage','20','20','Number of Patrons Per Page displayed by default','Integer'),
497
('EnablePayPalOpacPayments',  '0', NULL ,  'Enables the ability to pay fees and fines from  the OPAC via PayPal',  'YesNo' ),
499
('EnablePayPalOpacPayments',  '0', NULL ,  'Enables the ability to pay fees and fines from  the OPAC via PayPal',  'YesNo' ),
(-)a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql (+26 lines)
Lines 469-471 INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, Link Here
469
    </tr>
469
    </tr>
470
</tfoot>
470
</tfoot>
471
</table>', 'print', 'default');
471
</table>', 'print', 'default');
472
473
INSERT IGNORE INTO `letter` (module, code, name, title, content, is_html, message_transport_type) VALUES ('members', 'STAFF_VER_OPAC_REG', 'New patron Opac Self-Registration to verify', 'Verify new Opac patron self registration', '<h3>Opac self registration pending verification</h3>
474
<p><h4>Submitted Opac patron self registration:<h4>
475
    <ul>
476
    <li><<borrower_modifications.cardnumber>></li>
477
    <li><<borrower_modifications.title>> <<borrower_modifications.firstname>> <<borrower_modifications.surname>></li>
478
    <li>Physical address: <<borrower_modifications.streetnumber>> <<borrower_modifications.streettype>> <<borrower_modifications.address>> <<borrower_modifications.address2>>, <<borrower_modifications.city>>, <<borrower_modifications.state>> <<borrower_modifications.zipcode>>, <<borrower_modifications.country>></li>
479
    <li>Email: <<borrower_modifications.email>></li>
480
    <li>Phone: <<borrower_modifications.phone>></li>
481
    <li>Mobile: <<borrower_modifications.mobile>></li>
482
    <li>Fax: <<borrower_modifications.fax>></li>
483
    <li>Secondary email: <<borrower_modifications.emailpro>></li>
484
    <li>Secondary phone:<<borrower_modifications.phonepro>></li>
485
    <li>Home library: <<borrower_modifications.branchcode>></li>
486
    <li>Temporary patron category: <<borrower_modifications.categorycode>></li>
487
    </ul>
488
    </p>
489
    <p>
490
    If you wish to create a Koha patron account thereby giving this patron Opac access please click on this verification link:
491
    <p>
492
    <p>
493
    <<OPACBaseURL>>/cgi-bin/koha/opac-registration-verify.pl?token=<<borrower_modifications.verification_token>>&approved=1
494
    </p>
495
    <p>
496
    If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly.
497
    </p>', 1, 'email');
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (+13 lines)
Lines 818-823 OPAC: Link Here
818
            - "library patrons to register or modify their account via the OPAC."
818
            - "library patrons to register or modify their account via the OPAC."
819
            - "<br><strong>NOTE:</strong> This needs PatronSelfRegistrationDefaultCategory to be set to a valid patron category code."
819
            - "<br><strong>NOTE:</strong> This needs PatronSelfRegistrationDefaultCategory to be set to a valid patron category code."
820
        -
820
        -
821
            - "Choose email address that self registration verification emails will be sent to: "
822
            - pref: PatronSelfRegistrationVerificationRecipient
823
              default: RegisteringPatron
824
              choices:
825
                  RegisteringPatron: email address of Self registering patron
826
                  PatronSelfRegistrationVerificationRecipientAddress: PatronSelfRegistrationVerificationRecipientAddress
827
                  BranchEmailAddress: email address of branch
828
                  KohaAdminEmailAddress: KohaAdminEmailAddress
829
            - "<br><strong>NOTE:</strong> This system preferences requires the PatronSelfRegistrationVerifyByEmail to be set to Require."
830
            - "<br>If you choose PatronSelfRegistrationVerificationRecipientAddress you have to enter a valid email address:"
831
            - pref: PatronSelfRegistrationVerificationRecipientAddress
832
              class: email
833
        -
821
            - pref: PatronSelfRegistrationVerifyByEmail
834
            - pref: PatronSelfRegistrationVerifyByEmail
822
              choices:
835
              choices:
823
                  yes: Require
836
                  yes: Require
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-confirmation.tt (-1 / +20 lines)
Lines 31-36 Link Here
31
                    <div class="span9">
31
                    <div class="span9">
32
                [% END %]
32
                [% END %]
33
33
34
                [% IF verificationapproved == 'approved' %]
35
                    <div id="registration-complete">
36
                        <h1>New patron registered!</h1>
37
38
                        <p>You have successfully registered a new Koha patron account for [% borrower.firstname | html %] [% borrower.surname | html %].</p>
39
40
                        <p>Please copy the username and password listed below into an email to [% borrower.firstname | html %] [% borrower.surname | html %]'s email [% borrower.email | html %]:</p>
41
42
                        <p id="patron-userid-p">
43
                            <span id="patron-userid-label">Username:</span>
44
                            <span id="patron-userid">[% borrower.userid | html %]</span>
45
                        </p>
46
                        <p id="patron-password-p">
47
                            <span id="patron-password-label">Password:</span>
48
                            <span id="patron-password">[% password_cleartext | html %]</span>
49
                        </p>
50
                        <p>Please ask the patron to login and change their password.</p>
51
                    </div>
52
                [% ELSE %]
34
                    <div id="registration-complete">
53
                    <div id="registration-complete">
35
                        <h1>Registration Complete!</h1>
54
                        <h1>Registration Complete!</h1>
36
55
Lines 65-71 Link Here
65
84
66
                        <div id="PatronSelfRegistrationAdditionalInstructions">[% PatronSelfRegistrationAdditionalInstructions | $raw %]</div>
85
                        <div id="PatronSelfRegistrationAdditionalInstructions">[% PatronSelfRegistrationAdditionalInstructions | $raw %]</div>
67
                    </div>
86
                    </div>
68
87
                [% END %]
69
                </div> <!-- / .span7/9 -->
88
                </div> <!-- / .span7/9 -->
70
89
71
                    [% SET OpacNavRight = KohaNews.get( location => "OpacNavRight", lang => news_lang, library => branchcode ) %]
90
                    [% SET OpacNavRight = KohaNews.get( location => "OpacNavRight", lang => news_lang, library => branchcode ) %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-email-sent.tt (+12 lines)
Lines 25-30 Link Here
25
                [% ELSE %]
25
                [% ELSE %]
26
                    <div class="span12">
26
                    <div class="span12">
27
                [% END %]
27
                [% END %]
28
                [% IF verificationrecipient == 'RegisteringPatron' %]
28
                    <div id="reistration-confirmation-pending">
29
                    <div id="reistration-confirmation-pending">
29
                        <div id="confirmation-pending" class="alert alert-info">
30
                        <div id="confirmation-pending" class="alert alert-info">
30
                            <h1>Please confirm your registration</h1>
31
                            <h1>Please confirm your registration</h1>
Lines 34-39 Link Here
34
                            <p>Your account will not be activated until you follow the link provided in the confirmation email.</p>
35
                            <p>Your account will not be activated until you follow the link provided in the confirmation email.</p>
35
                        </div>
36
                        </div>
36
                    </div>
37
                    </div>
38
                [% ELSE %]
39
                    <div id="registration-confirmation-pending">
40
                        <div id="confirmation-pending" class="alert alert-info">
41
                            <h1>Thank you for submitting your library registration</h1>
42
43
                            <p>A library staff member will review your registration shortly, and if approved an email will be sent to <strong>[% email | html %]</strong> containing your OPAC login credentials.</p>
44
45
                            <p>Your account will not be activated until it has been approved by a library staff member.</p>
46
                        </div>
47
                    </div>
48
                [% END %]
37
                </div>
49
                </div>
38
            </div>
50
            </div>
39
        </div>
51
        </div>
(-)a/opac/opac-memberentry.pl (-10 / +45 lines)
Lines 176-196 if ( $action eq 'create' ) { Link Here
176
176
177
            Koha::Patron::Modification->new( \%borrower )->store();
177
            Koha::Patron::Modification->new( \%borrower )->store();
178
178
179
            #Send verification email
179
            my $verificationrecipient = C4::Context->preference("PatronSelfRegistrationVerificationRecipient");
180
            my $letter = C4::Letters::GetPreparedLetter(
180
            my $customverificationrecipient = C4::Context->preference("PatronSelfRegistrationVerificationRecipientAddress");
181
                module      => 'members',
181
            # Determine the 'to_address' of the verification email
182
                letter_code => 'OPAC_REG_VERIFY',
182
            my $toaddress;
183
                lang        => 'default', # Patron does not have a preferred language defined yet
183
            if ($verificationrecipient eq "BranchEmailAddress" ) {
184
                tables      => {
184
                my $library = Koha::Libraries->find( $borrower{branchcode} );
185
                    borrower_modifications => $verification_token,
185
                $toaddress = $library->inbound_email_address;
186
                },
186
            }
187
            );
187
            elsif ( $verificationrecipient eq "KohaAdminEmailAddress" ) {
188
                $toaddress = C4::Context->preference('ReplytoDefault')
189
                || C4::Context->preference('KohaAdminEmailAddress');
190
191
            } elsif ( $verificationrecipient eq "RegisteringPatron" ) {
192
                $toaddress = $borrower{'email'}
193
            } else {
194
                $toaddress =
195
                    $customverificationrecipient
196
                 || C4::Context->preference('ReplytoDefault')
197
                 || C4::Context->preference('KohaAdminEmailAddress');
198
            }
199
            $template->param( verificationrecipient => $verificationrecipient );
200
201
            my $letter;
202
            if ($verificationrecipient eq "RegisteringPatron" ) {
203
                # Send verification email directly to registering patron
204
                $letter = C4::Letters::GetPreparedLetter(
205
                    module      => 'members',
206
                    letter_code => 'OPAC_REG_VERIFY',
207
                    lang        => 'default', # Patron does not have a preferred language defined yet
208
                    tables      => {
209
                        borrower_modifications => $verification_token,
210
                    },
211
                );
212
            } else {
213
                # Send verification email to library
214
                $letter = C4::Letters::GetPreparedLetter(
215
                    module      => 'members',
216
                    letter_code => 'STAFF_VER_OPAC_REG',
217
                    lang        => 'default', # Patron does not have a preferred language defined yet
218
                    tables      => {
219
                        borrower_modifications => $verification_token,
220
                    },
221
                );
222
            }
188
223
189
            C4::Letters::EnqueueLetter(
224
            C4::Letters::EnqueueLetter(
190
                {
225
                {
191
                    letter                 => $letter,
226
                    letter                 => $letter,
192
                    message_transport_type => 'email',
227
                    message_transport_type => 'email',
193
                    to_address             => $borrower{'email'},
228
                    to_address             => $toaddress,
194
                    from_address =>
229
                    from_address =>
195
                      C4::Context->preference('KohaAdminEmailAddress'),
230
                      C4::Context->preference('KohaAdminEmailAddress'),
196
                }
231
                }
(-)a/opac/opac-registration-verify.pl (-1 / +3 lines)
Lines 38-43 unless ( C4::Context->preference('PatronSelfRegistration') ) { Link Here
38
38
39
my $token = $cgi->param('token');
39
my $token = $cgi->param('token');
40
my $m = Koha::Patron::Modifications->find( { verification_token => $token } );
40
my $m = Koha::Patron::Modifications->find( { verification_token => $token } );
41
my $verificationapproval = $cgi->param('approved');
41
42
42
my ( $template, $borrowernumber, $cookie );
43
my ( $template, $borrowernumber, $cookie );
43
44
Lines 67-72 if ( Link Here
67
    delete $patron_attrs->{changed_fields};
68
    delete $patron_attrs->{changed_fields};
68
    my $patron = Koha::Patron->new( $patron_attrs )->store;
69
    my $patron = Koha::Patron->new( $patron_attrs )->store;
69
70
71
    $template->param( verificationapproval => $verificationapproval ) if $verificationapproval;
72
70
    Koha::Patron::Consent->new({ borrowernumber => $patron->borrowernumber, type => 'GDPR_PROCESSING', given_on => $consent_dt })->store if $consent_dt;
73
    Koha::Patron::Consent->new({ borrowernumber => $patron->borrowernumber, type => 'GDPR_PROCESSING', given_on => $consent_dt })->store if $consent_dt;
71
74
72
    if ($patron) {
75
    if ($patron) {
73
- 

Return to bug 25090