addElement( 'select', 'effect', array('label' => 'Effect', 'multiOptions' => $dataObj->getDSlideEffect4Select()) ); $this->addElement( 'text', 'interval', array('label' => 'Interval', 'required' => true, 'class' => 'digit', 'size' => 5) ); /** @var Qs_Form_Decorator_ViewHelper $viewHelper */ $viewHelper = $this->getElement('interval')->getDecorator('ViewHelper'); $viewHelper->setAdditionalHtmlAfterElement(' seconds'); $this->getElement('interval')->addValidator('Int', true); $this->addElement( 'text', 'effectDuration', array('label' => 'Effect Duration', 'required' => true, 'class' => 'digit', 'size' => 5) ); /** @var Qs_Form_Decorator_ViewHelper $viewHelper */ $viewHelper = $this->getElement('effectDuration')->getDecorator('ViewHelper'); $viewHelper->setAdditionalHtmlAfterElement(' miliseconds'); $this->getElement('effectDuration')->addValidator('Int', true); $checkboxDecorators = array( 'ViewHelper', 'Errors', array('decorator' => 'Label', 'options' => array('placement' => 'APPEND')), 'DtDdWrapper' ); $this->addElement( 'checkbox', 'enableButtons', array('label' => 'Show Player Buttons', 'decorators' => $checkboxDecorators) ); $this->addElement( 'checkbox', 'autoHideToolbar', array('label' => 'Auto Hide Toolbar', 'decorators' => $checkboxDecorators) ); $this->addElement( 'checkbox', 'showArrows', array('label' => 'Show Arrows', 'decorators' => $checkboxDecorators) ); $this->addElement( 'checkbox', 'autostart', array('label' => 'Autostart', 'decorators' => $checkboxDecorators) ); $this->addElement( 'checkbox', 'enablePaginator', array('label' => 'Show Paginator', 'decorators' => $checkboxDecorators) ); $this->addElement('text', 'limit', array('label' => 'Limit Slides', 'class' => 'digit', 'size' => 5)); /** @var Qs_Form_Decorator_ViewHelper $viewHelper */ $viewHelper = $this->getElement('limit')->getDecorator('ViewHelper'); $viewHelper->setAdditionalHtmlAfterElement(' (leave blank to have no limits)'); /** * через глюки з YAHOO.widget.Paginator, забрав рав конфігурацю пагінатора, * по дефолту буде використовуватись "{PageLinks}" */ //$this->_initPaginatorElements(); return $this; } protected function _initPaginatorElements() { $paginatorOptions = new Qs_Form_SubForm(array('legend' => 'Paginator Options')); $paginatorOptions->addElement( 'text', 'pageLinks', array('label' => 'Links Count', 'required' => false, 'class' => 'digit', 'size' => 5) ); /** @var Qs_Form_Decorator_ViewHelper $viewHelper */ $viewHelper = $paginatorOptions->getElement('pageLinks')->getDecorator('ViewHelper'); $viewHelper->setAdditionalHtmlAfterElement(' (leave blank to calculate automatically)'); $paginatorOptions->getElement('pageLinks')->addValidator('Int', true); $paginatorOptions->addElement( 'text', 'linkWidth', array('label' => 'Link Width', 'class' => 'digit', 'size' => 5) ); /** @var Qs_Form_Decorator_ViewHelper $viewHelper */ $viewHelper = $paginatorOptions->getElement('linkWidth')->getDecorator('ViewHelper'); $viewHelper->setAdditionalHtmlAfterElement(' px'); $paginatorOptions->getElement('linkWidth')->addValidator('Int', true); $paginatorOptions->addElement( 'text', 'template', array( 'label' => 'Template', 'description' => 'Constants: {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink}' ) ); $this->addSubForm($paginatorOptions, 'paginatorOptions'); return $this; } }