3 [% USE AuthorisedValues %]
8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>Update patron records › Patrons › Koha</title>
10 [% INCLUDE 'doc-head-close.inc' %]
13 <body id="pat_update" class="pat">
14 [% WRAPPER 'header.inc' %]
15 [% INCLUDE 'patron-search-header.inc' %]
18 [% BLOCK display_names %]
20 [% CASE 'branchcode' %]<span>Home library (branchcode)</span>
21 [% CASE 'surname' %]<span>Surname</span>
22 [% CASE 'firstname' %]<span>First name</span>
23 [% CASE 'middle_name' %]<span>Middle name</span>
24 [% CASE 'title' %]<span>Title</span>
25 [% CASE 'othernames' %]<span>Other names</span>
26 [% CASE 'initials' %]<span>Initials</span>
27 [% CASE 'pronouns' %]<span>Pronouns</span>
28 [% CASE 'streetnumber' %]<span>Street number</span>
29 [% CASE 'streettype' %]<span>Street type</span>
30 [% CASE 'address' %]<span>Address</span>
31 [% CASE 'address2' %]<span>Address 2</span>
32 [% CASE 'city' %]<span>City</span>
33 [% CASE 'state' %]<span>State</span>
34 [% CASE 'zipcode' %]<span>ZIP/Postal code</span>
35 [% CASE 'country' %]<span>Country</span>
36 [% CASE 'email' %]<span>Email</span>
37 [% CASE 'phone' %]<span>Primary phone</span>
38 [% CASE 'mobile' %]<span>Other phone</span>
39 [% CASE 'fax' %]<span>Fax</span>
40 [% CASE 'emailpro' %]<span>Secondary email</span>
41 [% CASE 'phonepro' %]<span>Secondary phone</span>
42 [% CASE 'B_streetnumber' %]<span>Alternate address: Street number</span>
43 [% CASE 'B_streettype' %]<span>Alternate address: Street type</span>
44 [% CASE 'B_address' %]<span>Alternate address: Address</span>
45 [% CASE 'B_address2' %]<span>Alternate address: Address 2</span>
46 [% CASE 'B_city' %]<span>Alternate address: City</span>
47 [% CASE 'B_state' %]<span>Alternate address: State</span>
48 [% CASE 'B_zipcode' %]<span>Alternate address: ZIP/Postal code</span>
49 [% CASE 'B_email' %]<span>Alternate address: Email</span>
50 [% CASE 'B_phone' %]<span>Alternate address: Phone</span>
51 [% CASE 'contactnote' %]<span>Alternate address: Contact note</span>
52 [% CASE 'dateofbirth' %]<span>Date of birth</span>
53 [% CASE 'contactname' %]<span>Contact: Last name</span>
54 [% CASE 'contactfirstname' %]<span>Contact: First name</span>
55 [% CASE 'contacttitle' %]<span>Contact: Title</span>
56 [% CASE 'relationship' %]<span>Contact: Relationship</span>
57 [% CASE 'sex' %]<span>Gender</span>
58 [% CASE 'autorenew_checkouts' %]<span>Auto-renewal</span>
59 [% CASE 'altcontactfirstname' %]<span>Alternate contact: First name</span>
60 [% CASE 'altcontactsurname' %]<span>Alternate contact: Surname</span>
61 [% CASE 'altcontactaddress1' %]<span>Alternate contact: Address</span>
62 [% CASE 'altcontactaddress2' %]<span>Alternate contact: Address 2</span>
63 [% CASE 'altcontactaddress3' %]<span>Alternate contact: City</span>
64 [% CASE 'altcontactstate' %]<span>Alternate contact: State</span>
65 [% CASE 'altcontactzipcode' %]<span>Alternate contact: ZIP/Postal code</span>
66 [% CASE 'altcontactcountry' %]<span>Alternate contact: Country</span>
67 [% CASE 'altcontactphone' %]<span>Alternate contact: Phone</span>
68 [% CASE 'smsalertnumber' %]<span>SMS alert number</span>
69 [% CASE 'extended_attributes' %]<span>Additional attributes and identifiers</span>
70 [% CASE %][% field | html %]
74 [% BLOCK display_extended_attributes %]
75 [% IF attrs and attrs.size > 1 %]
77 [% FOREACH attr IN attrs %]
78 <li>[% PROCESS display_attribute attr=attr type=type %]</li>
82 [% PROCESS display_attribute attr=attrs.0 type=type %]
86 [% BLOCK display_attribute %]
87 [% IF type.authorised_value_category %]
88 [% AuthorisedValues.GetByCode(type.authorised_value_category,attr.attribute) | html %]
90 [% attr.attribute | html %]
94 [% WRAPPER 'sub-header.inc' %]
95 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
98 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
101 <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
104 <a href="#" aria-current="page">
105 Update patron records
112 <div class="main container-fluid">
114 <div class="col-md-8 col-md-offset-2">
116 <h1>Update patron records</h1>
117 [% IF PendingModifications %]
118 <form method="post" action="members-update-do.pl">
119 <div id="pending_updates" class="panel-group" role="tablist" aria-multiselectable="true">
120 [% FOREACH pm IN PendingModifications %]
121 [% SET borrowernumber = pm.borrowernumber %]
122 <div class="panel panel-default">
123 <div class="panel-heading" role="tab" id="panel-header-[% pm.borrowernumber | html %]">
124 <h3 class="panel-title">
125 <a role="button" class="collapsed" data-toggle="collapse" data-parent="#pending_updates" aria-controls="panel_modify_[% pm.borrowernumber | html %]" href="#panel_modify_[% pm.borrowernumber | uri %]">[% borrowers.$borrowernumber.surname | html %][% IF ( borrowers.$borrowernumber.firstname ) %], [% borrowers.$borrowernumber.firstname | html %][% END %] - [% Categories.GetName( borrowers.$borrowernumber.categorycode ) | html %] ([% Branches.GetName( borrowers.$borrowernumber.branchcode ) | html %]) ([% borrowers.$borrowernumber.cardnumber | html %]) - Requested on [% pm.timestamp | $KohaDates with_hours = 1 %]</a>
127 </div> <!-- /.panel-heading -->
128 <div id="panel_modify_[% pm.borrowernumber | html %]" class="panel-collapse collapse" role="tabpanel" aria-labelledby="panel-header-[% pm.borrowernumber | html %]">
129 <div class="panel-body">
130 <div class="btn-toolbar">
131 <input type="radio" id="approve_modify_[% pm.borrowernumber | html %]" name="modify_[% pm.borrowernumber | html %]" value="approve" />
132 <label for="approve_modify_[% pm.borrowernumber | html %]">Approve</label>
134 <input type="radio" id="deny_modify_[% pm.borrowernumber | html %]" name="modify_[% pm.borrowernumber | html %]" value="deny" />
135 <label for="deny_modify_[% pm.borrowernumber | html %]">Deny</label>
137 <input type="radio" id="ignore_modify_[% pm.borrowernumber | html %]" name="modify_[% pm.borrowernumber | html %]" value="ignore" checked="checked"/>
138 <label for="ignore_modify_[% pm.borrowernumber | html %]">Ignore</label>
139 | <a target="_blank" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% pm.borrowernumber | html %]" >Patron details</a>
142 [% IF borrowers.$borrowernumber.gonenoaddress > 0 %]
143 <div class="dialog message" style="margin-top:.8em">
144 <h4>Patron's address in doubt</h4>
145 <p>The <strong>Gone no address</strong> flag is set for this patron. If this modification request resolves the issue, please unset the flag.</p>
146 <input type="checkbox" id="unset_gna_[% pm.borrowernumber | html %]" name="unset_gna_[% pm.borrowernumber | html %]" value="unset_gna_[% pm.borrowernumber | html %]"/>
147 <label for="unset_gna_[% pm.borrowernumber | html %]">Unset Gone no address for this patron</label>
151 [% IF !pm.extended_attributes and pm.size > 3 or pm.extended_attributes and pm.size > 4 %]
152 [%# timestamp+verification_token+borrowernumber=3 %]
153 <div class="members-update-table">
162 [% FOREACH key IN pm.keys %]
163 [% IF ( key != "timestamp" and key != "extended_attributes" ) %]
164 [% IF ( ( pm.$key OR borrowers.$borrowernumber.$key ) && ( pm.$key != borrowers.$borrowernumber.$key ) ) %]
166 <td>[% PROCESS display_names field = key %]</td>
167 [% IF ( key == "dateofbirth" ) %]
168 <td>[% borrowers.$borrowernumber.$key | $KohaDates %]</td>
169 <td>[% pm.$key | $KohaDates %]</td>
170 [% ELSIF key == 'branchcode' %]
171 <td>[% Branches.GetName( borrowers.$borrowernumber.$key ) | html %]</td>
172 <td>[% Branches.GetName( pm.$key ) | html %]</td>
174 <td>[% borrowers.$borrowernumber.$key | html %]</td>
175 <td>[% pm.$key | html %]</td>
182 </div> <!-- /.members-update-table -->
183 [% END # /!pm.extended_attributes %]
184 [% IF borrowers.$borrowernumber.modified_attributes %]
185 <div class="members-update-table">
186 <h4>[% PROCESS display_names field='extended_attributes' %]</h4>
193 [% FOREACH attribute_group IN borrowers.$borrowernumber.modified_attributes %]
195 <td>[% attribute_group.type.description | html %]</td>
196 <td>[% PROCESS display_extended_attributes attrs=attribute_group.before type=attribute_group.type %]</td>
197 <td>[% PROCESS display_extended_attributes attrs=attribute_group.after type=attribute_group.type %]</td>
201 </div> <!-- /.members-update-table -->
202 [% END # / borrowers.$borrowernumber.modified_attributes %]
203 </div> <!-- /.panel-body -->
204 </div> <!-- /.panel-collapse.collapse -->
205 </div> <!-- /panel.panel-default -->
206 [% END # /FOREACH pm %]
207 </div> <!-- /#pending-updates -->
208 <fieldset class="action"><input type="submit" value="Submit" /></fieldset>
211 <div class="dialog message">
212 <p>There are no pending patron modifications.</p>
219 [% MACRO jsinclude BLOCK %]
220 [% INCLUDE 'str/members-menu.inc' %]
221 [% Asset.js("js/members-menu.js") | $raw %]
223 $(document).ready(function(){
224 [%- IF ( active ) -%]
225 $("#pending_updates a[href='#panel_modify_" + [% active | html %] + "']").click();
227 $("#pending_updates a.collapsed:eq(0)").click();
233 [% INCLUDE 'intranet-bottom.inc' %]