@extends('layouts.app') @section('content')

@lang('global.assets.title')

{!! Form::open(['method' => 'POST', 'route' => ['admin.assets.store'], 'files' => true,'class'=>'formvalidation']) !!}
@lang('global.app_create')
{!! Form::label('category_id', trans('global.assets.fields.category').'*', ['class' => 'control-label']) !!} {!! Form::select('category_id', $categories, old('category_id'), ['class' => 'form-control select2', 'required' => '']) !!}

@if($errors->has('category_id'))

{{ $errors->first('category_id') }}

@endif
{!! Form::label('serial_number', trans('global.assets.fields.serial-number').'', ['class' => 'control-label form-label']) !!}
{!! Form::text('serial_number', old('serial_number'), ['class' => 'form-control', 'placeholder' => 'Serial number']) !!}

@if($errors->has('serial_number'))

{{ $errors->first('serial_number') }}

@endif
{!! Form::label('title', trans('global.assets.fields.title').'*', ['class' => 'control-label form-label']) !!}
{!! Form::text('title', old('title'), ['class' => 'form-control', 'placeholder' => 'Title', 'required' => '']) !!}

@if($errors->has('title'))

{{ $errors->first('title') }}

@endif
{!! Form::label('photo1', trans('global.assets.fields.photo1').'', ['class' => 'control-label']) !!} {!! Form::file('photo1', ['class' => 'form-control', 'style' => 'margin-top: 4px;']) !!} {!! Form::hidden('photo1_max_size', 8) !!} {!! Form::hidden('photo1_max_width', 6000) !!} {!! Form::hidden('photo1_max_height', 6000) !!}

{{trans('others.global_file_types_gallery')}}

@if($errors->has('photo1'))

{{ $errors->first('photo1') }}

@endif
{!! Form::label('photo2', trans('global.assets.fields.photo2').'', ['class' => 'control-label']) !!} {!! Form::file('photo2[]', [ 'multiple', 'class' => 'form-control file-upload', 'data-url' => route('admin.media.upload'), 'data-bucket' => 'photo2', 'data-filekey' => 'photo2', 'data-accept' => FILE_TYPES_GALLERY, ]) !!}

{{trans('others.global_file_types_gallery')}}

 
@if($errors->has('photo2'))

{{ $errors->first('photo2') }}

@endif
{!! Form::label('attachments', trans('global.assets.fields.attachments').'', ['class' => 'control-label']) !!} {!! Form::file('attachments[]', [ 'multiple', 'class' => 'form-control file-upload', 'data-url' => route('admin.media.upload'), 'data-bucket' => 'attachments', 'data-filekey' => 'attachments', 'data-accept' => FILE_TYPES_GENERAL, ]) !!}

{{trans('others.global_file_types_general')}}

 
@if($errors->has('attachments'))

{{ $errors->first('attachments') }}

@endif
{!! Form::label('status_id', trans('global.assets.fields.status').'*', ['class' => 'control-label']) !!} {!! Form::select('status_id', $statuses, old('status_id'), ['class' => 'form-control select2', 'required' => '']) !!}

@if($errors->has('status_id'))

{{ $errors->first('status_id') }}

@endif
{!! Form::label('location_id', trans('global.assets.fields.location').'*', ['class' => 'control-label']) !!} {!! Form::select('location_id', $locations, old('location_id'), ['class' => 'form-control select2', 'required' => '']) !!}

@if($errors->has('location_id'))

{{ $errors->first('location_id') }}

@endif
{!! Form::label('assigned_user_id', trans('global.assets.fields.assigned-user').'', ['class' => 'control-label']) !!} {!! Form::select('assigned_user_id', $assigned_users, old('assigned_user_id'), ['class' => 'form-control select2']) !!}

@if($errors->has('assigned_user_id'))

{{ $errors->first('assigned_user_id') }}

@endif
{!! Form::label('notes', trans('global.assets.fields.notes').'', ['class' => 'control-label']) !!} {!! Form::textarea('notes', old('notes'), ['class' => 'form-control ', 'placeholder' => 'Notes','rows'=>'3']) !!}

@if($errors->has('notes'))

{{ $errors->first('notes') }}

@endif
{!! Form::submit(trans('global.app_save'), ['class' => 'btn btn-danger wave-effect']) !!} {!! Form::close() !!} @stop @section('javascript') @parent @stop