@php $bootbox_type = $config['bootbox_type'] ?? 'prompt'; $bootbox_run = $config['bootbox_run'] ?? true; @endphp var config = { value: "{{ $config['value'] ?? '' }}", placeholder: "{{ $config['placeholder'] ?? '' }}", buttons: { cancel: { label: '{{ $config['buttons_cancel_label'] ?? trans("backpack.crud.cancel") }}', className: 'btn-normal-cancel' }, confirm: { label: '{{ $config['buttons_confirm_label'] ?? trans("backpack.crud.save") }}', className: 'btn-normal-comfirm', }, }, callback: function (result) { @isset($config['action_include']) @include($config['action_include']) @elseif(!empty($config['action_type'])) @include("backpack::crud.buttons.active_script.button_action_script_".$config['action_type']) @endif } }; @if($bootbox_type == 'prompt') config.title = "{{ $config['title'] ?? '' }}"; @else config.message = "{{ $config['message'] ?? $config['title'] ?? '' }}"; @endif @if($bootbox_run) var bootbox_dialog = bootbox.{{ $bootbox_type }}(config); @endif