<div id="single-picker-<?php echo e($id); ?>" class="form-group single-picker-wrapper<?php echo e($parentHidden ? ' parent-hidden' : ''); ?>" style="<?php echo e(!empty($hide) ? 'display:none' : ''); ?>" data-form-id="generic_form_<?php echo e(RequestContext::get('generic_form_timestamp')); ?>">
    <?php echo Form::hidden($name, '', array('id' => $id, '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 e($info); ?></span>
    <?php endif; ?>
</div>

<script>
    $(function(){
        var singlePicker<?php echo e($id); ?> = new Eae.View.BackendSinglePicker({
            el: $("[data-form-id='generic_form_<?php echo e(RequestContext::get('generic_form_timestamp')); ?>']#single-picker-<?php echo e($id); ?>"),
            list: <?php echo json_encode($list, 15, 512) ?>,
            order: <?php echo json_encode($order, 15, 512) ?>,
            disabled: <?php echo e($enabled ? 'false': 'true'); ?>,
            parentId: <?php echo e($parentId); ?>,
            parentContentType: '<?php echo e($parentContentType); ?>',
            parentFieldName: '<?php echo e($name); ?>',
            parent:  <?php echo empty($parent) ? 'false': json_encode($parent); ?>,
            contentType: {
                label:  '<?php echo e($childContentType->getSingularLabel()); ?>',
                type: '<?php echo e($childContentType->getType()); ?>'
            },
            <?php if($maxSize): ?>
            maxSize: <?php echo e($maxSize); ?>

            <?php endif; ?>

        });
    });
</script>


<?php /**PATH /var/www/html/resources/views/admin/generic/components/forms/singlepicker.blade.php ENDPATH**/ ?>