Skip to content
Snippets Groups Projects
class.queue.php 31.5 KiB
Newer Older
  • Learn to ignore specific revisions
  • class QueueColDataConfigForm
    extends AbstractForm {
    
    function buildFields() {
        return array(
            'primary' => new DataSourceField(array(
                'label' => __('Primary Data Source'),
                'required' => true,
                'configuration' => array(
                    'root' => 'Ticket',
                ),
                'layout' => new GridFluidCell(6),
            )),
            'secondary' => new DataSourceField(array(
                'label' => __('Secondary Data Source'),
                'configuration' => array(
                    'root' => 'Ticket',
                ),
                'layout' => new GridFluidCell(6),
            )),
    
                'heading' => new TextboxField(array(
                    'label' => __('Heading'),
                    'required' => true,
                    'layout' => new GridFluidCell(3),
                )),
    
                'filter' => new ChoiceField(array(
                    'label' => __('Filter'),
    
                    'required' => false,
    
                    'choices' => QueueColumnFilter::getFilters(),
    
                    'layout' => new GridFluidCell(3),
                )),
                'width' => new TextboxField(array(
                    'label' => __('Width'),
                    'default' => 75,
                    'configuration' => array(
                        'validator' => 'number',
                    ),
                    'layout' => new GridFluidCell(3),
                )),
                'truncate' => new ChoiceField(array(
                    'label' => __('Text Overflow'),
                    'choices' => array(
                        'wrap' => __("Wrap Lines"),
                        'ellipsis' => __("Add Ellipsis"),
                        'clip' => __("Clip Text"),
                    ),
                    'default' => 'wrap',
                    'layout' => new GridFluidCell(3),
                )),
            );
        }
    }