Bug 17097: Add a confirmation page when deleting a patron
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / deletemem.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Can't Delete Patron</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 </head>
5 <body id="pat_deletemem" class="pat">
6 [% INCLUDE 'header.inc' %]
7 [% INCLUDE 'patron-search.inc' %]
8
9 <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; Cannot delete patron</div>
10 <div id="doc3" class="yui-t2">
11    
12    <div id="bd">
13     <div id="yui-main">
14     <div class="yui-b">
15     [% INCLUDE 'members-toolbar.inc' %]
16     [% IF ( ItemsOnIssues || charges || guarantees ) %]
17         <div class="dialog alert">
18         <h3>Cannot delete patron</h3>
19             <ul>
20             [% IF ( ItemsOnIssues ) %]
21                 <li>Patron has [% ItemsOnIssues %] item(s) checked out.</li>
22             [% END %]
23             [% IF ( charges ) %]
24                 <li>Patron has [% charges %] in fines.</li>
25             [% END %]
26             [% IF ( guarantees ) %]
27                 <li>Patron's record has guaranteed accounts attached.</li>
28             [% END %]
29             </ul>
30     </div>
31     [% ELSIF op == 'delete_confirm' and borrowernumber %]
32         [%# TODO add "patron does not exist" unless borrowernumber %]
33         <div class="dialog alert">
34             <h3>Are you sure you want to delete the patron [% firstname %] [% surname %]? This cannot be undone.</h3>
35             <form action="/cgi-bin/koha/members/deletemem.pl">
36                 <input type="hidden" name="borrowernumber" value="[% borrowernumber %]"/>
37                 <input type="hidden" name="op" value="delete_confirmed" />
38                 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
39             </form>
40             <form action="/cgi-bin/koha/members/moremember.pl">
41                 <input type="hidden" name="borrowernumber" value="[% borrowernumber %]"/>
42                 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
43             </form>
44         </div>
45     [% END %]
46     [% IF ( keeplocal ) %]
47         <div class="dialog message">
48         <h3>Remote record deleted, local record kept</h3>
49         <p>Patron was marked for deletion from Norwegian national patron database, but the local record was kept.</p>
50         </div>
51     [% END %]
52 </div>
53 </div>
54
55 <div class="yui-b">
56 [% INCLUDE 'circ-menu.inc' %]
57 </div>
58 </div>
59 [% INCLUDE 'intranet-bottom.inc' %]