{{__('Edit Plan')}}

{!! Form::open(['class' => 'edit-plan-form']) !!} {{-- Plan section --}}
{{-- Select Plan --}} @php $planType = config('constants.plan_type_for_edit_user'); @endphp
{!! Form::hidden('plan_id', $plan->id, ['id'=>'plan_id','data-status'=>$plan->status,'data-cancalled-date'=> $plan->cancalled_at!=''?$plan->cancalled_at:'','data-is-cancel' => $plan->is_about_to_cancel!=''?$plan->is_about_to_cancel:'', 'start-date'=>date('m/d/Y', strtotime(' +1 day')) ]) !!} {{ Form::select('user_select_plan',$subscriptionPlans,$plan->subscription_plan_id,['class'=>'form-control select2 user_select_plan','disabled'=>true])}} @if ($errors->has('user_select_plan')) {{ $errors->first('user_select_plan') }} @endif
{{-- ./Select Plan --}} {{-- plan status toggle --}} @php $planStatus = ''; $planStatusDisable = ''; $pointerClass = ''; if($plan->status){ $planStatus = 'checked'; if($plan->is_about_to_cancel == 1 || $plan->status == 2){ $planStatusDisable = 'disabled'; $pointerClass = 'default-cursor'; } } @endphp
{{-- Plan status toggle --}}
{{-- ./plan status toggle --}} {{-- ****** Active plan section *******--}}
{{-- start date --}}
@php $userStartDate = ''; $disabled = true; if($plan->end_date != ''){ $userStartDate = date('m/d/Y',strtotime("+1 day",strtotime($plan->end_date))); } if($plan->status == 2){ $userStartDate = date('m/d/Y',strtotime("$plan->start_date")); $disabled = false; } if($plan->status != 1 && $plan->cancalled_at && $plan->is_about_to_cancel == ''){ $disabled = false; } @endphp
{{ Form::text('start_date',$userStartDate,['class'=>'form-control pull-left','id'=>'start_date','placeholder'=>__('language.user_plan_start_date'),'disabled'=>$disabled,'required'=>true])}}
@if ($errors->has('start_date')) {{ $errors->first('start_date') }} @endif
{{-- ./start date --}} {{-- Price type --}}
@php $default = true;$custom = false;@endphp @if($plan->custom_price != '') @php $default = false;$custom = true;@endphp @else @php $default = true;$custom = false;@endphp @endif
@if ($errors->has('price_type')) {{ $errors->first('price_type') }} @endif
{{-- ./Price type --}} {{-- custom price --}}
{{ Form::number('custom_price',$plan->custom_price,['class'=>'form-control custom_price','id'=>'custom_price','placeholder'=>__('language.user_plan_custom_price'),'min'=>1])}} @if ($errors->has('custom_price')) {{ $errors->first('custom_price') }} @endif
{{-- ./custom price --}}
{{-- ****** Active plan section *******--}} {{-- ****** Message section *******--}}
@if($plan->status == 1)
This plan has been cancelled by {{ $plan->cancelled_by==1?'User':'Complete Wills' }}. User will able to plan features till {{date('d F, Y',strtotime($plan->end_date))}}.
@elseif($plan->status == 2)
You have already renew this plan. The plan will be effecting form {{date('d F, Y',strtotime($plan->start_date))}}.
@else
This plan current In-active. You can active/renew by plan status toggle and by choose start date of the plan.
@endif
{{-- ****** Message section *******--}}
 
{!! Form::button('Save', ['class'=>'btn btn-primary plan-save-btn']) !!} {!! Form::button('Cancel', ['class'=>'btn cancel-btn']) !!}
{{-- ./Plan section --}}
{!! Form::close() !!}