@extends('header') @section('head') @parent @stop @section('content') @parent @include('accounts.nav', ['selected' => ACCOUNT_IMPORT_EXPORT])

{!! trans('texts.import_data') !!}

{!! Former::open_for_files('/import') ->addClass('warn-on-exit') !!} {!! Former::select('source') ->onchange('setFileTypesVisible()') ->options(array_combine(\App\Services\ImportService::$sources, \App\Services\ImportService::$sources)) ->style('width: 200px') !!}
@foreach (\App\Services\ImportService::$entityTypes as $entityType) {!! Former::file("{$entityType}_file") ->addGroupClass("import-file {$entityType}-file") !!} @endforeach
{!! Former::actions( Button::info(trans('texts.upload'))->submit()->large()->appendIcon(Icon::create('open'))) !!} {!! Former::close() !!}
{!! Former::open('/export') !!}

{!! trans('texts.export_data') !!}

{!! Former::select('format') ->onchange('setCheckboxesEnabled()') ->addOption('CSV', 'CSV') ->addOption('XLS', 'XLS') ->addOption('JSON', 'JSON') ->style('max-width: 200px') ->help('
' . trans('texts.export_help')) !!}
{!! Former::inline_radios('include_radio') ->onchange('setCheckboxesEnabled()') ->label(trans('texts.include')) ->radios([ trans('texts.all') . '   ' => ['value' => 'all', 'name' => 'include'], trans('texts.selected') => ['value' => 'selected', 'name' => 'include'], ])->check('all') !!}
@include('partials/checkbox', ['field' => 'clients']) @include('partials/checkbox', ['field' => 'contacts']) @include('partials/checkbox', ['field' => 'credits']) @include('partials/checkbox', ['field' => 'tasks'])
@include('partials/checkbox', ['field' => 'invoices']) @include('partials/checkbox', ['field' => 'quotes']) @include('partials/checkbox', ['field' => 'recurring']) @include('partials/checkbox', ['field' => 'payments'])
@include('partials/checkbox', ['field' => 'products']) @include('partials/checkbox', ['field' => 'expenses']) @include('partials/checkbox', ['field' => 'vendors']) @include('partials/checkbox', ['field' => 'vendor_contacts'])

{!! Former::actions( Button::primary(trans('texts.download'))->submit()->large()->appendIcon(Icon::create('download-alt'))) !!}
{!! Former::close() !!} @stop