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

(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 79-84 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
79
('CatalogModuleRelink','0',NULL,'If OFF the linker will never replace the authids that are set in the cataloging module.','YesNo'),
79
('CatalogModuleRelink','0',NULL,'If OFF the linker will never replace the authids that are set in the cataloging module.','YesNo'),
80
('CataloguingLog','1',NULL,'If ON, log edit/create/delete actions on bibliographic data. WARNING: this feature is very resource consuming.','YesNo'),
80
('CataloguingLog','1',NULL,'If ON, log edit/create/delete actions on bibliographic data. WARNING: this feature is very resource consuming.','YesNo'),
81
('checkdigit','none','none|katipo','If ON, enable checks on patron cardnumber: none or \"Katipo\" style checks','Choice'),
81
('checkdigit','none','none|katipo','If ON, enable checks on patron cardnumber: none or \"Katipo\" style checks','Choice'),
82
('ChildNeedsGuarantor', '0', NULL, 'If ON, a child patron must have a guarantor when adding the patron.', 'YesNo'),
82
('CircAutocompl','1',NULL,'If ON, autocompletion is enabled for the Circulation input','YesNo'),
83
('CircAutocompl','1',NULL,'If ON, autocompletion is enabled for the Circulation input','YesNo'),
83
('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'),
84
('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'),
84
('CircControl','ItemHomeLibrary','PickupLibrary|PatronLibrary|ItemHomeLibrary','Specify the agency that controls the circulation and fines policy','Choice'),
85
('CircControl','ItemHomeLibrary','PickupLibrary|PatronLibrary|ItemHomeLibrary','Specify the agency that controls the circulation and fines policy','Choice'),
(-)a/installer/data/mysql/updatedatabase.pl (+12 lines)
Lines 8202-8207 if ( CheckVersion($DBversion) ) { Link Here
8202
    SetVersion($DBversion);
8202
    SetVersion($DBversion);
8203
}
8203
}
8204
8204
8205
$DBversion = "3.15.00.XXX";
8206
if ( CheckVersion($DBversion) ) {
8207
    $dbh->do(q{
8208
        INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type)
8209
        VALUES('ChildNeedsGuarantor', 0, 'If ON, a child patron must have a guarantor when adding the patron.', '', 'YesNo')
8210
    });
8211
8212
    print "Upgrade to $DBversion done (Bug 12133 - Guarantor requirements when registering a patron)\n";
8213
    SetVersion($DBversion);
8214
}
8215
8216
8205
=head1 FUNCTIONS
8217
=head1 FUNCTIONS
8206
8218
8207
=head2 TableExists($table)
8219
=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 384-389 Link Here
384
	        </li>
390
	        </li>
385
[% ELSE %]
391
[% ELSE %]
386
 [% IF ( C ) %]
392
 [% IF ( C ) %]
393
 [% IF ( Koha.Preference('ChildNeedsGuarantor') ) %]<li id="guarantor_required"><span class="required">Required</span></li>[% END %]
387
 [% IF ( guarantorid ) %]
394
 [% IF ( guarantorid ) %]
388
 <li id="contact-details">
395
 <li id="contact-details">
389
 [% ELSE %]
396
 [% 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