Bug 35796: Properly set patron_expiration value
[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>Delete patron [% patron.firstname | html %] [% patron.surname | html %] &rsaquo; Koha</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9 </head>
10 <body id="pat_deletemem" class="pat">
11 [% WRAPPER 'header.inc' %]
12     [% INCLUDE 'patron-search-header.inc' %]
13 [% END %]
14
15 [% WRAPPER 'sub-header.inc' %]
16     [% WRAPPER breadcrumbs %]
17         [% WRAPPER breadcrumb_item %]
18             <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
19         [% END %]
20         [% WRAPPER breadcrumb_item %]
21             <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% INCLUDE 'patron-title.inc' %]</a>
22         [% END %]
23         [% WRAPPER breadcrumb_item bc_active= 1 %]
24             <span>Delete patron</span>
25         [% END %]
26     [% END #/ WRAPPER breadcrumbs %]
27 [% END #/ WRAPPER sub-header.inc %]
28
29 <div class="main container-fluid">
30     <div class="row">
31         <div class="col-sm-10 col-sm-push-2">
32             <main>
33
34     [% INCLUDE 'members-toolbar.inc' %]
35     [% IF ItemsOnIssues || debits || is_guarantor %]
36         <div class="dialog alert">
37         <h1>Cannot delete patron</h1>
38             <ul>
39             [% IF ( ItemsOnIssues ) %]
40                 <li>Patron has [% ItemsOnIssues | html %] item(s) checked out.</li>
41             [% END %]
42             [% IF debits %]
43                 <li>Patron has [% debits | $Price %] in fines.</li>
44             [% END %]
45             [% IF is_guarantor %]
46                 <li>Patron's record has guaranteed accounts attached.</li>
47             [% END %]
48             </ul>
49     </div>
50     [% ELSIF op == 'delete_confirm' and patron %]
51         [%# TODO add "patron does not exist" unless patron %]
52         <div class="dialog alert">
53             [% IF ItemsOnHold or credits or pending_suggestions > 0 %]
54                 <ul>
55                     [% IF ItemsOnHold %]
56                         <li>Patron has [% ItemsOnHold | html %] hold(s). Deleting patron cancels all their holds.</li>
57                     [% END %]
58                     [% IF credits %]
59                         <li>Patron has a [% credits | $Price %] credit.</li>
60                     [% END %]
61                     [% IF pending_suggestions > 0 %]
62                         <li>Patron has [% pending_suggestions | html %] pending suggestions.</li>
63                     [% END %]
64                 </ul>
65             [% END %]
66             <h1>Are you sure you want to delete the patron [% patron.firstname | html %] [% patron.surname | html %]?</h1>
67             <p>This cannot be undone.</p>
68             <form action="/cgi-bin/koha/members/deletemem.pl">
69                 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
70                 <input type="hidden" name="member" value="[% patron.borrowernumber | html %]"/>
71                 <input type="hidden" name="op" value="delete_confirmed" />
72                 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
73             </form>
74             <form action="/cgi-bin/koha/members/moremember.pl">
75                 <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]"/>
76                 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
77             </form>
78         </div>
79     [% END %]
80
81             </main>
82         </div> <!-- /.col-sm-10.col-sm-push-2 -->
83
84         <div class="col-sm-2 col-sm-pull-10">
85             <aside>
86                 [% INCLUDE 'circ-menu.inc' %]
87             </aside>
88         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
89      </div> <!-- /.row -->
90
91 [% MACRO jsinclude BLOCK %]
92     [% INCLUDE 'str/members-menu.inc' %]
93     [% Asset.js("js/members-menu.js") | $raw %]
94 [% END %]
95
96 [% INCLUDE 'intranet-bottom.inc' %]