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