?>
<script type="text/javascript">
	Joomla.submitbutton = function(task)
	{
		if (task == 'cancel' || jQuery('#adminForm').validationEngine('validate'))
		{
			Joomla.submitform(task, document.getElementById('adminForm'));
		}
	}
</script>
	<div class="box-info full">
		<form action="index.php" method="post" name="adminForm" id="adminForm" class="form-horizontal" enctype="multipart/form-data" role="form">

			<?php 
// Use the function, the code should be moved here some time
echo MatukioHelperUtilsEvents::getEventEdit($this->event, 2);
?>
			<div class="clr clear"></div>

			<input type="hidden" name="option" value="com_matukio" />

			<input type="hidden" name="controller" value="eventlist" />
			<input type="hidden" name="model" value="event" />
			<input type="hidden" name="view" value="event" />
			<input type="hidden" name="task" value="" />

			<input type="hidden" name="published" value="<?php 
echo $this->event->published;
?>
" />
			<input type="hidden" name="id" value="<?php 
    echo $knopfoben;
}
// MatukioHelperUtilsEvents::getEventlistHeaderEnd();
echo "<table class=\"table\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\" border=\"0\" style=\"border-top: 1px solid #ccc\">" . "<tr><td class=\"sem_anzeige\">";
// Anzeige Bereichsueberschrift
if ($this->event->id == "") {
    $temp1 = JTEXT::_('COM_MATUKIO_NEW_EVENT');
    $temp2 = JTEXT::_('COM_MATUKIO_SUBMIT_NEW_EVENT');
} else {
    $temp1 = JTEXT::_('COM_MATUKIO_EDIT_EVENT');
    $temp2 = JTEXT::_('COM_MATUKIO_CHANGE_INFORMATION');
}
MatukioHelperUtilsEvents::printHeading("{$temp1}", "{$temp2}");
// Anzeige Eingabefelder
echo "</table>";
$html = MatukioHelperUtilsEvents::getEventEdit($this->event, 1, true);
// Anzeige Funktionsknoepfe unten
if (MatukioHelperSettings::getSettings('event_buttonposition', 2) > 0) {
    $html .= MatukioHelperUtilsEvents::getTableHeader(4) . "<tr>" . MatukioHelperUtilsEvents::getTableCell($knopfunten, 'd', 'c', '100%', 'sem_nav_d') . "</tr>" . MatukioHelperUtilsEvents::getTableHeader('e');
}
if ($this->event->published == "") {
    $html .= "\n<input type=\"hidden\" name=\"published\" value=\"1\" />";
} else {
    $html .= "\n<input type=\"hidden\" name=\"published\" value=\"" . $this->event->published . "\" />";
}
$html .= "<input type=\"hidden\" name=\"id\" value=\"" . $this->event->id . "\" />";
$html .= MatukioHelperUtilsEvents::getHiddenFormElements("", $this->catid, $this->search, $this->limit, $this->limitstart, 0, $this->dateid, -1);
echo $html;
?>

	<script type="text/javascript">