2015-11-05 23:37:04 +01:00
|
|
|
<div style="display:none">
|
2017-11-29 11:44:28 +01:00
|
|
|
{!! Former::open($entityType . 's/bulk')->addClass("bulk-form bulk-{$entityType}-form") !!}
|
|
|
|
{!! Former::text('bulk_action')->addClass('bulk-action') !!}
|
|
|
|
{!! Former::text('bulk_public_id')->addClass('bulk-public-id') !!}
|
2015-11-05 23:37:04 +01:00
|
|
|
{!! Former::close() !!}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
2016-12-11 21:14:18 +01:00
|
|
|
function submitForm_{{ $entityType }}(action, id) {
|
2015-11-05 23:37:04 +01:00
|
|
|
if (action == 'delete') {
|
2018-03-27 11:52:37 +02:00
|
|
|
if (!confirm({!! json_encode(trans("texts.are_you_sure")) !!})) {
|
2015-11-05 23:37:04 +01:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-10-22 11:51:47 +02:00
|
|
|
@if (in_array($entityType, [ENTITY_ACCOUNT_GATEWAY]))
|
|
|
|
if (action == 'archive') {
|
2018-03-27 11:52:37 +02:00
|
|
|
if (!confirm({!! json_encode(trans("texts.are_you_sure")) !!})) {
|
2017-10-22 11:51:47 +02:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@endif
|
|
|
|
|
2017-11-29 11:44:28 +01:00
|
|
|
$('.bulk-public-id').val(id);
|
|
|
|
$('.bulk-action').val(action);
|
|
|
|
$('form.bulk-{{ $entityType }}-form').submit();
|
2015-11-05 23:37:04 +01:00
|
|
|
}
|
2016-12-11 21:14:18 +01:00
|
|
|
</script>
|