@if (Auth::User()->perm('geofences', 'edit')) @endif
{!!trans('front.please_draw_polygon')!!}
{!! Form::hidden('polygon') !!} {!! Form::open(['route' => 'geofences.store', 'method' => 'POST', 'class' => 'form', 'id' => 'geofence_create']) !!}
{!! Form::label('name', trans('validation.attributes.name').':') !!} {!! Form::text('name', null, ['class' => 'form-control']) !!}
{!! Form::label('type', trans('validation.attributes.type').':') !!} {!! Form::select('type', $geofence_types, null, ['class' => 'form-control', 'onChange' => "app.geofences.changeType(this);"]) !!}
{!! Form::label('group_id', trans('validation.attributes.group_id').':') !!}
{!! Form::select('group_id', $geofence_groups, null, ['class' => 'form-control geofence_groups_select']) !!}
{!! Form::label('polygon_color', trans('validation.attributes.polygon_color').':') !!} {!! Form::text('polygon_color', '#D000DF', ['class' => 'form-control colorpicker']) !!}
{!! Form::close() !!}
{!! Form::hidden('polygon') !!} {!! Form::open(['route' => 'geofences.update', 'method' => 'PUT', 'id' => 'geofence_update']) !!}
{!! Form::label('name', trans('validation.attributes.name').':') !!} {!! Form::text('name', null, ['class' => 'form-control']) !!}
{!! Form::label('type', trans('validation.attributes.type').':') !!} {!! Form::select('type', $geofence_types, null, ['class' => 'form-control', 'onChange' => "app.geofences.changeType(this);"]) !!}
{!! Form::label('group_id', trans('validation.attributes.group_id').':') !!}
{!! Form::select('group_id', $geofence_groups, null, ['class' => 'form-control geofence_groups_select']) !!}
{!! Form::label('polygon_color', trans('validation.attributes.polygon_color').':') !!} {!! Form::text('polygon_color', '#D000DF', ['class' => 'form-control colorpicker']) !!}
{!! Form::close() !!}