@if (array_key_exists("name", Acelle\Model\SendingServer::types()[request()->type]["cols"]))
@include('helpers.form_control', [
'type' => 'text',
'class' => '',
'name' => 'name',
'value' => $server->name,
'help_class' => 'sending_server',
'rules' => Acelle\Model\SendingServer::rules(request()->type)
])
@endif
@if (array_key_exists("domain", Acelle\Model\SendingServer::types()[request()->type]["cols"]))
@include('helpers.form_control', [
'type' => 'text',
'class' => '',
'name' => 'domain',
'value' => $server->domain,
'help_class' => 'sending_server',
'rules' => Acelle\Model\SendingServer::rules(request()->type)
])
@endif
@if (array_key_exists("api_key", Acelle\Model\SendingServer::types()[request()->type]["cols"]))
@include('helpers.form_control', [
'type' => 'text',
'class' => '',
'name' => 'api_key',
'value' => $server->api_key,
'help_class' => 'sending_server',
'rules' => Acelle\Model\SendingServer::rules(request()->type)
])
@endif
@if (array_key_exists("host", Acelle\Model\SendingServer::types()[request()->type]["cols"]) && request()->type != 'sparkpost-api' && request()->type != 'mailgun-api')
@include('helpers.form_control', [
'type' => 'text',
'class' => '',
'name' => 'host',
'value' => $server->host,
'help_class' => 'sending_server',
'rules' => Acelle\Model\SendingServer::rules(request()->type)
])
@endif
@if ( array_key_exists("host", Acelle\Model\SendingServer::types()[request()->type]["cols"]) && request()->type == 'sparkpost-api' )
@include('helpers.form_control', [
'type' => 'select',
'class' => '',
'name' => 'host',
'value' => $server->host,
'help_class' => 'sending_server',
'options' => Acelle\Model\SendingServerSparkPost::HOSTS,
'rules' => Acelle\Model\SendingServer::rules(request()->type)
])
@endif
@if ( array_key_exists("host", Acelle\Model\SendingServer::types()[request()->type]["cols"]) && request()->type == 'mailgun-api' )
@include('helpers.form_control', [
'type' => 'select',
'class' => '',
'name' => 'host',
'value' => $server->host,
'help_class' => 'sending_server',
'options' => Acelle\Model\SendingServer::mailgunRegionSelectOptions(),
'rules' => Acelle\Model\SendingServer::rules(request()->type)
])
@endif
@if (array_key_exists("aws_access_key_id", Acelle\Model\SendingServer::types()[request()->type]["cols"]))
@include('helpers.form_control', [
'type' => 'text',
'class' => '',
'name' => 'aws_access_key_id',
'value' => $server->aws_access_key_id,
'help_class' => 'sending_server',
'rules' => Acelle\Model\SendingServer::rules(request()->type)
])
@endif
@if (array_key_exists("aws_secret_access_key", Acelle\Model\SendingServer::types()[request()->type]["cols"]))
@include('helpers.form_control', [
'type' => 'text',
'class' => '',
'name' => 'aws_secret_access_key',
'value' => $server->aws_secret_access_key,
'help_class' => 'sending_server',
'rules' => Acelle\Model\SendingServer::rules(request()->type)
])
@endif
@if (array_key_exists("aws_region", Acelle\Model\SendingServer::types()[request()->type]["cols"]))
@include('helpers.form_control', [
'type' => 'select',
'class' => '',
'name' => 'aws_region',
'value' => $server->aws_region,
'help_class' => 'sending_server',
'options' => Acelle\Model\SendingServer::awsRegionSelectOptions(),
'rules' => Acelle\Model\SendingServer::rules(request()->type)
])
@endif
@if (array_key_exists("smtp_username", Acelle\Model\SendingServer::types()[request()->type]["cols"]))
@include('helpers.form_control', [
'type' => 'text',
'class' => '',
'name' => 'smtp_username',
'value' => $server->smtp_username,
'help_class' => 'sending_server',
'rules' => Acelle\Model\SendingServer::rules(request()->type)
])
@endif
@if (array_key_exists("smtp_password", Acelle\Model\SendingServer::types()[request()->type]["cols"]))
@include('helpers.form_control', [
'type' => 'text',
'class' => '',
'name' => 'smtp_password',
'value' => $server->smtp_password,
'help_class' => 'sending_server',
'rules' => Acelle\Model\SendingServer::rules(request()->type)
])
@endif
@if (array_key_exists("smtp_port", Acelle\Model\SendingServer::types()[request()->type]["cols"]))
@include('helpers.form_control', [
'type' => 'text',
'class' => '',
'name' => 'smtp_port',
'value' => $server->smtp_port,
'help_class' => 'sending_server',
'rules' => Acelle\Model\SendingServer::rules(request()->type)
])
@endif
@if (array_key_exists("smtp_protocol", Acelle\Model\SendingServer::types()[request()->type]["cols"]))
@include('helpers.form_control', [
'type' => 'text',
'class' => '',
'name' => 'smtp_protocol',
'value' => $server->smtp_protocol,
'help_class' => 'sending_server',
'rules' => Acelle\Model\SendingServer::rules(request()->type)
])
@endif
@if (array_key_exists("sendmail_path", Acelle\Model\SendingServer::types()[request()->type]["cols"]))
@include('helpers.form_control', [
'type' => 'text',
'class' => '',
'name' => 'sendmail_path',
'value' => $server->sendmail_path,
'help_class' => 'sending_server',
'rules' => Acelle\Model\SendingServer::rules(request()->type)
])
@endif
@if (array_key_exists("default_from_email", Acelle\Model\SendingServer::types()[request()->type]["cols"]))
@include('helpers.form_control', [
'type' => 'text',
'class' => '',
'name' => 'default_from_email',
'value' => $server->default_from_email,
'help_class' => 'sending_server',
'rules' => Acelle\Model\SendingServer::rules(request()->type)
])
@endif