Confirm box implemented for datagrid actions

This commit is contained in:
Prashant Singh 2019-02-13 19:10:23 +05:30
parent 56b1684f06
commit b28f48cf95
2 changed files with 5 additions and 4 deletions

View File

@ -12,6 +12,7 @@ return [
],
'no-records' => 'No Records Found',
'filter-fields-missing' => 'Some of the required field is null, please check column, condition and value properly'
'filter-fields-missing' => 'Some of the required field is null, please check column, condition and value properly',
'click_on_action' => 'Do you really want to perform this action?'
]
];

View File

@ -26,8 +26,8 @@
<td data-value="{{ $column['label'] }}">{{ $column['wrapper']($record) }}</td>
@endif
@else
@if($column['type'] == 'price')
@if(isset($column['currencyCode']))
@if ($column['type'] == 'price')
@if (isset($column['currencyCode']))
<td data-value="{{ $column['label'] }}">{{ core()->formatPrice($record->{$columnIndex}, $column['currencyCode']) }}</td>
@else
<td data-value="{{ $column['label'] }}">{{ core()->formatBasePrice($record->{$columnIndex}) }}</td>
@ -43,7 +43,7 @@
<div>
@foreach ($actions as $action)
<a href="{{ route($action['route'], $record->{$index}) }}">
<span class="{{ $action['icon'] }}"></span>
<span class="{{ $action['icon'] }}" onclick="return confirm('{{ __('ui::app.datagrid.click_on_action') }}')"></span>
</a>
@endforeach
</div>