|
Lines 87-93
Link Here
|
| 87 |
<a class="btn btn-xs btn-default" style="white-space:nowrap" href="/cgi-bin/koha/clubs/templates-add-modify.pl?id=[% t.id | html %]"> |
87 |
<a class="btn btn-xs btn-default" style="white-space:nowrap" href="/cgi-bin/koha/clubs/templates-add-modify.pl?id=[% t.id | html %]"> |
| 88 |
<i class="fa fa-pencil"></i> Edit |
88 |
<i class="fa fa-pencil"></i> Edit |
| 89 |
</a> |
89 |
</a> |
| 90 |
<a class="btn btn-xs btn-default" href="#" onclick='ConfirmDeleteTemplate([% t.id | html %], "[% t.name | html %]", $(this) ); return false;'> |
90 |
<a class="btn btn-xs btn-default delete_template" href="#" data-id="[% t.id | html %]" data-name="[% t.name | html %]"> |
| 91 |
<i class="fa fa-trash"></i> Delete |
91 |
<i class="fa fa-trash"></i> Delete |
| 92 |
</a> |
92 |
</a> |
| 93 |
[% END %] |
93 |
[% END %] |
|
Lines 159-167
Link Here
|
| 159 |
{ "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, |
159 |
{ "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, |
| 160 |
] |
160 |
] |
| 161 |
} )); |
161 |
} )); |
|
|
162 |
|
| 163 |
$(".delete_club").on("click", function(e){ |
| 164 |
e.preventDefault(); |
| 165 |
var club_id = $(this).data("id"); |
| 166 |
var club_name = $(this).data("name"); |
| 167 |
ConfirmDeleteClub( club_id, club_name ); |
| 168 |
}); |
| 169 |
|
| 170 |
$(".delete_template").on("click", function(e){ |
| 171 |
e.preventDefault(); |
| 172 |
var template_id = $(this).data("id"); |
| 173 |
var template_name = $(this).data("name"); |
| 174 |
ConfirmDeleteTemplate( template_id, template_name ); |
| 175 |
}); |
| 176 |
|
| 177 |
$(".club_hold_search").on("click", function(e){ |
| 178 |
e.preventDefault; |
| 179 |
var club_id = $(this).data("id"); |
| 180 |
SearchToHold( club_id ); |
| 181 |
}); |
| 162 |
}); |
182 |
}); |
| 163 |
|
183 |
|
| 164 |
function ConfirmDeleteTemplate( id, name, a ) { |
184 |
function ConfirmDeleteTemplate( id, name ) { |
| 165 |
if ( confirm( _("Are you sure you want to delete the club template %s? This will delete all clubs using this template and cancel patron enrollments" ).format(name) ) ) { |
185 |
if ( confirm( _("Are you sure you want to delete the club template %s? This will delete all clubs using this template and cancel patron enrollments" ).format(name) ) ) { |
| 166 |
$.ajax({ |
186 |
$.ajax({ |
| 167 |
type: "POST", |
187 |
type: "POST", |
|
Lines 179-185
Link Here
|
| 179 |
} |
199 |
} |
| 180 |
} |
200 |
} |
| 181 |
|
201 |
|
| 182 |
function ConfirmDeleteClub( id, name, a ) { |
202 |
function ConfirmDeleteClub( id, name ) { |
| 183 |
if ( confirm( _("Are you sure you want to delete the club %s? This will cancel all patron enrollments in this club." ).format(name) ) ) { |
203 |
if ( confirm( _("Are you sure you want to delete the club %s? This will cancel all patron enrollments in this club." ).format(name) ) ) { |
| 184 |
$.ajax({ |
204 |
$.ajax({ |
| 185 |
type: "POST", |
205 |
type: "POST", |
| 186 |
- |
|
|