2015-03-16 22:45:25 +01:00
|
|
|
@extends('accounts.nav')
|
|
|
|
|
|
|
|
@section('content')
|
|
|
|
@parent
|
|
|
|
|
2015-04-01 21:57:02 +02:00
|
|
|
{!! Former::open('gateways/delete')->addClass('user-form') !!}
|
2015-03-16 22:45:25 +01:00
|
|
|
|
|
|
|
<div style="display:none">
|
2015-04-01 21:57:02 +02:00
|
|
|
{!! Former::text('accountGatewayPublicId') !!}
|
2015-03-16 22:45:25 +01:00
|
|
|
</div>
|
2015-04-01 21:57:02 +02:00
|
|
|
{!! Former::close() !!}
|
2015-03-16 22:45:25 +01:00
|
|
|
|
|
|
|
|
|
|
|
@if ($showAdd)
|
2015-04-27 14:28:40 +02:00
|
|
|
{!! Button::primary(trans('texts.add_gateway'))
|
2015-05-19 21:14:00 +02:00
|
|
|
->asLinkTo(URL::to('/gateways/create'))
|
2015-04-01 21:57:02 +02:00
|
|
|
->withAttributes(['class' => 'pull-right'])
|
2015-04-15 18:35:41 +02:00
|
|
|
->appendIcon(Icon::create('plus-sign')) !!}
|
2015-03-16 22:45:25 +01:00
|
|
|
@endif
|
|
|
|
|
2015-04-01 21:57:02 +02:00
|
|
|
{!! Datatable::table()
|
2015-03-16 22:45:25 +01:00
|
|
|
->addColumn(
|
|
|
|
trans('texts.name'),
|
2015-04-15 18:35:41 +02:00
|
|
|
trans('texts.payment_type_id'),
|
2015-03-16 22:45:25 +01:00
|
|
|
trans('texts.action'))
|
|
|
|
->setUrl(url('api/gateways/'))
|
|
|
|
->setOptions('sPaginationType', 'bootstrap')
|
|
|
|
->setOptions('bFilter', false)
|
|
|
|
->setOptions('bAutoWidth', false)
|
2015-04-15 18:35:41 +02:00
|
|
|
->setOptions('aoColumns', [[ "sWidth"=> "50%" ], [ "sWidth"=> "30%" ], ["sWidth"=> "20%"]])
|
|
|
|
->setOptions('aoColumnDefs', [['bSortable'=>false, 'aTargets'=>[2]]])
|
2015-04-01 21:57:02 +02:00
|
|
|
->render('datatable') !!}
|
2015-03-16 22:45:25 +01:00
|
|
|
|
|
|
|
<script>
|
|
|
|
window.onDatatableReady = function() {
|
|
|
|
$('tbody tr').mouseover(function() {
|
|
|
|
$(this).closest('tr').find('.tr-action').css('visibility','visible');
|
|
|
|
}).mouseout(function() {
|
|
|
|
$dropdown = $(this).closest('tr').find('.tr-action');
|
|
|
|
if (!$dropdown.hasClass('open')) {
|
|
|
|
$dropdown.css('visibility','hidden');
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
function setTrashVisible() {
|
|
|
|
var checked = $('#trashed').is(':checked');
|
|
|
|
window.location = '{{ URL::to('view_archive/token') }}' + (checked ? '/true' : '/false');
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
|
|
|
|
function deleteAccountGateway(id) {
|
|
|
|
if (!confirm('Are you sure?')) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
$('#accountGatewayPublicId').val(id);
|
|
|
|
$('form.user-form').submit();
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
@stop
|