|
Line 0
Link Here
|
|
|
1 |
[% INCLUDE 'doc-head-open.inc' %] |
| 2 |
<title>Koha › Administration › [% IF op =='add_form' %]Account types › [% IF account_type.type_code %] Modify account [% type %] type[% ELSE %] New account [% type %] type[% END %][% ELSE %][% IF op == 'delete_confirm' %]Account types › Confirm deletion of account [% type %]type[% ELSE %] Account types[% END %][% END %]</title> |
| 3 |
[% INCLUDE 'doc-head-close.inc' %] |
| 4 |
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> |
| 5 |
[% INCLUDE 'datatables.inc' %] |
| 6 |
<script type="text/javascript"> |
| 7 |
//<![CDATA[ |
| 8 |
$(document).ready(function() { |
| 9 |
$("#table_credit_types, #table_debit_types").dataTable($.extend(true, {}, dataTablesDefaults, { |
| 10 |
"aoColumnDefs": [ |
| 11 |
{ "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, |
| 12 |
], |
| 13 |
"aaSorting": [[ 1, "asc" ]], |
| 14 |
"iDisplayLength": 10, |
| 15 |
"sPaginationType": "full_numbers" |
| 16 |
})); |
| 17 |
}); |
| 18 |
//]]> |
| 19 |
</script> |
| 20 |
</head> |
| 21 |
<body id="admin_account_types" class="admin"> |
| 22 |
[% INCLUDE 'header.inc' %] |
| 23 |
[% INCLUDE 'cat-search.inc' %] |
| 24 |
|
| 25 |
<div id="breadcrumbs"> |
| 26 |
<a href="/cgi-bin/koha/mainpage.pl">Home</a> |
| 27 |
› <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> |
| 28 |
› <a href="/cgi-bin/koha/admin/account_types.pl">Account types</a> |
| 29 |
[% IF op == 'add_form' %] |
| 30 |
› [% IF account_type.type_code %]Modify[% ELSE %]New[% END %] Account [% type %] type |
| 31 |
[% ELSIF op == 'delete_confirm' %] |
| 32 |
› Confirm deletion of account [% type %] type |
| 33 |
[% END %] |
| 34 |
</div> |
| 35 |
|
| 36 |
<div id="doc3" class="yui-t2"> |
| 37 |
|
| 38 |
<div id="bd"> |
| 39 |
<div id="yui-main"> |
| 40 |
<div class="yui-b"> |
| 41 |
|
| 42 |
[% FOR m IN messages %] |
| 43 |
<div class="dialog [% m.type %]"> |
| 44 |
[% SWITCH m.code %] |
| 45 |
[% CASE 'error_on_saving' %] |
| 46 |
An error occurred when saving this account type. |
| 47 |
[% CASE 'error_on_delete' %] |
| 48 |
An error occurred when deleting this account type. Check the logs. |
| 49 |
[% CASE 'success_on_saving' %] |
| 50 |
Account type saved successfully. |
| 51 |
[% CASE 'success_on_delete' %] |
| 52 |
Account type deleted successfully. |
| 53 |
[% CASE %] |
| 54 |
[% m.code %] |
| 55 |
[% END %] |
| 56 |
</div> |
| 57 |
[% END %] |
| 58 |
|
| 59 |
[% IF op == 'add_form' %] |
| 60 |
[% IF account_type %] |
| 61 |
<h1>Modify an account [% type %] type</h1> |
| 62 |
[% ELSE %] |
| 63 |
<h1>New account [% type %] type</h1> |
| 64 |
[% END %] |
| 65 |
|
| 66 |
<form action="/cgi-bin/koha/admin/account_types.pl" name="Aform" method="post" class="validated"> |
| 67 |
<input type="hidden" name="op" value="add_validate" /> |
| 68 |
<input type="hidden" name="type" value="[% type %]" /> |
| 69 |
<fieldset class="rows"> |
| 70 |
<ol> |
| 71 |
<li> |
| 72 |
<label for="type_code" class="required">Account [% type %] type code: </label> |
| 73 |
[% IF account_type %] |
| 74 |
<strong>[% account_type.type_code %]</strong> |
| 75 |
<input type="hidden" name="type_code" value="[% type_code %]" /> |
| 76 |
[% ELSE %] |
| 77 |
<input type="text" name="type_code" id="type_code" size="10" maxlength="5" class="required" required="required"><span class="required">Required. Maximum length is 5 letters</span> |
| 78 |
[% END %] |
| 79 |
</li> |
| 80 |
[% IF type == 'debit' %] |
| 81 |
<li> |
| 82 |
<label for="default_amount">Default amount: </label> |
| 83 |
<input type="text" name="default_amount" id="default_amount" size="80" maxlength="100" value="[% account_type.default_amount |html %]" /> |
| 84 |
</li> |
| 85 |
[% END %] |
| 86 |
<li> |
| 87 |
<label for="description" class="required">Description: </label> |
| 88 |
<input type="text" name="description" id="description" required="required" class="required" size="80" maxlength="100" value="[% account_type.description |html %]" /> <span class="required">Required</span> |
| 89 |
</li> |
| 90 |
<li> |
| 91 |
<label for="can_be_added_manually">Can be added manually? </label> |
| 92 |
[% IF account_type.can_be_added_manually %] |
| 93 |
<input type="checkbox" name="can_be_added_manually" id="can_be_added_manually" checked="checked" value="1" /> |
| 94 |
[% ELSE %] |
| 95 |
<input type="checkbox" name="can_be_added_manually" id="can_be_added_manually" value="1" /> |
| 96 |
[% END %] |
| 97 |
</li> |
| 98 |
</ol> |
| 99 |
</fieldset> |
| 100 |
|
| 101 |
<fieldset class="action"> |
| 102 |
<button id="save_account_type" class="btn"><i class="fa fa-save"></i> Save</button> |
| 103 |
<a class="cancel btn-link" href="/cgi-bin/koha/admin/account_types.pl"><i class="fa fa-times"></i> Cancel</a> |
| 104 |
</fieldset> |
| 105 |
</form> |
| 106 |
[% END %] |
| 107 |
|
| 108 |
[% IF op == 'delete_confirm' %] |
| 109 |
<div class="dialog alert"> |
| 110 |
<h3>Delete account [% type %] type "[% account_type.description %]?"</h3> |
| 111 |
<table> |
| 112 |
<tr><th>Account type code</th> |
| 113 |
<td>[% account_type.type_code %]</td> |
| 114 |
</tr> |
| 115 |
<tr><th>Account type description</th> |
| 116 |
<td>[% account_type.description %]</td> |
| 117 |
</tr> |
| 118 |
</table> |
| 119 |
<form action="/cgi-bin/koha/admin/account_types.pl" method="post"> |
| 120 |
<input type="hidden" name="op" value="delete_confirmed" /> |
| 121 |
<input type="hidden" name="type_code" value="[% account_type.type_code %]" /> |
| 122 |
<input type="hidden" name="type" value="[% type %]" /> |
| 123 |
<button type="submit" class="btn approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button> |
| 124 |
</form> |
| 125 |
<form action="/cgi-bin/koha/admin/account_types.pl" method="get"> |
| 126 |
<button type=submit" class="btn deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button> |
| 127 |
</form> |
| 128 |
</div> |
| 129 |
[% END %] |
| 130 |
|
| 131 |
[% IF op == 'list' %] |
| 132 |
|
| 133 |
<div id="toolbar" class="btn-toolbar"> |
| 134 |
<a class="btn btn-small" id="newdebittype" href="/cgi-bin/koha/admin/account_types.pl?op=add_form&type=debit"><i class="fa fa-plus"></i> New debit type</a> |
| 135 |
<a class="btn btn-small" id="newcreditype" href="/cgi-bin/koha/admin/account_types.pl?op=add_form&type=credit"><i class="fa fa-plus"></i> New credit type</a> |
| 136 |
</div> |
| 137 |
|
| 138 |
<h2>Account debit types</h2> |
| 139 |
[% IF debit_types.count %] |
| 140 |
<table id="table_debit_types"> |
| 141 |
<thead> |
| 142 |
<th>Account type code</th> |
| 143 |
<th>Description</th> |
| 144 |
<th>Default amount</th> |
| 145 |
<th>Can be added manually</th> |
| 146 |
<th>Actions</th> |
| 147 |
</thead> |
| 148 |
<tbody> |
| 149 |
[% FOREACH debit_type IN debit_types %] |
| 150 |
<tr> |
| 151 |
<td>[% debit_type.type_code %]</td> |
| 152 |
<td>[% debit_type.description %]</td> |
| 153 |
<td>[% debit_type.default_amount %]</td> |
| 154 |
<td>[% IF debit_type.can_be_added_manually %]Yes[% ELSE %]No[% END %]</td> |
| 155 |
<td class="actions"> |
| 156 |
<a class="btn btn-mini" href="/cgi-bin/koha/admin/account_types.pl?op=add_form&type_code=[% debit_type.type_code %]&type=debit"><i class="fa fa-pencil"></i> Edit</a> |
| 157 |
[% IF debit_type.can_be_deleted %] |
| 158 |
<a class="btn btn-mini" href="/cgi-bin/koha/admin/account_types.pl?op=delete_confirm&type_code=[% debit_type.type_code %]&type=debit"><i class="fa fa-trash"></i> Delete</a> |
| 159 |
[% END %] |
| 160 |
</td> |
| 161 |
</tr> |
| 162 |
[% END %] |
| 163 |
</tbody> |
| 164 |
</table> |
| 165 |
[% ELSE %] |
| 166 |
<div class="dialog message"> |
| 167 |
There are no account debit types defined. <a href="/cgi-bin/koha/admin/account_types.pl?op=add_form&type=debit">Create new debit type</a> |
| 168 |
</div> |
| 169 |
[% END %] |
| 170 |
|
| 171 |
<h2>Account credit types</h2> |
| 172 |
[% IF credit_types.count %] |
| 173 |
<table id="table_credit_types"> |
| 174 |
<thead> |
| 175 |
<th>Account type code</th> |
| 176 |
<th>Description</th> |
| 177 |
<th>Can be added manually</th> |
| 178 |
<th>Actions</th> |
| 179 |
</thead> |
| 180 |
<tbody> |
| 181 |
[% FOREACH credit_type IN credit_types %] |
| 182 |
<tr> |
| 183 |
<td>[% credit_type.type_code %]</td> |
| 184 |
<td>[% credit_type.description %]</td> |
| 185 |
<td>[% IF credit_type.can_be_added_manually %]Yes[% ELSE %]No[% END %]</td> |
| 186 |
<td class="actions"> |
| 187 |
<a class="btn btn-mini" href="/cgi-bin/koha/admin/account_types.pl?op=add_form&type_code=[% credit_type.type_code %]&type=credit"><i class="fa fa-pencil"></i> Edit</a> |
| 188 |
[% IF credit_type.can_be_deleted %] |
| 189 |
<a class="btn btn-mini" href="/cgi-bin/koha/admin/account_types.pl?op=delete_confirm&type_code=[% credit_type.type_code %]&type=credit"><i class="fa fa-trash"></i> Delete</a> |
| 190 |
[% END %] |
| 191 |
</td> |
| 192 |
</tr> |
| 193 |
[% END %] |
| 194 |
</tbody> |
| 195 |
</table> |
| 196 |
[% ELSE %] |
| 197 |
<div class="dialog message"> |
| 198 |
There are no account credit types defined. <a href="/cgi-bin/koha/admin/account_types.pl?op=add_form&type=credit">Create new credit type</a> |
| 199 |
</div> |
| 200 |
[% END %] |
| 201 |
|
| 202 |
[% END %] |
| 203 |
|
| 204 |
</div> |
| 205 |
</div> |
| 206 |
<div class="yui-b"> |
| 207 |
[% INCLUDE 'admin-menu.inc' %] |
| 208 |
</div> |
| 209 |
</div> |
| 210 |
[% INCLUDE 'intranet-bottom.inc' %] |