Fix delete modals

This commit is contained in:
snipe 2017-02-15 23:04:49 -08:00
parent d9fe39c00e
commit a18e90c22a
2 changed files with 8 additions and 5 deletions

View file

@ -639,8 +639,9 @@
<form method="post" id="deleteForm" role="form">
{{ csrf_field() }}
{{ method_field('DELETE') }}
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">Close</button>
<button type="submit" class="btn btn-outline" id="dataConfirmOK">@lang('general.yes')</button>
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">{{ trans('general.cancel') }}</button>
<button type="submit" class="btn btn-outline" id="dataConfirmOK">{{ trans('general.yes') }}</button>
</form>
</div>
</div>

View file

@ -125,9 +125,11 @@ $('.snipe-table').bootstrapTable({
}
if (row.available_actions.delete === true) {
actions += '<a data-html="false" class="btn delete-asset btn-danger btn-sm" ' +
+ 'data-toggle="modal" href="" data-content="Are you sure you wish to delete this?" '
+ 'data-title="{{ trans('general.delete') }}?" onClick="return false;">'
actions += '<a href="{{ url('/') }}/' + destination + '/' + row.id + '" '
+ ' class="btn btn-danger btn-sm delete-asset" '
+ ' data-toggle="modal" '
+ ' data-content="Are you sure you wish to delete ' + row.name + ' (' + row.id + ')?" '
+ ' data-title="{{ trans('general.delete') }}?" onClick="return false;">'
+ '<i class="fa fa-trash"></i></a></nobr>';
}
return actions;