|
Lines 1-1996
Link Here
|
| 1 |
[% USE raw %] |
|
|
| 2 |
[% USE Asset %] |
| 3 |
[% USE To %] |
| 4 |
[% USE Koha %] |
| 5 |
[% USE KohaDates %] |
| 6 |
[% USE Branches %] |
| 7 |
[% PROCESS 'member-main-address-style.inc' %] |
| 8 |
[% PROCESS 'member-alt-address-style.inc' %] |
| 9 |
[% PROCESS 'member-alt-contact-style.inc' %] |
| 10 |
[% PROCESS 'restriction-types.inc' %] |
| 11 |
[% PROCESS 'i18n.inc' %] |
| 12 |
[% SET footerjs = 1 %] |
| 13 |
[% PROCESS 'patron-search.inc' %] |
| 14 |
[% INCLUDE 'doc-head-open.inc' %] |
| 15 |
<title |
| 16 |
>[% FILTER collapse %] |
| 17 |
[% UNLESS blocking_error %] |
| 18 |
[% IF ( op == 'add_form' ) %] |
| 19 |
[% t("Add patron") | html %] |
| 20 |
[% ELSE %] |
| 21 |
[% t("Modify patron") | html %] |
| 22 |
[% END %] |
| 23 |
[% INCLUDE 'patron-title.inc' no_html = 1 %] |
| 24 |
[% IF patron_category %]([% patron_category.description | html %])[% END %] |
| 25 |
[% END %] |
| 26 |
› [% t("Patrons") | html %] › [% t("Koha") | html %] |
| 27 |
[% END %]</title |
| 28 |
> |
| 29 |
[% INCLUDE 'doc-head-close.inc' %] |
| 30 |
[% FILTER collapse %] |
| 31 |
<style> |
| 32 |
fieldset legend { |
| 33 |
border: 1px solid #fff; |
| 34 |
margin-left: -0.5em; |
| 35 |
margin-top: -0.5em; |
| 36 |
padding: 0.7em; |
| 37 |
} |
| 38 |
fieldset legend:hover { |
| 39 |
border: 1px solid #6faf44; |
| 40 |
cursor: pointer; |
| 41 |
} |
| 42 |
|
| 43 |
fieldset legend i { |
| 44 |
color: #4c7aa8; |
| 45 |
font-size: 80%; |
| 46 |
padding-right: 0.2rem; |
| 47 |
} |
| 48 |
|
| 49 |
fieldset legend.collapsed { |
| 50 |
margin-bottom: -0.5em; |
| 51 |
} |
| 52 |
|
| 53 |
legend.collapsed i.fa.fa-caret-down::before { |
| 54 |
content: "\f0da"; |
| 55 |
} |
| 56 |
</style> |
| 57 |
[% END %] |
| 58 |
</head> |
| 59 |
|
| 60 |
<body id="pat_memberentrygen" class="pat"> |
| 61 |
[% WRAPPER 'header.inc' %] |
| 62 |
[% INCLUDE 'patron-search-header.inc' %] |
| 63 |
[% END %] |
| 64 |
|
| 65 |
[% WRAPPER 'sub-header.inc' %] |
| 66 |
[% WRAPPER breadcrumbs %] |
| 67 |
[% WRAPPER breadcrumb_item %] |
| 68 |
<a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> |
| 69 |
[% END %] |
| 70 |
[% UNLESS blocking_error %] |
| 71 |
[% UNLESS op == 'add_form' %] |
| 72 |
[% IF (borrower_data.firstname || borrower_data.surname ) %] |
| 73 |
[% WRAPPER breadcrumb_item %] |
| 74 |
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | uri %]"> [% INCLUDE 'patron-title.inc' %] </a> |
| 75 |
[% END %] |
| 76 |
[% END %] |
| 77 |
[% END %] |
| 78 |
[% END %] |
| 79 |
[% WRAPPER breadcrumb_item bc_active= 1 %] |
| 80 |
[% IF ( op == 'add_form' ) %] |
| 81 |
<span>Add patron</span> |
| 82 |
[% ELSE %] |
| 83 |
<span>Modify patron</span> |
| 84 |
[% END %] |
| 85 |
[% IF patron_category %] |
| 86 |
([% patron_category.description | html %]) |
| 87 |
[% END %] |
| 88 |
[% END %] |
| 89 |
[% END #/ WRAPPER breadcrumbs %] |
| 90 |
[% END #/ WRAPPER sub-header.inc %] |
| 91 |
|
| 92 |
<div class="main container-fluid"> |
| 93 |
<div class="row"> |
| 94 |
[% IF borrower_data.messages %] |
| 95 |
[% FOR message IN borrower_data.messages %] |
| 96 |
[% SWITCH message.error %] |
| 97 |
[% CASE 'error_on_insert_patron' %] |
| 98 |
<div class="alert alert-warning">Something went wrong when creating the patron. Check the logs for details.</div> |
| 99 |
[% CASE 'error_on_update_patron' %] |
| 100 |
<div class="alert alert-warning">Something went wrong when updating the patron. Check the logs for details.</div> |
| 101 |
[% CASE %] |
| 102 |
<div class="alert alert-warning">Unhandled error: [% message.error | html %]</div> |
| 103 |
[% END %] |
| 104 |
[% END %] |
| 105 |
[% END %] |
| 106 |
[% IF ( op == 'add_form' ) %] |
| 107 |
[% SET div_class = 'col-md-10 offset-md-1 col-lg-8 offset-lg-2' %] |
| 108 |
[% ELSE %] |
| 109 |
[% SET div_class = 'col-md-10 order-md-2 order-sm-1' %] |
| 110 |
[% END %] |
| 111 |
<div class="[% div_class | html %]"> |
| 112 |
<main class="clearfix"> |
| 113 |
[% INCLUDE 'messages.inc' %] |
| 114 |
|
| 115 |
[% IF error_alert %] |
| 116 |
[% IF ( error_alert == "no_email" ) %] |
| 117 |
<div class="alert alert-warning">This member has no email</div> |
| 118 |
[% ELSE %] |
| 119 |
<div class="alert alert-warning">[% error_alert | html %]</div> |
| 120 |
[% END %] |
| 121 |
[% END %] |
| 122 |
[% IF info_alert %] |
| 123 |
<div class="alert alert-info">Email has been sent.</div> |
| 124 |
[% END %] |
| 125 |
|
| 126 |
[% INCLUDE 'noadd-warnings.inc' %] |
| 127 |
|
| 128 |
[% UNLESS ( no_add ) %] |
| 129 |
<h1> |
| 130 |
[% IF ( op == 'add_form' ) %] |
| 131 |
<span>Add patron</span> |
| 132 |
[% ELSIF ( op == 'duplicate' ) %] |
| 133 |
<span>Duplicate patron</span> |
| 134 |
[% ELSE %] |
| 135 |
<span>Modify patron</span> |
| 136 |
[% END %] |
| 137 |
[% INCLUDE 'patron-title.inc' %] |
| 138 |
[% IF patron_category %]([% patron_category.description | html %])[% END %] |
| 139 |
</h1> |
| 140 |
|
| 141 |
[% IF quickadd && op == 'add_form' && !check_member %] |
| 142 |
<a href="#" class="toggle_quick_add"><i class="fa fa-plus-square"></i> Show full form</a> |
| 143 |
<a href="#" class="toggle_quick_add" style="display:none"><i class="fa fa-minus-square"></i> Show brief form</a> |
| 144 |
[% END %] |
| 145 |
|
| 146 |
[% IF ( check_member ) %] |
| 147 |
<div class="alert alert-warning"> |
| 148 |
<h3>Duplicate patron record?</h3> |
| 149 |
<p>[%- INCLUDE 'patron-title.inc' patron => check_patron hide_patron_infos_if_needed => 1 -%]</p> |
| 150 |
[% IF logged_in_user.can_see_patron_infos( check_patron ) %] |
| 151 |
<p |
| 152 |
><a class="popup_patronview" href="/cgi-bin/koha/members/moremember.pl?print=brief&borrowernumber=[% check_member | uri %]"><i class="fa-solid fa-window-restore"></i> View existing record</a></p |
| 153 |
> |
| 154 |
[% END %] |
| 155 |
<a href="/cgi-bin/koha/members/memberentry.pl?op=edit_form&borrowernumber=[% check_member | uri %]" class="btn btn-default" id="duplicate"> |
| 156 |
<i class="fa-solid fa-pencil" aria-hidden="true"></i> It is a duplicate. Edit existing record |
| 157 |
</a> |
| 158 |
<button type="submit" id="not-duplicate" class="new"> <i class="fa fa-plus"></i> Not a duplicate. Save as new record </button> |
| 159 |
</div> |
| 160 |
[% END %] |
| 161 |
|
| 162 |
[% IF ( nok ) %] |
| 163 |
<div class="alert alert-warning"> |
| 164 |
<p>The following fields are wrong. Please fix them.</p> |
| 165 |
<ul> |
| 166 |
[% IF ( ERROR_login_exist ) %] |
| 167 |
<li id="ERROR_login_exist">Username already exists or could not create unique new one.</li> |
| 168 |
[% END %] |
| 169 |
[% IF ERROR_cardnumber_already_exists %] |
| 170 |
<li id="ERROR_cardnumber">Card number already in use.</li> |
| 171 |
[% END %] |
| 172 |
[% IF ERROR_cardnumber_length %] |
| 173 |
<li id="ERROR_cardnumber">Card number length is incorrect.</li> |
| 174 |
[% END %] |
| 175 |
[% IF ( ERROR_age_limitations ) %] |
| 176 |
<li id="ERROR_age_limitations">Patron's age is incorrect for their category. Ages allowed are [% age_low | html %]-[% age_high | html %].</li> |
| 177 |
[% END %] |
| 178 |
[% IF ( ERROR_branch ) %] |
| 179 |
<li id="ERROR_branch">Library is invalid.</li> |
| 180 |
[% END %] |
| 181 |
[% IF ( ERROR_dateofbirth ) %] |
| 182 |
<li id="ERROR_dateofbirth">Date of birth is invalid.</li> |
| 183 |
[% END %] |
| 184 |
[% IF ( ERROR_dateenrolled ) %] |
| 185 |
<li id="ERROR_dateenrolled">Date of enrollment is invalid.</li> |
| 186 |
[% END %] |
| 187 |
[% IF ( ERROR_dateexpiry ) %] |
| 188 |
<li id="ERROR_dateexpiry">Date of expiration is invalid.</li> |
| 189 |
[% END %] |
| 190 |
[% IF ( ERROR_password_too_short ) %] |
| 191 |
<li id="ERROR_short_password">Password must be at least [% minPasswordLength | html %] characters long.</li> |
| 192 |
[% END %] |
| 193 |
[% IF ( ERROR_password_too_weak ) %] |
| 194 |
<li id="ERROR_weak_password">Password must contain at least one digit, one lowercase and one uppercase.</li> |
| 195 |
[% END %] |
| 196 |
[% IF ( ERROR_password_has_whitespaces ) %] |
| 197 |
<li id="ERROR_weak_password">Password must not contain leading or trailing whitespaces.</li> |
| 198 |
[% END %] |
| 199 |
[% IF ( ERROR_password_mismatch ) %] |
| 200 |
<li id="ERROR_password_mismatch">Passwords do not match.</li> |
| 201 |
[% END %] |
| 202 |
[% IF ( ERROR_password_expiration_date ) %] |
| 203 |
<li id="ERROR_dateexpiry">Password expiration date is invalid.</li> |
| 204 |
[% END %] |
| 205 |
[% IF ( ERROR_extended_unique_id_failed ) %] |
| 206 |
<li id="ERROR_extended_unique_id_failed" |
| 207 |
><strong>[% ERROR_extended_unique_id_failed_description | html %]:</strong> Attribute value "[% ERROR_extended_unique_id_failed_value | html %]" is already in use by another patron record.</li |
| 208 |
> |
| 209 |
[% END %] |
| 210 |
[% IF ERROR_bad_email %] |
| 211 |
<li id="ERROR_bad_email">The primary email is invalid.</li> |
| 212 |
[% END %] |
| 213 |
[% IF ERROR_bad_email_secondary %] |
| 214 |
<li id="ERROR_bad_email_secondary">The secondary email is invalid.</li> |
| 215 |
[% END %] |
| 216 |
[% IF ERROR_bad_email_alternative %] |
| 217 |
<li id="ERROR_bad_email_alternative">The alternative email is invalid.</li> |
| 218 |
[% END %] |
| 219 |
[% IF ( ERROR_child_no_guarantor ) %] |
| 220 |
<li id="ERROR_child_no_guarantor">A child patron needs a guarantor.</li> |
| 221 |
[% END %] |
| 222 |
[% IF ( ERROR_child_is_guarantor ) %] |
| 223 |
<li id="ERROR_child_is_guarantor">Child patron cannot be a guarantor.</li> |
| 224 |
[% END %] |
| 225 |
[% IF ( ERROR_guarantor_is_guarantee ) %] |
| 226 |
<li id="ERROR_guarantor_is_guarantee">A guarantor cannot be a guarantee.</li> |
| 227 |
[% END %] |
| 228 |
[% IF ( ERROR_cannot_delete_guarantor ) %] |
| 229 |
<li id="ERROR_cannot_delete_guarantor">Cannot delete guarantor(s). A child patron needs a guarantor.</li> |
| 230 |
[% END %] |
| 231 |
[% IF ( ERROR_invalid_relationship ) %] |
| 232 |
<li id="ERROR_invalid_relationship">Guarantor relationship cannot be left blank according to configuration.</li> |
| 233 |
[% END %] |
| 234 |
</ul> |
| 235 |
</div> |
| 236 |
[% END %] |
| 237 |
|
| 238 |
[% SET fieldstohide = Koha.Preference('CollapseFieldsPatronAddForm') %] |
| 239 |
[% IF Koha.Preference('CollapseFieldsPatronAddForm') %][% UNLESS step %] |
| 240 |
<p id="selections"> |
| 241 |
<label><input type="checkbox" id="toggle_hidden_fields" title="These fields are collapsed by default by the CollapseFieldsPatronAddForm system preference" /><strong>Show collapsed fields:</strong></label> |
| 242 |
[% FOREACH field IN fieldstohide.split(',') %] |
| 243 |
[% SWITCH field %] |
| 244 |
[% CASE 'identity' %] |
| 245 |
<span>Patron identity</span> | |
| 246 |
[% CASE 'guarantor' %] |
| 247 |
<span>Guarantor information</span> | |
| 248 |
[% CASE 'nonpatron_guarantor' %] |
| 249 |
<span>Non-patron guarantor</span> | |
| 250 |
[% CASE 'primary_address' %] |
| 251 |
<span>Main address</span> | |
| 252 |
[% CASE 'primary_contact' %] |
| 253 |
<span>Contact information</span> | |
| 254 |
[% CASE 'alt_address' %] |
| 255 |
<span>Alternate address</span> | |
| 256 |
[% CASE 'alt_contact' %] |
| 257 |
<span>Alternate contact</span> | |
| 258 |
[% CASE 'lib_mgmt' %] |
| 259 |
<span>Library management</span> | |
| 260 |
[% CASE 'lib_setup' %] |
| 261 |
<span>Library setup</span> | |
| 262 |
[% CASE 'login' %] |
| 263 |
<span>OPAC/Staff interface login</span> | |
| 264 |
[% CASE 'flags' %] |
| 265 |
<span>Patron account flags</span> | |
| 266 |
[% CASE 'debarments' %] |
| 267 |
<span>Patron restrictions</span> | |
| 268 |
[% CASE 'housebound' %] |
| 269 |
[% IF Koha.Preference('HouseboundModule') %]<span>Housebound roles</span> |[% END %] |
| 270 |
[% CASE 'additional' %] |
| 271 |
<span>Additional attributes and identifiers</span> | |
| 272 |
[% CASE 'messaging' %] |
| 273 |
<span>Patron messaging preferences</span> | |
| 274 |
[% END %] |
| 275 |
[% END %] |
| 276 |
</p> |
| 277 |
[% END %][% END %] |
| 278 |
|
| 279 |
[% UNLESS ( check_member ) %] |
| 280 |
<div id="toolbar" class="btn-toolbar sticky"> |
| 281 |
[% IF quickadd && op == 'add_form' %] |
| 282 |
<button class="btn btn-primary toggler" id="save_quick_add" name="save"><i class="fa fa-save"></i> Save</button> |
| 283 |
[% END %] |
| 284 |
<button class="btn btn-primary toggler" id="saverecord" name="save"><i class="fa fa-save"></i> Save</button> |
| 285 |
[% IF op == 'add_form' %] |
| 286 |
<a class="btn btn-link toggler save_entryform" href="/cgi-bin/koha/members/member.pl"> <i class="fa fa-times"></i> Cancel </a> |
| 287 |
[% ELSE %] |
| 288 |
<a class="btn btn-link" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | html %]"> <i class="fa fa-times"></i> Cancel </a> |
| 289 |
[% END %] |
| 290 |
</div> |
| 291 |
[% END %] |
| 292 |
|
| 293 |
<form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off" class="toggler"> |
| 294 |
[% UNLESS ( check_member ) %] |
| 295 |
<input type="hidden" name="nodouble" value="[% nodouble | html %]" /> |
| 296 |
[% END %] |
| 297 |
<!-- field always hidden in different form (1,2,3) --> |
| 298 |
<input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField | html %]" /> |
| 299 |
<input type="hidden" name="updtype" value="[% updtype | html %]" /> |
| 300 |
<input type="hidden" name="destination" value="[% destination | html %]" /> |
| 301 |
<input type="hidden" name="check_member" value="[% check_member | html %]" /> |
| 302 |
<input type="hidden" name="borrowernumber" value="[% borrowernumber | html UNLESS op == 'duplicate' %]" /> |
| 303 |
<input type="hidden" name="nodouble" value="[% nodouble | html UNLESS op == 'duplicate' %]" /> |
| 304 |
[% INCLUDE 'csrf-token.inc' %] |
| 305 |
[% IF ( step ) %] |
| 306 |
<input type="hidden" name="step" value="[% step | html %]" /> |
| 307 |
[% END %] |
| 308 |
[% IF ( op == 'add_form' ) %] |
| 309 |
<input type="hidden" name="op" value="cud-insert" /> |
| 310 |
[% ELSIF ( op == 'duplicate' ) %] |
| 311 |
<input type="hidden" name="op" value="cud-insert" /> |
| 312 |
[% ELSE %] |
| 313 |
<input type="hidden" name="op" value="cud-save" /> |
| 314 |
[% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 || step == 7 %] |
| 315 |
[%# Only put the card number if we arent showing it in the form later %] |
| 316 |
[% IF borrower_data.cardnumber %] |
| 317 |
<input type="hidden" name="cardnumber" value="[% borrower_data.cardnumber | html %]" /> |
| 318 |
[% END %] |
| 319 |
[% END %] |
| 320 |
[% END %] |
| 321 |
|
| 322 |
[% IF ( step_1 ) %] |
| 323 |
[% UNLESS notitle && nosurname && nofirstname && nopreferred_name && nomiddle_name && nodateofbirth && noinitials && noothernames &&nosex && nopronouns %] |
| 324 |
<fieldset class="rows" id="memberentry_identity"> |
| 325 |
<legend class="expanded" id="identity_lgd"> |
| 326 |
<i class="fa fa-caret-down" title="Collapse this section"></i> |
| 327 |
[% IF ( patron_category.category_type == 'I' ) %] |
| 328 |
<span>Organization identity</span> |
| 329 |
[% ELSE %] |
| 330 |
<span>Patron identity</span> |
| 331 |
[% END %] |
| 332 |
</legend> |
| 333 |
<ol> |
| 334 |
[% UNLESS ( patron_category.category_type == 'I' ) %] |
| 335 |
[% UNLESS notitle %] |
| 336 |
[% IF Koha.Preference('BorrowersTitles') %] |
| 337 |
<li> |
| 338 |
<label for="btitle" [% IF mandatorytitle %]class="required"[% END %]> Salutation: </label> |
| 339 |
<select id="btitle" name="title"> |
| 340 |
<option value=""></option> |
| 341 |
[% FOREACH patron_title IN Koha.Preference('BorrowersTitles').split('\|') %] |
| 342 |
[% IF btitle == patron_title %] |
| 343 |
<option value="[% patron_title | html %]" selected="selected">[% patron_title | html %]</option> |
| 344 |
[% ELSE %] |
| 345 |
<option value="[% patron_title | html %]">[% patron_title | html %]</option> |
| 346 |
[% END %] |
| 347 |
[% END %] |
| 348 |
</select> |
| 349 |
[% IF ( mandatorytitle ) %] |
| 350 |
<span class="required">Required</span> |
| 351 |
[% END %] |
| 352 |
</li> |
| 353 |
[% END # /IF Koha.Preference('BorrowersTitles') %] |
| 354 |
[% END # /UNLESS notitle %] |
| 355 |
[% END # /UNLESS ( I ) %] |
| 356 |
|
| 357 |
[% UNLESS nosurname %] |
| 358 |
<li> |
| 359 |
[% IF ( patron_category.category_type == 'I' ) %] |
| 360 |
<label for="surname" class="required"> Name: </label> |
| 361 |
[% ELSE %] |
| 362 |
<label for="surname" [% IF mandatorysurname %]class="required"[% END %]> Surname: </label> |
| 363 |
[% END %] |
| 364 |
|
| 365 |
[% IF ( uppercasesurnames ) %] |
| 366 |
<input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% patron.surname | html %]" /> |
| 367 |
[% ELSE %] |
| 368 |
<input type="text" id="surname" name="surname" size="20" value="[% patron.surname | html %]" /> |
| 369 |
[% END %] |
| 370 |
[% IF ( mandatorysurname ) %] |
| 371 |
<span class="required">Required</span> |
| 372 |
[% END %] |
| 373 |
</li> |
| 374 |
[% END # /UNLESS nosurname %] |
| 375 |
|
| 376 |
[% UNLESS ( patron_category.category_type == 'I' ) %] |
| 377 |
[% UNLESS nofirstname %] |
| 378 |
<li> |
| 379 |
<label for="firstname" [% IF mandatoryfirstname %]class="required"[% END %]> First name: </label> |
| 380 |
<input type="text" id="firstname" name="firstname" size="20" value="[% borrower_data.firstname | html UNLESS op == 'duplicate' %]" /> |
| 381 |
[% IF ( mandatoryfirstname ) %] |
| 382 |
<span class="required">Required</span> |
| 383 |
[% END %] |
| 384 |
</li> |
| 385 |
[% END #/UNLESS nofirstname %] |
| 386 |
[% UNLESS nopreferred_name %] |
| 387 |
<li> |
| 388 |
<label for="preferred_name" [% IF mandatorypreferred_name %]class="required"[% END %]> Preferred name: </label> |
| 389 |
<input type="text" id="preferred_name" name="preferred_name" size="20" value="[% borrower_data.preferred_name | html UNLESS op == 'duplicate' %]" /> |
| 390 |
[% IF ( mandatorypreferred_name ) %] |
| 391 |
<span class="required">Required</span> |
| 392 |
[% END %] |
| 393 |
</li> |
| 394 |
[% END #/UNLESS nopreferred_name %] |
| 395 |
[% UNLESS nomiddle_name %] |
| 396 |
<li> |
| 397 |
<label for="middle_name" [% IF mandatorymiddle_name %]class="required"[% END %]> Middle name: </label> |
| 398 |
<input type="text" id="middle_name" name="middle_name" size="20" value="[% borrower_data.middle_name | html UNLESS op == 'duplicate' %]" /> |
| 399 |
[% IF ( mandatorymiddle_name ) %] |
| 400 |
<span class="required">Required</span> |
| 401 |
[% END %] |
| 402 |
</li> |
| 403 |
[% END #/UNLESS nomiddle_name %] |
| 404 |
[% UNLESS nodateofbirth %] |
| 405 |
<li> |
| 406 |
<label for="dateofbirth" [% IF mandatorydateofbirth %]class="required"[% END %]> Date of birth: </label> |
| 407 |
<input |
| 408 |
type="text" |
| 409 |
id="dateofbirth" |
| 410 |
name="dateofbirth" |
| 411 |
size="20" |
| 412 |
value="[% borrower_data.dateofbirth | html UNLESS op == 'duplicate' %]" |
| 413 |
class="flatpickr" |
| 414 |
data-flatpickr-pastinclusive="true" |
| 415 |
/> |
| 416 |
[% IF ( mandatorydateofbirth ) %] |
| 417 |
<span class="required">Required</span> |
| 418 |
[% END %] |
| 419 |
[% IF ( ERROR_dateofbirth ) %] |
| 420 |
<span class="required">(Error)</span> |
| 421 |
[% END %] |
| 422 |
<div id="dateofbirth_hint" class="hint">[% INCLUDE 'date-format.inc' %]</div> |
| 423 |
</li> |
| 424 |
[% END # /UNLESS nodateofbirth %] |
| 425 |
[% UNLESS noinitials %] |
| 426 |
<li> |
| 427 |
<label for="initials" [% IF mandatoryinitials %]class="required"[% END %]> Initials: </label> |
| 428 |
<input type="text" id="initials" name="initials" size="20" value="[% borrower_data.initials | html UNLESS op == 'duplicate' %]" /> |
| 429 |
[% IF ( mandatoryinitials ) %] |
| 430 |
<span class="required">Required</span> |
| 431 |
[% END %] |
| 432 |
</li> |
| 433 |
[% END # /UNLESS noinitials %] |
| 434 |
[% UNLESS nopronouns %] |
| 435 |
<li> |
| 436 |
<label for="pronouns" [% IF mandatorypronouns %]class="required"[% END %]> Pronouns: </label> |
| 437 |
<input type="text" id="pronouns" name="pronouns" size="20" value="[% borrower_data.pronouns | html UNLESS op == 'duplicate' %]" /> |
| 438 |
[% IF ( mandatorypronouns ) %] |
| 439 |
<span class="required">Required</span> |
| 440 |
[% END %] |
| 441 |
</li> |
| 442 |
[% END # /UNLESS nopronouns %] |
| 443 |
[% END #/UNLESS ( I ) %] |
| 444 |
[% UNLESS noothernames %] |
| 445 |
<li> |
| 446 |
<label for="othernames" [% IF mandatoryothernames %]class="required"[% END %]> Other name: </label> |
| 447 |
<input type="text" id="othernames" name="othernames" size="20" value="[% borrower_data.othernames | html UNLESS op == 'duplicate' %]" /> |
| 448 |
[% IF ( mandatoryothernames ) %] |
| 449 |
<span class="required">Required</span> |
| 450 |
[% END %] |
| 451 |
[% IF ( patron_category.category_type == 'I' ) %]<input type="hidden" name="sex" value="N" />[% END %] |
| 452 |
</li> |
| 453 |
[% END #/UNLESS noothernames %] |
| 454 |
|
| 455 |
[% UNLESS ( patron_category.category_type == 'I' ) %] |
| 456 |
[% UNLESS nosex %] |
| 457 |
<li class="radio"> |
| 458 |
[% UNLESS ( op == 'duplicate' ) %] |
| 459 |
[% IF ( female ) %] |
| 460 |
<label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" checked="checked" /><span class="patronsex-female"> Female</span></label> |
| 461 |
[% ELSE %] |
| 462 |
<label for="sex-female"><input type="radio" name="sex" id="sex-female" value="F" /><span class="patronsex-female"> Female</span></label> |
| 463 |
[% END %] |
| 464 |
[% IF ( male ) %] |
| 465 |
<label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" checked="checked" /><span class="patronsex-male"> Male</span></label> |
| 466 |
[% ELSE %] |
| 467 |
<label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" /><span class="patronsex-male"> Male</span></label> |
| 468 |
[% END %] |
| 469 |
[% IF ( other ) %] |
| 470 |
<label for="sex-other"><input type="radio" name="sex" id="sex-other" value="O" checked="checked" /><span class="patronsex-other"> [% tp('gender', 'Other') | html %]</span></label> |
| 471 |
[% ELSE %] |
| 472 |
<label for="sex-other"><input type="radio" name="sex" id="sex-other" value="O" /><span class="patronsex-other"> [% tp('gender', 'Other') | html %]</span></label> |
| 473 |
[% END %] |
| 474 |
[% IF ( none ) %] |
| 475 |
<label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" checked="checked" /><span class="patronsex-none"> None specified</span></label> |
| 476 |
[% ELSE %] |
| 477 |
<label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" /><span class="patronsex-none"> None specified</span></label> |
| 478 |
[% END %] |
| 479 |
[% ELSE %] |
| 480 |
<label for="sex-female"><span class="patronsex-female">Female </span></label><input type="radio" name="sex" id="sex-female" value="F" /> |
| 481 |
<label for="sex-male"><span class="patronsex-male">Male </span></label><input type="radio" name="sex" id="sex-male" value="M" /> |
| 482 |
<label for="sex-other"><span class="patronsex-other">[% tp('gender', 'Other') | html %] </span></label><input type="radio" name="sex" id="sex-other" value="O" /> |
| 483 |
<label for="sex-none"><span class="patronsex-none">None specified </span></label><input type="radio" name="sex" id="sex-none" value="" checked="checked" /> |
| 484 |
[% END # /UNLESS ( op == 'duplicate' ) %] |
| 485 |
</li> |
| 486 |
[% END # /UNLESS nosex %] |
| 487 |
[% END # /UNLESS ( I ) %] |
| 488 |
</ol> |
| 489 |
</fieldset> |
| 490 |
<!-- /#memberentry_identity --> |
| 491 |
[% END # hide fieldset %] |
| 492 |
|
| 493 |
[% IF show_guarantor || guarantor %] |
| 494 |
[% SET possible_relationships = Koha.Preference('borrowerRelationship') %] |
| 495 |
<div id="memberentry_guarantor_anchor"> |
| 496 |
<fieldset id="memberentry_guarantor" class="rows"> |
| 497 |
<legend class="expanded" id="patron_guarantor_lgd"> |
| 498 |
<i class="fa fa-caret-down" aria-hidden="true"></i> |
| 499 |
Patron guarantor |
| 500 |
</legend> |
| 501 |
|
| 502 |
<div id="guarantor_relationships"> |
| 503 |
[% FOREACH r IN relationships %] |
| 504 |
<fieldset> |
| 505 |
<ol> |
| 506 |
[% IF patron_category.category_type == 'I' %] |
| 507 |
<li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]"> |
| 508 |
<span class="label">Organization:</span> |
| 509 |
[% INCLUDE 'patron-title.inc' patron=r.guarantor hide_patron_infos_if_needed=1 %] |
| 510 |
</li> |
| 511 |
<li> |
| 512 |
<span class="label">Relationship:</span> |
| 513 |
<span>[% r.relationship | html %]</span> |
| 514 |
</li> |
| 515 |
[% ELSE %] |
| 516 |
<li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]"> |
| 517 |
<span class="label">Guarantor:</span> |
| 518 |
[% INCLUDE 'patron-title.inc' patron=r.guarantor hide_patron_infos_if_needed=1 %] |
| 519 |
<input type="hidden" class="new_guarantor_id relation-[% r.id | html %]" name="new_guarantor_id" value="[% r.guarantor_id | html %]" /> |
| 520 |
</li> |
| 521 |
<li> |
| 522 |
<span class="label">Relationship:</span> |
| 523 |
<span>[% r.relationship | html %]</span> |
| 524 |
<input type="hidden" class="new_guarantor_relationship relation-[% r.id | html %]" name="new_guarantor_relationship" value="[% r.relationship | html %]" /> |
| 525 |
</li> |
| 526 |
|
| 527 |
<li> |
| 528 |
<label for="delete_guarantor-[% r.id | uri %]">Remove: </label> |
| 529 |
<input type="checkbox" id="delete_guarantor-[% r.id | uri %]" name="delete_guarantor" value="[% r.id | html %]" onclick="toggle_guarantor_field([% r.id | html %])" /> |
| 530 |
</li> |
| 531 |
[% END %] |
| 532 |
</ol> |
| 533 |
</fieldset> |
| 534 |
[% END # END relationships foreach %] |
| 535 |
[% IF guarantor && (!relationships) %] |
| 536 |
<fieldset class="guarantor"> |
| 537 |
<ol> |
| 538 |
<li class="guarantor-details" data-borrowernumber="0"> |
| 539 |
<span class="label">Guarantor:</span> |
| 540 |
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantor.borrowernumber | uri %]" target="blank" |
| 541 |
>[% guarantor.firstname | html %] [% guarantor.surname | html %] ([% guarantor.cardnumber | html %])</a |
| 542 |
> |
| 543 |
<input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value="[% guarantor.borrowernumber | html %]" /> |
| 544 |
</li> |
| 545 |
|
| 546 |
[% UNLESS norelationship %] |
| 547 |
<li> |
| 548 |
<label for="guarantor_relationship" [% IF mandatoryrelationship %]class="required"[% END %]>Relationship: </label> |
| 549 |
<select class="new_guarantor_relationship" name="new_guarantor_relationship" [% IF mandatoryrelationship %]required="required"[% END %]> |
| 550 |
<option value=""></option> |
| 551 |
[% FOREACH pr IN possible_relationships.split('\|') %] |
| 552 |
[% IF pr != "" %] |
| 553 |
<option value="[% pr | html %]">[% pr | html %]</option> |
| 554 |
[% END %] |
| 555 |
[% END %] |
| 556 |
</select> |
| 557 |
[% IF mandatoryrelationship %] |
| 558 |
<span class="required">Required</span> |
| 559 |
[% END %] |
| 560 |
</li> |
| 561 |
[% ELSE %] |
| 562 |
<input type="hidden" name="new_guarantor_relationship" value="" /> |
| 563 |
[% END %] |
| 564 |
|
| 565 |
<li> |
| 566 |
<label for="guarantor_cancel"> </label> |
| 567 |
<span |
| 568 |
><a href="#" class="guarantor_cancel"><i class="fa fa-trash-can" aria-hidden="true"></i> Remove</a></span |
| 569 |
> |
| 570 |
</li> |
| 571 |
</ol> |
| 572 |
</fieldset> |
| 573 |
[% END %] |
| 574 |
</div> |
| 575 |
<!-- #/guarantor_relationships --> |
| 576 |
|
| 577 |
<fieldset class="guarantor" id="guarantor_template"> |
| 578 |
<ol> |
| 579 |
<li class="guarantor-details" data-borrowernumber="0"> |
| 580 |
<span class="label">Guarantor:</span> |
| 581 |
<a class="new_guarantor_link" href="#" target="blank"> |
| 582 |
<span class="new_guarantor_firstname_text"></span> <span class="new_guarantor_surname_text"></span> (<span class="new_guarantor_id_text"></span>) |
| 583 |
</a> |
| 584 |
<input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value="" /> |
| 585 |
</li> |
| 586 |
|
| 587 |
[% UNLESS norelationship %] |
| 588 |
<li> |
| 589 |
<label for="guarantor_relationship" [% IF mandatoryrelationship %]class="required"[% END %]>Relationship: </label> |
| 590 |
<select class="new_guarantor_relationship" name="new_guarantor_relationship" [% IF mandatoryrelationship %]required="required"[% END %]> |
| 591 |
<option value="" selected></option> |
| 592 |
[% FOREACH pr IN possible_relationships.split('\|') %] |
| 593 |
[% IF pr != "" %] |
| 594 |
<option value="[% pr | html %]">[% pr | html %]</option> |
| 595 |
[% END %] |
| 596 |
[% END %] |
| 597 |
</select> |
| 598 |
[% IF mandatoryrelationship %] |
| 599 |
<span class="required">Required</span> |
| 600 |
[% END %] |
| 601 |
</li> |
| 602 |
[% ELSE %] |
| 603 |
<input type="hidden" name="new_guarantor_relationship" value="" /> |
| 604 |
[% END %] |
| 605 |
|
| 606 |
<li> |
| 607 |
<label for="guarantor_cancel"> </label> |
| 608 |
<span |
| 609 |
><a href="#" class="guarantor_cancel"><i class="fa fa-trash-can"></i> Remove</a></span |
| 610 |
> |
| 611 |
</li> |
| 612 |
</ol> |
| 613 |
</fieldset> |
| 614 |
|
| 615 |
<ol> |
| 616 |
<input type="hidden" id="guarantor_id" value="" /> |
| 617 |
<input name="guarantor_surname" id="guarantor_surname" type="hidden" /> |
| 618 |
<input name="guarantor_firstname" id="guarantor_firstname" type="hidden" /> |
| 619 |
|
| 620 |
<li> |
| 621 |
<a href="#patron_search_modal" class="btn btn-default" data-bs-toggle="modal"><i class="fa fa-plus"></i> Add guarantor</a> |
| 622 |
</li> |
| 623 |
|
| 624 |
[% IF Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %] |
| 625 |
<li> |
| 626 |
<label for="privacy_guarantor_checkouts">Show checkouts to guarantors:</label> |
| 627 |
<select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts"> |
| 628 |
[% IF borrower_data.privacy_guarantor_checkouts %] |
| 629 |
<option value="0">No</option> |
| 630 |
<option value="1" selected>Yes</option> |
| 631 |
[% ELSE %] |
| 632 |
<option value="0" selected>No</option> |
| 633 |
<option value="1">Yes</option> |
| 634 |
[% END %] |
| 635 |
</select> |
| 636 |
<div class="hint">Allow guarantors of this patron to view this patron's checkouts from the OPAC</div> |
| 637 |
</li> |
| 638 |
[% END %] |
| 639 |
[% IF Koha.Preference('AllowStaffToSetFinesVisibilityForGuarantor') %] |
| 640 |
<li> |
| 641 |
<label for="privacy_guarantor_fines">Show charges to guarantors:</label> |
| 642 |
<select name="privacy_guarantor_fines" id="privacy_guarantor_fines"> |
| 643 |
[% IF borrower_data.privacy_guarantor_fines %] |
| 644 |
<option value="0">No</option> |
| 645 |
<option value="1" selected>Yes</option> |
| 646 |
[% ELSE %] |
| 647 |
<option value="0" selected>No</option> |
| 648 |
<option value="1">Yes</option> |
| 649 |
[% END %] |
| 650 |
</select> |
| 651 |
<div class="hint">Allow guarantors of this patron to view this patron's charges from the OPAC</div> |
| 652 |
</li> |
| 653 |
[% END %] |
| 654 |
</ol> |
| 655 |
</fieldset> |
| 656 |
<!-- /#memberentry_guarantor --> |
| 657 |
</div> |
| 658 |
<!-- #/memberentry_guarantor_anchor --> |
| 659 |
|
| 660 |
[% UNLESS nocontactname && nocontactfirstname && norelationship %] |
| 661 |
<fieldset class="rows" id="non_patron_guarantor"> |
| 662 |
<legend class="expanded" id="non_patron_guarantor_lgd"> |
| 663 |
<i class="fa fa-caret-down" aria-hidden="true"></i> |
| 664 |
Non-patron guarantor |
| 665 |
</legend> |
| 666 |
<ol> |
| 667 |
[% UNLESS nocontactname %] |
| 668 |
<li> |
| 669 |
<label for="contactname" [% IF mandatorycontactname %]class="required"[% END %]> Guarantor surname: </label> |
| 670 |
<input type="text" id="contactname" name="contactname" value="[% patron.contactname | html %]" /> |
| 671 |
[% IF ( mandatorycontactname ) %] |
| 672 |
<span class="required">Required</span> |
| 673 |
[% END %] |
| 674 |
<div class="hint">Non-patron guarantor surname</div> |
| 675 |
</li> |
| 676 |
[% END # /UNLESS nocontactname %] |
| 677 |
|
| 678 |
[% UNLESS nocontactfirstname %] |
| 679 |
<li> |
| 680 |
<label for="contactfirstname" [% IF mandatorycontactfirstname %]class="required"[% END %]> Guarantor first name: </label> |
| 681 |
<input type="text" id="contactfirstname" name="contactfirstname" value="[% patron.contactfirstname | html %]" /> |
| 682 |
[% IF ( mandatorycontactfirstname ) %] |
| 683 |
<span class="required">Required</span> |
| 684 |
[% END %] |
| 685 |
<div class="hint">Non-patron guarantor first name</div> |
| 686 |
</li> |
| 687 |
[% END # /UNLESS noaltcontactfirstname %] |
| 688 |
|
| 689 |
[% UNLESS norelationship %] |
| 690 |
<li> |
| 691 |
<label for="relationship" [% IF mandatoryrelationship %]class="required"[% END %]>Relationship: </label> |
| 692 |
<select class="relationship" name="relationship" id="relationship" [% IF mandatoryrelationship %]required="required"[% END %]> |
| 693 |
<option value=""></option> |
| 694 |
[% FOREACH pr IN possible_relationships.split('\|') %] |
| 695 |
[% IF pr == borrower_data.relationship %] |
| 696 |
<option value="[% pr | html %]" selected="selected">[% pr | html %]</option> |
| 697 |
[% ELSE %] |
| 698 |
<option value="[% pr | html %]">[% pr | html %]</option> |
| 699 |
[% END %] |
| 700 |
[% END %] |
| 701 |
</select> |
| 702 |
[% IF mandatoryrelationship %] |
| 703 |
<span class="required">Required</span> |
| 704 |
[% END %] |
| 705 |
</li> |
| 706 |
[% END # /UNLESS norelationship %] |
| 707 |
</ol> |
| 708 |
</fieldset> |
| 709 |
<!-- /#non_patron_guarantor --> |
| 710 |
[% END # /UNLESS nocontactname && nocontactfirstname && norelationship %] |
| 711 |
[% END # /IF show_guarantor || guarantor %] |
| 712 |
|
| 713 |
[% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %] |
| 714 |
[% PROCESS 'main-address-style' %] |
| 715 |
[% END # /UNLESS nostreet && nocity etc group %] |
| 716 |
|
| 717 |
[% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %] |
| 718 |
<fieldset class="rows" id="memberentry_contact"> |
| 719 |
<legend class="expanded" id="contact_lgd"> |
| 720 |
<i class="fa fa-caret-down" aria-hidden="true"></i> |
| 721 |
Contact information |
| 722 |
</legend> |
| 723 |
<ol> |
| 724 |
[% UNLESS nophone %] |
| 725 |
<li> |
| 726 |
<label for="phone" [% IF mandatoryphone %]class="required"[% END %]> Primary phone: </label> |
| 727 |
<input type="text" id="phone" name="phone" value="[% patron.phone | html %]" /> |
| 728 |
[% IF ( mandatoryphone ) %] |
| 729 |
<span class="required">Required</span> |
| 730 |
[% END %] |
| 731 |
<div class="hint">Shows on transit slips</div> |
| 732 |
</li> |
| 733 |
[% END # /UNLESS nophone %] |
| 734 |
|
| 735 |
[% UNLESS nophonepro %] |
| 736 |
<li> |
| 737 |
<label for="phonepro" [% IF mandatoryphonepro %]class="required"[% END %]> Secondary phone: </label> |
| 738 |
<input type="text" id="phonepro" name="phonepro" value="[% patron.phonepro | html %]" /> |
| 739 |
[% IF ( mandatoryphonepro ) %] |
| 740 |
<span class="required">Required</span> |
| 741 |
[% END %] |
| 742 |
</li> |
| 743 |
[% END # /UNLESS nophonepro %] |
| 744 |
|
| 745 |
[% UNLESS nomobile %] |
| 746 |
<li> |
| 747 |
<label for="mobile" [% IF mandatorymobile %]class="required"[% END %]> Other phone: </label> |
| 748 |
<input type="text" id="mobile" name="mobile" value="[% patron.mobile | html %]" /> |
| 749 |
[% IF ( mandatorymobile ) %] |
| 750 |
<span class="required">Required</span> |
| 751 |
[% END %] |
| 752 |
</li> |
| 753 |
[% END # /UNLESS nomobile %] |
| 754 |
|
| 755 |
[% UNLESS noemail %] |
| 756 |
<li> |
| 757 |
<label for="email" [% IF mandatoryemail %]class="required"[% END %]> Primary email: </label> |
| 758 |
[% IF ( NoUpdateEmail ) %] |
| 759 |
<input type="text" id="email" name="email" size="45" value="[% patron.email | html %]" disabled="disabled" /> |
| 760 |
[% ELSE %] |
| 761 |
<input type="text" id="email" name="email" size="45" value="[% patron.email | html %]" /> |
| 762 |
[% END %] |
| 763 |
[% IF ( mandatoryemail ) %] |
| 764 |
<span class="required">Required</span> |
| 765 |
[% END %] |
| 766 |
<div class="hint">Shows on transit slips</div> |
| 767 |
</li> |
| 768 |
[% END #/UNLESS noemail %] |
| 769 |
|
| 770 |
[% UNLESS noemailpro %] |
| 771 |
<li> |
| 772 |
<label for="emailpro" [% IF mandatoryemailpro %]class="required"[% END %]> Secondary email: </label> |
| 773 |
[% IF ( NoUpdateEmail ) %] |
| 774 |
<input type="text" id="emailpro" name="emailpro" size="45" value="[% patron.emailpro | html %]" disabled="disabled" /> |
| 775 |
[% ELSE %] |
| 776 |
<input type="text" id="emailpro" name="emailpro" size="45" value="[% patron.emailpro | html %]" /> |
| 777 |
[% END %] |
| 778 |
[% IF ( mandatoryemailpro ) %] |
| 779 |
<span class="required">Required</span> |
| 780 |
[% END %] |
| 781 |
</li> |
| 782 |
[% END #/UNLESS noemailpro %] |
| 783 |
|
| 784 |
[% UNLESS nofax %] |
| 785 |
<li> |
| 786 |
<label for="fax" [% IF mandatoryfax %]class="required"[% END %]> Fax: </label> |
| 787 |
<input type="text" id="fax" name="fax" value="[% patron.fax | html %]" /> |
| 788 |
[% IF ( mandatoryfax ) %] |
| 789 |
<span class="required">Required</span> |
| 790 |
[% END %] |
| 791 |
</li> |
| 792 |
[% END #/UNLESS nofax %] |
| 793 |
|
| 794 |
[% UNLESS noprimary_contact_method %] |
| 795 |
<li> |
| 796 |
<label for="primary_contact_method" [% IF mandatoryprimary_contact_method %]class="required"[% END %]> Main contact method: </label> |
| 797 |
|
| 798 |
<select id="primary_contact_method" name="primary_contact_method"> |
| 799 |
<option value=""></option> |
| 800 |
[% UNLESS nophone %] |
| 801 |
[% IF ( borrower_data.primary_contact_method == 'phone' ) %] |
| 802 |
<option value="phone" selected="selected">Primary phone</option> |
| 803 |
[% ELSE %] |
| 804 |
<option value="phone">Primary phone</option> |
| 805 |
[% END %] |
| 806 |
[% END %] |
| 807 |
[% UNLESS nophonepro %] |
| 808 |
[% IF ( borrower_data.primary_contact_method == 'phonepro' ) %] |
| 809 |
<option value="phonepro" selected="selected">Secondary phone</option> |
| 810 |
[% ELSE %] |
| 811 |
<option value="phonepro">Secondary phone</option> |
| 812 |
[% END %] |
| 813 |
[% END %] |
| 814 |
[% UNLESS nomobile %] |
| 815 |
[% IF ( borrower_data.primary_contact_method == 'mobile' ) %] |
| 816 |
<option value="mobile" selected="selected">Other phone</option> |
| 817 |
[% ELSE %] |
| 818 |
<option value="mobile">Other phone</option> |
| 819 |
[% END %] |
| 820 |
[% END %] |
| 821 |
[% UNLESS noemail %] |
| 822 |
[% IF ( borrower_data.primary_contact_method == 'email' ) %] |
| 823 |
<option value="email" selected="selected">Primary email</option> |
| 824 |
[% ELSE %] |
| 825 |
<option value="email">Primary email</option> |
| 826 |
[% END %] |
| 827 |
[% END %] |
| 828 |
[% UNLESS noemailpro %] |
| 829 |
[% IF ( borrower_data.primary_contact_method == 'emailpro' ) %] |
| 830 |
<option value="emailpro" selected="selected">Secondary email</option> |
| 831 |
[% ELSE %] |
| 832 |
<option value="emailpro">Secondary email</option> |
| 833 |
[% END %] |
| 834 |
[% END %] |
| 835 |
[% UNLESS nofax %] |
| 836 |
[% IF ( borrower_data.primary_contact_method == 'fax' ) %] |
| 837 |
<option value="fax" selected="selected">Fax</option> |
| 838 |
[% ELSE %] |
| 839 |
<option value="fax">Fax</option> |
| 840 |
[% END %] |
| 841 |
[% END %] |
| 842 |
</select> |
| 843 |
[% IF mandatoryprimary_contact_method %] |
| 844 |
<span class="required">Required</span> |
| 845 |
[% END %] |
| 846 |
</li> |
| 847 |
[% END %] |
| 848 |
</ol> |
| 849 |
</fieldset> |
| 850 |
<!-- /#memberentry_contact --> |
| 851 |
[% END # hide fieldset %] |
| 852 |
|
| 853 |
<!-- ************************ STEP_1 *********************** --> |
| 854 |
[% END # /IF ( step_1 ) %] |
| 855 |
|
| 856 |
[% IF ( step_6 ) %] |
| 857 |
[% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %] |
| 858 |
[% PROCESS 'alt-address-style' %] |
| 859 |
[% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %] |
| 860 |
[% END # /IF ( step_6 ) %] |
| 861 |
|
| 862 |
[% IF ( step_2 ) %] |
| 863 |
[% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %] |
| 864 |
[% PROCESS 'alt-contact-style' %] |
| 865 |
[% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %] |
| 866 |
[% END # /IF ( step_2 ) %] |
| 867 |
|
| 868 |
[% IF ( step_3 ) %] |
| 869 |
[% SET autoMemberNum = Koha.Preference('autoMemberNum') %] |
| 870 |
<fieldset class="rows" id="memberentry_library_management"> |
| 871 |
<legend class="expanded" id="library_management_lgd"> |
| 872 |
<i class="fa fa-caret-down" aria-hidden="true"></i> |
| 873 |
Library management |
| 874 |
</legend> |
| 875 |
<ol> |
| 876 |
[% UNLESS nocardnumber %] |
| 877 |
<li> |
| 878 |
<label for="cardnumber" class="[% mandatorycardnumber ? 'required' : 'validated' | html %]"> Card number: </label> |
| 879 |
|
| 880 |
[% IF minlength_cardnumber == maxlength_cardnumber %] |
| 881 |
<input |
| 882 |
type="text" |
| 883 |
id="cardnumber" |
| 884 |
name="cardnumber" |
| 885 |
size="20" |
| 886 |
value="[% borrower_data.cardnumber | html %]" |
| 887 |
minlength="[% minlength_cardnumber | html %]" |
| 888 |
maxlength="[% maxlength_cardnumber | html %]" |
| 889 |
/> |
| 890 |
[% IF mandatorycardnumber %] |
| 891 |
<span class="required">Required</span> |
| 892 |
[% END %] |
| 893 |
<span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span> |
| 894 |
<div class="hint">Card number must be exactly [% minlength_cardnumber | html %] characters.</div> |
| 895 |
[% ELSIF minlength_cardnumber && maxlength_cardnumber %] |
| 896 |
<input |
| 897 |
type="text" |
| 898 |
id="cardnumber" |
| 899 |
name="cardnumber" |
| 900 |
size="20" |
| 901 |
value="[% borrower_data.cardnumber | html %]" |
| 902 |
minlength="[% minlength_cardnumber | html %]" |
| 903 |
maxlength="[% maxlength_cardnumber | html %]" |
| 904 |
/> |
| 905 |
[% IF mandatorycardnumber %] |
| 906 |
<span class="required">Required</span> |
| 907 |
[% END %] |
| 908 |
<span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span> |
| 909 |
<div class="hint">Card number must be between [% minlength_cardnumber | html %] and [% maxlength_cardnumber | html %] characters.</div> |
| 910 |
[% ELSIF maxlength_cardnumber %] |
| 911 |
<input type="text" id="cardnumber" name="cardnumber" size="20" value="[% borrower_data.cardnumber | html %]" maxlength="[% maxlength_cardnumber | html %]" /> |
| 912 |
[% IF mandatorycardnumber %] |
| 913 |
<span class="required">Required</span> |
| 914 |
[% END %] |
| 915 |
<span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber | html %] characters.</span> |
| 916 |
<div class="hint">Card number can be up to [% maxlength_cardnumber | html %] characters.</div> |
| 917 |
[% ELSE %] |
| 918 |
<input type="text" id="cardnumber" name="cardnumber" size="20" value="[% borrower_data.cardnumber | html %]" /> |
| 919 |
[% IF mandatorycardnumber %] |
| 920 |
<span class="required">Required</span> |
| 921 |
[% END %] |
| 922 |
<div class="hint">There is no minimum or maximum character length.</div> |
| 923 |
[% END %] |
| 924 |
[% IF autoMemberNum %] |
| 925 |
[% IF mandatorycardnumber %] |
| 926 |
<div class="hint"><span class="error">autoMemberNum is set to enabled, but card number is marked as mandatory in BorrowerMandatoryField: auto calc has been disabled.</span></div> |
| 927 |
[% ELSE %] |
| 928 |
<div class="hint">Leave blank for auto calc during registration</div> |
| 929 |
[% END %] |
| 930 |
[% END %] |
| 931 |
</li> |
| 932 |
[% END # /UNLESS nocardnumber %] |
| 933 |
|
| 934 |
[% UNLESS nobranchcode %] |
| 935 |
<li> |
| 936 |
<label for="libraries" class="required">Library:</label> |
| 937 |
<select name="branchcode" id="libraries"> |
| 938 |
[% PROCESS options_for_libraries libraries => Branches.all( selected => userbranch, only_from_group => 1 ) %] |
| 939 |
</select> |
| 940 |
<span class="required">Required</span> |
| 941 |
</li> |
| 942 |
[% END %] |
| 943 |
|
| 944 |
<li> |
| 945 |
<label for="categorycode_entry" class="required">Category: </label> |
| 946 |
<select id="categorycode_entry" name="categorycode"> |
| 947 |
[% FOREACH category_type IN patron_categories.keys.sort %] |
| 948 |
[% SET optgroup_label = t("Unknown") %] |
| 949 |
[% SWITCH category_type %] |
| 950 |
[% CASE 'C' %] |
| 951 |
[% optgroup_label = t("Child") %] |
| 952 |
[% CASE 'A' %] |
| 953 |
[% optgroup_label = t("Adult") %] |
| 954 |
[% CASE 'S' %] |
| 955 |
[% optgroup_label = t("Staff") %] |
| 956 |
[% CASE 'I' %] |
| 957 |
[% optgroup_label = t("Organization") %] |
| 958 |
[% CASE 'P' %] |
| 959 |
[% optgroup_label = t("Professional") %] |
| 960 |
[% CASE 'X' %] |
| 961 |
[% optgroup_label = t("Statistical") %] |
| 962 |
[% END %] |
| 963 |
<optgroup label="[% optgroup_label | html %]"> |
| 964 |
[% FOREACH category IN patron_categories.$category_type %] |
| 965 |
[% IF category.categorycode == patron_category.categorycode %] |
| 966 |
<option |
| 967 |
value="[% category.categorycode | html %]" |
| 968 |
selected="selected" |
| 969 |
data-pwd-length="[% category.effective_min_password_length | html %]" |
| 970 |
data-pwd-strong="[% category.effective_require_strong_password | html %]" |
| 971 |
data-typename="[% category_type | html %]" |
| 972 |
>[% category.description | html %]</option |
| 973 |
> |
| 974 |
[% ELSE %] |
| 975 |
<option |
| 976 |
value="[% category.categorycode | html %]" |
| 977 |
data-pwd-length="[% category.effective_min_password_length | html %]" |
| 978 |
data-pwd-strong="[% category.effective_require_strong_password | html %]" |
| 979 |
data-typename="[% category_type | html %]" |
| 980 |
>[% category.description | html %]</option |
| 981 |
> |
| 982 |
[% END %] |
| 983 |
[% END %] |
| 984 |
</optgroup> |
| 985 |
[% END %] |
| 986 |
</select> |
| 987 |
[% IF limited_category %] |
| 988 |
<span title="The patron's current category ([% patron_category.description | html %]) is limited to other libraries"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i></span> |
| 989 |
[% END %] |
| 990 |
<span class="required">Required</span> |
| 991 |
</li> |
| 992 |
|
| 993 |
[% UNLESS nosort1 %] |
| 994 |
<li> |
| 995 |
<label for="sort1" [% IF mandatorysort1 %]class="required"[% END %]> Sort 1: </label> |
| 996 |
[% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=borrower_data.sort1, empty=1, size = 20 %] |
| 997 |
[% IF ( mandatorysort1 ) %] |
| 998 |
<span class="required">Required</span> |
| 999 |
[% END %] |
| 1000 |
</li> |
| 1001 |
[% END # /UNLESS nosort1 %] |
| 1002 |
|
| 1003 |
[% UNLESS nosort2 %] |
| 1004 |
<li> |
| 1005 |
<label for="sort2" [% IF mandatorysort2 %]class="required"[% END %]> Sort 2: </label> |
| 1006 |
[% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=borrower_data.sort2, empty=1, size = 20 %] |
| 1007 |
[% IF ( mandatorysort2 ) %] |
| 1008 |
<span class="required">Required</span> |
| 1009 |
[% END %] |
| 1010 |
</li> |
| 1011 |
[% END # /UNLESS nosort2 %] |
| 1012 |
|
| 1013 |
[% UNLESS noautorenew_checkouts %] |
| 1014 |
<li class="radio"> |
| 1015 |
<label for="yes-autorenew_checkouts"> Allow auto-renewal of items: </label> |
| 1016 |
[% IF ( borrower_data.autorenew_checkouts || op == 'add_form' ) %] |
| 1017 |
<label for="yes-autorenew_checkouts"> |
| 1018 |
Yes |
| 1019 |
<input type="radio" id="yes-autorenew_checkouts" name="autorenew_checkouts" value="1" checked="checked" /> |
| 1020 |
</label> |
| 1021 |
<label for="no-autorenew_checkouts"> |
| 1022 |
No |
| 1023 |
<input type="radio" id="no-autorenew_checkouts" name="autorenew_checkouts" value="0" /> |
| 1024 |
</label> |
| 1025 |
[% ELSE %] |
| 1026 |
<label for="yes-autorenew_checkouts"> |
| 1027 |
Yes |
| 1028 |
<input type="radio" id="yes-autorenew_checkouts" name="autorenew_checkouts" value="1" /> |
| 1029 |
</label> |
| 1030 |
<label for="no-autorenew_checkouts"> |
| 1031 |
No |
| 1032 |
<input type="radio" id="no-autorenew_checkouts" name="autorenew_checkouts" value="0" checked="checked" /> |
| 1033 |
</label> |
| 1034 |
[% END %] |
| 1035 |
</li> |
| 1036 |
[% END %] |
| 1037 |
|
| 1038 |
[% UNLESS noprotected || !CanUpdateProtectPatron %] |
| 1039 |
<li class="radio"> |
| 1040 |
<label for="protected">Protected:</label> |
| 1041 |
[% IF ( patron.protected == 1 ) %] |
| 1042 |
<label for="yes-protected"> |
| 1043 |
Yes |
| 1044 |
<input type="radio" id="yes-protected" name="protected" value="1" checked="checked" /> |
| 1045 |
</label> |
| 1046 |
<label for="no-protected"> |
| 1047 |
No |
| 1048 |
<input type="radio" id="no-protected" name="protected" value="0" /> |
| 1049 |
</label> |
| 1050 |
[% ELSE %] |
| 1051 |
<label for="yes-protected"> |
| 1052 |
Yes |
| 1053 |
<input type="radio" id="yes-protected" name="protected" value="1" /> |
| 1054 |
</label> |
| 1055 |
<label for="no-protected"> |
| 1056 |
No |
| 1057 |
<input type="radio" id="no-protected" name="protected" value="0" checked="checked" /> |
| 1058 |
</label> |
| 1059 |
[% END %] |
| 1060 |
</li> |
| 1061 |
[% END %] |
| 1062 |
|
| 1063 |
[% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %] |
| 1064 |
<li> |
| 1065 |
<label for="checkprevcheckout">Check for previous checkouts: </label> |
| 1066 |
<select name="checkprevcheckout" id="checkprevcheckout"> |
| 1067 |
[% IF ( borrower_data.checkprevcheckout == 'yes' ) %] |
| 1068 |
<option value="yes" selected="selected">Yes if settings allow it</option> |
| 1069 |
<option value="no">No if settings allow it</option> |
| 1070 |
<option value="inherit">Inherit from settings</option> |
| 1071 |
[% ELSIF ( borrower_data.checkprevcheckout == 'no' ) %] |
| 1072 |
<option value="yes">Yes if settings allow it</option> |
| 1073 |
<option value="no" selected="selected">No if settings allow it</option> |
| 1074 |
<option value="inherit">Inherit from settings</option> |
| 1075 |
[% ELSE %] |
| 1076 |
<option value="yes">Yes if settings allow it</option> |
| 1077 |
<option value="no">No if settings allow it</option> |
| 1078 |
<option value="inherit" selected="selected">Inherit from settings</option> |
| 1079 |
[% END %] |
| 1080 |
</select> |
| 1081 |
</li> |
| 1082 |
[% END # /IF ( Koha.Preference('CheckPrevCheckout') %] |
| 1083 |
|
| 1084 |
[% IF Koha.Preference('TranslateNotices') %] |
| 1085 |
<li> |
| 1086 |
<label for="lang">Preferred language for notices: </label> |
| 1087 |
<select id="lang" name="lang"> |
| 1088 |
<option value="default">Default</option> |
| 1089 |
[% FOR language IN languages %] |
| 1090 |
[% FOR sublanguage IN language.sublanguages_loop %] |
| 1091 |
[% IF language.plural %] |
| 1092 |
[% IF sublanguage.rfc4646_subtag == borrower_data.lang %] |
| 1093 |
<option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected" |
| 1094 |
>[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option |
| 1095 |
> |
| 1096 |
[% ELSE %] |
| 1097 |
<option value="[% sublanguage.rfc4646_subtag | html %]" |
| 1098 |
>[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option |
| 1099 |
> |
| 1100 |
[% END %] |
| 1101 |
[% ELSE %] |
| 1102 |
[% IF sublanguage.rfc4646_subtag == borrower_data.lang %] |
| 1103 |
<option value="[% sublanguage.rfc4646_subtag | html %]" selected="selected">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option> |
| 1104 |
[% ELSE %] |
| 1105 |
<option value="[% sublanguage.rfc4646_subtag | html %]">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</option> |
| 1106 |
[% END %] |
| 1107 |
[% END # /IF language.plural %] |
| 1108 |
[% END # /FOR sublanguage %] |
| 1109 |
[% END #/FOR language %] |
| 1110 |
</select> |
| 1111 |
<!-- /#lang --> |
| 1112 |
</li> |
| 1113 |
[% END #/IF Koha.Preference('TranslateNotices') %] |
| 1114 |
</ol> |
| 1115 |
</fieldset> |
| 1116 |
<!-- /#memberentry_library_management --> |
| 1117 |
|
| 1118 |
[% UNLESS nodateenrolled && noopacnote && noborrowernotes %] |
| 1119 |
<fieldset class="rows" id="memberentry_subscription"> |
| 1120 |
<legend class="expanded" id="library_setup_lgd"> |
| 1121 |
<i class="fa fa-caret-down" aria-hidden="true"></i> |
| 1122 |
Library setup |
| 1123 |
</legend> |
| 1124 |
<ol> |
| 1125 |
[% UNLESS nodateenrolled %] |
| 1126 |
<li> |
| 1127 |
<label for="from" [% IF mandatorydateenrolled %]class="required"[% END %]> Registration date: </label> |
| 1128 |
<input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% borrower_data.dateenrolled | html %]" class="flatpickr" data-date_to="to" /> |
| 1129 |
[% IF ( mandatorydateenrolled ) %] |
| 1130 |
<span class="required">Required</span> |
| 1131 |
[% END %] |
| 1132 |
[% IF ( ERROR_dateenrolled ) %] |
| 1133 |
<span class="required">(Error)</span> |
| 1134 |
[% END %] |
| 1135 |
<div class="hint">[% INCLUDE 'date-format.inc' %]</div> |
| 1136 |
</li> |
| 1137 |
[% END # /UNLESS nodateenrolled %] |
| 1138 |
|
| 1139 |
<li [% IF nodateexpiry %]style="display:none"[% END %]> |
| 1140 |
<label for="to" [% IF mandatorydateexpiry %]class="required"[% END %]> Expiry date (leave blank for auto calc): </label> |
| 1141 |
[% UNLESS ( op == 'add_form' ) %] |
| 1142 |
<input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% borrower_data.dateexpiry | html UNLESS op == 'duplicate' %]" class="flatpickr" /> |
| 1143 |
[% ELSE %] |
| 1144 |
<input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% borrower_data.dateexpiry | html %]" class="flatpickr" /> |
| 1145 |
[% END %] |
| 1146 |
[% IF ( mandatorydateexpiry ) %] |
| 1147 |
<span class="required">Required</span> |
| 1148 |
[% END %] |
| 1149 |
[% IF ( ERROR_dateexpiry ) %] |
| 1150 |
<span class="required">(Error)</span> |
| 1151 |
[% END %] |
| 1152 |
<div class="hint">[% INCLUDE 'date-format.inc' %]</div> |
| 1153 |
</li> |
| 1154 |
|
| 1155 |
[% UNLESS noopacnote %] |
| 1156 |
<li> |
| 1157 |
<label for="opacnote" [% IF mandatoryopacnote %]class="required"[% END %]> OPAC note: </label> |
| 1158 |
<textarea id="opacnote" name="opacnote" cols="55" rows="5">[% borrower_data.opacnote | html UNLESS op == 'duplicate' %]</textarea> |
| 1159 |
<div class="hint">This message appears on this patron's user page in the OPAC</div> |
| 1160 |
[% IF ( mandatoryopacnote ) %] |
| 1161 |
<span class="required">Required</span> |
| 1162 |
[% END %] |
| 1163 |
</li> |
| 1164 |
[% END # /UNLESS noopacnote %] |
| 1165 |
|
| 1166 |
[% UNLESS noborrowernotes %] |
| 1167 |
<li> |
| 1168 |
<label for="borrowernotes" [% IF mandatoryborrowernotes %]class="required"[% END %]> Circulation note: </label> |
| 1169 |
<textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% borrower_data.borrowernotes | $raw UNLESS op == 'duplicate' %]</textarea> |
| 1170 |
<div class="hint">This message displays when checking out to this patron</div> |
| 1171 |
[% IF ( mandatoryborrowernotes ) %] |
| 1172 |
<span class="required">Required</span> |
| 1173 |
[% END %] |
| 1174 |
</li> |
| 1175 |
[% END # /UNLESS noborrowernotes %] |
| 1176 |
</ol> |
| 1177 |
</fieldset> |
| 1178 |
<!-- /#memberentry_subscription --> |
| 1179 |
[% END # hide fieldset %] |
| 1180 |
|
| 1181 |
[% UNLESS nouserid && nopassword && !CanUpdatePasswordExpiration %] |
| 1182 |
<fieldset class="rows" id="memberentry_userid"> |
| 1183 |
<legend class="expanded" id="opac_staff_login_lgd"> |
| 1184 |
<i class="fa fa-caret-down" aria-hidden="true"></i> |
| 1185 |
OPAC/Staff interface login |
| 1186 |
</legend> |
| 1187 |
<ol> |
| 1188 |
[% UNLESS nouserid %] |
| 1189 |
<li> |
| 1190 |
<label for="userid" [% IF mandatoryuserid %]class="required"[% END %]> Username: </label> |
| 1191 |
|
| 1192 |
[% IF ( NoUpdateLogin ) %] |
| 1193 |
[% IF ( op == 'duplicate' ) %] |
| 1194 |
<input type="text" id="userid" name="userid" size="20" disabled="disabled" /> |
| 1195 |
[% ELSE %] |
| 1196 |
<input type="text" id="userid" name="userid" size="20" disabled="disabled" value="[% borrower_data.userid | html %]" /> |
| 1197 |
[% END %] |
| 1198 |
[% ELSE %] |
| 1199 |
[% IF ( op == 'duplicate' ) %] |
| 1200 |
<input type="text" id="userid" name="userid" size="20" value="" /> |
| 1201 |
[% ELSE %] |
| 1202 |
<input type="text" id="userid" name="userid" size="20" value="[% borrower_data.userid | html %]" /> |
| 1203 |
[% END %] |
| 1204 |
[% END # /IF ( NoUpdateLogin ) %] |
| 1205 |
|
| 1206 |
[%# Dummy input to avoid Firefox from using userid/password saved for authentication %] |
| 1207 |
<input type="text" disabled="disabled" style="display:none" /> |
| 1208 |
|
| 1209 |
[% IF ( mandatoryuserid ) %] |
| 1210 |
<span class="required">Required</span> |
| 1211 |
[% END %] |
| 1212 |
</li> |
| 1213 |
[% END # /UNLESS nouserid %] |
| 1214 |
|
| 1215 |
[% UNLESS nopassword %] |
| 1216 |
<li> |
| 1217 |
<label for="password" [% IF mandatorypassword %]class="required"[% END %]> Password: </label> |
| 1218 |
[% IF ( op == 'add_form' ) %] |
| 1219 |
[% IF ( NoUpdateLogin ) %] |
| 1220 |
[% IF ( op == 'duplicate' ) %] |
| 1221 |
<input type="password" id="password" name="password" size="20" disabled="disabled" /> |
| 1222 |
[% ELSE %] |
| 1223 |
<input type="password" id="password" name="password" size="20" disabled="disabled" value="[% borrower_data.password | html %]" /> |
| 1224 |
[% END %] |
| 1225 |
[% ELSE %] |
| 1226 |
[% IF ( op == 'duplicate' ) %] |
| 1227 |
<input type="password" id="password" name="password" size="20" autocomplete="new-password" /> |
| 1228 |
[% ELSE %] |
| 1229 |
<input type="password" id="password" name="password" size="20" autocomplete="new-password" value="[% borrower_data.password | html %]" /> |
| 1230 |
[% END %] |
| 1231 |
[% END # /IF ( NoUpdateLogin ) %] |
| 1232 |
[% ELSE # IF ( op == 'add_form' ) %] |
| 1233 |
|
| 1234 |
[% IF ( borrower_data.password ) %] |
| 1235 |
[% IF ( NoUpdateLogin ) %] |
| 1236 |
<input type="password" id="password" name="password" size="20" disabled="disabled" value="****" /> |
| 1237 |
[% ELSE %] |
| 1238 |
[% IF ( op == 'duplicate' ) %] |
| 1239 |
<input type="password" id="password" name="password" autocomplete="new-password" size="20" /> |
| 1240 |
[% ELSE %] |
| 1241 |
<input type="password" id="password" name="password" size="20" value="****" /> |
| 1242 |
[% END %] |
| 1243 |
[% END %] |
| 1244 |
[% ELSE %] |
| 1245 |
[% IF ( NoUpdateLogin ) %] |
| 1246 |
<input type="password" id="password" name="password" size="20" disabled="disabled" value="" /> |
| 1247 |
[% ELSE %] |
| 1248 |
<input type="password" id="password" name="password" size="20" autocomplete="new-password" value="" /> |
| 1249 |
[% END %] |
| 1250 |
[% END # /IF ( password ) %] |
| 1251 |
[% END # /IF ( op == 'add_form' ) %] |
| 1252 |
[% IF ( mandatorypassword ) %] |
| 1253 |
<span class="required">Required</span> |
| 1254 |
[% END %] |
| 1255 |
[% IF ( ERROR_password_too_short ) %] |
| 1256 |
<span class="required">Password is too short</span> |
| 1257 |
[% END %] |
| 1258 |
[% IF ( ERROR_password_too_weak ) %] |
| 1259 |
<span class="required">Password is too weak</span> |
| 1260 |
[% END %] |
| 1261 |
[% IF ( ERROR_password_has_whitespaces ) %] |
| 1262 |
<span class="required">Password has leading or trailing whitespaces</span> |
| 1263 |
[% END %] |
| 1264 |
<div class="hint">Minimum password length: [% patron.category.effective_min_password_length | html %]</div> |
| 1265 |
</li> |
| 1266 |
|
| 1267 |
<li> |
| 1268 |
<label for="password2" [% IF mandatorypassword %]class="required"[% END %]> Confirm password: </label> |
| 1269 |
[% IF ( op == 'add_form' ) %] |
| 1270 |
[% IF ( NoUpdateLogin ) %] |
| 1271 |
[% IF ( op == 'duplicate' ) %] |
| 1272 |
<input type="password" id="password2" name="password2" size="20" disabled="disabled" /> |
| 1273 |
[% ELSE %] |
| 1274 |
<input type="password" id="password2" name="password2" size="20" disabled="disabled" value="[% borrower_data.password | html %]" /> |
| 1275 |
[% END %] |
| 1276 |
[% ELSE %] |
| 1277 |
[% IF ( op == 'duplicate' ) %] |
| 1278 |
<input type="password" id="password2" name="password2" size="20" /> |
| 1279 |
[% ELSE %] |
| 1280 |
<input type="password" id="password2" name="password2" size="20" value="[% borrower_data.password | html %]" /> |
| 1281 |
[% END %] |
| 1282 |
[% END %] |
| 1283 |
[% ELSE # IF ( op == 'add_form' ) %] |
| 1284 |
[% IF ( borrower_data.password ) %] |
| 1285 |
[% IF ( NoUpdateLogin ) %] |
| 1286 |
<input type="password" id="password2" name="password2" size="20" disabled="disabled" value="****" /> |
| 1287 |
[% ELSE %] |
| 1288 |
[% IF ( op == 'duplicate' ) %] |
| 1289 |
<input type="password" id="password2" name="password2" size="20" /> |
| 1290 |
[% ELSE %] |
| 1291 |
<input type="password" id="password2" name="password2" size="20" value="****" /> |
| 1292 |
[% END %] |
| 1293 |
[% END %] |
| 1294 |
[% ELSE %] |
| 1295 |
[% IF ( NoUpdateLogin ) %] |
| 1296 |
<input type="password" id="password2" name="password2" size="20" disabled="disabled" value="" /> |
| 1297 |
[% ELSE %] |
| 1298 |
<input type="password" id="password2" name="password2" size="20" value="" /> |
| 1299 |
[% END %] |
| 1300 |
[% END %] |
| 1301 |
[% END # /IF ( op == 'add_form' ) %] |
| 1302 |
|
| 1303 |
[% IF ( mandatorypassword ) %] |
| 1304 |
<span class="required">Required</span> |
| 1305 |
[% END %] |
| 1306 |
[% IF ( ERROR_password_mismatch ) %] |
| 1307 |
<span class="required">Passwords do not match</span> |
| 1308 |
[% END %] |
| 1309 |
</li> |
| 1310 |
[% END # /UNLESS nopassword %] |
| 1311 |
[% UNLESS ( !CanUpdatePasswordExpiration ) %] |
| 1312 |
<li> |
| 1313 |
<label for="password_expiration_date">Password expiration date:</label> |
| 1314 |
<input type="text" id="password_expiration_date" name="password_expiration_date" maxlength="10" size="10" value="[% borrower_data.password_expiration_date | html %]" class="flatpickr" /> |
| 1315 |
</li> |
| 1316 |
[% END %] |
| 1317 |
</ol> |
| 1318 |
</fieldset> |
| 1319 |
<!-- /#memberentry_userid --> |
| 1320 |
[% END # UNLESS nouserid && nopassword && !CanUpdatePasswordExpiration %] |
| 1321 |
|
| 1322 |
<!--this zones are not necessary in modif mode --> |
| 1323 |
[% UNLESS ( op == 'add_form' || op == 'duplicate' || ( nogonenoaddress && nolost ) ) %] |
| 1324 |
<fieldset class="rows" id="memberentry_account_flags"> |
| 1325 |
<legend class="expanded" id="account_flags_lgd"> |
| 1326 |
<i class="fa fa-caret-down" aria-hidden="true"></i> |
| 1327 |
Patron account flags |
| 1328 |
</legend> |
| 1329 |
<p>Setting a value here will prevent patron from circulating materials and placing holds on the OPAC</p> |
| 1330 |
<ol class="radio"> |
| 1331 |
[% UNLESS nogonenoaddress %] |
| 1332 |
<li> |
| 1333 |
<label class="radio [% IF mandatorygonenoaddress %]required[% END %]" for="yesgonenoaddress"> Gone no address: </label> |
| 1334 |
[% IF CAN_user_circulate_manage_restrictions %] |
| 1335 |
<label for="yesgonenoaddress"> |
| 1336 |
[% IF ( borrower_data.gonenoaddress ) %] |
| 1337 |
<input type="radio" id="yesgonenoaddress" name="gonenoaddress" value="1" checked="checked" /> |
| 1338 |
[% ELSE %] |
| 1339 |
<input type="radio" id="yesgonenoaddress" name="gonenoaddress" value="1" /> |
| 1340 |
[% END %] |
| 1341 |
Yes |
| 1342 |
</label> |
| 1343 |
<label for="nogonenoaddress"> |
| 1344 |
[% IF ( borrower_data.gonenoaddress ) %] |
| 1345 |
<input type="radio" id="nogonenoaddress" name="gonenoaddress" value="0" /> |
| 1346 |
[% ELSE %] |
| 1347 |
<input type="radio" id="nogonenoaddress" name="gonenoaddress" value="0" checked="checked" /> |
| 1348 |
[% END %] |
| 1349 |
No |
| 1350 |
</label> |
| 1351 |
[% ELSE %] |
| 1352 |
[% IF borrower_data.gonenoaddress %]<span>Yes</span>[% ELSE %]<span>No</span>[% END %] |
| 1353 |
[% END # /IF CAN_user_circulate_manage_restrictions %] |
| 1354 |
[% IF mandatorygonenoaddress %] |
| 1355 |
<span class="required">Required</span> |
| 1356 |
[% END %] |
| 1357 |
</li> |
| 1358 |
[% END # /UNLESS nogonenoaddress %] |
| 1359 |
[% UNLESS nolost %] |
| 1360 |
<li> |
| 1361 |
<label class="radio [% IF mandatorylost %]required[% END %]" for="yeslost"> Lost card: </label> |
| 1362 |
[% IF CAN_user_circulate_manage_restrictions %] |
| 1363 |
<label for="yeslost"> |
| 1364 |
[% IF ( borrower_data.lost ) %] |
| 1365 |
<input type="radio" id="yeslost" name="lost" value="1" checked="checked" /> |
| 1366 |
[% ELSE %] |
| 1367 |
<input type="radio" id="yeslost" name="lost" value="1" /> |
| 1368 |
[% END %] |
| 1369 |
Yes |
| 1370 |
</label> |
| 1371 |
<label for="nolost"> |
| 1372 |
[% IF ( borrower_data.lost ) %] |
| 1373 |
<input type="radio" id="nolost" name="lost" value="0" /> |
| 1374 |
[% ELSE %] |
| 1375 |
<input type="radio" id="nolost" name="lost" value="0" checked="checked" /> |
| 1376 |
[% END %] |
| 1377 |
No |
| 1378 |
</label> |
| 1379 |
[% ELSE %] |
| 1380 |
[% IF borrower_data.lost %]<span>Yes</span>[% ELSE %]<span>No</span>[% END %] |
| 1381 |
[% END # /IF CAN_user_circulate_manage_restrictions %] |
| 1382 |
[% IF mandatorylost %] |
| 1383 |
<span class="required">Required</span> |
| 1384 |
[% END %] |
| 1385 |
</li> |
| 1386 |
[% END # /UNLESS nogonenoaddress %] |
| 1387 |
</ol> |
| 1388 |
</fieldset> |
| 1389 |
<!-- /#memberentry_account_flags --> |
| 1390 |
[% END %] |
| 1391 |
<fieldset class="rows" id="memberentry_restrictions"> |
| 1392 |
<legend class="expanded" id="restrictions_lgd"> |
| 1393 |
<i class="fa fa-caret-down" aria-hidden="true"></i> |
| 1394 |
Patron restrictions |
| 1395 |
</legend> |
| 1396 |
[% IF ( patron.restrictions.count ) %] |
| 1397 |
<table> |
| 1398 |
<thead> |
| 1399 |
<tr> |
| 1400 |
<th>Type</th> |
| 1401 |
<th>Comment</th> |
| 1402 |
<th>Expiration</th> |
| 1403 |
<th>[% tp('patron restriction created on', 'Created') | html %]</th> |
| 1404 |
[% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %] |
| 1405 |
<th>Remove?</th> |
| 1406 |
[% END %] |
| 1407 |
</tr> |
| 1408 |
</thead> |
| 1409 |
<tbody> |
| 1410 |
[% FOREACH restriction IN patron.restrictions %] |
| 1411 |
<tr> |
| 1412 |
<td>[% PROCESS restriction_type_description restriction_type=restriction.type %]</td> |
| 1413 |
<td> |
| 1414 |
[% IF restriction.comment.search('OVERDUES_PROCESS') %] |
| 1415 |
Restriction added by overdues process [% restriction.comment.remove('OVERDUES_PROCESS ') | $raw %] |
| 1416 |
[% ELSE %] |
| 1417 |
[% restriction.comment | $raw %] |
| 1418 |
[% END %] |
| 1419 |
</td> |
| 1420 |
<td> |
| 1421 |
[% IF restriction.expiration %] |
| 1422 |
[% restriction.expiration | $KohaDates %] |
| 1423 |
[% ELSE %] |
| 1424 |
<em>Indefinite</em> |
| 1425 |
[% END %] |
| 1426 |
</td> |
| 1427 |
<td>[% restriction.created | $KohaDates %]</td> |
| 1428 |
[% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %] |
| 1429 |
<td> |
| 1430 |
<input type="checkbox" id="debarment_[% restriction.borrower_debarment_id | html %]" name="remove_debarment" value="[% restriction.borrower_debarment_id | html %]" /> |
| 1431 |
</td> |
| 1432 |
[% END %] |
| 1433 |
</tr> |
| 1434 |
[% END # /FOREACH d %] |
| 1435 |
</tbody> |
| 1436 |
</table> |
| 1437 |
[% ELSE %] |
| 1438 |
<p>Patron is currently unrestricted.</p> |
| 1439 |
[% END # /IF ( patron.restrictions.count ) %] |
| 1440 |
|
| 1441 |
[% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %] |
| 1442 |
<p |
| 1443 |
><a href="#" id="add_manual_restriction"><i class="fa fa-plus"></i> Add manual restriction</a></p |
| 1444 |
> |
| 1445 |
<fieldset id="manual_restriction_form"> |
| 1446 |
<input type="hidden" id="add_debarment" name="add_debarment" value="0" /> |
| 1447 |
<legend id="manual_restriction_lgd">Add manual restriction</legend> |
| 1448 |
<ol> |
| 1449 |
[% IF Koha.Preference('PatronRestrictionTypes') %] |
| 1450 |
<li> |
| 1451 |
<label for="debarred_type">Type:</label> |
| 1452 |
<select name="debarred_type"> |
| 1453 |
[% FOREACH restriction_type IN restriction_types %] |
| 1454 |
[% IF !restriction_type.is_system %] |
| 1455 |
[% IF restriction_type.is_default %] |
| 1456 |
<option value="[% restriction_type.code | html %]" selected>[% PROCESS restriction_type_description %]</option> |
| 1457 |
[% ELSE %] |
| 1458 |
<option value="[% restriction_type.code | html %]">[% PROCESS restriction_type_description %]</option> |
| 1459 |
[% END %] |
| 1460 |
[% END %] |
| 1461 |
[% END %] |
| 1462 |
</select> |
| 1463 |
</li> |
| 1464 |
[% END %] |
| 1465 |
<li> |
| 1466 |
<label for="debarred_comment">Comment: </label> |
| 1467 |
<input type="text" id="debarred_comment" name="debarred_comment" /> |
| 1468 |
</li> |
| 1469 |
<li> |
| 1470 |
<label for="debarred_expiration">Expiration: </label> |
| 1471 |
<input name="debarred_expiration" id="debarred_expiration" size="10" value="" class="flatpickr" type="text" /> |
| 1472 |
<a href="#" id="clear_debarred_expiration">Clear date</a> |
| 1473 |
</li> |
| 1474 |
</ol> |
| 1475 |
<p> |
| 1476 |
<a class="cancel" id="cancel_manual_restriction" href="#">Cancel</a> |
| 1477 |
</p> |
| 1478 |
</fieldset> |
| 1479 |
<!-- /#manual_restriction_form --> |
| 1480 |
[% END # /IF CAN_user_borrowers_edit_borrowers %] |
| 1481 |
</fieldset> |
| 1482 |
<!-- /#memberentry_restrictions --> |
| 1483 |
[% END # /IF ( step_3 ) %] |
| 1484 |
|
| 1485 |
[% IF ( step_7 ) %] |
| 1486 |
[% IF Koha.Preference('HouseboundModule') %] |
| 1487 |
<fieldset class="rows" id="memberentry_housebound_roles"> |
| 1488 |
<legend class="expanded" id="housebound_roles"> |
| 1489 |
<i class="fa fa-caret-down" aria-hidden="true"></i> |
| 1490 |
Housebound roles |
| 1491 |
</legend> |
| 1492 |
<ol class="radio"> |
| 1493 |
<li> |
| 1494 |
<label class="radio" for="housebound_chooser"> Chooser: </label> |
| 1495 |
[% IF ( housebound_role.housebound_chooser == 1 ) %] |
| 1496 |
<label for="yes_housebound_chooser">Yes </label> |
| 1497 |
<input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" checked="checked" /> |
| 1498 |
<label for="no_housebound_chooser">No </label> |
| 1499 |
<input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" /> |
| 1500 |
[% ELSE %] |
| 1501 |
<label for="yes_housebound_chooser">Yes </label> |
| 1502 |
<input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" /> |
| 1503 |
<label for="no_housebound_chooser">No </label> |
| 1504 |
<input type="radio" id="no_housebound_chooser" name="housebound_chooser" value="0" checked="checked" /> |
| 1505 |
[% END %] |
| 1506 |
</li> |
| 1507 |
<li> |
| 1508 |
<label class="radio" for="housebound_deliverer">Deliverer:</label> |
| 1509 |
[% IF ( housebound_role.housebound_deliverer == 1 ) %] |
| 1510 |
<label for="yes_housebound_deliverer">Yes </label> |
| 1511 |
<input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" checked="checked" /> |
| 1512 |
<label for="no_housebound_deliverer">No </label> |
| 1513 |
<input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" /> |
| 1514 |
[% ELSE %] |
| 1515 |
<label for="yes_housebound_deliverer">Yes </label> |
| 1516 |
<input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" /> |
| 1517 |
<label for="no_housebound_deliverer">No </label> |
| 1518 |
<input type="radio" id="no_housebound_deliverer" name="housebound_deliverer" value="0" checked="checked" /> |
| 1519 |
[% END %] |
| 1520 |
</li> |
| 1521 |
</ol> |
| 1522 |
<!-- /ol.radio --> |
| 1523 |
</fieldset> |
| 1524 |
<!-- /#memberentry_housebound_roles --> |
| 1525 |
[% END # hide fieldset %] |
| 1526 |
[% END # IF step_7 %] |
| 1527 |
|
| 1528 |
[% IF ( step_4 ) %] |
| 1529 |
[% IF Koha.Preference('ExtendedPatronAttributes') %] |
| 1530 |
[% UNLESS ( no_patron_attribute_types ) %] |
| 1531 |
<fieldset class="rows" id="memberentry_patron_attributes"> |
| 1532 |
<legend class="expanded" id="patron_attributes_lgd"> |
| 1533 |
<i class="fa fa-caret-down" aria-hidden="true"></i> |
| 1534 |
Additional attributes and identifiers |
| 1535 |
</legend> |
| 1536 |
<input type="hidden" name="setting_extended_patron_attributes" value="1" /> |
| 1537 |
[% FOREACH pa_loo IN patron_attributes %] |
| 1538 |
<ol class="attributes_table"> |
| 1539 |
<div id="aai_[% pa_loo.class | html %]"> |
| 1540 |
[% IF pa_loo.class %] |
| 1541 |
<h3 id="[% pa_loo.class | html %]_lgd">[% pa_loo.lib | html %]</h3> |
| 1542 |
[% END %] |
| 1543 |
[% FOREACH patron_attribute IN pa_loo.items %] |
| 1544 |
<li data-category_code="[% patron_attribute.category_code | html %]" data-pa_code="[% patron_attribute.code | replace('[^a-zA-Z0-9_-]', '') %]"> |
| 1545 |
[% IF patron_attribute.mandatory %] |
| 1546 |
<label for="[% patron_attribute.form_id | html %]" class="required" required="required">[% patron_attribute.description | html %]: </label> |
| 1547 |
[% ELSE %] |
| 1548 |
<label for="[% patron_attribute.form_id | html %]">[% patron_attribute.description | html %]: </label> |
| 1549 |
[% END %] |
| 1550 |
[% IF ( patron_attribute.use_dropdown ) %] |
| 1551 |
<select id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]" [% IF patron_attribute.mandatory %]required="required"[% END %]> |
| 1552 |
<option value=""></option> |
| 1553 |
[% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %] |
| 1554 |
[% IF auth_val_loo.authorised_value == patron_attribute.value %] |
| 1555 |
<option value="[% auth_val_loo.authorised_value | html %]" selected="selected"> [% auth_val_loo.lib | html %] </option> |
| 1556 |
[% ELSE %] |
| 1557 |
<option value="[% auth_val_loo.authorised_value | html %]"> [% auth_val_loo.lib | html %] </option> |
| 1558 |
[% END %] |
| 1559 |
[% END %] |
| 1560 |
</select> |
| 1561 |
[% ELSE %] |
| 1562 |
[% IF patron_attribute.mandatory %] |
| 1563 |
[% IF patron_attribute.is_date %] |
| 1564 |
<input |
| 1565 |
type="text" |
| 1566 |
id="[% patron_attribute.form_id | html %]" |
| 1567 |
name="[% patron_attribute.form_id | html %]" |
| 1568 |
maxlength="10" |
| 1569 |
size="10" |
| 1570 |
value="[% patron_attribute.value | html %]" |
| 1571 |
required="required" |
| 1572 |
class="flatpickr" |
| 1573 |
/> |
| 1574 |
[% ELSE %] |
| 1575 |
<textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]" required="required"> |
| 1576 |
[% patron_attribute.value | html %]</textarea |
| 1577 |
> |
| 1578 |
[% END %] |
| 1579 |
[% ELSE %] |
| 1580 |
[% IF patron_attribute.is_date %] |
| 1581 |
<input |
| 1582 |
type="text" |
| 1583 |
id="[% patron_attribute.form_id | html %]" |
| 1584 |
name="[% patron_attribute.form_id | html %]" |
| 1585 |
maxlength="10" |
| 1586 |
size="10" |
| 1587 |
value="[% patron_attribute.value | html %]" |
| 1588 |
class="flatpickr" |
| 1589 |
/> |
| 1590 |
[% ELSE %] |
| 1591 |
<textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">[% patron_attribute.value | html %]</textarea> |
| 1592 |
[% END %] |
| 1593 |
[% END %] |
| 1594 |
[% END # /IF ( patron_attribute.use_dropdown ) %] |
| 1595 |
<input type="hidden" id="[% patron_attribute.form_id | html %]_code" name="[% patron_attribute.form_id | html %]_code" value="[% patron_attribute.code | html %]" /> |
| 1596 |
[% IF ( !patron_attribute.is_date ) %] |
| 1597 |
<a href="#" class="clear_attribute"><i class="fa fa-fw fa-trash-can"></i> Clear</a> |
| 1598 |
[% END %] |
| 1599 |
[% IF ( patron_attribute.repeatable ) %] |
| 1600 |
<a href="#" class="clone_attribute"><i class="fa fa-fw fa-plus"></i> New</a> |
| 1601 |
[% END %] |
| 1602 |
[% IF patron_attribute.mandatory %]<span class="required">Required</span>[% END %] |
| 1603 |
</li> |
| 1604 |
[% END # /FOREACH patron_attribute %] |
| 1605 |
</div> |
| 1606 |
</ol> |
| 1607 |
[% END # /FOREACH pa_loo %] |
| 1608 |
</fieldset> |
| 1609 |
<!-- /#memberentry_patron_attributes --> |
| 1610 |
[% END # UNLESS ( no_patron_attribute_types ) %] |
| 1611 |
[% END # IF Koha.Preference('ExtendedPatronAttributes') %] |
| 1612 |
[% END # IF ( step_4 ) %] |
| 1613 |
|
| 1614 |
[% IF ( step_5 ) %] |
| 1615 |
[% IF ( EnhancedMessagingPreferences ) %] |
| 1616 |
<fieldset class="rows" id="memberentry_messaging_prefs"> |
| 1617 |
<legend class="expanded" id="patron_messaging_prefs_lgd"> |
| 1618 |
<i class="fa fa-caret-down" aria-hidden="true"></i> |
| 1619 |
Patron messaging preferences |
| 1620 |
</legend> |
| 1621 |
<div id="messaging_prefs_loading" class="form-message" style="display:none"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading new messaging defaults </div> |
| 1622 |
<input type="hidden" name="setting_messaging_prefs" value="1" /> |
| 1623 |
[% INCLUDE 'messaging-preference-form.inc' %] |
| 1624 |
[% IF ( SMSSendDriver ) %] |
| 1625 |
[% IF !nosmsalertnumber %] |
| 1626 |
<p> |
| 1627 |
<label for="SMSnumber">SMS number:</label> |
| 1628 |
<input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber | html %]" /> |
| 1629 |
<span class="hint sms_number_help">Please enter numbers only. Prefix the number with + or 00 if including the country code.</span> |
| 1630 |
</p> |
| 1631 |
[% END %] |
| 1632 |
[% IF SMSSendDriver == 'Email' && !nosms_provider_id %] |
| 1633 |
<p> |
| 1634 |
<label for="sms_provider_id">SMS provider:</label> |
| 1635 |
<select id="sms_provider_id" name="sms_provider_id"> |
| 1636 |
<option value="">Unknown</option> |
| 1637 |
[% FOREACH s IN sms_providers %] |
| 1638 |
[% IF s.id == borrower_data.sms_provider_id %] |
| 1639 |
<option value="[% s.id | html %]" selected="selected">[% s.name | html %]</option> |
| 1640 |
[% ELSE %] |
| 1641 |
<option value="[% s.id | html %]">[% s.name | html %]</option> |
| 1642 |
[% END %] |
| 1643 |
[% END %] |
| 1644 |
</select> |
| 1645 |
</p> |
| 1646 |
[% END # /UNLESS nosms_provider_id %] |
| 1647 |
[% END # IF ( SMSSendDriver ) %] |
| 1648 |
</fieldset> |
| 1649 |
[% END # IF ( EnhancedMessagingPreferences ) %] |
| 1650 |
[% END # /IF step_5 %] |
| 1651 |
</form> |
| 1652 |
<!-- /#entryform --> |
| 1653 |
|
| 1654 |
[% IF quickadd && op == 'add_form' && !check_member %] |
| 1655 |
<form method="get" id="quick_add_form" class="toggler"> |
| 1656 |
<fieldset class="rows quick_add" |
| 1657 |
><legend>Quick add</legend> |
| 1658 |
<ol id="quick_add_list"> </ol> |
| 1659 |
</fieldset> |
| 1660 |
</form> |
| 1661 |
[% END %] |
| 1662 |
[% END # /UNLESS ( no_add ) %] |
| 1663 |
</main> |
| 1664 |
</div> |
| 1665 |
<!-- /.col-md-10.order-md-2 --> |
| 1666 |
|
| 1667 |
[% UNLESS ( op == 'add_form' ) %] |
| 1668 |
<div class="col-md-2 order-sm-2 order-md-1"> |
| 1669 |
<aside> [% INCLUDE 'circ-menu.inc' %] </aside> |
| 1670 |
</div> |
| 1671 |
<!-- /.col-md-2.order-md-1 --> |
| 1672 |
[% END %] |
| 1673 |
</div> |
| 1674 |
<!-- /.row --> |
| 1675 |
</div> |
| 1676 |
<!-- /.main.container-fluid --> |
| 1677 |
|
| 1678 |
[% MACRO jsinclude BLOCK %] |
| 1679 |
[% INCLUDE 'calendar.inc' %] |
| 1680 |
[% INCLUDE 'str/members-menu.inc' %] |
| 1681 |
[% Asset.js("js/members-menu.js") | $raw %] |
| 1682 |
<script> |
| 1683 |
function update_cardnumber_warning(size){ |
| 1684 |
var max_len = [% maxlength_cardnumber | html %]; |
| 1685 |
if ( size >= max_len ) { |
| 1686 |
$("#cn_max").show(); |
| 1687 |
} else { |
| 1688 |
$("#cn_max").hide(); |
| 1689 |
} |
| 1690 |
} |
| 1691 |
|
| 1692 |
function toggle_guarantor_field(rel_number){ |
| 1693 |
$(".relation-"+rel_number).prop('disabled', (i, v) => !v); |
| 1694 |
} |
| 1695 |
|
| 1696 |
function showHideFields(){ |
| 1697 |
$("#messaging_prefs_loading, #guarantor_template").hide(); |
| 1698 |
[% UNLESS step == 1 %] |
| 1699 |
[% IF fieldstohide.match('identity') %] |
| 1700 |
togglePanel( $("#identity_lgd") ); |
| 1701 |
[% END %] |
| 1702 |
[% IF show_guarantor || guarantor %] |
| 1703 |
[% IF fieldstohide.match('guarantor') %] |
| 1704 |
togglePanel( $("#patron_guarantor_lgd") ); |
| 1705 |
[% END %] |
| 1706 |
[% IF fieldstohide.match('nonpatron_guarantor') %] |
| 1707 |
togglePanel( $("#non_patron_guarantor_lgd") ); |
| 1708 |
[% END %] |
| 1709 |
[% END %] |
| 1710 |
[% IF fieldstohide.match('primary_address') %] |
| 1711 |
togglePanel( $("#main_address_lgd") ); |
| 1712 |
[% END %] |
| 1713 |
[% IF fieldstohide.match('primary_contact') %] |
| 1714 |
togglePanel( $("#contact_lgd") ); |
| 1715 |
[% END %] |
| 1716 |
[% END %] |
| 1717 |
[% UNLESS step == 6 %] |
| 1718 |
[% IF fieldstohide.match('alt_address') %] |
| 1719 |
togglePanel( $("#alt_address_lgd") ); |
| 1720 |
[% END %] |
| 1721 |
[% END %] |
| 1722 |
[% UNLESS step == 2 %] |
| 1723 |
[% IF fieldstohide.match('alt_contact') %] |
| 1724 |
togglePanel( $("#alt_contact_lgd") ); |
| 1725 |
[% END %] |
| 1726 |
[% END %] |
| 1727 |
[% UNLESS step == 3 %] |
| 1728 |
[% IF fieldstohide.match('lib_mgmt') %] |
| 1729 |
togglePanel( $("#library_management_lgd") ); |
| 1730 |
[% END %] |
| 1731 |
[% UNLESS nodateenrolled && noopacnote && noborrowernotes %] |
| 1732 |
[% IF fieldstohide.match('lib_setup') %] |
| 1733 |
togglePanel( $("#library_setup_lgd") ); |
| 1734 |
[% END %] |
| 1735 |
[% END %] |
| 1736 |
[% UNLESS nouserid && nopassword %] |
| 1737 |
[% IF fieldstohide.match('login') %] |
| 1738 |
togglePanel( $("#opac_staff_login_lgd") ); |
| 1739 |
[% END %] |
| 1740 |
[% END %] |
| 1741 |
[% UNLESS ( op == 'add_form' || op == 'duplicate' ) %] |
| 1742 |
[% IF fieldstohide.match('flags') %] |
| 1743 |
togglePanel( $("#account_flags_lgd") ); |
| 1744 |
[% END %] |
| 1745 |
[% END %] |
| 1746 |
[% IF fieldstohide.match('debarments') %] |
| 1747 |
togglePanel( $("#restrictions_lgd") ); |
| 1748 |
[% END %] |
| 1749 |
[% END %] |
| 1750 |
[% UNLESS step == 7 %] |
| 1751 |
[% IF Koha.Preference('HouseboundModule') %] |
| 1752 |
[% IF fieldstohide.match('housebound') %] |
| 1753 |
togglePanel( $("#housebound_roles") ); |
| 1754 |
[% END %] |
| 1755 |
[% END %] |
| 1756 |
[% END %] |
| 1757 |
[% UNLESS step == 4 %] |
| 1758 |
[% IF Koha.Preference('ExtendedPatronAttributes') %] |
| 1759 |
[% IF fieldstohide.match('additional') %] |
| 1760 |
togglePanel( $("#patron_attributes_lgd") ); |
| 1761 |
[% END %] |
| 1762 |
[% END %] |
| 1763 |
[% END %] |
| 1764 |
[% UNLESS step == 5 %] |
| 1765 |
[% IF Koha.Preference('EnhancedMessagingPreferences') %] |
| 1766 |
[% IF fieldstohide.match('messaging') %] |
| 1767 |
togglePanel( $("#patron_messaging_prefs_lgd") ); |
| 1768 |
$("#messaging_prefs_loading").toggle(); |
| 1769 |
[% END %] |
| 1770 |
[% END %] |
| 1771 |
[% END %] |
| 1772 |
} |
| 1773 |
|
| 1774 |
function togglePanel( node ){ |
| 1775 |
var panel = node.nextAll(); |
| 1776 |
if(panel.is(":visible")){ |
| 1777 |
node.addClass("collapsed").removeClass("expanded").attr("title", _("Click to expand this section") ); |
| 1778 |
panel.hide(); |
| 1779 |
} else { |
| 1780 |
node.addClass("expanded").removeClass("collapsed").attr("title", _("Click to collapse this section") ); |
| 1781 |
panel.show(); |
| 1782 |
panel.find("input, select, textarea").eq(0).focus(); |
| 1783 |
} |
| 1784 |
} |
| 1785 |
|
| 1786 |
$(document).ready(function() { |
| 1787 |
showHideFields(); |
| 1788 |
$("#toggle_hidden_fields").change(function(){ |
| 1789 |
showHideFields(); |
| 1790 |
}); |
| 1791 |
|
| 1792 |
$(".collapsed,.expanded").on("click",function(){ |
| 1793 |
togglePanel( $(this) ); |
| 1794 |
$("#messaging_prefs_loading").hide(); |
| 1795 |
$("#guarantor_template").hide(); |
| 1796 |
}); |
| 1797 |
|
| 1798 |
$("#saverecord").css({ 'margin-left': 0 }); |
| 1799 |
|
| 1800 |
[% IF borrower_data.categorycode %] |
| 1801 |
update_category_code( "[% borrower_data.categorycode | html %]" ); |
| 1802 |
[% ELSE %] |
| 1803 |
if ( $("#categorycode_entry").length > 0 ){ |
| 1804 |
var category_code = $("#categorycode_entry").find("option:selected").val(); |
| 1805 |
update_category_code( category_code ); |
| 1806 |
} |
| 1807 |
[% END %] |
| 1808 |
|
| 1809 |
[% IF new_guarantors %] |
| 1810 |
[% FOREACH g IN new_guarantors %] |
| 1811 |
select_user( '[% g.patron.borrowernumber | html %]', [% To.json( g.patron.unblessed ) | $raw %], '[% g.relationship | html %]' ); |
| 1812 |
[% END %] |
| 1813 |
[% END %] |
| 1814 |
|
| 1815 |
$("#cn_max").hide(); |
| 1816 |
var content; |
| 1817 |
$("#cardnumber").on("keydown", function(e){ |
| 1818 |
content = $(this).val(); |
| 1819 |
}); |
| 1820 |
$("#cardnumber").on("keyup", function(e){ |
| 1821 |
// .val() will return the value of the input after the key has been released |
| 1822 |
var l = $(this).val().length; |
| 1823 |
if ( l == content.length + 1 ) { l--; } |
| 1824 |
update_cardnumber_warning(l); |
| 1825 |
}); |
| 1826 |
$("#cardnumber").bind("paste", function(e){ |
| 1827 |
var pastedData = e.originalEvent.clipboardData.getData('text'); |
| 1828 |
update_cardnumber_warning(pastedData.length - 1); |
| 1829 |
} ); |
| 1830 |
var toggle_quick_add = $(".toggle_quick_add"); |
| 1831 |
$(toggle_quick_add).click(function(e){ |
| 1832 |
toggle_quick_add.toggle(); |
| 1833 |
e.preventDefault(); |
| 1834 |
var toggle_to = ''; |
| 1835 |
var toggle_from = ''; |
| 1836 |
if( $("#entryform:visible").length ) { |
| 1837 |
toggle_to = "#quick_add_form label"; |
| 1838 |
toggle_from = "#entryform label"; |
| 1839 |
$("#memberentry_guarantor").appendTo("#quick_add_form"); |
| 1840 |
} else { |
| 1841 |
toggle_to="#entryform label"; |
| 1842 |
toggle_from = "#quick_add_form label"; |
| 1843 |
$("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor"); |
| 1844 |
} |
| 1845 |
$(toggle_from).each(function() { |
| 1846 |
var input_label = $(this).attr('for'); |
| 1847 |
if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' || input_label == 'sex-other' ) { |
| 1848 |
$(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') ); |
| 1849 |
return; |
| 1850 |
} |
| 1851 |
$(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() ); |
| 1852 |
}); |
| 1853 |
|
| 1854 |
$(".toggler").toggle(); |
| 1855 |
}); |
| 1856 |
|
| 1857 |
$("#save_quick_add").click(function(){ |
| 1858 |
$("#quick_add_form").validate(); |
| 1859 |
if( $("#quick_add_form").valid()){ |
| 1860 |
$('.toggle_quick_add').click(); |
| 1861 |
$("#memberentry_guarantor").appendTo("#memberentry_guarantor_anchor"); |
| 1862 |
$('#saverecord').click(); |
| 1863 |
} |
| 1864 |
else {return false;} |
| 1865 |
}); |
| 1866 |
|
| 1867 |
$("#saverecord").click(function(){ |
| 1868 |
if( check_form_borrowers() ){ |
| 1869 |
$("#entryform").submit(); |
| 1870 |
} |
| 1871 |
}); |
| 1872 |
|
| 1873 |
$('#not-duplicate').on('click', function() { |
| 1874 |
$("input[name='nodouble']").val('1'); |
| 1875 |
$('#entryform').submit(); |
| 1876 |
}); |
| 1877 |
|
| 1878 |
$(".popup_patronview").on("click", function(e){ |
| 1879 |
e.preventDefault(); |
| 1880 |
var url = $(this).attr("href"); |
| 1881 |
openWindow( url, "patronview" ); |
| 1882 |
}); |
| 1883 |
|
| 1884 |
$("#dateofbirth").on("change", function(){ |
| 1885 |
write_age(); |
| 1886 |
}); |
| 1887 |
|
| 1888 |
$("#debarred_comment, #debarred_expiration").on("change", function(){ |
| 1889 |
$("#add_debarment").val(1); |
| 1890 |
}); |
| 1891 |
|
| 1892 |
$("#clear_debarred_expiration").on("click", function(e){ |
| 1893 |
e.preventDefault(); |
| 1894 |
$('#debarred_expiration').val(""); |
| 1895 |
}); |
| 1896 |
|
| 1897 |
$("#memberentry_patron_attributes").on("click", ".clear_attribute", function(e){ |
| 1898 |
e.preventDefault(); |
| 1899 |
clear_entry( this ); |
| 1900 |
}); |
| 1901 |
|
| 1902 |
$("#memberentry_patron_attributes").on("click", ".clone_attribute", function(e){ |
| 1903 |
e.preventDefault(); |
| 1904 |
clone_entry( this ); |
| 1905 |
}); |
| 1906 |
|
| 1907 |
$("#categorycode_entry").on("change", function(){ |
| 1908 |
update_category_code(this); |
| 1909 |
}); |
| 1910 |
|
| 1911 |
[% IF logged_in_user.borrowernumber == borrowernumber %] |
| 1912 |
$("#userid").on("change", function(){ |
| 1913 |
$(this).parent().find("div.hint").remove(); |
| 1914 |
if ( "[% borrower_data.userid | html %]" != $(this).val() ) { |
| 1915 |
$(this).parent().append('<div class="hint">%s</div>'.format(_("You will be logged out if you modify your username"))); |
| 1916 |
} |
| 1917 |
}); |
| 1918 |
[% END %] |
| 1919 |
|
| 1920 |
}); |
| 1921 |
|
| 1922 |
[% IF quickadd && op == 'add_form' && !check_member %] |
| 1923 |
$(document).ready(function () { |
| 1924 |
|
| 1925 |
$("#entryform,#saverecord").hide(); |
| 1926 |
[% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %] |
| 1927 |
var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field | html %]",[% END %]]; |
| 1928 |
$("#entryform label").each(function () { |
| 1929 |
var input_label = $(this).attr('for'); |
| 1930 |
if ( input_label == 'sex-female' ) { |
| 1931 |
input_label='sex'; |
| 1932 |
} |
| 1933 |
else if ( input_label == 'btitle' ) { |
| 1934 |
input_label='title'; |
| 1935 |
} |
| 1936 |
if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){ |
| 1937 |
let orig_li = $(this).parent(); |
| 1938 |
if( orig_li.attr('class') == 'radio' ){ |
| 1939 |
let new_field = orig_li.clone(); |
| 1940 |
new_field.children('label').each(function(){ |
| 1941 |
let child_input = $(this).children('input'); |
| 1942 |
child_input.attr("id",child_input.attr("id") + "_quick_add"); |
| 1943 |
}); |
| 1944 |
new_field.appendTo("#quick_add_list"); |
| 1945 |
} else { |
| 1946 |
let orig_input_id = orig_li.children("input,textarea,select").last().attr("id"); |
| 1947 |
if ( orig_input_id ) { |
| 1948 |
let new_field = orig_li.clone(); |
| 1949 |
new_field.children("#"+orig_input_id).attr("id",orig_input_id + "_quick_add"); |
| 1950 |
new_field.appendTo("#quick_add_list"); |
| 1951 |
} |
| 1952 |
[% UNLESS mandatorypassword %] |
| 1953 |
if( input_label == 'password' ){ |
| 1954 |
let orig_p2 = $("#entryform label[for='password2']").parent(); |
| 1955 |
let new_p2 = orig_p2.clone(); |
| 1956 |
new_p2.find('input[id="password2"]').attr("id","password2_quick_add"); |
| 1957 |
new_p2.appendTo("#quick_add_list"); |
| 1958 |
} |
| 1959 |
[% END %] |
| 1960 |
} |
| 1961 |
} |
| 1962 |
}); |
| 1963 |
if ( $("#memberentry_guarantor").length ) { |
| 1964 |
$("#memberentry_guarantor").appendTo("#quick_add_form"); |
| 1965 |
} |
| 1966 |
$("#quick_add_form").show(); |
| 1967 |
$("#quick_add_form").find(".flatpickr:hidden").each( (i, input) => { |
| 1968 |
$(input).siblings(".flatpickr_wrapper").remove(); // Remove leftover from the previous flatpickr that has been cloned |
| 1969 |
apply_flatpickr(input); |
| 1970 |
} ); |
| 1971 |
}); |
| 1972 |
[% END %] |
| 1973 |
$("#guarantor_template").hide(); |
| 1974 |
var prefill_fields; |
| 1975 |
var to_api_mapping; |
| 1976 |
[% IF prefill_fields %] |
| 1977 |
prefill_fields = [% To.json(prefill_fields) | $raw %]; |
| 1978 |
[% END %] |
| 1979 |
[% IF to_api_mapping %] |
| 1980 |
to_api_mapping = [% To.json(to_api_mapping) | $raw %]; |
| 1981 |
[% END %] |
| 1982 |
|
| 1983 |
var TalkingTechItivaPhoneNotification = [% Koha.Preference('TalkingTechItivaPhoneNotification') || 0 | html %]; |
| 1984 |
var PhoneNotification = [% Koha.Preference('PhoneNotification') || 0 | html %]; |
| 1985 |
</script> |
| 1986 |
[% Asset.js("js/members.js") | $raw %] |
| 1987 |
[% Asset.js("js/messaging-preference-form.js") | $raw %] |
| 1988 |
[% PROCESS 'password_check.inc' new_password => 'password', category_selector => '#categorycode_entry', minPasswordLength => patron.category.effective_min_password_length, RequireStrongPassword => patron.category.effective_require_strong_password %] |
| 1989 |
|
| 1990 |
[% INCLUDE 'select2.inc' %] |
| 1991 |
[% SET columns = ['cardnumber','name','category','branch','dateofbirth','address-library','action'] %] |
| 1992 |
[% PROCESS patron_search_modal columns => columns, modal_title => t("Add guarantor") %] |
| 1993 |
[% PROCESS patron_search_js columns => columns, actions => ["select"], preview_on_name_click => 1 %] |
| 1994 |
[% END %] |
| 1995 |
|
| 1996 |
[% INCLUDE 'intranet-bottom.inc' %] |