/** * 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); } } }