Lines 115-209
Link Here
|
115 |
<h1>Update patron records</h1> |
115 |
<h1>Update patron records</h1> |
116 |
[% IF PendingModifications %] |
116 |
[% IF PendingModifications %] |
117 |
<form method="post" action="members-update-do.pl"> |
117 |
<form method="post" action="members-update-do.pl"> |
118 |
<div id="pending_updates" class="panel-group" role="tablist" aria-multiselectable="true"> |
118 |
[% WRAPPER accordion panelgroup_id="pending_updates" %] |
119 |
[% FOREACH pm IN PendingModifications %] |
119 |
[% FOREACH pm IN PendingModifications %] |
120 |
[% SET borrowernumber = pm.borrowernumber %] |
120 |
[% SET borrowernumber = pm.borrowernumber %] |
121 |
<div class="panel panel-default"> |
121 |
[% WRAPPER accordion_item %] |
122 |
<div class="panel-heading" role="tab" id="panel-header-[% pm.borrowernumber | html %]"> |
122 |
[% WRAPPER accordion_heading panel_id="panel-${pm.borrowernumber}" %] |
123 |
<h3 class="panel-title"> |
123 |
[% 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 %] |
124 |
<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> |
124 |
[% END %] |
125 |
</h3> |
125 |
[% WRAPPER accordion_panel panel_id="panel-${pm.borrowernumber}" %] |
126 |
</div> <!-- /.panel-heading --> |
|
|
127 |
<div id="panel_modify_[% pm.borrowernumber | html %]" class="panel-collapse collapse" role="tabpanel" aria-labelledby="panel-header-[% pm.borrowernumber | html %]"> |
128 |
<div class="panel-body"> |
129 |
<div class="btn-toolbar"> |
130 |
|
126 |
|
131 |
<label for="approve_modify_[% pm.borrowernumber | html %]"><input type="radio" id="approve_modify_[% pm.borrowernumber | html %]" name="modify_[% pm.borrowernumber | html %]" value="approve" /> Approve</label> |
127 |
<div class="btn-toolbar"> |
132 |
|
128 |
|
|
|
129 |
<label for="approve_modify_[% pm.borrowernumber | html %]"><input type="radio" id="approve_modify_[% pm.borrowernumber | html %]" name="modify_[% pm.borrowernumber | html %]" value="approve" /> Approve</label> |
133 |
|
130 |
|
134 |
<label for="deny_modify_[% pm.borrowernumber | html %]"><input type="radio" id="deny_modify_[% pm.borrowernumber | html %]" name="modify_[% pm.borrowernumber | html %]" value="deny" /> Deny</label> |
|
|
135 |
|
131 |
|
|
|
132 |
<label for="deny_modify_[% pm.borrowernumber | html %]"><input type="radio" id="deny_modify_[% pm.borrowernumber | html %]" name="modify_[% pm.borrowernumber | html %]" value="deny" /> Deny</label> |
136 |
|
133 |
|
137 |
<label for="ignore_modify_[% pm.borrowernumber | html %]"><input type="radio" id="ignore_modify_[% pm.borrowernumber | html %]" name="modify_[% pm.borrowernumber | html %]" value="ignore" checked="checked"/> Ignore</label> |
|
|
138 |
| <a target="_blank" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% pm.borrowernumber | html %]" >Patron details</a> |
139 |
</div> |
140 |
|
141 |
[% IF borrowers.$borrowernumber.gonenoaddress > 0 %] |
142 |
<div class="dialog message" style="margin-top:.8em"> |
143 |
<h4>Patron's address in doubt</h4> |
144 |
<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> |
145 |
<input type="checkbox" id="unset_gna_[% pm.borrowernumber | html %]" name="unset_gna_[% pm.borrowernumber | html %]" value="unset_gna_[% pm.borrowernumber | html %]"/> |
146 |
<label for="unset_gna_[% pm.borrowernumber | html %]">Unset Gone no address for this patron</label> |
147 |
</div> |
148 |
[% END %] |
149 |
|
150 |
[% IF !pm.extended_attributes and pm.size > 3 or pm.extended_attributes and pm.size > 4 %] |
151 |
[%# timestamp+verification_token+borrowernumber=3 %] |
152 |
<div class="members-update-table"> |
153 |
<table> |
154 |
<tr> |
155 |
<th>Field</th> |
156 |
<th>Old value</th> |
157 |
<th>New value</th> |
158 |
</tr> |
159 |
|
134 |
|
|
|
135 |
<label for="ignore_modify_[% pm.borrowernumber | html %]"><input type="radio" id="ignore_modify_[% pm.borrowernumber | html %]" name="modify_[% pm.borrowernumber | html %]" value="ignore" checked="checked"/> Ignore</label> |
136 |
| <a target="_blank" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% pm.borrowernumber | html %]" >Patron details</a> |
137 |
</div> |
160 |
|
138 |
|
161 |
[% FOREACH key IN pm.keys %] |
139 |
[% IF borrowers.$borrowernumber.gonenoaddress > 0 %] |
162 |
[% IF ( key != "timestamp" and key != "extended_attributes" ) %] |
140 |
<div class="dialog message" style="margin-top:.8em"> |
163 |
[% IF ( ( pm.$key OR borrowers.$borrowernumber.$key ) && ( pm.$key != borrowers.$borrowernumber.$key ) ) %] |
141 |
<h4>Patron's address in doubt</h4> |
164 |
<tr> |
142 |
<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> |
165 |
<td>[% PROCESS display_names field = key %]</td> |
143 |
<input type="checkbox" id="unset_gna_[% pm.borrowernumber | html %]" name="unset_gna_[% pm.borrowernumber | html %]" value="unset_gna_[% pm.borrowernumber | html %]"/> |
166 |
[% IF ( key == "dateofbirth" ) %] |
144 |
<label for="unset_gna_[% pm.borrowernumber | html %]">Unset Gone no address for this patron</label> |
167 |
<td>[% borrowers.$borrowernumber.$key | $KohaDates %]</td> |
145 |
</div> |
168 |
<td>[% pm.$key | $KohaDates %]</td> |
146 |
[% END %] |
169 |
[% ELSIF key == 'branchcode' %] |
147 |
|
170 |
<td>[% Branches.GetName( borrowers.$borrowernumber.$key ) | html %]</td> |
148 |
[% IF !pm.extended_attributes and pm.size > 3 or pm.extended_attributes and pm.size > 4 %] |
171 |
<td>[% Branches.GetName( pm.$key ) | html %]</td> |
149 |
[%# timestamp+verification_token+borrowernumber=3 %] |
172 |
[% ELSE %] |
150 |
<div class="members-update-table"> |
173 |
<td>[% borrowers.$borrowernumber.$key | html %]</td> |
151 |
<table> |
174 |
<td>[% pm.$key | html %]</td> |
152 |
<tr> |
175 |
[% END %] |
153 |
<th>Field</th> |
176 |
</tr> |
154 |
<th>Old value</th> |
177 |
[% END %] |
155 |
<th>New value</th> |
|
|
156 |
</tr> |
157 |
|
158 |
|
159 |
[% FOREACH key IN pm.keys %] |
160 |
[% IF ( key != "timestamp" and key != "extended_attributes" ) %] |
161 |
[% IF ( ( pm.$key OR borrowers.$borrowernumber.$key ) && ( pm.$key != borrowers.$borrowernumber.$key ) ) %] |
162 |
<tr> |
163 |
<td>[% PROCESS display_names field = key %]</td> |
164 |
[% IF ( key == "dateofbirth" ) %] |
165 |
<td>[% borrowers.$borrowernumber.$key | $KohaDates %]</td> |
166 |
<td>[% pm.$key | $KohaDates %]</td> |
167 |
[% ELSIF key == 'branchcode' %] |
168 |
<td>[% Branches.GetName( borrowers.$borrowernumber.$key ) | html %]</td> |
169 |
<td>[% Branches.GetName( pm.$key ) | html %]</td> |
170 |
[% ELSE %] |
171 |
<td>[% borrowers.$borrowernumber.$key | html %]</td> |
172 |
<td>[% pm.$key | html %]</td> |
173 |
[% END %] |
174 |
</tr> |
178 |
[% END %] |
175 |
[% END %] |
179 |
[% END %] |
176 |
[% END %] |
180 |
</table> |
177 |
[% END %] |
181 |
</div> <!-- /.members-update-table --> |
178 |
</table> |
182 |
[% END # /!pm.extended_attributes %] |
179 |
</div> <!-- /.members-update-table --> |
183 |
[% IF borrowers.$borrowernumber.modified_attributes %] |
180 |
[% END # /!pm.extended_attributes %] |
184 |
<div class="members-update-table"> |
181 |
[% IF borrowers.$borrowernumber.modified_attributes %] |
185 |
<h4>[% PROCESS display_names field='extended_attributes' %]</h4> |
182 |
<div class="members-update-table"> |
186 |
<table> |
183 |
<h4>[% PROCESS display_names field='extended_attributes' %]</h4> |
|
|
184 |
<table> |
185 |
<tr> |
186 |
<th>Field</th> |
187 |
<th>Old value</th> |
188 |
<th>New value</th> |
189 |
</tr> |
190 |
[% FOREACH attribute_group IN borrowers.$borrowernumber.modified_attributes %] |
187 |
<tr> |
191 |
<tr> |
188 |
<th>Field</th> |
192 |
<td>[% attribute_group.type.description | html %]</td> |
189 |
<th>Old value</th> |
193 |
<td>[% PROCESS display_extended_attributes attrs=attribute_group.before type=attribute_group.type %]</td> |
190 |
<th>New value</th> |
194 |
<td>[% PROCESS display_extended_attributes attrs=attribute_group.after type=attribute_group.type %]</td> |
191 |
</tr> |
195 |
</tr> |
192 |
[% FOREACH attribute_group IN borrowers.$borrowernumber.modified_attributes %] |
196 |
[% END %] |
193 |
<tr> |
197 |
</table> |
194 |
<td>[% attribute_group.type.description | html %]</td> |
198 |
</div> <!-- /.members-update-table --> |
195 |
<td>[% PROCESS display_extended_attributes attrs=attribute_group.before type=attribute_group.type %]</td> |
199 |
[% END # / borrowers.$borrowernumber.modified_attributes %] |
196 |
<td>[% PROCESS display_extended_attributes attrs=attribute_group.after type=attribute_group.type %]</td> |
200 |
[% END %] |
197 |
</tr> |
201 |
[% END %] |
198 |
[% END %] |
|
|
199 |
</table> |
200 |
</div> <!-- /.members-update-table --> |
201 |
[% END # / borrowers.$borrowernumber.modified_attributes %] |
202 |
</div> <!-- /.panel-body --> |
203 |
</div> <!-- /.panel-collapse.collapse --> |
204 |
</div> <!-- /panel.panel-default --> |
205 |
[% END # /FOREACH pm %] |
202 |
[% END # /FOREACH pm %] |
206 |
</div> <!-- /#pending-updates --> |
203 |
[% END # /collapse %] |
207 |
<fieldset class="action"><input type="submit" class="btn btn-primary" value="Submit" /></fieldset> |
204 |
<fieldset class="action"><input type="submit" class="btn btn-primary" value="Submit" /></fieldset> |
208 |
</form> |
205 |
</form> |
209 |
[% ELSE %] |
206 |
[% ELSE %] |
Lines 221-229
Link Here
|
221 |
<script> |
218 |
<script> |
222 |
$(document).ready(function(){ |
219 |
$(document).ready(function(){ |
223 |
[%- IF ( active ) -%] |
220 |
[%- IF ( active ) -%] |
224 |
$("#pending_updates a[href='#panel_modify_" + [% active | html %] + "']").click(); |
221 |
$("#pending_updates_group a[href='#panel-" + [% active | html %] + "_panel']").click(); |
225 |
[%- ELSE -%] |
222 |
[%- ELSE -%] |
226 |
$("#pending_updates a.collapsed:eq(0)").click(); |
223 |
$("#pending_updates_group a.collapsed:eq(0)").click(); |
227 |
[%- END -%] |
224 |
[%- END -%] |
228 |
}); |
225 |
}); |
229 |
</script> |
226 |
</script> |
230 |
- |
|
|