@extends('admin.layouts.layout', ['title' => $module]) @section('css') @endsection @section('main')
@if($id) {!! Form::model($data, [ 'method' => 'PATCH', 'route' => [$form['route'], $id], 'class' => 'form-horizontal', 'enctype'=>'multipart/form-data' ]) !!} @else {!! Form::open(array('route' => $form['route'],'method'=>'POST', 'enctype'=>'multipart/form-data')) !!} @endif
{!! Form::label('file_type', 'Type *:',array('class'=>'form-label','for'=>'file_type'),false) !!} @php($ffolder = (old('file_type')=="1")?'checked':((isset($data->file_type) && $data->file_type==1)?'checked':'')) @php($fpdf = (old('file_type')=="2")?'checked':((empty($ffolder) && isset($data->file_type) && $data->file_type==2)?'checked':'')) @php($fhtml = (old('file_type')=="3")?'checked':((empty($ffolder) && empty($fpdf) && isset($data->file_type) && $data->file_type==3)?'checked':'')) @php($default_chk = (empty($ffolder) && empty($fpdf) && empty($fhtml))?'checked':'') @php($folder_dis = (old('file_type')=="1")?'':((isset($data->file_type) && ($data->file_type==3 || $data->file_type==2) && (isset($data->child_nodes) && count($data->child_nodes)))?'disabled':'')) @php($file_dis = (old('file_type')=="1")?'disabled':((isset($data->file_type) && $data->file_type==1 && (isset($data->child_nodes) && count($data->child_nodes)))?'disabled':'')) @php($d_none = (old('file_type')=="3")?'':((isset($data->file_type) && $data->file_type==3)?'':'d-none')) @php($file_type_dis = ($id && isset($data->child_nodes) && count($data->child_nodes))?'disabled':'')
@if ($errors->has('file_type')) {{ $errors->first('file_type') }} @endif If has any child nodes then you can not change type. If need changes then remove child nodes before update
@php($staffonly = (isset($data->staff_only) && $data->staff_only==1)?'checked':'') {!! Form::label('staff_only', 'Allow Staff Only',array('class'=>'form-label','for'=>'staff_only'),false) !!}
@php($groupleaderonly = (isset($data->group_leader_only) && $data->group_leader_only==1)?'checked':'') {!! Form::label('group_leader_only', 'Allow Group Leader Only',array('class'=>'form-label','for'=>'group_leader_only'),false) !!}
{!! Form::label('parent_id', 'Select Parent Folder:',array('class'=>'form-label','for'=>'parent_id'),false) !!} @php($cruises = \App\Helpers\Helper::getTourFolder($tour_details->id,$id)) {!! Form::select('parent_id', $cruises, null, ['class' => 'form-control select2','id'=>'parent_id','placeholder'=>$tour_details->file_name]) !!}
@if ($errors->has('parent_id')) {{ $errors->first('parent_id') }} @endif
{!! Form::label('name', 'Name *:',array('class'=>'form-label','for'=>'name'),false) !!} {!! Form::text('name', null, ['class' => 'form-control','id'=>'name','placeholder'=>'Enter name']) !!}
@if ($errors->has('name')) {{ $errors->first('name') }} @endif
@php($folder_none = (old('common_folder')=="1")?'':((isset($data->file_type) && $data->file_type==1)?'':((!$id)?'':'d-none')))
@php($common_folder = (isset($data->common_folder) && $data->common_folder==1)?'checked':'') {!! Form::label('common_folder', 'Common Folder',array('class'=>'form-label','for'=>'common_folder'),false) !!}
@if ($errors->has('common_folder')) {{ $errors->first('common_folder') }} @endif
{{--
{!! Form::label('status', 'Status *:',array('class'=>'form-label','for'=>'status'),false) !!} @php($enb = (isset($data->status) && $data->status==1)?'checked':'') @php($dsb = (isset($data->status) && $data->status==0)?'checked':'') @php($default_chk = (empty($enb) && empty($dsb))?'checked':'')
@if ($errors->has('status')) {{ $errors->first('status') }} @endif
--}}
{!! Form::label('icon_link', 'Icon *:',array('class'=>'form-label','for'=>'status'),false) !!} @php($anchor = (isset($data->icon_link) && $data->icon_link=="anchor.png")?'checked':'') @php($cruising_info_icon = (isset($data->icon_link) && $data->icon_link=="cruising-info-icon.png")?'checked':'') @php($folder = (isset($data->icon_link) && $data->icon_link=="folder.png")?'checked':'') @php($pdf = (isset($data->icon_link) && $data->icon_link=="pdf.png")?'checked':'') @php($post_cruise_icon = (isset($data->icon_link) && $data->icon_link=="post-cruise-icon.png")?'checked':'') @php($schedule_info_icon = (isset($data->icon_link) && $data->icon_link=="schedule-info-icon.png")?'checked':'') @php($web = (isset($data->icon_link) && $data->icon_link=="web.png")?'checked':'') @php($other = (isset($data->icon_link) && $data->icon_link=="others.png")?'checked':'') @php($info = (isset($data->icon_link) && $data->icon_link=="info.png")?'checked':'') @php($default_chk = (empty($anchor) && empty($cruising_info_icon) && empty($folder) && empty($pdf) && empty($post_cruise_icon) && empty($schedule_info_icon) && empty($web) && empty($other) && empty($info))?'checked':'')
@if ($errors->has('status')) {{ $errors->first('status') }} @endif
arrow_back Back {!! Form::close() !!}
@endsection @section('scripts') @endsection