{{ trans('messages.list.title.edit') }}

{{ trans('messages.list_details') }}

@include('helpers.form_control', [ 'type' => 'text', 'name' => 'name', 'value' => $list->name, 'help_class' => 'list', 'rules' => Acelle\Model\MailList::$rules, ]) @include('helpers.form_control', ['type' => 'text', 'name' => 'from_name', 'label' => trans('messages.default_from_name'), 'value' => $list->from_name, 'help_class' => 'list', 'rules' => Acelle\Model\MailList::$rules])
@include('helpers.form_control', [ 'type' => 'autofill', 'id' => 'sender_from_input', 'name' => 'from_email', 'label' => trans('messages.from_email'), 'value' => $list->from_email, 'help_class' => 'list', 'rules' => Acelle\Model\MailList::$rules, 'url' => action('SenderController@dropbox'), 'empty' => trans('messages.sender.dropbox.empty'), 'error' => trans('messages.sender.dropbox.error', [ 'sender_link' => action('SenderController@index'), ]), 'header' => trans('messages.verified_senders'), ])

{{ trans('messages.contact_information') }} {!! trans('messages.default_from_your_contact_information', ['link' => action('AccountController@contact')]) !!}

@include('helpers.form_control', ['type' => 'text', 'name' => 'contact[company]', 'label' => trans('messages.company_organization'), 'value' => $list->contact->company, 'help_class' => 'list', 'rules' => Acelle\Model\MailList::$rules])
@include('helpers.form_control', ['type' => 'text', 'name' => 'contact[phone]', 'label' => trans('messages.phone'), 'value' => $list->contact->phone, 'help_class' => 'list', 'rules' => Acelle\Model\MailList::$rules])
@include('helpers.form_control', ['type' => 'text', 'name' => 'contact[email]', 'label' => trans('messages.email'), 'value' => $list->contact->email, 'help_class' => 'list', 'rules' => Acelle\Model\MailList::$rules])
@include('helpers.form_control', ['type' => 'text', 'name' => 'contact[zip]', 'label' => trans('messages.zip_postal_code'), 'value' => $list->contact->zip, 'help_class' => 'list', 'rules' => Acelle\Model\MailList::$rules])
@include('helpers.form_control', ['type' => 'text', 'name' => 'contact[state]', 'label' => trans('messages.state_province_region'), 'value' => $list->contact->state, 'rules' => Acelle\Model\MailList::$rules])
@include('helpers.form_control', ['type' => 'text', 'name' => 'contact[city]', 'label' => trans('messages.city'), 'value' => $list->contact->city, 'help_class' => 'list', 'rules' => Acelle\Model\MailList::$rules])
@include('helpers.form_control', ['type' => 'text', 'name' => 'contact[address_1]', 'label' => trans('messages.address_1'), 'value' => $list->contact->address_1, 'help_class' => 'list', 'rules' => Acelle\Model\MailList::$rules])
@include('helpers.form_control', ['type' => 'text', 'name' => 'contact[address_2]', 'label' => trans('messages.address_2'), 'value' => $list->contact->address_2, 'help_class' => 'list', 'rules' => Acelle\Model\MailList::$rules])
@if (config('custom.japan')) @else
@include('helpers.form_control', ['type' => 'select', 'name' => 'contact[country_id]', 'label' => trans('messages.country'), 'value' => $list->contact->country_id, 'options' => Acelle\Model\Country::getSelectOptions(), 'include_blank' => trans('messages.choose'), 'rules' => Acelle\Model\MailList::$rules])
@endif
@include('helpers.form_control', ['type' => 'text', 'name' => 'contact[url]', 'label' => trans('messages.url'), 'label' => trans('messages.home_page'), 'value' => $list->contact->url, 'help_class' => 'list', 'rules' => Acelle\Model\MailList::$rules])

{{ trans('messages.settings') }}

{{ trans('messages.subscription') }}

{{--
@include('helpers.form_control', ['type' => 'text', 'name' => 'email_subscribe', 'value' => $list->email_subscribe, 'help_class' => 'list', 'rules' => Acelle\Model\MailList::$rules]) @include('helpers.form_control', ['type' => 'text', 'name' => 'email_unsubscribe', 'value' => $list->email_unsubscribe, 'help_class' => 'list', 'rules' => Acelle\Model\MailList::$rules])
--}}
@if ($allowedSingleOptin) @include('helpers.form_control', [ 'type' => 'checkbox', 'name' => 'subscribe_confirmation', 'value' => $list->subscribe_confirmation, 'options' => [false,true], 'help_class' => 'list', 'rules' => Acelle\Model\MailList::$rules ]) @else @endif @include('helpers.form_control', ['type' => 'checkbox', 'name' => 'unsubscribe_notification', 'value' => $list->unsubscribe_notification, 'options' => [false,true], 'help_class' => 'list', 'rules' => Acelle\Model\MailList::$rules])
@include('helpers.form_control', ['type' => 'checkbox', 'name' => 'send_welcome_email', 'value' => $list->send_welcome_email, 'options' => [false,true], 'help_class' => 'list', 'rules' => Acelle\Model\MailList::$rules])
@if (Auth::user()->customer->useOwnSendingServer())

{{ trans('messages.sending_servers') }}

@include('helpers.form_control', ['type' => 'checkbox2', 'class' => '', 'name' => 'all_sending_servers', 'value' => $list->all_sending_servers, 'label' => trans('messages.use_all_sending_servers'), 'options' => [false,true], 'help_class' => 'list', 'rules' => Acelle\Model\MailList::$rules ])
@if(!\Auth::user()->customer->activeSendingServers()->count())
{!! trans('messages.list.there_no_subaccount_sending_server') !!}
@else

@foreach (\Auth::user()->customer->activeSendingServers()->orderBy("name")->get() as $server)
@include('helpers.form_control', [ 'type' => 'checkbox2', 'name' => 'sending_servers[' . $server->uid . '][check]', 'value' => $list->mailListsSendingServers->contains('sending_server_id', $server->id), 'label' => $server->name, 'options' => [false, true], 'help_class' => 'list', 'rules' => Acelle\Model\MailList::$rules ])
@include('helpers.form_control', [ 'type' => 'text', 'class' => 'numeric', 'name' => 'sending_servers[' . $server->uid . '][fitness]', 'label' => '', 'value' => ($list->mailListsSendingServers()->where('sending_server_id', $server->id)->first() ? $list->mailListsSendingServers()->where('sending_server_id', $server->id)->first()->fitness : "100"), 'help_class' => 'list', 'rules' => Acelle\Model\MailList::$rules ])
@endforeach
@endif
@endif