Files
FHC-Core/application/widgets/vorlage_widget.php
T
bison-paolo 14aab3dd56 - Vorlage widget now add an empty element to the beginning of the drop
down box
- Bugfix message write controller:
	- JS function getVorlageText was missing
	- Wrong URL in form action
2017-03-13 16:39:38 +01:00

23 lines
658 B
PHP

<?php
class Vorlage_widget extends Widget
{
public function display($data)
{
$this->load->model("system/Vorlage_model", "VorlageModel");
$this->VorlageModel->addOrder("vorlage_kurzbz");
$result = $this->VorlageModel->loadWhere(array("mimetype" => "text/html"));
if (is_object($result) && $result->error == EXIT_SUCCESS)
{
// Adding an empty element
$emptyVorlage = new stdClass();
$emptyVorlage->vorlage_kurzbz = '-1';
$emptyVorlage->bezeichnung = 'Select a template...';
array_unshift($result->retval, $emptyVorlage);
$data = array("vorlage" => $result->retval);
$this->view("widgets/vorlage", $data);
}
}
}