@extends('layouts.admin') @section('css') @endsection @section('content')
{{ Form::open(array('route' => $routes, 'method' => 'POST' ,'id' => 'ajaxSave','files' => true))}}
{{Form::label('handbook_category', __('handbooks.category'), array('class' => 'control-label'))}} {!! Form::select('handbook_category', handbookCategory('', true), $data->handbook_category, ['class' => 'form-control select2']) !!}
{{Form::label('parent_id', __('handbooks.parent'), array('class' => 'control-label'))}} {{ Form::select('parent_id', ['' => __('common.select-option')], $data->parent_id, array('class' => 'form-control select2-new')) }} {{ Form::hidden('selected_parent_id',$data->parent_id,['id'=>'selected_parent_id']) }}
{{Form::label('id', __('handbooks.name'), array('class' => 'control-label'))}} {{ Form::text('name', $data->name,array('placeholder' => __('handbooks.name'),'class' => 'form-control'))}}
{{Form::label('id', __('handbooks.status'), array('class' => 'control-label'))}} {{ Form::select('status', activeStatus(), $data->status, array('class' => 'form-control select2')) }}
  • {{ Form::submit( __('common.save'), array('class' => 'btn btn-primary width80'));}}
{{Form::label('content_type', __('handbooks.content_type'), array('class' => 'control-label'))}}
{!! Form::radio('content_type', 1, !isset($data->content_type) || ($data->content_type == 1)?true:false,['id'=>"content"]) !!} {!! Form::label('content', __('handbooks.description'), array('for' => 'content','class' =>'mr-2')) !!} {!! Form::radio('content_type', 2,($data->content_type == 2)?true:false,['id'=>"file"]) !!} {!! Form::label('file', __('handbooks.attachment'), array('for' => 'file')) !!}
{{Form::label('description', __('handbooks.description'), array('class' => 'control-label'))}} {{ Form::textarea('description', ($data->content_type == 1)?$data->description:"", array('class' => 'form-control','id' => 'content-desc')) }}
{{Form::label('attachment', __('handbooks.attachment'), array('class' => 'control-label'))}} {{ Form::file('attachment') }} @if ($data->content_type == 2) @php $extension = pathinfo($data->description, PATHINFO_EXTENSION); $file = pathinfo($data->description, PATHINFO_FILENAME); @endphp @if (in_array($extension, ['pdf','mp3'])) {{ $file . '.' . $extension }} @else

{{ $file . '.' . $extension }}

@endif @endif
@if($data->id) @method('PUT') @endif {{ Form::token()}} {{ Form::close()}}
@endsection @section('script') @endsection