Bug 23219: Cancel patrons holds when patron delete
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / deletemem.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Price %]
4 [% USE Branches %]
5 [% SET footerjs = 1 %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha &rsaquo; Delete patron [% patron.firstname | html %] [% patron.surname | html %]</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9 </head>
10 <body id="pat_deletemem" class="pat">
11 [% INCLUDE 'header.inc' %]
12 [% INCLUDE 'patron-search.inc' %]
13
14 <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; Delete patron [% patron.firstname | html %] [% patron.surname | html %]</div>
15
16 <div class="main container-fluid">
17     <div class="row">
18         <div class="col-sm-10 col-sm-push-2">
19             <main>
20
21     [% INCLUDE 'members-toolbar.inc' %]
22     [% IF ( ItemsOnIssues || charges || guarantees ) %]
23         <div class="dialog alert">
24         <h3>Cannot delete patron</h3>
25             <ul>
26             [% IF ( ItemsOnIssues ) %]
27                 <li>Patron has [% ItemsOnIssues | html %] item(s) checked out.</li>
28             [% END %]
29             [% IF ( charges ) %]
30                 <li>Patron has [% charges | $Price %] in fines.</li>
31             [% END %]
32             [% IF ( guarantees ) %]
33                 <li>Patron's record has guaranteed accounts attached.</li>
34             [% END %]
35             </ul>
36     </div>
37     [% ELSIF op == 'delete_confirm' and patron %]
38         [%# TODO add "patron does not exist" unless patron %]
39         <div class="dialog alert">
40             [% IF ( ItemsOnHold ) %]
41             <h3>Patron has [% ItemsOnHold | html %] hold(s). Deleting patron cancels all their holds.</h3></br>
42             [% END %]
43             <h3>Are you sure you want to delete the patron [% patron.firstname | html %] [% patron.surname | html %]? This cannot be undone.</h3>
44             <form action="/cgi-bin/koha/members/deletemem.pl">
45                 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
46                 <input type="hidden" name="member" value="[% patron.borrowernumber | html %]"/>
47                 <input type="hidden" name="op" value="delete_confirmed" />
48                 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
49             </form>
50             <form action="/cgi-bin/koha/members/moremember.pl">
51                 <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]"/>
52                 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
53             </form>
54         </div>
55     [% END %]
56
57             </main>
58         </div> <!-- /.col-sm-10.col-sm-push-2 -->
59
60         <div class="col-sm-2 col-sm-pull-10">
61             <aside>
62                 [% INCLUDE 'circ-menu.inc' %]
63             </aside>
64         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
65      </div> <!-- /.row -->
66
67 [% MACRO jsinclude BLOCK %]
68     [% INCLUDE 'str/members-menu.inc' %]
69     [% Asset.js("js/members-menu.js") | $raw %]
70 [% END %]
71
72 [% INCLUDE 'intranet-bottom.inc' %]