@extends('admin.master') @section('content') @if(isset($editModeData)) @section('title','Edit warning') @else @section('title','Add New Warning') @endif
@yield('title')
@if(isset($editModeData)) {{ Form::model($editModeData, array('route' => array('warning.update', $editModeData->warning_id), 'method' => 'PUT','files' => 'true','class' => 'form-horizontal')) }} @else {{ Form::open(array('route' => 'warning.store','enctype'=>'multipart/form-data','class'=>'form-horizontal')) }} @endif
@if($errors->any()) @endif @if(session()->has('success'))
 {{ session()->get('success') }}
@endif @if(session()->has('error'))
 {{ session()->get('error') }}
@endif
{{ Form::select('warning_to',$employeeList, Input::old('warning_to'), array('class' => 'form-control warning_to select2 required')) }}
{!! Form::text('warning_type',Input::old('warning_type'), $attributes = array('class'=>'form-control required warning_type','id'=>'warning_type','placeholder'=>'Enter warning type')) !!}
{!! Form::text('subject',Input::old('subject'), $attributes = array('class'=>'form-control required subject','id'=>'subject','placeholder'=>'Enter subject')) !!}
{{ Form::select('warning_by',$employeeList, session('logged_session_data.employee_id'), array('class' => 'form-control warning_by select2 required')) }}
{!! Form::text('warning_date',isset($editModeData) ? dateConvertDBtoForm($editModeData->warning_date) : Input::old('warning_date'), $attributes = array('class'=>'form-control required dateField','id'=>'warning_date','placeholder'=>'Enter warning date','readonly'=>'readonly')) !!}
{!! Form::textarea('description',Input::old('description'), $attributes = array('class'=>'form-control description','id'=>'warning_date','placeholder'=>'Enter description...')) !!}
@if(isset($editModeData)) @else @endif
{{ Form::close() }}
@endsection @section('page_scripts') @endsection