@extends('layouts.popup.medium') @section('bar-title') {{ trans('messages.plan.new_plan') }} @endsection @section('content')
{{ csrf_field() }}

{{ trans('messages.plan.sending_server') }}

{{ trans('messages.plan.sending_server.intro') }}


@include('helpers.form_control.control', [ 'type' => 'text', 'name' => 'plan[options][sending_servers_max]', 'value' => $plan->getOption('sending_servers_max'), 'label' => trans('messages.max_sending_servers'), 'help_class' => 'plan', 'attributes' => [ 'default-value' => '10', ], ])
@include('helpers.form_control.control', [ 'type' => 'checkbox', 'name' => 'unlimited', 'value' => '', 'label' => trans('messages.unlimited'), 'attributes' => [ 'checked' => $plan->getOption('sending_servers_max') == -1, ], ])

@include('helpers.form_control', ['type' => 'checkbox2', 'class' => '', 'name' => 'plan[options][all_sending_server_types]', 'value' => $plan->getOption('all_sending_server_types'), 'label' => trans('messages.allow_adding_all_sending_server_types'), 'options' => ['no','yes'], 'help_class' => 'plan', 'rules' => $plan->validationRules()['options'], ])


@foreach (Acelle\Model\SendingServer::types() as $key => $type)
@include('helpers.form_control', ['type' => 'checkbox', 'class' => '', 'name' => 'plan[options][sending_server_types][' . $key . ']', 'value' => isset($plan->getOption('sending_server_types')[$key]) ? $plan->getOption('sending_server_types')[$key] : 'no', 'label' => '', 'options' => ['no','yes'], 'help_class' => 'plan', 'rules' => $plan->validationRules()['options'], ])   {{ trans('messages.' . $key) }}
@endforeach

@if (Auth()->user()->admin->getSubaccountSendingServers()->count())
@include('helpers.form_control', [ 'type' => 'select', 'class' => 'numeric', 'name' => 'plan[options][sending_server_subaccount_uid]', 'value' => $plan->getOption('sending_server_subaccount_uid'), 'label' => '', 'help_class' => 'plan', 'include_blank' => trans('messages.select_sending_server_with_subaccount'), 'options' => Auth()->user()->admin->getSubaccountSendingServersSelectOptions(), 'rules' => $plan->validationRules()['options'], ])
@else
{!! trans('messages.plan_option.there_no_subaccount_sending_server') !!}
@endif
{{ trans('messages.plan.wizard.cancel') }}
@endsection