{!! Form::open(['route' => ['admin::newsletter::settings::save'], 'class' => 'form-horizontal']) !!} @if ($smtpConnection)
{{ trans('Newsletter::admin/settings/list.smtp.connection.success') }}
@else
{{ trans('Newsletter::admin/settings/list.smtp.connection.error') }}
@endif
{!! Form::label(trans('Newsletter::admin/settings/list.labels.username'), null, ['class' => 'control-label col-sm-2'] ) !!}
{!! Form::text('username', !$settings->isEmpty() ? $settings->first()->username : null, ['class' => 'form-control', 'name' => 'username', 'placeholder' => trans('Newsletter::admin/settings/list.placeholders.username') ] ) !!}
{!! Form::label(trans('Newsletter::admin/settings/list.labels.password'), null, ['class' => 'control-label col-sm-2'] ) !!}
{!! Form::input('password', 'password', !$settings->isEmpty() ? $settings->first()->password : null ) !!}
{!! Form::label(trans('Newsletter::admin/settings/list.labels.port'), null, ['class' => 'control-label col-sm-2'] ) !!}
{!! Form::text('port', !$settings->isEmpty() ? $settings->first()->port : null, ['class' => 'form-control', 'name' => 'port', 'placeholder' => trans('Newsletter::admin/settings/list.placeholders.port') ] ) !!}
{!! Form::label(trans('Newsletter::admin/settings/list.labels.adress'), null, ['class' => 'control-label col-sm-2'] ) !!}
{!! Form::text('adress', !$settings->isEmpty() ? $settings->first()->adress : null, ['class' => 'form-control', 'name' => 'adress', 'placeholder' => trans('Newsletter::admin/settings/list.placeholders.adress') ] ) !!}
{!! Form::label(trans('Newsletter::admin/settings/list.labels.host'), null, ['class' => 'control-label col-sm-2'] ) !!}
{!! Form::text('host', !$settings->isEmpty() ? $settings->first()->host : null, ['class' => 'form-control', 'name' => 'host', 'placeholder' => trans('Newsletter::admin/settings/list.placeholders.host') ] ) !!}
{!! Form::label(trans('Newsletter::admin/settings/list.labels.name'), null, ['class' => 'control-label col-sm-2'] ) !!}
{!! Form::text('name', !$settings->isEmpty() ? $settings->first()->name : null, ['class' => 'form-control', 'name' => 'name', 'placeholder' => trans('Newsletter::admin/settings/list.placeholders.name') ] ) !!}
{!! Form::label(trans('Newsletter::admin/settings/list.labels.encryption'), null, ['class' => 'control-label col-sm-2'] ) !!}
{!! Form::select('encryption', [ \App\Core\Modules\Newsletter\Models\NewsletterSettings::ENCRYPTION_SSL => 'SSL', \App\Core\Modules\Newsletter\Models\NewsletterSettings::ENCRYPTION_TLS => 'TLS', \App\Core\Modules\Newsletter\Models\NewsletterSettings::ENCRYPTION_NONE => trans('Newsletter::admin/settings/list.smtp.encryption.none')], !$settings->isEmpty() ? $settings->first()->encryption : null, ['id' => 'encryption', 'class' => 'form-control']) !!}
{!! Form::submit(trans('Newsletter::admin/settings/list.labels.save'), ['class' => 'btn btn-success', 'name' => 'submit']) !!}
{!! Form::close() !!}