Widget\SortBox: hardcode some styles

This is a quickfix, should be moved to CSS once we know how our HTML
elements will definitively look like
This commit is contained in:
Thomas Gelf 2014-06-20 14:55:43 +02:00
parent 9411dec5d0
commit 2cf79fe9a7
1 changed files with 14 additions and 26 deletions

View File

@ -141,34 +141,22 @@ class SortBox extends AbstractWidget
$form->setMethod('GET');
$form->setTokenDisabled();
$form->setName($this->name);
$form->addElement(
'select',
'sort',
array(
'label' => 'Sort By',
'multiOptions' => $this->sortFields,
'style' => 'width: 12em',
'class' => 'autosubmit',
)
);
$form->addElement(
'select',
'dir',
array(
'multiOptions' => array(
'desc' => 'Desc',
'asc' => 'Asc',
),
'style' => 'width: 4em',
'class' => 'autosubmit'
)
);
$form->addElement('select', 'sort', array(
'label' => 'Sort By',
'multiOptions' => $this->sortFields,
'style' => 'width: 12em',
'class' => 'autosubmit',
));
$form->addElement('select', 'dir', array(
'multiOptions' => array(
'asc' => 'Asc',
'desc' => 'Desc',
),
'style' => 'width: 5em',
'class' => 'autosubmit'
));
$sort = $form->getElement('sort')->setDecorators(array('ViewHelper'));
$dir = $form->getElement('dir')->setDecorators(array('ViewHelper'));
// $form->enableAutoSubmit(array('sort', 'dir'));
// $form->addElement($this->createFallbackSubmitButton());
if ($this->request) {
$form->setAction($this->request->getRequestUri());
$form->populate($this->request->getParams());