@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('setEntityTypesVisible()') ->addOption('CSV', 'CSV') ->addOption('XLS', 'XLS') ->addOption('JSON', 'JSON') ->style('max-width: 200px') ->inlineHelp('export_help') !!} {!! Former::checkbox('entity_types') ->label('include') ->addGroupClass('entity-types') ->checkboxes([ trans('texts.clients') => array('name' => ENTITY_CLIENT, 'value' => 1), trans('texts.tasks') => array('name' => ENTITY_TASK, 'value' => 1), trans('texts.invoices') => array('name' => ENTITY_INVOICE, 'value' => 1), trans('texts.payments') => array('name' => ENTITY_PAYMENT, 'value' => 1), ])->check(ENTITY_CLIENT)->check(ENTITY_TASK)->check(ENTITY_INVOICE)->check(ENTITY_PAYMENT) !!} {!! Former::actions( Button::primary(trans('texts.download'))->submit()->large()->appendIcon(Icon::create('download-alt'))) !!}
{!! Former::close() !!} @stop