@extends('backend.layouts.app') @section('title', __('labels.backend.lessons.title').' | '.app_name()) @push('after-styles') @endpush @section('content') {!! Form::open(['method' => 'POST', 'route' => ['admin.lessons.store'], 'files' => true,]) !!} {!! Form::hidden('model_id',0,['id'=>'lesson_id']) !!}

@lang('labels.backend.lessons.create')

{!! Form::label('course_id', trans('labels.backend.lessons.fields.course'), ['class' => 'control-label']) !!} {!! Form::select('course_id', $courses, (request('course_id')) ? request('course_id') : old('course_id'), ['class' => 'form-control select2']) !!}
{!! Form::label('title', trans('labels.backend.lessons.fields.title').'*', ['class' => 'control-label']) !!} {!! Form::text('title', old('title'), ['class' => 'form-control', 'placeholder' => trans('labels.backend.lessons.fields.title'), 'required' => '']) !!}
{!! Form::label('slug',trans('labels.backend.lessons.fields.slug'), ['class' => 'control-label']) !!} {!! Form::text('slug', old('slug'), ['class' => 'form-control', 'placeholder' => trans('labels.backend.lessons.slug_placeholder')]) !!}
{!! Form::label('lesson_image', trans('labels.backend.lessons.fields.lesson_image').' '.trans('labels.backend.lessons.max_file_size'), ['class' => 'control-label']) !!} {!! Form::file('lesson_image', ['class' => 'form-control' , 'accept' => 'image/jpeg,image/gif,image/png']) !!} {!! Form::hidden('lesson_image_max_size', 8) !!} {!! Form::hidden('lesson_image_max_width', 4000) !!} {!! Form::hidden('lesson_image_max_height', 4000) !!}
{!! Form::label('short_text', trans('labels.backend.lessons.fields.short_text'), ['class' => 'control-label']) !!} {!! Form::textarea('short_text', old('short_text'), ['class' => 'form-control ', 'placeholder' => trans('labels.backend.lessons.short_description_placeholder')]) !!}
{!! Form::label('full_text', trans('labels.backend.lessons.fields.full_text'), ['class' => 'control-label']) !!} {!! Form::textarea('full_text', old('full_text'), ['class' => 'form-control editor', 'placeholder' => '']) !!}
{!! Form::label('downloadable_files', trans('labels.backend.lessons.fields.downloadable_files').' '.trans('labels.backend.lessons.max_file_size'), ['class' => 'control-label']) !!} {!! Form::file('downloadable_files[]', [ 'multiple', 'class' => 'form-control file-upload', 'id' => 'downloadable_files', 'accept' => "image/jpeg,image/gif,image/png,application/msword,audio/mpeg,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application,application/vnd.openxmlformats-officedocument.presentationml.presentation,application/vnd.ms-powerpoint,application/pdf,video/mp4" ]) !!}
{!! Form::label('pdf_files', trans('labels.backend.lessons.fields.add_pdf'), ['class' => 'control-label']) !!} {!! Form::file('add_pdf', [ 'class' => 'form-control file-upload', 'id' => 'add_pdf', 'accept' => "application/pdf" ]) !!}
{!! Form::label('audio_files', trans('labels.backend.lessons.fields.add_audio'), ['class' => 'control-label']) !!} {!! Form::file('add_audio', [ 'class' => 'form-control file-upload', 'id' => 'add_audio', 'accept' => "audio/mpeg3" ]) !!}
{!! Form::label('add_video', trans('labels.backend.lessons.fields.add_video'), ['class' => 'control-label']) !!} {!! Form::select('media_type', ['youtube' => 'Youtube','vimeo' => 'Vimeo','upload' => 'Upload','embed' => 'Embed'],null,['class' => 'form-control', 'placeholder' => 'Select One','id'=>'media_type' ]) !!} {!! Form::text('video', old('video'), ['class' => 'form-control mt-3 d-none', 'placeholder' => trans('labels.backend.lessons.enter_video_url'),'id'=>'video' ]) !!} {!! Form::file('video_file', ['class' => 'form-control mt-3 d-none', 'placeholder' => trans('labels.backend.lessons.enter_video_url'),'id'=>'video_file' ]) !!} @lang('labels.backend.lessons.video_guide')
{!! Form::hidden('published', 0) !!} {!! Form::checkbox('published', 1, false, []) !!} {!! Form::label('published', trans('labels.backend.lessons.fields.published'), ['class' => 'checkbox control-label font-weight-bold']) !!}
{!! Form::submit(trans('strings.backend.general.app_save'), ['class' => 'btn btn-danger']) !!}
{!! Form::close() !!} @stop @push('after-scripts') @endpush