mirror of
https://github.com/Mibew/mibew.git
synced 2024-11-15 16:44:11 +03:00
Remove js with ban delete comfirm from style files
This commit is contained in:
parent
dd71e6bc70
commit
01e2d8f2a7
@ -18,12 +18,10 @@
|
||||
|
||||
(function(Mibew, $) {
|
||||
$(document).ready(function() {
|
||||
$('a.removelink').click(function() {
|
||||
var address = $.trim($("#t" + this.id).text());
|
||||
|
||||
$('a.remove-link').click(function() {
|
||||
return confirm(Mibew.Localization.trans(
|
||||
'Are you sure that you want to delete address {0} from the blocked list?',
|
||||
address
|
||||
$(this).data('ban-address')
|
||||
));
|
||||
});
|
||||
});
|
@ -65,6 +65,8 @@ class BanController extends AbstractController
|
||||
$page['pagination.items'] = $pagination['items'];
|
||||
$page = array_merge($page, prepare_menu($operator));
|
||||
|
||||
$this->getAssetManager()->attachJs('js/compiled/bans.js');
|
||||
|
||||
return $this->render('bans', $page);
|
||||
}
|
||||
|
||||
|
@ -1,10 +1,6 @@
|
||||
{{#extends "_layout"}}
|
||||
{{#override "menu"}}{{> _menu}}{{/override}}
|
||||
|
||||
{{#override "head"}}
|
||||
<script type="text/javascript" src="{{asset "@CurrentStyle/js/bans.js"}}"></script>
|
||||
{{/override}}
|
||||
|
||||
{{#override "content"}}
|
||||
{{l10n "Here you can block malicious visitors that affect your work with spam messages."}}
|
||||
|
||||
@ -34,7 +30,7 @@
|
||||
{{#each [pagination.items]}}
|
||||
<tr>
|
||||
<td class="notlast">
|
||||
<a href="{{route "history" q=address type="visitor"}}" class="man" id="ti{{banid}}">
|
||||
<a href="{{route "history" q=address type="visitor"}}" class="man">
|
||||
{{address}}
|
||||
</a>
|
||||
</td>
|
||||
@ -44,7 +40,7 @@
|
||||
<td>{{cutString comment "30"}}</td>
|
||||
|
||||
<td>
|
||||
<a class="removelink" id="i{{banid}}" href="{{csrfProtectedRoute "ban_delete" ban_id=banid}}">
|
||||
<a class="remove-link" data-ban-address="{{address}}" href="{{csrfProtectedRoute "ban_delete" ban_id=banid}}">
|
||||
{{l10n "remove"}}
|
||||
</a>,
|
||||
<a href="{{route "ban_edit" ban_id=banid}}"
|
||||
|
Loading…
Reference in New Issue
Block a user