{{ $pageTitle ?? trans('messages.list') }}
{{ __('messages.back') }}
{{ Form::model($plan,['method' => 'POST','route'=>'plans.store', 'enctype'=>'multipart/form-data', 'data-toggle'=>"validator" ,'id'=>'plan'] ) }} {{ Form::hidden('id') }}
{{ Form::label('title',trans('messages.title').' *',['class'=>'form-control-label'], false ) }} {{ Form::text('title',old('title'),['placeholder' => trans('messages.title'),'class' =>'form-control','required']) }}
{{ Form::label('type',trans('messages.type').' *',['class'=>'form-control-label'],false) }} {{ Form::select('type',['monthly' => __('messages.monthly') , 'yearly' => __('messages.yearly') ],old('type'),[ 'id' => 'type' ,'class' =>'form-control select2js','required']) }}
{{ Form::label('duration',trans('messages.duration').' *',['class'=>'form-control-label'],false) }} {{ Form::select('duration',['1' => '1' , '2' => '2','3' => '3','4' => '4','5' => '5','6' => '6','7' => '7','8' => '8','9' => '9','10' => '10','11' => '11','12' => '12' ],old('duration'),[ 'id' => 'duration' ,'class' =>'form-control select2js','required']) }}
{{ Form::label('amount',__('messages.amount').' *', ['class' => 'form-control-label'],false) }} {{ Form::number('amount',old('amount'),['placeholder' => __('messages.amount'),'class' =>'form-control', 'required', 'step' => 'any', 'min' => 0]) }}
{{ Form::label('status',trans('messages.status').' *',['class'=>'form-control-label'],false) }} {{ Form::select('status',['1' => __('messages.active') , '0' => __('messages.inactive') ],old('status'),[ 'id' => 'role' ,'class' =>'form-control select2js','required']) }}
{{ Form::label('plan_type',trans('messages.plan_limitation').' *',['class'=>'form-control-label'],false) }}
{{ Form::label('description',__('messages.description'), ['class' => 'form-control-label']) }} {{ Form::textarea('description', null, ['class'=>"form-control textarea" , 'rows'=>3 , 'placeholder'=> __('messages.description') ]) }}
@foreach($plan_limit as $key => $value)
{{ Form::checkbox("plan_limitation[$value->value][is_checked]", $planValue!= null ? $planValue[$value->value]['is_checked'] : null, $planValue!= null && $planValue[$value->value]['is_checked'] == 'on' ? true : false, ['class' => 'custom-control-input checklist' , 'id' => "enable_".$value->value ,'onClick' => "showCheckLimitData('enable_$value->value')" ]) }}
{{ Form::label('service_limit',__('messages.limit'), ['class' => 'form-control-label']) }} {{ Form::number("plan_limitation[$value->value][limit]",$planValue!= null ? $planValue[$value->value]['limit'] : null,['placeholder' => __('messages.plan_limitations',['keyword' => __('messages.'.$value->value)] ),'class' =>'form-control', 'step' => 'any', 'min' => 0]) }}
@endforeach
{{ Form::label('trial_period',__('messages.trial_period'), ['class' => 'form-control-label']) }} {{ Form::number('trial_period',old('trial_period'),['placeholder' => __('messages.trial_period'),'class' =>'form-control', 'step' => 'any', 'min' => 0]) }}
{{ Form::submit( trans('messages.save'), ['class'=>'btn btn-md btn-primary float-right']) }} {{ Form::close() }}
@section('bottom_script') @endsection