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

(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 83-88 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
83
('CatalogModuleRelink','0',NULL,'If OFF the linker will never replace the authids that are set in the cataloging module.','YesNo'),
83
('CatalogModuleRelink','0',NULL,'If OFF the linker will never replace the authids that are set in the cataloging module.','YesNo'),
84
('CataloguingLog','1',NULL,'If ON, log edit/create/delete actions on bibliographic data. WARNING: this feature is very resource consuming.','YesNo'),
84
('CataloguingLog','1',NULL,'If ON, log edit/create/delete actions on bibliographic data. WARNING: this feature is very resource consuming.','YesNo'),
85
('checkdigit','none','none|katipo','If ON, enable checks on patron cardnumber: none or \"Katipo\" style checks','Choice'),
85
('checkdigit','none','none|katipo','If ON, enable checks on patron cardnumber: none or \"Katipo\" style checks','Choice'),
86
('ChildNeedsGuarantor', '0', NULL, 'If ON, a child patron must have a guarantor when adding the patron.', 'YesNo'),
86
('CircAutocompl','1',NULL,'If ON, autocompletion is enabled for the Circulation input','YesNo'),
87
('CircAutocompl','1',NULL,'If ON, autocompletion is enabled for the Circulation input','YesNo'),
87
('CircAutoPrintQuickSlip','qslip',NULL,'Choose what should happen when an empty barcode field is submitted in circulation: Display a print quick slip window, Display a print slip window or Clear the screen.','Choice'),
88
('CircAutoPrintQuickSlip','qslip',NULL,'Choose what should happen when an empty barcode field is submitted in circulation: Display a print quick slip window, Display a print slip window or Clear the screen.','Choice'),
88
('CircControl','ItemHomeLibrary','PickupLibrary|PatronLibrary|ItemHomeLibrary','Specify the agency that controls the circulation and fines policy','Choice'),
89
('CircControl','ItemHomeLibrary','PickupLibrary|PatronLibrary|ItemHomeLibrary','Specify the agency that controls the circulation and fines policy','Choice'),
(-)a/installer/data/mysql/updatedatabase.pl (+11 lines)
Lines 9438-9443 if ( CheckVersion($DBversion) ) { Link Here
9438
   SetVersion ($DBversion);
9438
   SetVersion ($DBversion);
9439
}
9439
}
9440
9440
9441
$DBversion = "3.15.00.XXX";
9442
if ( CheckVersion($DBversion) ) {
9443
    $dbh->do(q{
9444
        INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type)
9445
        VALUES('ChildNeedsGuarantor', 0, 'If ON, a child patron must have a guarantor when adding the patron.', '', 'YesNo')
9446
    });
9447
9448
    print "Upgrade to $DBversion done (Bug 12133 - Guarantor requirements when registering a patron)\n";
9449
    SetVersion($DBversion);
9450
}
9451
9441
=head1 FUNCTIONS
9452
=head1 FUNCTIONS
9442
9453
9443
=head2 TableExists($table)
9454
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref (+7 lines)
Lines 56-61 Patrons: Link Here
56
               katipo: Do
56
               katipo: Do
57
         - check and construct borrower card numbers in the Katipo style. This overrides <code>autoMemberNum</code> if on.
57
         - check and construct borrower card numbers in the Katipo style. This overrides <code>autoMemberNum</code> if on.
58
     -
58
     -
59
         - "A child patron"
60
         - pref: "ChildNeedsGuarantor"
61
           choices:
62
               yes: "must have"
63
               no: "doesn't need"
64
         - a guarantor when adding the patron.
65
     -
59
         - pref: EnhancedMessagingPreferences
66
         - pref: EnhancedMessagingPreferences
60
           choices:
67
           choices:
61
               yes: Allow
68
               yes: Allow
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (+7 lines)
Lines 175-180 Link Here
175
		<div class="dialog alert">
175
		<div class="dialog alert">
176
			<p>The following fields are wrong. Please fix them.</p>
176
			<p>The following fields are wrong. Please fix them.</p>
177
			<ul>
177
			<ul>
178
                        [% IF ( ERROR_child_no_guarantor ) %]
179
                                <li id="ERROR_child_no_guarantor">A child patron needs a guarantor.</li>
180
                        [% END %]
181
                        [% IF ( ERROR_guarantor_is_guarantee ) %]
182
                                <li id="ERROR_guarantor_is_guarantee">A guarantor cannot be a guarantee.</li>
183
                        [% END %]
178
			[% IF ( ERROR_login_exist ) %]
184
			[% IF ( ERROR_login_exist ) %]
179
				<li id="ERROR_login_exist">Username/password already exists.</li>
185
				<li id="ERROR_login_exist">Username/password already exists.</li>
180
			[% END %]
186
			[% END %]
Lines 383-388 Link Here
383
	        </li>
389
	        </li>
384
[% ELSE %]
390
[% ELSE %]
385
 [% IF ( C ) %]
391
 [% IF ( C ) %]
392
 [% IF ( Koha.Preference('ChildNeedsGuarantor') ) %]<li id="guarantor_required"><span class="required">Required</span></li>[% END %]
386
 [% IF ( guarantorid ) %]
393
 [% IF ( guarantorid ) %]
387
 <li id="contact-details">
394
 <li id="contact-details">
388
 [% ELSE %]
395
 [% ELSE %]
(-)a/members/memberentry.pl (-1 / +7 lines)
Lines 262-270 if ( $guarantorid and ( $category_type eq 'C' || $category_type eq 'P' )) { Link Here
262
		        $newdata{$_} = $guarantordata->{$_};
262
		        $newdata{$_} = $guarantordata->{$_};
263
	        }
263
	        }
264
        }
264
        }
265
266
        push @errors, 'ERROR_guarantor_is_guarantee' if ( $guarantordata->{'guarantorid'} &&
267
                                                          ($op eq 'save' || $op eq 'insert') );
265
    }
268
    }
266
}
269
}
267
270
271
push @errors, 'ERROR_child_no_guarantor' if ( $category_type eq 'C' && !$guarantorid &&
272
                                              ($op eq 'save' || $op eq 'insert') &&
273
                                              C4::Context->preference('ChildNeedsGuarantor') );
274
268
###############test to take the right zipcode, country and city name ##############
275
###############test to take the right zipcode, country and city name ##############
269
# set only if parameter was passed from the form
276
# set only if parameter was passed from the form
270
$newdata{'city'}    = $input->param('city')    if defined($input->param('city'));
277
$newdata{'city'}    = $input->param('city')    if defined($input->param('city'));
271
- 

Return to bug 12133