addElement( 'select', 'effect', ['label' => 'Effect', 'multiOptions' => $dataObj->getDSlideEffect4Select()] ); $this->addElement( 'text', 'interval', ['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', ['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 = [ 'ViewHelper', 'Errors', ['decorator' => 'Label', 'options' => ['placement' => 'APPEND']], 'DtDdWrapper', ]; $this->addElement( 'checkbox', 'enableButtons', ['label' => 'Show Player Buttons', 'decorators' => $checkboxDecorators] ); $this->addElement( 'checkbox', 'autoHideToolbar', ['label' => 'Auto Hide Toolbar', 'decorators' => $checkboxDecorators] ); $this->addElement( 'checkbox', 'showArrows', ['label' => 'Show Arrows', 'decorators' => $checkboxDecorators] ); $this->addElement( 'checkbox', 'autostart', ['label' => 'Autostart', 'decorators' => $checkboxDecorators] ); $this->addElement( 'checkbox', 'enablePaginator', ['label' => 'Show Paginator', 'decorators' => $checkboxDecorators] ); $this->addElement('text', 'limit', ['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(['legend' => 'Paginator Options']); $paginatorOptions->addElement( 'text', 'pageLinks', ['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', ['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', [ 'label' => 'Template', 'description' => 'Constants: {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink}', ] ); $this->addSubForm($paginatorOptions, 'paginatorOptions'); return $this; } }