<div id="single-picker-<?php echo $id; ?>" class="form-group single-picker-wrapper" style="<?php echo !empty($hide) ? 'display:none' : ''; ?>">
    <input type="hidden" name="<?php echo $name; ?>" id="<?php echo $id; ?>" value="" class="single-picker-values" />
    <?php echo 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>
    <?php if(!empty($info)): ?>
        <span id="helpBlock" class="help-block"><?php echo $info; ?></span>
    <?php endif; ?>
</div>

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

            <?php endif; ?>

        });    
    });
</script>


   