getElement(); if ($form instanceof Zend_Form_SubForm) { return $this; } /** @var $doc Qs_Doc */ $doc = Zend_Registry::get('doc'); $doc->addCriticalStylesheet('css/components/form.css'); $doc->addScript('js/lib/form-submit-lock.js'); if ($form->getAjaxValidation()) { $options = $form->getScriptOptions(); $doc->addScript('js/lib/form.js') ->addScript('js/jquery.scrollTo.js') ->addInitFunction('Qs_Form.init', array($form->getId(), $options)); } else { $doc->addReadyFunction("$('#{$form->getId()}').formSubmitLock"); } if (($extensionOptions = $form->getScriptOption('translateExtension'))) { $doc->addScript('js/lib/form-translate-extension.js'); $doc->addInitObject('qs.form.TranslateExtension', [$extensionOptions]); } return $this; } }