@extends('backend.layouts.app') @section('content')

{{ html()->form('PUT' ,route('backend.videos.update', $data->id)) ->attribute('enctype', 'multipart/form-data') ->attribute('data-toggle', 'validator') ->attribute('id', 'form-submit') // Add the id attribute here ->attribute('novalidate', 'novalidate') // Disable default browser validation ->class('requires-validation') // Add the requires-validation class ->open() }} @csrf
{{__('customer.about')}} {{ __('video.singular_title') }}
{{ html()->label(__('movie.lbl_poster'), 'poster')->class('form-label') }}
{{ html()->button(__(''. __('messages.lbl_choose_image'))) ->class('input-group-text form-control') ->type('button') ->attribute('data-bs-toggle', 'modal') ->attribute('data-bs-target', '#exampleModal') ->attribute('data-image-container', 'selectedImageContainer2') ->attribute('data-hidden-input', 'file_url2') ->style('height: 13.8rem') }} {{ html()->text('image_input2') ->class('form-control') ->placeholder(__('placeholder.lbl_image')) ->attribute('aria-label', 'Image Input 2') ->attribute('data-bs-toggle', 'modal') ->attribute('data-bs-target', '#exampleModal') ->attribute('data-image-container', 'selectedImageContainer2') ->attribute('data-hidden-input', 'file_url2') ->attribute('aria-describedby', 'basic-addon1') }}
@if ($data->poster_url) × @else

No image selected.

@endif
{{ html()->hidden('poster_url')->id('file_url2')->value($data->poster_url) }} {{ html()->hidden('remove_image')->id('remove_image_flag')->value(0) }}
{{ html()->label(__('video.lbl_title') . ' *', 'name')->class('form-label') }} {{ html()->text('name')->attribute('value', $data->name)->placeholder(__('placeholder.lbl_movie_name'))->class('form-control')->attribute('required','required') }} @error('name') {{ $message }} @enderror
Title field is required
{{ html()->label(__('movie.lbl_movie_access') , 'access')->class('form-label') }}
@error('movie_access') {{ $message }} @enderror
{{ html()->label(__('movie.lbl_select_plan'). ' *', 'type')->class('form-label') }} {{ html()->select('plan_id', $plan->pluck('name', 'id')->prepend(__('placeholder.lbl_select_plan'), ''), $data->plan_id)->class('form-control select2')->id('plan_id') }} @error('plan_id') {{ $message }} @enderror
Plan field is required
{{--
{{ html()->label(__('movie.lbl_trailer_url_type'), 'type')->class('form-label') }} {{ html()->select( 'trailer_url_type', $upload_url_type->pluck('name', 'value')->prepend(__('placeholder.lbl_select_type'), ''), old('trailer_url_type', $data->trailer_url_type ?? '') )->class('form-control select2')->id('trailer_url_type') }} @error('trailer_url_type') {{ $message }} @enderror
{{ html()->label(__('movie.lbl_trailer_url'), 'trailer_url')->class('form-label') }} {{ html()->text('trailer_url')->attribute('value', $data->trailer_url)->placeholder(__('placeholder.lbl_trailer_url'))->class('form-control') }} @error('trailer_url') {{ $message }} @enderror
{{ html()->label(__('movie.lbl_trailer_video'), 'trailer_video')->class('form-label') }}
@if (Str::endsWith($data->trailer_url, ['.jpeg', '.jpg', '.png', '.gif'])) @else @endif
{{ html()->hidden('trailer_video')->id('file_url3')->value($data->trailer_url)->attribute('data-validation', 'iq_video_quality') }} @error('trailer_video') {{ $message }} @enderror
--}}
{{ html()->label(__('plan.lbl_status'), 'status')->class('form-label') }}
{{ html()->label(__('messages.active'), 'status')->class('form-label mb-0 text-body') }}
{{ html()->hidden('status', 0) }} {{ html()->checkbox('status',$data->status) ->class('form-check-input') ->id('status') ->value(1) }}
@error('status') {{ $message }} @enderror
{{ html()->label(__('movie.lbl_short_desc'), 'short_desc')->class('form-label') }} {{ __('messages.lbl_chatgpt') }}
{{ html()->textarea('short_desc',$data->short_desc )->class('form-control')->id('short_desc')->placeholder(__('placeholder.episode_short_desc'))->rows('8') }} @error('short_desc') {{ $message }} @enderror
{{ html()->label(__('movie.lbl_description'). ' *', 'description')->class('form-label mb-0') }} {{ __('messages.lbl_chatgpt') }}
{{ html()->textarea('description',$data->description)->class('form-control')->id('description')->placeholder(__('placeholder.lbl_movie_description'))->attribute('required','required') }} @error('description') {{ $message }} @enderror
Description field is required
{{ __('movie.lbl_basic_info') }}
{{ html()->label(__('movie.lbl_duration') . ' *', 'duration')->class('form-label') }} {{ html()->time('duration')->attribute('value', $data->duration)->placeholder(__('movie.lbl_duration'))->class('form-control min-datetimepicker-time')->attribute('required','required') }} @error('duration') {{ $message }} @enderror
Duration field is required
{{ html()->label(__('movie.lbl_release_date') , 'release_date')->class('form-label') }} {{ html()->date('release_date')->attribute('value', $data->release_date)->placeholder(__('movie.lbl_release_date'))->class('form-control datetimepicker') }} @error('release_date') {{ $message }} @enderror {{--
Release Date field is required
--}}
{{ html()->label(__('movie.lbl_age_restricted'), 'is_restricted')->class('form-label') }}
{{ html()->label(__('movie.lbl_child_content'), 'is_restricted')->class('form-label mb-0 text-body') }}
{{ html()->hidden('is_restricted', 0) }} {{ html()->checkbox('is_restricted', $data->is_restricted)->class('form-check-input')->id('is_restricted') }}
@error('is_restricted') {{ $message }} @enderror
{{ html()->label(__('movie.lbl_download_status'), 'download_status')->class('form-label') }}
{{ html()->label(__('movie.lbl_download_status'), 'download_status')->class('form-label mb-0 text-body') }}
{{ html()->hidden('download_status', 0) }} {{ html()->checkbox('download_status', !empty($data) && $data->download_status == 1)->class('form-check-input')->id('download_status')->value(1) }}
@error('download_status') {{ $message }} @enderror
{{ __('movie.lbl_video_info') }}
{{ html()->label(__('movie.lbl_video_upload_type'), 'video_upload_type')->class('form-label') }} {{ html()->select( 'video_upload_type', $upload_url_type->pluck('name', 'value')->prepend(__('placeholder.lbl_select_video_type'), ''), old('video_upload_type', $data->video_upload_type ?? ''), )->class('form-control select2')->id('video_upload_type')->required() }} @error('video_upload_type') {{ $message }} @enderror
Video Type field is required
{{ html()->label(__('movie.video_url_input'), 'video_url_input')->class('form-label') }} {{ html()->text('video_url_input')->attribute('value', $data->video_url_input)->placeholder(__('placeholder.video_url_input'))->class('form-control') }} @error('video_url_input') {{ $message }} @enderror
Video Url field is required
{{ html()->label(__('movie.video_file_input'), 'video_file')->class('form-label') }}
@if (Str::endsWith($data->video_url_input, ['.jpeg', '.jpg', '.png', '.gif'])) @else @endif
{{ html()->hidden('video_file_input')->id('file_url4')->value($data->video_url_input)->attribute('data-validation', 'iq_video_quality') }} @error('video') {{ $message }} @enderror
Video file field is required
{{ __('movie.lbl_quality_info') }}
enable_quality == 1 ? 'checked' : ''}} >
@error('enable_quality') {{ $message }} @enderror
@if(!empty($data['VideoStreamContentMappings']) && count($data['VideoStreamContentMappings']) > 0) @foreach($data['VideoStreamContentMappings'] as $mapping)
{{ html()->label(__('movie.lbl_video_upload_type'), 'video_quality_type')->class('form-label') }} {{ html()->select( 'video_quality_type[]', $upload_url_type->pluck('name', 'value')->prepend(__('placeholder.lbl_select_video_type'), ''), $mapping->type, )->class('form-control select2 video_quality_type')->id('video_quality_type_' . $mapping->id) }} @error('video_quality_type') {{ $message }} @enderror
{{ html()->label(__('movie.lbl_video_quality'), 'video_quality')->class('form-label') }} {{ html()->select( 'video_quality[]', $video_quality->pluck('name', 'value')->prepend(__('placeholder.lbl_select_quality'), ''), $mapping->quality // Populate the select with the existing quality )->class('form-control select2')->id('video_quality_' . $mapping->id) }} @error('video_quality') {{ $message }} @enderror
{{ html()->label(__('movie.video_url_input'), 'quality_video_url_input')->class('form-label') }} {{ html()->text('quality_video_url_input[]', $mapping->url) // Populate the input with the existing URL ->placeholder(__('placeholder.video_url_input'))->class('form-control') }} @error('quality_video_url_input') {{ $message }} @enderror
{{ html()->label(__('movie.video_file_input'), 'quality_video')->class('form-label') }}
@if (Str::endsWith(setBaseUrlWithFileName($mapping->url), ['.jpeg', '.jpg', '.png', '.gif'])) @else @endif
{{ html()->hidden('quality_video[]')->id('file_url5')->value(setBaseUrlWithFileName($mapping->url))->attribute('data-validation', 'iq_video_quality') }} @error('quality_video') {{ $message }} @enderror
@endforeach @else
{{ html()->label(__('movie.lbl_video_upload_type'), 'video_quality_type')->class('form-label') }} {{ html()->select( 'video_quality_type[]', $upload_url_type->pluck('name', 'value')->prepend(__('placeholder.lbl_select_video_type'), ''), old('video_quality_type', 'Local'), )->class('form-control select2 video_quality_type') }} @error('video_quality_type') {{ $message }} @enderror
{{ html()->label(__('movie.lbl_video_quality'), 'video_quality')->class('form-label') }} {{ html()->select( 'video_quality[]', $video_quality->pluck('name', 'value')->prepend(__('placeholder.lbl_select_quality'), ''), null // No existing quality )->class('form-control select2')->id('video_quality_new') }} @error('video_quality') {{ $message }} @enderror
{{ html()->label(__('movie.video_url_input'), 'quality_video_url_input')->class('form-label') }} {{ html()->text('quality_video_url_input[]', null) // No existing URL ->placeholder(__('placeholder.video_url_input'))->class('form-control') }} @error('quality_video_url_input') {{ $message }} @enderror
{{ html()->label(__('movie.video_file_input'), 'quality_video')->class('form-label') }}
@if ($data->video_quality_url) @endif
{{ html()->hidden('video_quality_url')->id('file_url5')->value( setBaseUrlWithFileName($data->video_quality_url)) }} {{-- {{ html()->file('quality_video[]')->class('form-control-file')->accept('video/*')->class('form-control') }} --}} @error('quality_video') {{ $message }} @enderror
@endif
@include('components.media-modal') @endsection @push('after-scripts') @endpush