{{-- Name: notice.create Author: JH2 Created: 2015-05-26 --}} @extends('partials.box') @section($content_id) {!! Form::model('Notice', ['route' => ['admin.notice.store'], 'class' => 'form-horizontal']) !!}
{!! Form::label('title', Lang::get('notice.form.title'), ['class' => 'col-md-3 control-label']) !!}
{!! Form::text('title', old('title'), ['class' => 'form-control']) !!} {!! $errors->first('title', ':message') !!}
{!! Form::label('content', Lang::get('notice.form.content'), ['class' => 'col-md-3 control-label']) !!}
{!! Form::textArea('content', old('content'), ['class' => 'form-control tinymce']) !!} {!! $errors->first('content', ':message') !!}
{!! Form::label('start_time', Lang::get('notice.form.start_time'), ['class' => 'col-md-3 control-label']) !!}
{!! Form::input('text', 'start_time', (old('sort_order'))?old('start_time'):date('Y-m-d H:i:00'), ['class' => 'form-control', 'id' => 'start-time']) !!}
{!! $errors->first('start_time', ':message') !!}
{!! Form::label('stop_time', Lang::get('notice.form.stop_time'), ['class' => 'col-md-3 control-label']) !!}
{!! Form::input('text', 'stop_time', (old('stop_time'))?old('stop_time'):date('Y-m-d H:i:s', strtotime(date('Y-m-d H:i:00').'+ 6 days')), ['class' => 'form-control', 'id' => 'stop-time']) !!}
{!! $errors->first('stop_time', ':message') !!}
{!! Form::label('company_id', Lang::get('notice.form.company_id'), ['class' => 'col-md-3 control-label']) !!}
{{-- {{ dd(Company::get()->pluck('name', 'id')->toArray()) }} --}} {!! Form::select('company_id', [0 => Lang::get('notice.form.global')] + Company::get()->pluck('name', 'id')->toArray(), (old('company_id'))?old('company_id'):0, ['class' => 'form-control']) !!} {!! $errors->first('company_id', ':message') !!}
{!! Form::label('status', Lang::get('notice.form.status'), ['class' => 'col-md-3 control-label']) !!}
{!! Form::select('status', Notice::_get('status'), old('status'), ['class' => 'form-control']) !!} {!! $errors->first('status', ':message') !!}
{{--
{!! Form::label('type', Lang::get('notice.form.type'), ['class' => 'col-md-3 control-label']) !!}
{!! Form::select('type', Notice::_get('type'), old('type'), ['class' => 'form-control']) !!} {!! $errors->first('type', ':message') !!}
--}}
{!! Form::label('prio', Lang::get('notice.form.prio'), ['class' => 'col-md-3 control-label']) !!}
{!! Form::select('prio', Notice::_get('prio'), old('type'), ['class' => 'form-control']) !!} {!! $errors->first('prio', ':message') !!}
{!! Form::submit(Lang::get('notice.form.save'), ['class' => 'btn btn-primary']) !!}
{!! Form::close() !!} @stop @section('footer-script') @include('partials.tinymce') @stop