@extends('layouts.main') @section('content') @if($option == "View") @endif {!! Form::model($document, ['url' => 'incoming/save', 'class' => 'form-horizontal', 'autocomplete' => 'off', 'id' => 'groupForm', 'files' => true]) !!}
@if(Session::has('unauthorize'))
× {{ Session::get('unauthorize') }}
@endif @if(Session::has('update'))
× {{ Session::get('update') }}
@endif @if(Session::has('success'))
× {{ Session::get('success') }}
@endif

{{ $data['page'] }} | {{ $option }}

@if($option == 'View') @if(count($references) > 0)      Reference Outgoing Document(s):
@foreach($references as $reference)      {{ $reference->d_subject }} @endforeach @endif @endif

Attachment Details

{!! Form::hidden('id', $id) !!} {!! Form::hidden('option', $option) !!}
@if($option == 'Add' || $option == 'Edit') {!! Form::text('d_subject', null, ['class' => 'form-control input-sm align-form', 'data-validation' => 'required', 'data-validation-error-msg-container' => '#d_subject', $option == 'View' ? 'readonly' : '']) !!} @else {!! Form::text('d_subject', null, ['class' => 'form-control input-sm align-form', 'readonly']) !!} @endif
{{ $errors->first('d_subject') }}
@if($option == 'Add' || $option == 'Edit') {!! Form::select('dtypes', $dtypes, $option == 'Edit' || $option == 'View' ? $document->dt_id : NULL, ['class' => 'form-control input-sm chosen-select', 'data-validation' => 'required', $option == 'View' ? 'readonly' : '']) !!} @else {!! Form::text('dt_id', $document->dtypes->dt_type, ['class' => 'form-control input-sm align-form', 'readonly']) !!} @endif
{{ $errors->first('dtypes') }}
@if($option == 'Add')
{!! Form::file('d_file[]', ['class' => 'align-form', 'multiple'=>true]) !!}
{{ $errors->first('d_file') }}
{!! Form::file('d_filetwo[]', ['class' => 'align-form', 'multiple'=>true]) !!}
{{ $errors->first('d_filetwo') }}
@elseif($option == 'Route' || $option == 'View')
@foreach( $files as $file ) @if( $file->da_file != "" ) @if ( is_file($attachment) ) {{ basename($file->da_file) }}
@else File missing.
@endif @else No file uploaded. @endif @endforeach
{{ $errors->first('da_file') }}
@endif
{!! Form::text('d_documentdate', null, ['class' => 'form-control input-sm', 'data-validation' => 'required', 'data-validation-error-msg-container' => '#d_documentdate', 'id' => 'd_documentdate', 'maxlength' => '10', 'placeholder' => 'Document Date', 'readonly']) !!}
{{ $errors->first('d_documentdate') }}
{!! Form::text('d_datereceived', null, ['class' => 'form-control input-sm', 'data-validation' => 'required', 'data-validation-error-msg-container' => '#d_datereceived', 'id' => 'd_datereceived', 'maxlength' => '10', 'placeholder' => 'Date Received', 'readonly']) !!}
{{ $errors->first('d_datereceived') }}
@if($option == 'Add' || $option == 'Edit') {!! Form::text('d_sender', null, ['class' => 'form-control input-sm', 'id' => 'sender', 'data-validation' => 'required', 'data-validation-error-msg-container' => '#d_sender']) !!} @else {!! Form::text('d_sender', null, ['class' => 'form-control input-sm align-form', 'readonly']) !!} @endif
{{ $errors->first('d_sender') }} *Note: No need to type 'OTHERS'. Just type the name directly.
@if($option == 'Add') {!! Form::text('c_name', null, ['class' => 'form-control input-sm align-form', 'id' => 'company', 'data-validation' => 'required', 'data-validation-error-msg-container' => '#c_name', $option == 'View' ? 'readonly' : '']) !!} @elseif($option == 'Edit') {!! Form::text('c_name', $document->companies->c_name, ['class' => 'form-control input-sm align-form', 'id' => 'company', 'data-validation' => 'required', 'data-validation-error-msg-container' => '#c_name', $option == 'View' ? 'readonly' : '']) !!} @else {!! Form::text('c_id', $document->companies->c_name, ['class' => 'form-control input-sm align-form', 'readonly']) !!} @endif
{{ $errors->first('c_name') }} *Note: No need to type 'OTHERS'. Just type the company name directly.
@if($option == 'Add' || $option == 'Edit')
@else
@endif {{ $errors->first('d_keywords') }}
@if($option == 'Edit' && $document->d_routingthru == 0)

File Attachments

@if($attachments->isEmpty())
No existing attachment(s) found.
@else @foreach($attachments as $attachment) @endforeach
Filename Date/Time Uploaded
{{ basename($attachment->da_file) }} {{ date('F d, Y h:i A', strtotime($attachment->created_at)) }}
@if($attachments->render())
{!! $attachments->render() !!}
@endif @endif
@endif

Routing Details

@if($option == 'Add') {!! Form::text('d_routingslip', $routingslip, ['class' => 'form-control input-sm align-form', 'readonly']) !!} @else {!! Form::text('d_routingslip', null, ['class' => 'form-control input-sm align-form', 'readonly']) !!} @endif
{{ $errors->first('d_routingslip') }}
@if($option == 'Add')
{!! Form::text('d_routingfrom', $rd, ['class' => 'form-control input-sm align-form', 'readonly']) !!}
{{ $errors->first('d_routingfrom') }}
@endif
@if($option == 'Route') {!! Form::select('d_routingthru', $leaders, NULL, ['class' => 'form-control input-sm chosen-select', $option == 'View' ? 'readonly' : '']) !!} @elseif($option == 'Add') {!! Form::text('route_thru', null, ['class' => 'form-control input-sm align-form', 'readonly']) !!} @else