1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-14 23:22:52 +01:00
invoiceninja/resources/views/partials/bulk_form.blade.php
2018-03-27 12:52:37 +03:00

29 lines
952 B
PHP

<div style="display:none">
{!! 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') !!}
{!! Former::close() !!}
</div>
<script type="text/javascript">
function submitForm_{{ $entityType }}(action, id) {
if (action == 'delete') {
if (!confirm({!! json_encode(trans("texts.are_you_sure")) !!})) {
return;
}
}
@if (in_array($entityType, [ENTITY_ACCOUNT_GATEWAY]))
if (action == 'archive') {
if (!confirm({!! json_encode(trans("texts.are_you_sure")) !!})) {
return;
}
}
@endif
$('.bulk-public-id').val(id);
$('.bulk-action').val(action);
$('form.bulk-{{ $entityType }}-form').submit();
}
</script>