@extends('Frontend.Layouts.modal') @section('title') {!!trans('global.add_new')!!} @stop @section('body') {!!Form::open(['route' => 'devices.store', 'method' => 'POST'])!!} {!!Form::hidden('id')!!}
@if (isAdmin())
{!! Form::hidden('active', 0) !!} {!! Form::checkbox('active', 1, true) !!} {!! Form::label(null, trans('validation.attributes.active')) !!}
{!! Form::label('user_id', trans('validation.attributes.user').'*:') !!} {!! Form::select('user_id[]', $users->lists('email', 'id'), Auth::User()->id, ['class' => 'form-control', 'multiple' => 'multiple', 'data-live-search' => true]) !!}
@endif
{!!Form::label('name', trans('validation.attributes.name').'*:')!!} {!!Form::text('name', null, ['class' => 'form-control'])!!}
@if(Auth::user()->can('edit', new \Tobuli\Entities\Device(), 'imei'))
{!!Form::text('imei', null, ['class' => 'form-control', 'placeholder' => trans('front.imei_placeholder')] )!!}
@endif @if (isAdmin() && Auth::user()->can('view', new \Tobuli\Entities\Device(), 'expiration_date'))
{!! Form::label('expiration_date', trans('validation.attributes.expiration_date').':') !!}
{!! Form::hidden('enable_expiration_date', 0) !!} {!! Form::checkbox('enable_expiration_date', 1, false, Auth::user()->can('edit', new \Tobuli\Entities\Device(), 'expiration_date') ? [] : ['disabled' => 'disabled']) !!} {!! Form::label(null) !!}
{!! Form::text('expiration_date', NULL, ['class' => 'form-control datetimepicker', 'disabled' => 'disabled']) !!}
@endif @if(Auth::User()->able('configure_device'))
{!! Form::checkbox('configure_device', 1, false, ['data-disabler' => '#device-form-configurator;hide-disable']) !!} {!! Form::label(null, trans('front.device_configuration')) !!}
@include('Frontend.DeviceConfig.form', ['showDeviceSelect' => false])
@endif
{!!Form::label('device_icons_type', trans('validation.attributes.icon_type').':')!!} {!!Form::select('device_icons_type', $icons_type, null, ['class' => 'form-control'])!!}
{!!Form::hidden('icon_id')!!}