示例#1
0
 /**
  * Called when visiting a form, after processing all form elements
  * Adds required note, form attributes, validation javascript and form content.
  *
  * @global moodle_page $PAGE
  * @param moodleform $form Passed by reference
  */
 function finishForm(&$form)
 {
     global $PAGE;
     if ($form->isFrozen()) {
         $this->_hiddenHtml = '';
     }
     parent::finishForm($form);
     $this->_html = str_replace('{collapsebtns}', $this->_collapseButtons, $this->_html);
     if (!$form->isFrozen()) {
         $args = $form->getLockOptionObject();
         if (count($args[1]) > 0) {
             $PAGE->requires->js_init_call('M.form.initFormDependencies', $args, true, moodleform::get_js_module());
         }
     }
 }
 /**
  * @global moodle_page $PAGE
  * @param object $form Passed by reference
  */
 function finishForm(&$form)
 {
     global $PAGE;
     if ($form->isFrozen()) {
         $this->_hiddenHtml = '';
     }
     parent::finishForm($form);
     if (!$form->isFrozen()) {
         $args = $form->getLockOptionObject();
         if (count($args[1]) > 0) {
             $PAGE->requires->js_init_call('M.form.initFormDependencies', $args, false, moodleform::get_js_module());
         }
     }
 }
示例#3
0
 /**
  * Custom render
  *
  * @param HTML_QuickForm_Renderer_Tableless $render
  *
  * @return void
  * @see http://pear.php.net/package/HTML_QuickForm_Renderer_Tableless/docs
  */
 public static function onRender(HTML_QuickForm_Renderer_Tableless $render)
 {
     $render->setElementTemplate(self::$_elementTemplate);
 }
 function finishForm(&$form)
 {
     if ($form->isFrozen()) {
         $this->_hiddenHtml = '';
     }
     parent::finishForm($form);
     if (!$form->isFrozen() && '' != ($script = $form->getLockOptionEndScript())) {
         // add a lockoptions script
         $this->_html = $this->_html . "\n" . $script;
     }
 }
示例#5
0
 function finishForm(&$form)
 {
     parent::finishForm($form);
     // add a lockoptions script
     if ('' != ($script = $form->getLockOptionEndScript())) {
         $this->_html = $this->_html . "\n" . $script;
     }
 }