<div id="single-picker-{{$id}}" class="form-group single-picker-wrapper{{ $parentHidden ? ' parent-hidden' : '' }}" style="{{ !empty($hide) ? 'display:none' : '' }}">
    <input type="hidden" name="{{$name}}" id="{{$id}}" value="" class="single-picker-values" />
    {{ Form::label($id, ucfirst($label), array('class' => 'control-label')) }}
    <button type="button" class="btn btn-xs btn-default command-add-item pull-right" title="">
        <span class="icon glyphicon glyphicon-plus"></span>
    </button>
    <div class="row">
        <div class="col-sm-12">
            <div class="panel panel-default picker-panel single-picker-list">
                <ol class="list-group"></ol>
            </div>
        </div>
    </div>
    @if(!empty($info))
        <span id="helpBlock" class="help-block">{{ $info }}</span>
    @endif
</div>

<script>
    $(function(){
        var singlePicker{{$id}} = new Eae.View.BackendSinglePicker({
            el: $("#single-picker-{{$id}}"),
            list: {{ json_encode($list) }},
            order: {{ $order ? 'true': 'false' }},
            disabled: {{ $enabled ? 'false': 'true' }},
            parentId: {{ $parentId }},
            parentContentType: '{{ $parentContentType }}',
            parentFieldName: '{{ $name }}',
            parent:  {{ empty($parent) ? 'false': json_encode($parent) }},
            contentType: {
                label:  '{{ $childContentType->getSingularLabel() }}',
                type: '{{ $childContentType->getType() }}'
            },
            @if($maxSize)
            maxSize: {{ $maxSize }}
            @endif

        });
    });
</script>


