diff options
Diffstat (limited to 'h-source/Application/Controllers/GenericController.php')
-rw-r--r-- | h-source/Application/Controllers/GenericController.php | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/h-source/Application/Controllers/GenericController.php b/h-source/Application/Controllers/GenericController.php index a2c5bdf..f1f1d70 100644 --- a/h-source/Application/Controllers/GenericController.php +++ b/h-source/Application/Controllers/GenericController.php @@ -129,6 +129,8 @@ class GenericController extends BaseController $data['submitName'] = "insertAction"; $data['hiddenInput'] = null; + + $data['tracksHelpLabel'] = $this->getEntryLabel('it_tracks_users'); $data['values'] = $this->m['HardwareModel']->getFormValues('insert','sanitizeHtml'); $this->append($data); @@ -288,7 +290,9 @@ class GenericController extends BaseController // echo $this->m['HardwareModel']->fields; $data['values'] = $this->m['HardwareModel']->getFormValues('update','sanitizeHtml'); $data['hiddenInput'] = "<input type='hidden' name='id_hard' value='".$clean['id_hard']."'>\n"; - + + $data['tracksHelpLabel'] = $this->getEntryLabel('it_tracks_users'); + $this->append($data); if (!isset($_POST['from_client'])) @@ -322,6 +326,19 @@ class GenericController extends BaseController } } +// get the help label for the "it_tracks_users" entry + protected function getEntryLabel($entryName) + { + $tracksHelpLabel = null; + $xml = $this->getBox(array('devices',$this->controller,'form',$entryName)); + if ($xml) + { + $box_news = new BoxParser($xml); + $tracksHelpLabel = $box_news->render(); + } + return $tracksHelpLabel; + } + //get the preview of the description entry protected function getPreview() { @@ -531,6 +548,8 @@ class GenericController extends BaseController $data['tree'] = $this->getSpecHardLink() . " » <span class='last_tree_element'>".$data['ne_name']."</span>"; $data['isDeleted'] = $this->m['HardwareModel']->isDeleted($clean['id_hard']); $data['isApproved'] = strcmp($data['table'][0]['hardware']['approved'],'yes') === 0 ? true : false; + + $data['tracksHelpLabel'] = $this->getEntryLabel('it_tracks_users'); $this->passWhoAskedForDeletion($clean['id_hard']); } |