Bug 10904: Limit patron update request management by branch
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / members-update.tt
1 [% USE Branches %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha &rsaquo; Patrons &rsaquo; Update patron records</title>
4 [% INCLUDE 'doc-head-close.inc' %]
5 <script type="text/javascript">
6     $(function() {
7         $( "#pending_updates" ).accordion();
8     });
9 </script>
10 </head>
11 <body id="pat_update" class="pat">
12 [% INCLUDE 'header.inc' %]
13 [% INCLUDE 'patron-search.inc' %]
14
15 [% BLOCK display_names %]
16 [% SWITCH field %]
17 [% CASE 'branchcode'          %]<span>Home library (branchcode)</span>
18 [% CASE 'surname'             %]<span>Surname</span>
19 [% CASE 'firstname'           %]<span>First name</span>
20 [% CASE 'title'               %]<span>Title</span>
21 [% CASE 'othernames'          %]<span>Other names</span>
22 [% CASE 'initials'            %]<span>Initials</span>
23 [% CASE 'streetnumber'        %]<span>Street number</span>
24 [% CASE 'streettype'          %]<span>Street type</span>
25 [% CASE 'address'             %]<span>Address</span>
26 [% CASE 'address2'            %]<span>Address 2</span>
27 [% CASE 'city'                %]<span>City</span>
28 [% CASE 'state'               %]<span>State</span>
29 [% CASE 'zipcode'             %]<span>Zip code</span>
30 [% CASE 'country'             %]<span>Country</span>
31 [% CASE 'email'               %]<span>Email</span>
32 [% CASE 'phone'               %]<span>Primary phone</span>
33 [% CASE 'mobile'              %]<span>Other phone</span>
34 [% CASE 'fax'                 %]<span>Fax</span>
35 [% CASE 'emailpro'            %]<span>Secondary email</span>
36 [% CASE 'phonepro'            %]<span>Secondary phone</span>
37 [% CASE 'B_streetnumber'      %]<span>Alternate address: Street number</span>
38 [% CASE 'B_streettype'        %]<span>Alternate address: Street type</span>
39 [% CASE 'B_address'           %]<span>Alternate address: Address</span>
40 [% CASE 'B_address2'          %]<span>Alternate address: Address 2</span>
41 [% CASE 'B_city'              %]<span>Alternate address: City</span>
42 [% CASE 'B_state'             %]<span>Alternate address: State</span>
43 [% CASE 'B_zipcode'           %]<span>Alternate address: Zip/postal code</span>
44 [% CASE 'B_email'             %]<span>Alternate address: Email</span>
45 [% CASE 'B_phone'             %]<span>Alternate address: Phone</span>
46 [% CASE 'contactnote'         %]<span>Alternate address: Contact note</span>
47 [% CASE 'dateofbirth'         %]<span>Date of birth</span>
48 [% CASE 'contactname'         %]<span>Contact: Last name</span>
49 [% CASE 'contactfirstname'    %]<span>Contact: First name</span>
50 [% CASE 'contacttitle'        %]<span>Contact: Title</span>
51 [% CASE 'relationship'        %]<span>Contact: Relationship</span>
52 [% CASE 'sex'                 %]<span>Sex</span>
53 [% CASE 'altcontactfirstname' %]<span>Alternate contact: First name</span>
54 [% CASE 'altcontactsurname'   %]<span>Alternate contact: Surname</span>
55 [% CASE 'altcontactaddress1'  %]<span>Alternate contact: Address</span>
56 [% CASE 'altcontactaddress2'  %]<span>Alternate contact: Address 2</span>
57 [% CASE 'altcontactaddress3'  %]<span>Alternate contact: City</span>
58 [% CASE 'altcontactstate'     %]<span>Alternate contact: State</span>
59 [% CASE 'altcontactzipcode'   %]<span>Alternate contact: Zip code</span>
60 [% CASE 'altcontactcountry'   %]<span>Alternate contact: Country</span>
61 [% CASE 'altcontactphone'     %]<span>Alternate contact: Phone</span>
62 [% CASE 'smsalertnumber'      %]<span>SMS alert number</span>
63 [% CASE %][% field %]
64 [% END %]
65 [% END %]
66
67 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> &rsaquo; Update patron records</div>
68
69 <div id="doc2" class="yui-t7">
70
71    <div id="bd">
72         <div id="yui-main">
73
74             [% IF PendingModifications %]
75             <h2>Update patron records</h2>
76                 <form method="post" action="members-update-do.pl">
77                     <div id="pending_updates">
78                             [% FOREACH pm IN PendingModifications %]
79                                 [% SET borrowernumber = pm.borrowernumber %]
80                                 <h3><a href="#panel_modify_[% pm.borrowernumber %]">[% borrowers.$borrowernumber.surname %][% IF ( borrowers.$borrowernumber.firstname ) %], [% borrowers.$borrowernumber.firstname %][% END %] ([% Branches.GetName( borrowers.$borrowernumber.branchcode ) %]) ([% borrowers.$borrowernumber.cardnumber %])</a></h3>
81                                 <div id="panel_modify_[% pm.borrowernumber %]">
82                                     <a target="_blank" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">View record</a>
83                                     <div style="background-color:#E6F0F2;padding:.5em;margin:.3em 0;">
84                                         <input type="radio" id="approve_modify_[% pm.borrowernumber %]" name="modify_[% pm.borrowernumber %]" value="approve" />
85                                         <label for="approve_modify_[% pm.borrowernumber %]">Approve</label>
86
87                                         <input type="radio" id="deny_modify_[% pm.borrowernumber %]" name="modify_[% pm.borrowernumber %]" value="deny" />
88                                         <label for="deny_modify_[% pm.borrowernumber %]">Deny</label>
89
90                                         <input type="radio" id="ignore_modify_[% pm.borrowernumber %]" name="modify_[% pm.borrowernumber %]" value="ignore" checked="checked"/>
91                                         <label for="ignore_modify_[% pm.borrowernumber %]">Ignore</label>
92                                         | <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% pm.borrowernumber %]" >Patron details</a>
93                                     </div>
94                                         <table>
95                                             <tr>
96                                                 <th>Field</th>
97                                                 <th>From</th>
98                                                 <th>To</th>
99                                             </tr>
100
101
102                                             [% FOREACH key IN pm.keys %]
103                                                 [% IF ( key != "timestamp" ) %]
104                                                     [% IF ( ( pm.$key OR borrowers.$borrowernumber.$key ) && ( pm.$key != borrowers.$borrowernumber.$key ) ) %]
105                                                         <tr>
106                                                             <td>[% PROCESS display_names field = key %]</td>
107                                                             <td>[% borrowers.$borrowernumber.$key %]</td>
108                                                             <td>[% pm.$key %]</td>
109                                                         </tr>
110                                                     [% END %]
111                                                 [% END %]
112                                             [% END %]
113                                         </table>
114                                 </div>
115                             [% END %]
116                         </div>
117                     <fieldset class="action"><input type="submit" value="Submit" /></fieldset>
118
119                 </form>
120             [% ELSE %]
121             <div class="dialog message">
122                 <p>There are no pending patron modifications.</p>
123             </div>
124             [% END %]
125
126         </div>
127     </div>
128 [% INCLUDE 'intranet-bottom.inc' %]