aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Controllers/GenericController.php
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2011-10-08 09:09:05 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2011-10-08 09:09:05 +0000
commit75095b0329236ea0e2522a633f4a2be733d6869b (patch)
tree990b9181d8963ac3006346ecabec339f9b4a12ba /h-source/Application/Controllers/GenericController.php
parent53f9d690ee2f49545d63788be6c1fe80d9ec6e58 (diff)
improved the way text can be written inside modules of the website
Diffstat (limited to 'h-source/Application/Controllers/GenericController.php')
-rw-r--r--h-source/Application/Controllers/GenericController.php21
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() . " &raquo; <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']);
}