@extends('layouts.admin') @section('css') @endsection @section('content')
{{isset($FileEdit)?'Edit':'New'}} File
@include('inc.messages')
@if(isset($FileEdit)) {!! Form::model($FileEdit,['method'=>'put','files'=>true,'class'=>'form-horizontal']) !!} @else {!! Form::open(['action','filesController@create','class'=>'form-horizontal','role'=>'form','enctype'=>'multipart/form-data','files'=>true]) !!} @endif
{!! Form::label("title","File Title",["class"=>"control-label col-md-2"]) !!}
{!! Form::text("title",isset($FileEdit)?$FileEdit->title:null,["class"=>"form-control".($errors->has('title')?" is-invalid":"") ,"autofocus" ,"placeholder"=>"Enter Title here" ,"required"]) !!}
{!! Form::label("alias","Alias (URL)",["class"=>"control-label col-md-2"]) !!}
{!! Form::text("alias",isset($FileEdit)?$FileEdit->alias:null,["class"=>"form-control".($errors->has('alias')?" is-invalid":"") ,"autofocus" ,"placeholder"=>"Enter Alias " ,"required", isset($FileEdit)?"readonly":null ]) !!}
{!! Form::label("category","Category",["class"=>"control-label col-md-2"]) !!}
{{Form::select("category",[ 'logo' => 'Logo', 'slider' => 'Slider', 'partnersandassociates' => 'Partners $ Associates', 'broucher'=>'Broucher', 'newsletter'=>'News Letter', 'ourgroup'=>'Our Group', 'isocertificates'=>'Iso Certificates', 'others'=>'Others' ] ,(isset($FileEdit)?$FileEdit->category:null) , [ "class" => "bs-select form-control", "placeholder" => "Select a category" ]) }}
{{--
{!! Form::label("status","Select Status",["class"=>"control-label col-md-2"]) !!}
{{Form::select("status",[ '1' => 'Enable', '0' => 'Disable' ] ,(isset($FileEdit)?$FileEdit->status:null) , [ "class" => "bs-select form-control", "placeholder" => "Select Status" ]) }}
--}} {{--
{!! Form::label("link","Link",["class"=>"control-label col-md-2"]) !!}
{!! Form::text("link",isset($FileEdit)?$FileEdit->link:null,["class"=>"form-control".($errors->has('link')?" is-invalid":"") ,"autofocus" ,"placeholder"=>"Enter Url link here" ]) !!}
--}} {{-- @if(isset($FileEdit))
{!! Form::label("link","Flipbook Path",["class"=>"control-label col-md-2"]) !!}
{!! Form::text("link",isset($FileEdit)?$FileEdit->link:null,["class"=>"form-control input-inline input-medium".($errors->has('title')?" is-invalid":"") ,"autofocus" ,"placeholder"=>"Enter Flipbook Path" ]) !!}
@endif --}}
{!! Form::label("image","Select File",["class"=>"control-label col-md-2", "for"=>"exampleInputFile"]) !!}
{!! Form::file("image",["class"=>"form-control"]) !!}

{{isset($FileEdit)?'Please select a new file to replace the exsisting one':'Please select a file '}}

{!! Form::label("status","Status",["class"=>"control-label col-md-3 col-lg-2"]) !!}
@if(isset($FileEdit)) {!! Form::label("image","Current File",["class"=>"control-label col-md-2", "for"=>"exampleInputFile"]) !!}
@endif
{{--


{!! Form::label("file","Flipbook zip File",["class"=>"control-label col-md-2", "for"=>"exampleInputFile"]) !!}
{!! Form::file("file",["class"=>"form-control"]) !!}

{{isset($FileEdit)?'Please select a new file to replace the exsisting one':'Please select a ZIP file '}}

--}}

Optional File Inputs


{{-- adding second line for title --}}
{!! Form::label("title_first_line","File Input 1",["class"=>"control-label col-md-2"]) !!}
{!! Form::text("title_first_line",isset($FileEdit)?$FileEdit->title_first_line:null,["class"=>"form-control".($errors->has('title_first_line')?" is-invalid":"") ,"autofocus" ,"placeholder"=>"Enter First line of title here" ]) !!}
{{-- --}} {{-- adding second line for title --}}
{!! Form::label("title_second_line","File Input 2",["class"=>"control-label col-md-2"]) !!}
{!! Form::text("title_second_line",isset($FileEdit)?$FileEdit->title_second_line:null,["class"=>"form-control".($errors->has('title_second_line')?" is-invalid":"") ,"autofocus" ,"placeholder"=>"Enter Seond line of title here" ]) !!}
{{-- --}}
{{ Form::button(' Save', ['type' => 'submit', 'name'=>'btnSave', 'class' =>'btn red btn-sm'] ) }}
{{ Form::close() }}
@endsection @section('scripts') @if(isset($FileEdit)) @else @endif @endsection