@extends('backend.layouts.app') @section('content') {{ html()->form('POST' ,route('backend.plans.store')) ->attribute('data-toggle', 'validator') ->attribute('id', 'form-submit') // Add the id attribute here ->class('requires-validation') // Add the requires-validation class ->attribute('novalidate', 'novalidate') // Disable default browser validation ->open() }}
{{ html()->label(__('plan.lbl_name') . ' *', 'name')->class('form-label') }} {{ html()->text('name') ->attribute('value', old('name')) ->placeholder(__('placeholder.lbl_plan_name')) ->class('form-control') ->attribute('required','required') }} @error('name') {{ $message }} @enderror
Name field is required
{{ html()->label(__('plan.lbl_duration') . '*', 'duration')->class('form-label') }} {{ html()->select('duration', [ '' => __('messages.lbl_select_duration'), 'week' => 'Week', 'month' => 'Month', 'year' => 'Year' ], old('duration')) ->class('form-control select2') ->id('duration') ->attribute('placeholder', __('placeholder.lbl_plan_duration_type')) ->attribute('required','required') }} @error('duration') {{ $message }} @enderror
Duration field is required
{{ html()->label(__('plan.lbl_duration_value') . '*', 'duration_value')->class('form-label') }} {{ html()->input('number', 'duration_value', old('duration_value')) ->class('form-control') ->id('duration_value') ->attribute('placeholder', __('placeholder.lbl_plan_duration_value')) ->attribute('oninput', "this.value = Math.abs(this.value)") ->attribute('required','required') }} @error('duration_value') {{ $message }} @enderror
Duration Value field is required
{{ html()->label(__('plan.lbl_amount') . '*', 'price')->class('form-label') }} {{ html()->input('number', 'price', old('price')) ->class('form-control') ->id('price') ->attribute('step', '0.01') ->attribute('placeholder', __('placeholder.lbl_plan_price')) ->attribute('oninput', "this.value = Math.abs(this.value)") ->attribute('required','required') }} @error('price') {{ $message }} @enderror
Price field is required
{{ html()->label(__('plan.lbl_discount'), 'discount')->class('form-label') }}
{{ html()->label(__('messages.active'), 'discount')->class('form-label mb-0 text-body') }}
{{ html()->hidden('discount', 0) }} {{ html()->checkbox('discount',old('discount', false)) ->class('form-check-input') ->id('discount-toggle') }}
@error('discount') {{ $message }} @enderror
@if($purchaseMethodEnabled)
{{ html()->label(__('messages.lbl_android_identifier') . '*', 'android_identifier')->class('form-label') }} {{ html()->text('android_identifier', old('android_identifier')) ->class('form-control') ->id('android_identifier') ->attribute('placeholder', __('messages.lbl_android_identifier')) ->attribute('required','required') }} @error('android_identifier') {{ $message }} @enderror
Android Identifier field is required
{{ html()->label(__('messages.lbl_apple_identifier') . '*', 'apple_identifier')->class('form-label') }} {{ html()->text('apple_identifier', old('apple_identifier')) ->class('form-control') ->id('apple_identifier') ->attribute('placeholder', __('messages.lbl_apple_identifier')) ->attribute('required','required') }} @error('apple_identifier') {{ $message }} @enderror
Apple Identifier field is required
@endif
{{ html()->label(__('plan.lbl_status'), 'status')->class('form-label') }}
{{ html()->label(__('messages.active'), 'status')->class('form-label mb-0 text-body') }}
{{ html()->hidden('status', 1) }} {{ html()->checkbox('status',old('status', true)) ->class('form-check-input') ->id('status') }}
@error('status') {{ $message }} @enderror
{{ html()->label(__('plan.lbl_discount_percentage') . '*', 'discount_percentage')->class('form-label') }} {{ html()->input('number', 'discount_percentage', old('discount_percentage')) ->class('form-control') ->id('discount_percentage') ->attribute('min', '0') ->attribute('max', '99') ->attribute('placeholder', __('plan.enter_discount_percentage')) }} @error('discount_percentage') {{ $message }} @enderror
Discount percentage is required
{{ html()->label(__('plan.lbl_total_price'), 'total_price')->class('form-label') }} {{ html()->input('number', 'total_price', old('total_price')) ->class('form-control') ->id('total_price') ->attribute('step', '0.01') ->attribute('placeholder', __('plan.lbl_total_price')) ->attribute('readonly', 'readonly') }} @error('total_price') {{ $message }} @enderror
Total price field is required
{{ html()->label(__('plan.lbl_description') . '*', 'description')->class('form-label') }} {{ html()->textarea('description') ->attribute('value', old('description')) ->placeholder(__('placeholder.lbl_plan_limit_description')) ->class('form-control') ->attribute('required','required') }} @error('description') {{ $message }} @enderror
Description field is required
@if(!empty($planLimits))
{{ __('plan.lbl_plan_limits') }}
@endif
@foreach($planLimits as $planLimit)
slug, false) ? 'checked' : '' }} onchange="toggleQualitySection()">
@error($planLimit->slug ) {{ $message }} @enderror
@if($planLimit->slug=='device-limit')
{{ html()->label(__('plan.lbl_device_limit'), 'device_limit_value')->class('form-label') }} {{ html()->input('number', 'device_limit_value', old('device_limit_value')) ->class('form-control') ->id('device_limit_value') ->attribute('placeholder', __('placeholder.lbl_device_limit')) ->attribute('value', '0') ->attribute('min', '1') }} @error('device_limit_value') {{ $message }} @enderror
Device Limit field is required
@endif @if($planLimit->slug=='profile-limit')
{{ html()->label(__('plan.lbl_profile_limit'), 'profile_limit_value')->class('form-label') }} {{ html()->input('number', 'profile_limit_value', old('profile_limit_value')) ->class('form-control') ->id('profile_limit_value') ->attribute('placeholder', __('placeholder.lbl_device_limit')) ->attribute('value', '0') ->attribute('min', '1') }} @error('profile_limit_value') {{ $message }} @enderror
Profile Limit field is required
@endif @if($planLimit->slug=='download-status')
@foreach($downloadoptions as $option)
value, false) ? 'checked' : '' }} onchange="toggleQualitySection()">
@endforeach
@endif @if($planLimit->slug == 'supported-device-type')
@foreach(['tablet', 'laptop', 'mobile'] as $option)
@endforeach
@endif @endforeach
{{ html()->submit(trans('messages.save'))->class('btn btn-md btn-primary float-right')->id('submit-button') }}
{{ html()->form()->close() }} @endsection @push('after-scripts') @endpush