/**
  * Load the HTML template files for editing.
  */
 protected function loadHTMLTemplates()
 {
     if (array_key_exists('auto_template', $this->args) && is_array($this->args['auto_template']) && !(array_key_exists('disabled', $this->args['auto_template']) && $this->args['auto_template']['disabled'])) {
         $append_node = 'siteContent';
         if (array_key_exists('append_node', $this->args['auto_template']) && is_scalar($this->args['auto_template']['append_node']) && $this->args['auto_template']['append_node']) {
             $append_node = $this->args['auto_template']['append_node'];
         }
         if (!($node = $this->template->getElementById($append_node)) instanceof DOMNode) {
             I2CE::raiseError("Could not find add template to {$append_node}");
             return false;
         }
         $options = $this->args['auto_template'];
         $options['is_edit'] = true;
         $options['parent_obj'] = $this->parentObj;
         $gizmo = new I2CE_Gizmo_FormParent($this, $this->primaryObject, $options);
         $gizmo->generate($node);
         return true;
     } else {
         parent::loadHTMLTemplates();
         $this->template->appendFileById("form_" . $this->getPrimaryFormName() . ".html", "tbody", $this->getParentFormName() . "_form");
         return true;
     }
 }
 /**
  * Load the  template (HTML or XML) files to the template object.
  *  
  * 
  */
 protected function loadHTMLTemplates()
 {
     parent::loadHTMLTemplates();
     $evaluationsNode = $this->template->getElementById('list_evaluations');
     if (!$evaluationsNode instanceof DOMNode) {
         I2CE::raiseError("Don't know where to list evaluations");
         return false;
     }
     $comp_added = false;
     foreach ($this->node_ids[I2CE_PageForm::EDIT_SECONDARY] as $node) {
         if ($node instanceof DOMNode) {
             $comp_added = true;
             $evaluationsNode->appendChild($node);
         }
     }
     if (!$comp_added) {
         $this->template->addFile("training_course_evaluation_no_competency.html", "div");
     }
 }
 /**
  * Load the HTML template files for editing.
  */
 protected function loadHTMLTemplates()
 {
     I2CE_PageForm::loadHTMLTemplates();
     $this->template->appendFileById("menu_view_tr_link.html", "li", "navBarUL", true);
     $this->template->appendFileById("form_tr_training_resume.html", "tbody", "training_form");
 }
 /**
  * Load the HTML template files for editing.
  */
 protected function loadHTMLTemplates()
 {
     parent::loadHTMLTemplates();
     $this->template->appendFileById("menu_view_link.html", "li", "navBarUL", true);
     $this->template->appendFileById("form_" . $this->getForm(true) . ".html", "tbody", "person_form");
 }
 /**
  * Load the HTML template files for editing.
  */
 protected function loadHTMLTemplates()
 {
     parent::loadHTMLTemplates();
     $node = $this->template->loadFile("form_person.html", 'table');
     if (!$node instanceof DOMNode) {
         return false;
     }
     if (!($personnode = $this->template->getElementById('list_fields', $node)) instanceof DOMNode) {
         return false;
     }
     $this->template->appendNodeById($personnode, 'person_fields');
     $this->template->appendFileById("form_application.html", "tbody", "application");
     if ($this->creatingNewUser()) {
         $access = get_class(I2CE::getUserAccess());
         $postfix = '';
         if ($access && ($pos = strpos($access, 'I2CE_UserAccess_')) !== false) {
             $postfix = substr($access, 15);
         }
         $node = $this->template->loadFile("user_form{$postfix}.html", 'table');
         if (!$node instanceof DOMNode) {
             return false;
         }
         if (!($usernodes = $this->template->getElementById('form', $node)) instanceof DOMNode) {
             return false;
         }
         if (!($trNode = $this->template->getElementById('user_fields')) instanceof DOMNode) {
             return true;
         }
         while ($usernodes->hasChildNodes()) {
             $trNode->appendChild($usernodes->firstChild);
         }
         $this->template->findAndRemoveNodes("//*[@name='user:role' or @name='role']", $trNode);
         $map = iHRIS_Module_SelfService::getUserDetailsInPerson();
         foreach ($map as $detail => $field) {
             $this->template->findAndRemoveNodes("//*[@name='user:{$detail}' or @name='{$detail}']", $trNode);
         }
     }
 }
 /**
  * Load the HTML template files for editing.
  */
 protected function loadHTMLTemplates()
 {
     if (array_key_exists('auto_template', $this->args) && is_array($this->args['auto_template']) && !(array_key_exists('disabled', $this->args['auto_template']) && $this->args['auto_template']['disabled'])) {
         $append_node = 'siteContent';
         if (array_key_exists('append_node', $this->args['auto_template']) && is_scalar($this->args['auto_template']['append_node']) && $this->args['auto_template']['append_node']) {
             $append_node = $this->args['auto_template']['append_node'];
         }
         if (!($node = $this->template->appendFileById($this->getBaseTemplate(), 'div', $append_node)) instanceof DOMNode) {
             I2CE::raiseError("Could not load template:" . $this->getBaseTemplate());
             return false;
         }
         $options = $this->args['auto_template'];
         $options['is_edit'] = true;
         $gizmo = new I2CE_Gizmo_Form($this, $this->primaryObject, $options);
         $gizmo->generate($node);
         return true;
     } else {
         return parent::loadHTMLTemplates();
     }
 }
 /**
  * Load the HTML template files for editing.
  */
 protected function loadHTMLTemplates()
 {
     if (array_key_exists('auto_template', $this->args) && is_array($this->args['auto_template']) && !(array_key_exists('disabled', $this->args['auto_template']) && $this->args['auto_template']['disabled'])) {
         $append_node = 'siteContent';
         if (array_key_exists('append_node', $this->args['auto_template']) && is_scalar($this->args['auto_template']['append_node']) && $this->args['auto_template']['append_node']) {
             $append_node = $this->args['auto_template']['append_node'];
         }
         $this->generateAutoTemplate($this->args['auto_template'], $append_node);
         return true;
     } else {
         parent::loadHTMLTemplates();
         $this->template->appendFileById("form_" . $this->getPrimaryFormName() . ".html", "tbody", $this->getParentFormName() . "_form");
         return true;
     }
 }
 /**
  * Load the HTML template files for editing.
  */
 protected function loadHTMLTemplates()
 {
     parent::loadHTMLTemplates();
     $this->template->appendFileById("menu_view_tr_link.html", "li", "navBarUL", true);
     $this->template->appendFileById("form_tr_" . ($this->id > 0 && $this->editForm() ? "edit_" : "") . $this->getForm(true) . ".html", "tbody", "training_form");
 }
 /**
  * Load the HTML template files for editing.
  */
 protected function loadHTMLTemplates()
 {
     parent::loadHTMLTemplates();
     $this->template->appendFileById("menu_view_ti.html", "li", "navBarUL", true);
     $this->template->appendFileById("lists_form_" . $this->getForm() . ".html", "tbody", "training_institution_form");
 }
 /**
  * Load the HTML template files for editing.
  */
 protected function loadHTMLTemplates()
 {
     if (array_key_exists('auto_template', $this->args) && is_array($this->args['auto_template']) && !(array_key_exists('disabled', $this->args['auto_template']) && $this->args['auto_template']['disabled'])) {
         $append_node = 'siteContent';
         if (array_key_exists('append_node', $this->args['auto_template']) && is_scalar($this->args['auto_template']['append_node']) && $this->args['auto_template']['append_node']) {
             $append_node = $this->args['auto_template']['append_node'];
         }
         $this->generateAutoTemplate($this->args['auto_template'], $append_node);
         return true;
     } else {
         return parent::loadHTMLTemplates();
     }
 }
 /**
  * Load the HTML template files for editing.
  */
 protected function loadHTMLTemplates()
 {
     parent::loadHTMLTemplates();
     $this->template->addFile("user_form_" . $this->getForm(true) . ".html", "tbody");
 }