/**
  * Displays the coupon edit form
  *
  * @param   string  $tpl  - The template
  *
  * @return  mixed|void
  */
 public function display($tpl = null)
 {
     $model = $this->getModel();
     $bookingfield = $model->getBookingfield();
     if (!$bookingfield) {
         $bookingfield = JTable::getInstance('bookingfields', 'Table');
     }
     // Type
     $field_types = array(JHTML::_('select.option', 'text', JText::_('COM_MATUKIO_TYPE_TEXT')), JHTML::_('select.option', 'textarea', JText::_('COM_MATUKIO_TYPE_TEXTAREA')), JHTML::_('select.option', 'select', JText::_('COM_MATUKIO_TYPE_SELECT')), JHTML::_('select.option', 'radio', JText::_('COM_MATUKIO_TYPE_RADIO')), JHTML::_('select.option', 'checkbox', JText::_('COM_MATUKIO_TYPE_CHECKBOX')), JHTML::_('select.option', 'spacer', JText::_('COM_MATUKIO_TYPE_SPACER')), JHTML::_('select.option', 'spacertext', JText::_('COM_MATUKIO_TYPE_SPACER_TEXT')));
     $select_fieldtype = JHTML::_('select.genericlist', $field_types, 'type', 'class="inputbox input select"', 'value', 'text', $bookingfield->type);
     // Page
     $pages = array(JHTML::_('select.option', '1', JText::_('COM_MATUKIO_PAGE_ONE')), JHTML::_('select.option', '2', JText::_('COM_MATUKIO_PAGE_TWO')), JHTML::_('select.option', '3', JText::_('COM_MATUKIO_PAGE_THREE')));
     $select_pages = JHTML::_('select.genericlist', $pages, 'page', 'class="inputbox"', 'value', 'text', $bookingfield->page);
     $this->select_required = MatukioHelperInput::getRadioButtonBool("required", "required", $bookingfield->required);
     $this->select_published = MatukioHelperInput::getRadioButtonBool("published", "published", $bookingfield->published);
     // Data preallocation
     $sources = array(JHTML::_('select.option', '0', JText::_('COM_MATUKIO_NONE')), JHTML::_('select.option', '1', JText::_('COM_MATUKIO_JOOMLA_USER_PROFILE')));
     $select_source = JHTML::_('select.genericlist', $sources, 'datasource', 'class="input chzn_single"', 'value', 'text', $bookingfield->datasource);
     $joomla_fields = array(JHTML::_('select.option', 'name', JText::_('COM_MATUKIO_NAME')), JHTML::_('select.option', 'username', JText::_('COM_MATUKIO_USERNAME')), JHTML::_('select.option', 'email', JText::_('COM_MATUKIO_EMAIL')), JHTML::_('select.option', 'address1', 'address1'), JHTML::_('select.option', 'address2', JText::_('address2')), JHTML::_('select.option', 'city', JText::_('city')), JHTML::_('select.option', 'region', JText::_('region')), JHTML::_('select.option', 'country', JText::_('country')), JHTML::_('select.option', 'postal_code', JText::_('postal_code')), JHTML::_('select.option', 'phone', JText::_('phone')), JHTML::_('select.option', 'website', JText::_('website')), JHTML::_('select.option', 'favoritebook', JText::_('favoritebook')), JHTML::_('select.option', 'aboutme', JText::_('aboutme')), JHTML::_('select.option', 'dob', JText::_('dob')));
     $select_joomla_data = JHTML::_('select.genericlist', $joomla_fields, 'datasource_map', 'class="input chzn_single"', 'value', 'text', $bookingfield->datasource_map);
     $this->bookingfield = $bookingfield;
     $this->select_type = $select_fieldtype;
     $this->select_page = $select_pages;
     $this->select_source = $select_source;
     $this->select_joomla_data = $select_joomla_data;
     $this->addToolbar();
     parent::display($tpl);
 }
 /**
  * Displays the coupon edit form
  *
  * @param   string  $tpl  - The template
  *
  * @return  mixed|void
  */
 public function display($tpl = null)
 {
     $model = $this->getModel();
     $coupon = $model->getCoupon();
     if (!$coupon) {
         $coupon = JTable::getInstance('coupons', 'Table');
     }
     $this->coupon = $coupon;
     $this->select_procent = MatukioHelperInput::getRadioButtonBool("procent", "procent", $coupon->procent);
     $this->select_published = MatukioHelperInput::getRadioButtonBool("published", "published", $coupon->published);
     $this->addToolbar();
     parent::display($tpl);
 }
 /**
  * Displays the taxes edit form
  *
  * @param   string  $tpl  - The template
  *
  * @return  mixed|void
  */
 public function display($tpl = null)
 {
     $model = $this->getModel();
     $tax = $model->getTax();
     if (!$tax) {
         $tax = JTable::getInstance('taxes', 'MatukioTable');
         $tax->value = 0.0;
     }
     $this->select_published = MatukioHelperInput::getRadioButtonBool("published", "published", $tax->published);
     $this->tax = $tax;
     $this->addToolbar();
     parent::display($tpl);
 }
 /**
  * Displays the participant edit form
  *
  * @param   string  $tpl  - The template
  *
  * @throws  Exception
  * @return  mixed|void
  */
 public function display($tpl = null)
 {
     $booking_id = JFactory::getApplication()->input->getInt('booking_id', 0);
     $model = $this->getModel();
     $booking = null;
     if (!empty($booking_id)) {
         $booking = $model->getBooking();
     }
     if (!$booking) {
         $booking = JTable::getInstance('bookings', 'Table');
         $event_id = JFactory::getApplication()->input->getInt("event_id", 0);
         if (!empty($event_id)) {
             $booking->semid = $event_id;
         }
         $booking->uuid = MatukioHelperPayment::getUuid(true);
     }
     $db = JFactory::getDbo();
     $db->setQuery("SELECT r.id AS value, CONCAT(a.title, ' ', r.begin) AS text FROM #__matukio_recurring AS r LEFT JOIN #__matukio AS a ON r.event_id = a.id ");
     $events = (array) $db->loadObjectList();
     $this->event_select = JHtml::_('select.genericlist', $events, 'event_id', '', 'value', 'text', $booking->semid);
     $dispatcher = JDispatcher::getInstance();
     JPluginHelper::importPlugin("payment");
     $gateways = $dispatcher->trigger('onTP_GetInfo', array(MatukioHelperPayment::$matukio_payment_plugins));
     $payment = array();
     foreach ($gateways as $gway) {
         $payment[] = array("name" => $gway->id, "title" => $gway->name);
     }
     // Booking status
     $options[] = array("value" => MatukioHelperUtilsBooking::$PENDING, "text" => MatukioHelperUtilsBooking::getBookingStatusName(MatukioHelperUtilsBooking::$PENDING));
     $options[] = array("value" => MatukioHelperUtilsBooking::$ACTIVE, "text" => MatukioHelperUtilsBooking::getBookingStatusName(MatukioHelperUtilsBooking::$ACTIVE));
     $options[] = array("value" => MatukioHelperUtilsBooking::$WAITLIST, "text" => MatukioHelperUtilsBooking::getBookingStatusName(MatukioHelperUtilsBooking::$WAITLIST));
     $options[] = array("value" => MatukioHelperUtilsBooking::$ARCHIVED, "text" => JText::_("COM_MATUKIO_ARCHIVED"));
     $options[] = array("value" => MatukioHelperUtilsBooking::$DELETED, "text" => JText::_("COM_MATUKIO_DELETED"));
     $this->status_select = JHtml::_('select.genericlist', $options, 'status', '', 'value', 'text', $booking->status);
     $marks[] = array("value" => 0, "text" => JText::_("COM_MATUKIO_NONE"));
     $marks[] = array("value" => 1, "text" => "1");
     $marks[] = array("value" => 2, "text" => "2");
     $marks[] = array("value" => 3, "text" => "3");
     $marks[] = array("value" => 4, "text" => "4");
     $marks[] = array("value" => 5, "text" => "5");
     $marks[] = array("value" => 6, "text" => "6");
     $this->mark_select = JHtml::_('select.genericlist', $marks, 'mark', '', 'value', 'text', $booking->mark);
     $this->select_checkedin = MatukioHelperInput::getRadioButtonBool("checked_in", "checked_in", $booking->checked_in);
     $this->booking = $booking;
     $this->payment = $payment;
     $this->addToolbar();
     parent::display($tpl);
 }
 /**
  * Displays the fee edit form
  *
  * @param   string  $tpl  - The template
  *
  * @return  mixed|void
  */
 public function display($tpl = null)
 {
     $model = $this->getModel();
     $fee = $model->getFee();
     if (!$fee) {
         $fee = JTable::getInstance('differentfees', 'MatukioTable');
         $fee->value = 0.0;
         $fee->discount = 1;
         $fee->percent = 1;
     }
     $this->select_published = MatukioHelperInput::getRadioButtonBool("published", "published", $fee->published);
     $this->fee = $fee;
     $this->select_percent = MatukioHelperInput::getRadioButtonBool("percent", "percent", $fee->percent);
     $this->select_discount = MatukioHelperInput::getRadioButtonBool("discount", "discount", $fee->discount);
     $this->addToolbar();
     parent::display($tpl);
 }
					</tr>
					-->
					<input type="hidden" name="cancelled" value="<?php 
echo $this->recurring->cancelled;
?>
" />
					<tr>
						<td align="left" class="key">
							<?php 
echo JText::_('COM_MATUKIO_PUBLISHED');
?>
:
						</td>
						<td>
							<?php 
echo MatukioHelperInput::getRadioButtonBool("published", "published", $this->recurring->published);
?>
						</td>
					</tr>
				</table>

			</div>
			<input type="hidden" name="id" value="<?php 
echo $this->recurring->id;
?>
"/>
			<input type="hidden" name="option" value="com_matukio"/>
			<input type="hidden" name="controller" value="recurring"/>
			<input type="hidden" name="view" value="editRecurring"/>
			<input type="hidden" name="model" value="editRecurring"/>
			<input type="hidden" name="task" value="editRecurring"/>
							       size="60" class="input"
							       value="jos_sembookings" />
						</td>
					</tr>
					<tr>
						<td class="key" width="200px">
								<label for="seminar_table" title="<?php 
echo JText::_('COM_MATUKIO_IMPORT_SEMINAR_NUMBER_TABLE');
?>
">
								<?php 
echo JText::_('COM_MATUKIO_IMPORT_SEMINAR_NUMBER_TABLE');
?>
:
								<?php 
echo MatukioHelperInput::getTooltip("COM_MATUKIO_TOOLTIP_IMPORT_SEMINAR_NUMBER_TABLE");
?>
							</label>
						</td>
						<td>
							<input type="text" maxlength="255" id="seminar_number_table" name="seminar_number_table"
							       size="60" class="input"
							       value="jos_semnumber" />
						</td>
					</tr>
					<tr>
						<td colspan="2">
							<div align="right">
								<input type="submit" class="mat_button btn btn-primary"
								       value="<?php 
echo JText::_("COM_MATUKIO_IMPORT");
									<td>
										<input class="input-medium required validate-numeric" type="text"
										       maxlength="15" name="max_hits" id="max_hits" required="required"
										       value="<?php 
echo $this->coupon->max_hits;
?>
"/>
								</tr>
								<tr>
									<td class="key">
										<?php 
echo JText::_('COM_MATUKIO_PERCENT');
?>
:
										<?php 
echo MatukioHelperInput::getTooltip("COM_MATUKIO_TOOLTIP_PERCENT");
?>
									</td>
									<td>
										<?php 
echo $this->select_procent;
?>
									</td>
								</tr>
								<tr>
									<td class="key">
										<?php 
echo JText::_('COM_MATUKIO_PUBLISHED_UP');
?>
:
									</td>
?>
</legend>
			<table class="table">
				<tr>
					<td class="key" colspan="2">
						<label for="value_7" width="100"
						       title="<?php 
echo JText::_('COM_MATUKIO_TEMPLATE_CERTIFICATE_CODE');
?>
">
							<?php 
echo JText::_('COM_MATUKIO_TEMPLATE_CERTIFICATE_CODE');
?>
:
							<?php 
echo MatukioHelperInput::getTooltip("COM_MATUKIO_TOOLTIP_TEMPLATE_CERTIFICATE_CODE");
?>
						</label>
					</td>
				</tr>
				<tr>
					<td colspan="2">
						<?php 
$editor = JFactory::getEditor();
echo $editor->display("value[7]", $this->templates[6]->value, 800, 400, 40, 20, false, "value_7");
?>

						<input type="hidden" name="subject[7]" value="E"/>
						<input type="hidden" name="value_text[7]" value=""/>
					</td>
				</tr>
						<td>
							<input type="text" name="style" id="style" size="50" class="input"
							       value="<?php 
echo $this->bookingfield->style;
?>
" />
						</td>
					</tr>
					<tr>
						<td class="key">
							<?php 
echo JText::_('COM_MATUKIO_ORDERING');
?>
:
							<?php 
echo MatukioHelperInput::getTooltip("COM_MATUKIO_TOOLTIP_BOOKINGFIELD_ORDERING");
?>
						</td>
						<td>
							<input class="required" type="text" name="ordering" id="ordering" class="input input-small"
							       value="<?php 
echo $this->bookingfield->ordering;
?>
" />
						</td>
					</tr>
					<tr>
						<td class="key">
							<?php 
echo JText::_('JPUBLISHED');
?>
?>
					</td>
				</tr>
				<tr>
					<td class="key" colspan="2">
						<label for="value_text_11"
						       title="<?php 
echo JText::_('COM_MATUKIO_TEMPLATE_MAIL_CRONJOB_REMINDER_TEXT_DESC');
?>
">
							<?php 
echo JText::_('COM_MATUKIO_TEMPLATE_MAIL_CRONJOB_REMINDER_TEXT');
?>
:
							<?php 
echo MatukioHelperInput::getTooltip("COM_MATUKIO_TOOLTIP_TEMPLATE_MAIL_CRONJOB_REMINDER_TEXT");
?>
						</label>
					</td>
				</tr>
				<tr>
					<td colspan="2">
						<textarea rows="10" cols="80" name="value_text[11]" id="value_text_11"
						          style="min-width: 400px; width: auto;"><?php 
echo $this->templates[10]->value_text;
?>
</textarea>
					</td>
				</tr>
			</table>
		</fieldset>
    /**
     * Gets the Edit field for the different prices :)
     *
     * @param   int    $num  - The number (current count)
     * @param   array  $fee  - The fee array.. need to convert to std class
     *
     * @return string
     */
    public static function getDifferentFeeEdit($num, $fee = null)
    {
        if (!$fee) {
            $fee = JTable::getInstance('differentfees', 'MatukioTable');
            $fee->discount = 1;
            $fee->percent = 1;
            $fee->id = $num + 1;
        } else {
            // Convert the array to to std class...
            $f = JTable::getInstance('differentfees', 'MatukioTable');
            $f->title = $fee["title"];
            $f->value = $fee["value"];
            $f->discount = $fee["discount"];
            $f->percent = $fee["percent"];
            $f->id = $fee["id"];
            if (!empty($fee["published_up"])) {
                $f->published_up = $fee["published_up"];
            }
            if (!empty($fee["published_down"])) {
                $f->published_down = $fee["published_down"];
            }
            $f->published = 1;
            $fee = $f;
        }
        $select_percent = MatukioHelperInput::getRadioButtonBool("different_fees_override[" . $num . "][percent]", "different_fees_override_percent" . $num, $fee->percent);
        $select_discount = MatukioHelperInput::getRadioButtonBool("different_fees_override[" . $num . "][discount]", "different_fees_override_discount" . $num, $fee->discount);
        $html = '<div class="different_fee" id="fee_' . $num . '">';
        $html .= '<div class="row show-grid">';
        $html .= '<div class="col-sm-2">';
        $html .= '<input class="form-control" type="text" name="different_fees_override[' . $num . '][title]" id="different_fees_override_title' . $num . '" size="50" maxlength="250"
								 value="' . $fee->title . '" placeholder="' . JText::_("COM_MATUKIO_FEE_TITLE") . '" />';
        $html .= '</div>';
        $html .= '<div class="col-sm-1">';
        $html .= '<input class="form-control price" type="text" name="different_fees_override[' . $num . '][value]" id="different_fees_override_value' . $num . '" size="10" maxlength="15"
								       value="' . $fee->value . '" placeholder="' . JText::_("COM_MATUKIO_VALUE") . '"/>';
        $html .= '</div>';
        $html .= '<div class="col-sm-2">';
        $html .= JText::_("COM_MATUKIO_PERCENT") . " ";
        $html .= $select_percent;
        $html .= '</div>';
        $html .= '<div class="col-sm-2">';
        $html .= JText::_("COM_MATUKIO_FEE_DISCOUNT") . " ";
        $html .= $select_discount;
        $html .= '</div>';
        $html .= '<div class="col-sm-2">';
        $html .= JHtml::_('calendar', $fee->published_up, 'different_fees_override[' . $num . '][published_up]', 'different_fees_override_published_up' . $num, '%Y-%m-%d', array('style' => "width: 100px;", 'class' => "form-control date", 'placeholder' => JText::_("COM_MATUKIO_PUBLISHED_UP")));
        $html .= '</div>';
        $html .= '<div class="col-sm-2">';
        $html .= JHtml::_('calendar', $fee->published_down, 'different_fees_override[' . $num . '][published_down]', 'different_fees_override_published_down' . $num, '%Y-%m-%d', array('style' => "width: 100px;", 'class' => "form-control date", 'placeholder' => JText::_("COM_MATUKIO_PUBLISHED_DOWN")));
        $html .= '</div>';
        if ($num != 0) {
            $html .= '<div class="col-sm-1">';
            $html .= '<button id="rem_fee' . $num . '" class="btn btn-danger" type="button">' . JText::_("COM_MATUKIO_REMOVE") . '</button>';
            $html .= '</div>';
        } else {
            $html .= '<div class="col-sm-1">';
            $html .= '<button id="add_fee" class="btn btn-success" type="button">' . JText::_("COM_MATUKIO_ADD") . '</button>';
            $html .= '</div>';
        }
        $html .= '<input type="hidden" name="different_fees_override[' . $num . '][num]" id="different_fees_override_num' . $num . '" value="' . $num . '" />';
        $html .= '<input type="hidden" name="different_fees_override[' . $num . '][id]" id="different_fees_override_id' . $num . '" value="' . $fee->id . '" />';
        $html .= '</div>';
        $html .= '</div>';
        // Add JavaSCript to Remove other fees
        if ($num != 0) {
            $html .= '
				<script type="text/javascript">
				jQuery("#rem_fee' . $num . '").click(function() {
					jQuery("#fee_' . $num . '").remove();
				});
				</script>
			';
        }
        return $html;
    }
    ?>
</a>
						</td>
						<td>
							<?php 
    echo $l->id;
    ?>
						</td>
						<td>
							<?php 
    echo $l->value;
    ?>
						</td>
						<td>
							<?php 
    echo MatukioHelperInput::getYesNo($l->procent);
    ?>
						</td>
						<td>
							<?php 
    echo $l->published_up;
    ?>
						</td>
						<td>
							<?php 
    echo $l->published_down;
    ?>
						</td>
						<td style="text-align: center">
							<?php 
    echo $published;
    echo $l->values;
    ?>
						</td>
						<td style="text-align: center">
							<?php 
    echo $l->page;
    ?>
						</td>
						<td>
							<?php 
    echo $l->type;
    ?>
						</td>
						<td>
							<?php 
    echo MatukioHelperInput::getYesNo($l->required);
    ?>
						</td>
						<td style="text-align: center">
							<?php 
    echo $l->ordering;
    ?>
						</td>
						<td style="text-align: center">
							<?php 
    echo $published;
    ?>
						</td>
					</tr>
					<?php 
    $i++;
							<td>
								<input class="input required" type="text" name="title" id="title" size="50" maxlength="250" required="required"
								       value="<?php 
echo $this->tax->title;
?>
" />
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php 
echo JText::_('COM_MATUKIO_VALUE');
?>
:
								<?php 
echo MatukioHelperInput::getTooltip("COM_MATUKIO_TOOLTIP_TAX_VALUE");
?>
							</td>
							<td>
								<input class="input text_area required validate-numeric" type="text" size="10" maxlength="15" name="value" id="value" required="required"
								       value="<?php 
echo $this->tax->value;
?>
" />
						</tr>
						<tr>
							<td class="key">
								<?php 
echo JText::_('COM_MATUKIO_PUBLISHED');
?>
:
    echo $l->id;
    ?>
						</td>
						<td>
							<?php 
    echo $l->value;
    ?>
						</td>
						<td style="text-align: center">
							<?php 
    echo MatukioHelperInput::getYesNo($l->percent);
    ?>
						</td>
						<td style="text-align: center">
							<?php 
    echo MatukioHelperInput::getYesNo($l->discount);
    ?>
						</td>
						<td>
							<?php 
    echo $l->published_up;
    ?>
						</td>
						<td>
							<?php 
    echo $l->published_down;
    ?>
						</td>
						<td style="text-align: center">
							<?php 
    echo $published;
echo JText::_('COM_MATUKIO_TEMPLATE_TICKET');
?>
</legend>
		<table class="table">
			<tr>
				<td class="key" colspan="2">
					<label for="value_8" title="<?php 
echo JText::_('COM_MATUKIO_TEMPLATE_TICKET');
?>
">
						<?php 
echo JText::_('COM_MATUKIO_TEMPLATE_TICKET_PDF');
?>
:
						<?php 
echo MatukioHelperInput::getTooltip("COM_MATUKIO_TOOLTIP_TEMPLATE_TICKET_TEMPLATE");
?>
					</label>
				</td>
			</tr>
			<tr>
				<td colspan="2">
					<?php 
$editor = JFactory::getEditor();
echo $editor->display("value[10]", $this->templates[9]->value, 800, 300, 40, 20, false, "value_10");
?>
					<input type="hidden" name="subject[10]" value="E" />
					<input type="hidden" name="value_text[10]" value="" />
				</td>
			</tr>
		</table>
    /**
     * Returns the html event edit fields
     * sem_f008
     *
     * @param   object  $row       - The event
     * @param   int     $art       - The art (no idea)
     * @param   bool    $frontend  - Is this form shown in the frontend or backend?!
     *
     * @return string
     */
    public static function getEventEdit($row, $art, $frontend = false)
    {
        jimport('joomla.database.table');
        // We need Bootstrap since 3.0
        if ($frontend) {
            CompojoomHtmlBehavior::bootstrap31(true, false, true, false);
            JHTML::_('script', 'media/lib_compojoom/js/jquery.radiobtns.js');
        }
        MatukioHelperUtilsBasic::loadValidation();
        JHTML::_('script', 'media/com_matukio/js/select2.min.js');
        JHTML::_('script', 'media/com_matukio/js/recurring.jquery.js');
        JHTML::_('stylesheet', 'media/com_matukio/css/select2.css');
        JHTML::_('stylesheet', 'media/com_matukio/css/select2-bootstrap.css');
        $doc = JFactory::getDocument();
        // Small css fixes
        $doc->addStyleDeclaration('
			.table td { vertical-align: middle !important; }
		');
        // Add JS for different fees
        $doc->addScriptDeclaration('
			(function ($) {
				$( document ).ready(function( $ ) {
					$("#adminForm").validationEngine();

					var numfees = $("#numfees").val();

					$("#add_fee").click(function() {
						$.get( "index.php?option=com_matukio&format=raw&view=requests&task=get_override_fee_edit_row",
						{ num: numfees } )
						.done(function( data ) {
							$( "#feecont" ).append( data );
							$("input .btn").button();

							numfees++;
							$("#numfees").val(numfees);

	                        // Turn radios into btn-group
							$.getScript( "' . JUri::root() . 'media/com_matukio/js/radiobtns.js" );
						});
					});

					$(".compojoom-bootstrap").mat_recurring({
					});

					// Turn checkboxes into btn-group
				$(\'.checkbox.btn-group label\').addClass(\'btn\');

				// Isis template and others may already have done this so remove these!
				$(".checkbox.btn-group label").unbind(\'click\');
				$(".checkbox.btn-group label input[type=\'checkbox\']").unbind(\'click\');

				$(".checkbox.btn-group label").click(function(event) {
					event || (event = window.event);

					// stop the event being triggered twice is click on input AND label outside it!
					if (event.target.tagName.toUpperCase()=="INPUT"){
						//event.preventDefault();
						return;
					}

					var label = $(this);
					var input = $(\'#\' + label.attr(\'for\'));

					if (input.prop(\'disabled\')) {
						label.removeClass(\'active btn-success btn-danger btn-primary\');
						input.prop(\'checked\', false);
						event.stopImmediatePropagation();
						return;
					}

					if (!input.prop(\'checked\')) {
						label.addClass(\'active btn-success\');
					} else {
						label.removeClass(\'active btn-success btn-danger btn-primary\');
					}

					// bootstrap takes care of the checkboxes themselves!
				});

				$(".btn-group input[type=checkbox]").each(function() {
					var input = $(this);
					input.css(\'display\',\'none\');
				});

				$("#place_id").change(function(){
					var pval = $(this).val();

					if (pval == "0") {
						$("#custom_place").show();
						$("#gmaps").show();
					} else {
						$("#custom_place").hide();
						$("#gmaps").hide();
					}
				});

				})
			})(jQuery);
		');
        $editor = JFactory::getEditor();
        $catlist = self::getCategoryListArray($row->catid);
        $reqfield = " <span class=\"sem_reqfield\">*</span>";
        // Vorlage
        $html = "";
        if ($art == 1 or $art == 2) {
            $html = "<input type=\"hidden\" name=\"pattern\" value=\"\" />";
            $html .= "<input type=\"hidden\" name=\"vorlage\" value=\"0\" />";
        }
        if ($row->id == 0 and ($art == 1 or $art == 2)) {
            // $html = self::getTemplateListSelect($row->vorlage, $art);
        }
        // Surrounding div
        // $html .= '<div class="compojoom-bootstrap">';
        $html .= '<div id="mat_event_edit">';
        $html .= '<!-- List of tabs -->
			<ul class="nav nav-tabs nav-justified">
				<li class="active">
					<a href="#basic" data-toggle="tab">' . JText::_('COM_MATUKIO_BASIC_SETTINGS') . '</a>
				</li>
				<li>
					<a href="#advanced" data-toggle="tab">' . JText::_('COM_MATUKIO_ADDITIONAL_SETTINGS') . '</a>
				</li>
				<li>
					<a href="#eventfields" data-toggle="tab">' . JText::_('COM_MATUKIO_GENERAL_INPUT_FIELDS') . '</a>
				</li>
				<li>
					<a href="#files" data-toggle="tab">' . JText::_('COM_MATUKIO_FILES') . '</a>
				</li>
				<li>
					<a href="#overrides" data-toggle="tab">' . JText::_('COM_MATUKIO_OVERRIDES') . '</a>
				</li>
			</ul>';
        // Basics
        $html .= '<div class="tab-content">';
        $html .= '<div id="basic" class="tab-pane active">';
        $html .= '<div class="form-group">';
        $html .= '<div class="col-sm-offset-2 col-sm-10">';
        $html .= JTEXT::_('COM_MATUKIO_SETTINGS_NEEDED');
        $html .= '</div>';
        $html .= '</div>';
        // Vorlagenname und Besitzer
        if ($art == 3) {
            $html .= "<tr>" . self::getTableCell(JTEXT::_('COM_MATUKIO_TEMPLATE') . ':', 'd', 'r', '20%', 'sem_edit') . self::getTableCell("<input class=\"sem_inputbox\" type=\"text\" name=\"pattern\" size=\"50\" maxlength=\"100\"\n\t\t\tvalue=\"" . $row->pattern . "\" />" . $reqfield, 'd', 'l', '80%', 'sem_edit') . "</tr>";
            $html .= "<tr>" . self::getTableCell(JTEXT::_('COM_MATUKIO_OWNER') . ':', 'd', 'r', '20%', 'sem_edit') . self::getTableCell(self::getOranizerList($row->publisher) . $reqfield, 'd', 'l', '80%', 'sem_edit') . "</tr>";
            $reqfield = "";
        }
        // ID der Veranstaltung
        if ($row->id < 1) {
            $htxt = JTEXT::_('COM_MATUKIO_ID_NOT_CREATED');
            $htx2 = JTEXT::_('COM_MATUKIO_SHOULD_REGISTERED_USERS_RECEIVE_MAIL');
            $htx3 = JTEXT::_('COM_MATUKIO_NEW_EVENT_PUBLISHED_INTERESTED_SEE_HOMEPAGE');
            $htx4 = "";
            $htx5 = " checked=\"checked\"";
        } else {
            $htxt = $row->id;
            $htx2 = JTEXT::_('COM_MATUKIO_INFORM_PER_EMAIL');
            $htx3 = JTEXT::_('COM_MATUKIO_EVENTS_DATAS_CHANGED');
            if ($row->cancelled == 0) {
                $htx4 = "";
                $htx5 = " checked=\"checked\"";
                if ($art != 3) {
                    $htx4 = " onClick=\"infotext.value='" . JTEXT::_('COM_MATUKIO_ORGANISER_CANCELLED') . "'\"";
                    $htx5 = " onClick=\"infotext.value='" . JTEXT::_('COM_MATUKIO_EVENTS_DATAS_CHANGED') . "'\"" . $htx5;
                }
            } else {
                $htx4 = " checked=\"checked\"";
                $htx5 = "";
                if ($art != 3) {
                    $htx4 = " onClick=\"infotext.value='" . JTEXT::_('COM_MATUKIO_EVENTS_DATAS_CHANGED') . "'\"" . $htx4;
                    $htx5 = " onClick=\"infotext.value='" . JTEXT::_('COM_MATUKIO_ORGANISER_HAS_REPUBLISHED_EVENT') . "'\"";
                }
            }
        }
        if ($row->id > 0 && false) {
            $html .= "<tr>" . self::getTableCell(JTEXT::_('COM_MATUKIO_ID') . MatukioHelperUtilsBasic::createToolTip(JTEXT::_('COM_MATUKIO_AUTO_ID')), 'd', 'l', '20%', 'sem_edit');
            $html .= self::getTableCell($htxt, 'd', 'l', '80%', 'sem_edit') . "</tr>";
        }
        // Titel
        $html .= '<div class="form-group">';
        $html .= '<label for="title" class="col-sm-2 control-label">' . JTEXT::_('COM_MATUKIO_TITLE') . $reqfield . '</label>';
        $html .= '<div class="col-sm-10">';
        $html .= "<input class=\"form-control validate[required]\" type=\"text\" name=\"title\" id=\"title\"\n            maxlength=\"250\" value=\"" . $row->title . "\" />";
        $html .= '</div>';
        $html .= '</div>';
        // Category
        $htxt = $catlist[0];
        if (MatukioHelperSettings::getSettings('event_image', 1) == 1) {
            foreach ($catlist[1] as $el) {
                $htxt .= "<input type=\"hidden\" id=\"im" . $el->id . "\" value=\"" . $el->image . "\" />";
            }
        }
        $html .= '<div class="form-group">';
        $html .= '<label for="category" class="col-sm-2 control-label">' . JTEXT::_('COM_MATUKIO_CATEGORY') . MatukioHelperUtilsBasic::createToolTip(JTEXT::_('COM_MATUKIO_EVENT_ASSIGNED_CATEGORY')) . $reqfield . '</label>';
        $html .= '<div class="col-sm-10">';
        $html .= $htxt;
        $html .= '</div>';
        $html .= '</div>';
        // Event number
        $html .= '<div class="form-group">';
        $html .= '<label for="semnum" class="col-sm-2 control-label">' . JTEXT::_('COM_MATUKIO_NUMBER') . MatukioHelperUtilsBasic::createToolTip(JTEXT::_('COM_MATUKIO_UNIQUE_NUMBER')) . $reqfield . '</label>';
        $html .= '<div class="col-sm-10">';
        $html .= "<input class=\"form-control validate[required]\"\n\t\t\t\ttype=\"text\" id=\"semnum\" name=\"semnum\" maxlength=\"100\" value=\"" . $row->semnum . "\" />";
        $html .= '</div>';
        $html .= '</div>';
        $radios = array();
        $radios[] = JHTML::_('select.option', 1, JTEXT::_('COM_MATUKIO_YES'));
        $radios[] = JHTML::_('select.option', 0, JTEXT::_('COM_MATUKIO_NO'));
        if ($row->showbegin == "") {
            $row->showbegin = 1;
        }
        if ($row->showend == "") {
            $row->showend = 1;
        }
        if ($row->showbooked == "") {
            $row->showbooked = 1;
        }
        // Event begin
        $htxt = "<div class=\"col-sm-4\">" . JHTML::_('calendar', JHtml::_('date', $row->begin, 'Y-m-d H:i:s'), '_begin_date', '_begin_date', '%Y-%m-%d %H:%M:%S', array('class' => 'form-control validate[required]'));
        $radio_showbegin = MatukioHelperInput::getRadioButtonBool("showbegin", "showbegin", $row->showbegin);
        $htxt .= "</div> <div class=\"col-sm-4\">" . JTEXT::_('COM_MATUKIO_DISPLAY') . " " . $radio_showbegin . "</div>";
        $html .= '<div class="form-group">';
        $html .= '<label for="_begin_date" class="col-sm-2 control-label">' . JTEXT::_('COM_MATUKIO_BEGIN') . MatukioHelperUtilsBasic::createToolTip(JTEXT::_('COM_MATUKIO_DATE_TIME_FORMAT')) . $reqfield . '</label>';
        $html .= $htxt;
        $html .= '</div>';
        // Event end
        $htxt = "<div class=\"col-sm-4\">" . JHTML::_('calendar', JHtml::_('date', $row->end, 'Y-m-d H:i:s'), '_end_date', '_end_date', '%Y-%m-%d %H:%M:%S', array('class' => 'form-control validate[required]'));
        $radio_showend = MatukioHelperInput::getRadioButtonBool("showend", "showend", $row->showend);
        $htxt .= "</div> <div class=\"col-sm-4\">" . JTEXT::_('COM_MATUKIO_DISPLAY') . " " . $radio_showend . "</div>";
        $html .= '<div class="form-group">';
        $html .= '<label for="_end_date" class="col-sm-2 control-label">' . JTEXT::_('COM_MATUKIO_END') . MatukioHelperUtilsBasic::createToolTip(JTEXT::_('COM_MATUKIO_DATE_TIME_FORMAT')) . $reqfield . '</label>';
        $html .= $htxt;
        $html .= '</div>';
        // Anmeldeschluss
        // Closing end
        $htxt = "<div class=\"col-sm-4\">" . JHTML::_('calendar', JHtml::_('date', $row->booked, 'Y-m-d H:i:s'), '_booked_date', '_booked_date', '%Y-%m-%d %H:%M:%S', array('class' => 'form-control validate[required]'));
        $radio_showbooked = MatukioHelperInput::getRadioButtonBool("showbooked", "showbooked", $row->showbooked);
        $htxt .= "</div> <div class=\"col-sm-4\">" . JTEXT::_('COM_MATUKIO_DISPLAY') . " " . $radio_showbooked . "</div>";
        $html .= '<div class="form-group">';
        $html .= '<label for="_booked_date" class="col-sm-2 control-label">' . JTEXT::_('COM_MATUKIO_CLOSING_DATE') . MatukioHelperUtilsBasic::createToolTip(JTEXT::_('COM_MATUKIO_DATE_TIME_FORMAT')) . $reqfield . '</label>';
        $html .= $htxt;
        $html .= '</div>';
        // RECURRING
        $html .= '<div class="form-group">';
        $html .= '<label for="recurring" class="col-sm-2 control-label">' . JTEXT::_('COM_MATUKIO_IS_RECURRING') . $reqfield . '</label>';
        $html .= '<div class="col-sm-10">';
        $html .= MatukioHelperInput::getRadioButtonBool("recurring", "recurring", $row->recurring);
        $html .= '</div>';
        $html .= '</div>';
        // Recurring events
        $rstyle = "";
        if (!$row->recurring) {
            $rstyle = ' style="display: none;"';
        }
        $html .= '<div id="reccuring-gen"' . $rstyle . '>';
        $html .= '<div class="form-group">';
        $html .= '<div class="col-sm-offset-2 col-sm-10">';
        $html .= JTEXT::_('COM_MATUKIOR_RECURRING_INTRO');
        $html .= '</div>';
        $html .= '</div>';
        // Check for old events
        if (empty($row->recurring_type)) {
            $row->recurring_type = "daily";
        }
        $repeat_type = array();
        $repeat_type["daily"] = JText::_("COM_MATUKIO_REPEAT_DAILY");
        $repeat_type["weekly"] = JText::_("COM_MATUKIO_REPEAT_WEEKLY");
        $repeat_type["monthly"] = JText::_("COM_MATUKIO_REPEAT_MONTHLY");
        $repeat_type["yearly"] = JText::_("COM_MATUKIO_REPEAT_YEARLY");
        $recurring = MatukioHelperInput::getRadioButton("recurring_type", "recurring_type", $repeat_type, $row->recurring_type);
        $html .= '<div class="form-group">';
        $html .= '<label for="recurring_type" class="col-sm-2 control-label">' . JTEXT::_('COM_MATUKIO_REPEAT_TYPE') . '</label>';
        $html .= '<div class="col-sm-10">';
        $html .= $recurring;
        $html .= '</div>';
        $html .= '</div>';
        $html .= '<div class="form-group">';
        $html .= '<div class="col-sm-offset-2 col-sm-10">';
        $html .= '<div id="recurring_daily">';
        $html .= '</div>';
        $html .= '<div id="recurring_monthly">';
        $repeat_week = array();
        $repeat_week[1] = JText::_("COM_MATUKIO_RECURRING_WEEK1");
        $repeat_week[2] = JText::_("COM_MATUKIO_RECURRING_WEEK2");
        $repeat_week[3] = JText::_("COM_MATUKIO_RECURRING_WEEK3");
        $repeat_week[4] = JText::_("COM_MATUKIO_RECURRING_WEEK4");
        $repeat_week[5] = JText::_("COM_MATUKIO_RECURRING_WEEK5");
        $recurring_month_week = MatukioHelperInput::getCheckboxButton("recurring_month_week", "recurring_month_week", $repeat_week, $row->recurring_month_week);
        $html .= $recurring_month_week . "<br />";
        $html .= "<br />";
        $html .= '</div>';
        $html .= '<div id="recurring_weekly">';
        $repeat_week_day = array();
        $repeat_week_day["Monday"] = JText::_("COM_MATUKIO_MONDAY");
        $repeat_week_day["Tuesday"] = JText::_("COM_MATUKIO_TUESDAY");
        $repeat_week_day["Wednesday"] = JText::_("COM_MATUKIO_WEDNESDAY");
        $repeat_week_day["Thursday"] = JText::_("COM_MATUKIO_THURSDAY");
        $repeat_week_day["Friday"] = JText::_("COM_MATUKIO_FRIDAY");
        $repeat_week_day["Saturday"] = JText::_("COM_MATUKIO_SATURDAY");
        $repeat_week_day["Sunday"] = JText::_("COM_MATUKIO_SUNDAY");
        $recurring_week_day = MatukioHelperInput::getCheckboxButton("recurring_week_day", "recurring_week_day", $repeat_week_day, $row->recurring_week_day);
        $html .= $recurring_week_day;
        $html .= "<br />";
        $html .= '</div>';
        $html .= '</div>';
        $html .= '</div>';
        $html .= '<div class="form-group">';
        $html .= '<label for="recurring_count" class="col-sm-2 control-label">' . JTEXT::_('COM_MATUKIO_RECURRING_REPEAT_COUNT') . '</label>';
        $html .= '<div class="col-sm-10">';
        $html .= '<input type="text" name="recurring_count" id="recurring_count" value="' . $row->recurring_count . '" class="form-control" />';
        $html .= '</div>';
        $html .= '</div>';
        $html .= '<div class="form-group">';
        $html .= '<label for="recurring_count" class="col-sm-2 control-label">' . JTEXT::_('COM_MATUKIO_RECURRING_REPEAT_UNTIL') . '</label>';
        $html .= '<div class="col-sm-10">';
        $html .= '<input type="text" name="recurring_until" id="recurring_until" value="' . $row->recurring_until . '" class="form-control" />';
        $html .= '</div>';
        $html .= '</div>';
        $html .= '<div class="form-group">';
        $html .= '<div class="col-sm-offset-2 col-sm-10">';
        $html .= '<button id="generateRecurring" class="btn btn-success">' . JText::_("COM_MATUKIO_RECURRING_BUTTON_GENERATE") . '</button>';
        $html .= '</div>';
        $html .= '</div>';
        $html .= '<div class="form-group">';
        $html .= '<div class="col-sm-offset-2 col-sm-10">';
        $html .= '<div id="generated_events">' . '</div>';
        $html .= '</div>';
        $html .= '</div>';
        $html .= '<input type="hidden" name="recurring_edited" id="recurring_edited" value="0" />';
        $html .= '</div>';
        // Short description
        $html .= '<div class="form-group">';
        $html .= '<label for="shortdesc" class="col-sm-2 control-label">' . JTEXT::_('COM_MATUKIO_BRIEF_DESCRIPTION') . MatukioHelperUtilsBasic::createToolTip(JTEXT::_('COM_MATUKIO_BRIEF_DESCRIPTION_DESC')) . $reqfield . '</label>';
        $html .= '<div class="col-sm-10">';
        $html .= "<textarea class=\"form-control validate[required]\" rows=\"3\" name=\"shortdesc\" placeholder=\"" . JText::_("COM_MATUKIO_BRIEF_DESCRIPTION_DESC") . "\">" . $row->shortdesc . "</textarea>";
        $html .= '</div>';
        $html .= '</div>';
        // Locations
        $locations = array(JHTML::_('select.option', '0', JText::_('COM_MATUKIO_CUSTOM_LOCATION')));
        $dblocs = self::getLocations();
        if ($dblocs) {
            foreach ($dblocs as $l) {
                $locations[] = JHTML::_('select.option', $l->id, JText::_($l->title));
            }
        }
        $select_locations = JHTML::_('select.genericlist', $locations, 'place_id', 'class="form-control chzn-single"', 'value', 'text', $row->place_id);
        $html .= '<div class="form-group">';
        $html .= '<label for="place_id" class="col-sm-2 control-label">' . JTEXT::_('COM_MATUKIO_CITY') . $reqfield . '</label>';
        $html .= '<div class="col-sm-10">';
        $html .= $select_locations;
        $html .= '</div>';
        $html .= '</div>';
        $pstyle = "";
        if ($row->place_id > 0) {
            $pstyle = ' style="display:none"';
        }
        $html .= '<div id="custom_place" class="form-group"' . $pstyle . '>';
        $html .= '<label for="place" class="col-sm-2 control-label">' . JTEXT::_('COM_MATUKIO_CUSTOM_LOCATION') . '</label>';
        $html .= '<div class="col-sm-10">';
        $html .= "<textarea class=\"form-control\" rows=\"3\" name=\"place\">" . $row->place . "</textarea>";
        $html .= '</div>';
        $html .= '</div>';
        // Organiser
        if ($art != 3 && (!$frontend || MatukioHelperSettings::_("frontend_organizer_allevent", 1))) {
            $html .= '<div class="form-group">';
            $html .= '<label for="publisher" class="col-sm-2 control-label">' . JTEXT::_('COM_MATUKIO_ORGANISER') . MatukioHelperUtilsBasic::createToolTip(JTEXT::_('COM_MATUKIO_ORGANISER_MANAGE_FRONTEND')) . $reqfield . '</label>';
            $html .= '<div class="col-sm-10">';
            $html .= self::getOranizerList($row->publisher);
            $html .= '</div>';
            $html .= '</div>';
        } else {
            $html .= '<input type="hidden" name="publisher" value="' . JFactory::getUser()->id . '" />';
        }
        $webinar = MatukioHelperInput::getRadioButtonBool("webinar", "webinar", $row->webinar);
        $html .= '<div class="form-group">';
        $html .= '<label for="webinar" class="col-sm-2 control-label">' . JTEXT::_('COM_MATUKIO_WEBINAR') . $reqfield . '</label>';
        $html .= '<div class="col-sm-10">';
        $html .= $webinar;
        $html .= '</div>';
        $html .= '</div>';
        // Available seats
        $htxt = "<div class=\"col-sm-6\"><input class=\"form-control validate[required, custom[integer]]\" type=\"text\" name=\"maxpupil\" value=\"" . $row->maxpupil . "\" /></div><div class=\"col-sm-4\"> - " . JTEXT::_('COM_MATUKIO_IF_FULLY_BOOKED') . ": ";
        $radios = array();
        $radios[] = JHTML::_('select.option', 0, JTEXT::_('COM_MATUKIO_WAITLIST'));
        $radios[] = JHTML::_('select.option', 1, JTEXT::_('COM_MATUKIO_END_BOOKING'));
        $radios[] = JHTML::_('select.option', 2, JTEXT::_('COM_MATUKIO_HIDE_EVENT'));
        $htxt .= JHTML::_('select.genericlist', $radios, 'stopbooking', 'class="inputbox"', 'value', 'text', $row->stopbooking) . "</div>";
        $html .= '<div class="form-group">';
        $html .= '<label for="webinar" class="col-sm-2 control-label">' . JTEXT::_('COM_MATUKIO_MAX_PARTICIPANT') . $reqfield . '</label>';
        $html .= $htxt;
        $html .= '</div>';
        // Min. participants (since 4.3.0 for cronjob)
        $html .= '<div class="form-group">';
        $html .= '<label for="hot_event" class="col-sm-2 control-label">' . JTEXT::_('COM_MATUKIO_MIN_PARTICIPANTS') . '</label>';
        $html .= '<div class="col-sm-10">';
        $html .= "<input class=\"form-control\" type=\"text\" name=\"minpupil\" id=\"minpupil\" value=\"" . $row->minpupil . "\" />";
        $html .= '</div>';
        $html .= '</div>';
        // Max. bookable places
        $bookableplaces = $row->nrbooked;
        if ($bookableplaces == "") {
            $bookableplaces = 1;
        }
        if (MatukioHelperSettings::getSettings('frontend_usermehrereplaetze', 2) > 0) {
            $htxt = "<input class=\"inputbox form-control validate[required, custom[integer]]\" type=\"text\" name=\"nrbooked\" value=\"" . $bookableplaces . "\" />";
        } else {
            $radios = array();
            $radios[] = JHTML::_('select.option', 0, "0");
            $radios[] = JHTML::_('select.option', 1, "1");
            $htxt = JHTML::_('select.genericlist', $radios, 'nrbooked', 'class="form-control validate[required, custom[integer]]" ', 'value', 'text', $row->nrbooked);
        }
        $html .= '<div class="form-group">';
        $html .= '<label for="webinar" class="col-sm-2 control-label">' . JTEXT::_('COM_MATUKIO_MAX_BOOKABLE_PLACES') . MatukioHelperUtilsBasic::createToolTip(JTEXT::_('COM_MATUKIO_CANNOT_BOOK_ONLINE')) . $reqfield . '</label>';
        $html .= '<div class="col-sm-10">';
        $html .= $htxt;
        $html .= '</div>';
        $html .= '</div>';
        $html .= "</div>";
        // ### Panel 2 ###
        $html .= '<div class="tab-pane" id="advanced">';
        $html .= '<div class="form-group">';
        $html .= '<div class="col-sm-12">' . JTEXT::_('COM_MATUKIO_ADDITIONAL_SETTINGS_DESC') . '</div>';
        $html .= '</div>';
        // Description
        $htxt = $editor->display("description", $row->description, "600", "300", "50", "5");
        $html .= '<div class="form-group">';
        $html .= '<div class="col-sm-12">';
        $html .= '<label for="description" class="control-label">' . JTEXT::_('COM_MATUKIO_DESCRIPTION') . '</label><br /><br />';
        $html .= JTEXT::_('COM_MATUKIO_USE_FOLLOWING_TAGS') . $htxt;
        $html .= '</div>';
        $html .= '</div>';
        // Veranstaltungsbild
        if (MatukioHelperSettings::getSettings('event_image', 1) == 1) {
            jimport('joomla.filesystem.folder');
            $htxt = "";
            if (MatukioHelperSettings::getSettings('image_path', '') != "") {
                $htxt = trim(MatukioHelperSettings::getSettings('image_path', ''), "/") . "/";
            }
            $htxt = JPATH_SITE . "/images/" . $htxt;
            if (!is_dir($htxt)) {
                mkdir($htxt, 0755);
            }
            $imageFiles = JFolder::files($htxt);
            $images = array(JHTML::_('select.option', '', '- ' . JText::_('COM_MATUKIO_STANDARD_IMAGE') . ' -'));
            foreach ($imageFiles as $file) {
                if (preg_match("/jpg|png|gif/i", $file)) {
                    $images[] = JHTML::_('select.option', $file);
                }
            }
            $imagelist = JHTML::_('select.genericlist', $images, 'image', 'class="sem_inputbox form-control" size="1" ', 'value', 'text', $row->image);
            $htxt = "<span style=\"position:absolute;display:none;border:3px solid #FF9900;background-color:#FFFFFF;\" id=\"1\"><img id=\"toolbild\"\n        src=\"images/stories/" . $row->image . "\" /></span><span style=\"position:absolute;display:none;border:3px solid #FF9900;background-color:#FFFFFF;\"\n        id=\"2\"><img src=\"" . MatukioHelperUtilsBasic::getComponentImagePath() . "2601.png\" /></span>";
            $htxt .= $imagelist . "&nbsp;";
            $html .= '<div class="form-group">';
            $html .= '<label for="image" class="col-sm-2 control-label">' . JTEXT::_('COM_MATUKIO_IMAGE_FOR_OVERVIEW') . '</label>';
            $html .= '<div class="col-sm-10">';
            $html .= $htxt;
            $html .= '</div>';
            $html .= '</div>';
        }
        // Google-Maps
        $htxt = "<input class=\"sem_inputbox form-control\" type=\"text\" name=\"gmaploc\" id=\"gmaploc\" value=\"" . $row->gmaploc . "\" /> ";
        $html .= '<div id="gmaps" class="form-group">';
        $html .= '<label for="gmaploc" class="col-sm-2 control-label">' . JTEXT::_('COM_MATUKIO_GMAPS_LOCATION') . '</label>';
        $html .= '<div class="col-sm-10">';
        $html .= $htxt;
        $html .= '</div>';
        $html .= '</div>';
        // Tutor
        $html .= '<div class="form-group">';
        $html .= '<label for="teacher" class="col-sm-2 control-label">' . JTEXT::_('COM_MATUKIO_TUTOR') . '</label>';
        $html .= '<div class="col-sm-10">';
        $html .= "<input class=\"form-control\" type=\"text\" name=\"teacher\" id=\"teacher\" value=\"" . $row->teacher . "\" />";
        $html .= '</div>';
        $html .= '</div>';
        // Target
        $html .= '<div class="form-group">';
        $html .= '<label for="target" class="col-sm-2 control-label">' . JTEXT::_('COM_MATUKIO_TARGET_GROUP') . '</label>';
        $html .= '<div class="col-sm-10">';
        $html .= "<input class=\"form-control\" type=\"text\" name=\"target\" id=\"target\" value=\"" . $row->target . "\" />";
        $html .= '</div>';
        $html .= '</div>';
        // Fees
        // Yeah i know this also is true if fees is 0, but we need to check if it is "" or null
        if (empty($row->fees)) {
            $row->fees = 0;
        }
        // Gebuehr
        $html .= '<div class="form-group">';
        $html .= '<label for="fees" class="col-sm-2 control-label">' . JTEXT::_('COM_MATUKIO_FEES') . " (" . MatukioHelperSettings::getSettings('currency_symbol', '$') . ')' . " " . JTEXT::_('COM_MATUKIO_PRO_PERSON') . " " . JText::_("COM_MATUKIO_BRUTTO") . '</label>';
        $html .= '<div class="col-sm-10">';
        $html .= "<input class=\"form-control validate[required]\" type=\"text\" name=\"fees\" id=\"fees\" value=\"" . $row->fees . "\" />";
        $html .= '</div>';
        $html .= '</div>';
        // Taxes
        $taxes = array(JHTML::_('select.option', '0', '- ' . JText::_('COM_MATUKIO_NO_TAX') . ' -'));
        $taxes_list = MatukioHelperTaxes::getTaxes();
        foreach ($taxes_list as $t) {
            $taxes[] = JHTML::_('select.option', $t->id, '- ' . JText::_($t->title) . ' -');
        }
        $taxlist = JHTML::_('select.genericlist', $taxes, 'tax_id', 'class="form-control chzn-single"', 'value', 'text', $row->tax_id);
        $html .= '<div class="form-group">';
        $html .= '<label for="tax_id" class="col-sm-2 control-label">' . JTEXT::_('COM_MATUKIO_EVENT_TAX') . '</label>';
        $html .= '<div class="col-sm-10">';
        $html .= $taxlist;
        $html .= '</div>';
        $html .= '</div>';
        // Different fees
        $different_fees = MatukioHelperInput::getRadioButtonBool("different_fees", "different_fees", $row->different_fees);
        $html .= '<div class="form-group">';
        $html .= '<label for="different_fees" class="col-sm-2 control-label">' . JTEXT::_('COM_MATUKIO_DIFFERENT_FEES') . '</label>';
        $html .= '<div class="col-sm-10">';
        $html .= $different_fees;
        $html .= '</div>';
        $html .= '</div>';
        // Top event
        $top_event = MatukioHelperInput::getRadioButtonBool("top_event", "top_event", $row->top_event);
        $html .= '<div class="form-group">';
        $html .= '<label for="top_event" class="col-sm-2 control-label">' . JTEXT::_('COM_MATUKIO_TOP_EVENT') . '</label>';
        $html .= '<div class="col-sm-10">';
        $html .= $top_event;
        $html .= '</div>';
        $html .= '</div>';
        // Hot event
        $hot_event = MatukioHelperInput::getRadioButtonBool("hot_event", "hot_event", $row->hot_event);
        $html .= '<div class="form-group">';
        $html .= '<label for="hot_event" class="col-sm-2 control-label">' . JTEXT::_('COM_MATUKIO_HOT_EVENT') . '</label>';
        $html .= '<div class="col-sm-10">';
        $html .= $hot_event;
        $html .= '</div>';
        $html .= '</div>';
        // Abgesagt
        /*		$htxt = MatukioHelperInput::getRadioButtonBool(
        			"cancel", "cancel", $row->cancelled, "inputbox required", "required=\"required\" aria-required=\"true\""
        		);
        
        		$html .= '<div class="form-group">';
        		$html .= '<label for="cancel" class="col-sm-2 control-label">' . JTEXT::_('COM_MATUKIO_CANCELLED')
        			. MatukioHelperUtilsBasic::createToolTip(JTEXT::_('COM_MATUKIO_CANCELLED_EVENT_NO_BOOKINGS'))
        			. '</label>' ;
        		$html .= '<div class="col-sm-10">';
        		$html .= $htxt . "<input type=\"hidden\" name=\"cancelled\" value=\"" . $row->cancelled . "\">";
        		$html .= '</div>';
        		$html .= '</div>';
        */
        $html .= "<input type=\"hidden\" name=\"cancel\" value=\"" . $row->cancelled . "\">";
        $html .= "<input type=\"hidden\" name=\"cancelled\" value=\"" . $row->cancelled . "\">";
        $html .= "</div>";
        // ### Panel 3 ###
        $html .= '<div class="tab-pane" id="eventfields">';
        $html .= "<table class=\"table\">";
        $html .= "<tr>" . self::getTableCell(JTEXT::_('COM_MATUKIO_FILLED_IN_ONCE') . "<br />&nbsp;<br />" . JTEXT::_('COM_MATUKIO_FIELD_INPUT_SPECIFIED') . "<br />&nbsp;<br />" . JTEXT::_('COM_MATUKIO_FIELD_TIPS_SPECIFIED') . "<br />&nbsp;<br />", 'd', 'l', '100%', 'sem_edit', 2) . "</tr>";
        // Zusatzfelder
        $zusfeld = self::getAdditionalFieldsFrontend($row);
        if (!empty($zusfeld)) {
            for ($i = 0; $i < count($zusfeld[0]); $i++) {
                $html .= "<tr>" . self::getTableCell(JTEXT::_('COM_MATUKIO_INPUT') . " " . ($i + 1) . ":", 'd', 'l', '20%', 'sem_edit');
                $htxt = "<input class=\"input sem_inputbox\" type=\"text\" name=\"zusatz" . ($i + 1) . "\" size=\"50\" value=\"" . $zusfeld[0][$i] . "\" />";
                $html .= self::getTableCell($htxt, 'd', 'l', '80%', 'sem_edit') . "</tr>";
                if (empty($zusfeld[1][$i])) {
                    $zusfeld[1][$i] = "";
                }
                $html .= "<tr>" . self::getTableCell(JTEXT::_('COM_MATUKIO_FIELD_TIP') . ":", 'd', 'l', '20%', 'sem_edit');
                $htxt = "<input class=\"input sem_inputbox\" type=\"text\" name=\"zusatz" . ($i + 1) . "hint\" size=\"50\" maxlength=\"250\" value=\"" . $zusfeld[1][$i] . "\" />";
                $html .= self::getTableCell($htxt, 'd', 'l', '80%', 'sem_edit') . "</tr>";
                $radios = array();
                $radios[] = JHTML::_('select.option', 1, JTEXT::_('COM_MATUKIO_YES'));
                $radios[] = JHTML::_('select.option', 0, JTEXT::_('COM_MATUKIO_NO'));
                $htxt = "";
                if (empty($zusfeld[1][$i])) {
                    // Set radio button to 0
                    $zusfeld[2][$i] = 0;
                }
                $html .= "<tr>" . self::getTableCell(str_replace("SEM_FNUM", $i + 1, JTEXT::_('COM_MATUKIO_DISPLAY_SEM_FNUM')) . ":", 'd', 'l', '20%', 'sem_edit');
                $showoverview = MatukioHelperInput::getRadioButtonBool('zusatz' . ($i + 1) . 'show', 'zusatz' . ($i + 1) . 'show', $zusfeld[2][$i]);
                $html .= self::getTableCell($htxt . " " . $showoverview, 'd', 'l', '80%', 'sem_edit') . "</tr>";
            }
        }
        $html .= "</table>";
        $html .= "</div>";
        // ### Panel 4 ###
        if (MatukioHelperSettings::_('file_maxsize', 500) > 0) {
            $html .= '<div class="tab-pane" id="files">';
            $htxt = str_replace("SEM_FILESIZE", MatukioHelperSettings::getSettings('file_maxsize', 500), JTEXT::_('COM_MATUKIO_FILE_SIZE_UP_TO'));
            $htxt = str_replace("SEM_FILETYPES", strtoupper(MatukioHelperSettings::getSettings('file_endings', 'txt pdf zip jpg')), $htxt);
            $html .= "<table class=\"table\">";
            $html .= "<tr>" . self::getTableCell($htxt, 'd', 'l', '100%', 'sem_edit', 2) . "</tr>";
            $datfeld = self::getEventFileArray($row);
            $select = array();
            $select[] = JHTML::_('select.option', 0, JTEXT::_('COM_MATUKIO_EVERYONE'));
            $select[] = JHTML::_('select.option', 1, JTEXT::_('COM_MATUKIO_REGISTERED_USERS'));
            $select[] = JHTML::_('select.option', 2, JTEXT::_('COM_MATUKIO_USERS_BOOKED_EVENT'));
            $select[] = JHTML::_('select.option', 3, JTEXT::_('COM_MATUKIO_USERS_PAID_FOR_EVENT'));
            for ($i = 0; $i < count($datfeld[0]); $i++) {
                $html .= "<tr>" . self::getTableCell(JTEXT::_('COM_MATUKIO_FILE') . " " . ($i + 1) . ":", 'd', 'l', '20%', 'sem_edit');
                if ($datfeld[0][$i] != "") {
                    $htxt = "<b>" . $datfeld[0][$i] . "</b> - <input class=\"sem_inputbox\" type=\"checkbox\" name=\"deldatei" . ($i + 1) . "\"\n                        value=\"1\" onClick=\"if(this.checked==true) {datei" . ($i + 1) . ".disabled=true;} else {datei" . ($i + 1) . ".disabled=false;}\"> " . JTEXT::_('COM_MATUKIO_DELETE_FILE');
                    $html .= self::getTableCell($htxt, 'd', 'l', '80%', 'sem_edit') . "</tr>";
                    $html .= "<tr>" . self::getTableCell("&nbsp;", 'd', 'l', '20%', 'sem_edit');
                }
                $htxt = "<input class=\"sem_inputbox btn-success\" name=\"datei" . ($i + 1) . "\" type=\"file\">";
                $html .= self::getTableCell($htxt, 'd', 'l', '80%', 'sem_edit') . "</tr>";
                $html .= "<tr>" . self::getTableCell("&nbsp;", 'd', 'l', '20%', 'sem_edit');
                $htxt = JTEXT::_('COM_MATUKIO_DESCRIPTION') . ": <input class=\"sem_inputbox form-control\" type=\"text\" name=\"file" . ($i + 1) . "desc\" size=\"50\" maxlength=\"255\" value=\"" . $datfeld[1][$i] . "\" />";
                $html .= self::getTableCell($htxt, 'd', 'l', '80%', 'sem_edit') . "</tr>";
                $html .= "<tr>" . self::getTableCell("&nbsp;", 'd', 'l', '20%', 'sem_edit');
                $htxt = JHTML::_('select.genericlist', $select, 'file' . ($i + 1) . 'down', 'class="sem_inputbox" ', 'value', 'text', $datfeld[2][$i]);
                $html .= self::getTableCell(JTEXT::_('COM_MATUKIO_WHO_MAY_DOWNLOAD') . " " . $htxt, 'd', 'l', '80%', 'sem_edit') . "</tr>";
            }
            $html .= "</table>";
            $html .= "</div>";
        }
        // ### Panel 5 ###
        $html .= '<div class="tab-pane" id="overrides">';
        $editor = JFactory::getEditor();
        $html .= '<div class="form-group">';
        $html .= '<div class="col-sm-12">';
        $html .= JText::_("COM_MATUKIO_OVERRIDES_INTRO");
        $html .= '</div>';
        $html .= '</div>';
        // Custom different fees  @since 3.0
        $html .= '<div class="form-group">';
        $html .= '<div class="col-sm-12">';
        $html .= '<label>' . JText::_("COM_MATUKIO_DIFFERENT_FEES_OVERRIDE") . '</label>';
        $html .= '</div>';
        $html .= '</div>';
        $html .= '<div class="form-group">';
        $html .= '<div class="col-sm-12">';
        $html .= JText::_("COM_MATUKIO_DIFFERENT_FEES_OVERRIDE_TEXT");
        $html .= '</div>';
        $html .= '</div>';
        $html .= '<div class="form-group">';
        $html .= '<div class="col-sm-12">';
        $html .= '<div id="feecont">';
        if (empty($row->different_fees_override)) {
            $html .= MatukioHelperFees::getDifferentFeeEdit(0);
            $count = 1;
        } else {
            $json = str_replace('&quot;', '"', $row->different_fees_override);
            $fees = json_decode($json, true);
            $count = 1;
            foreach ($fees as $f) {
                $html .= MatukioHelperFees::getDifferentFeeEdit($f["num"], $f);
                $count++;
            }
        }
        $html .= '</div>';
        $html .= '</div>';
        $html .= '<input type="hidden" name="numfees" id="numfees" value="' . $count . '" />';
        $html .= "</div>";
        $html .= '<br /><br /><div class="form-group">';
        $html .= '<div class="col-sm-12">';
        $html .= '<label for="booking_mail">' . JText::_("COM_MATUKIO_CUSTOM_BOOKING_MAIL_TEXT") . '</label>';
        $html .= '</div>';
        $html .= '</div>';
        $html .= '<div class="form-group">';
        $html .= '<div class="col-sm-12">';
        $html .= $editor->display("booking_mail", $row->booking_mail, 600, 300, 40, 20, 1);
        $html .= '</div>';
        $html .= '</div>';
        $html .= '<div class="form-group">';
        $html .= '<div class="col-sm-12">';
        $html .= '<label for="certificate_code">' . JText::_("COM_MATUKIO_CUSTOM_CERTIFICATE_CODE") . '</label>';
        $html .= '</div>';
        $html .= '</div>';
        $html .= '<div class="form-group">';
        $html .= '<div class="col-sm-12">';
        $html .= $editor->display("certificate_code", $row->certificate_code, 600, 300, 40, 20, 1);
        $html .= '</div>';
        $html .= '</div>';
        $html .= "</div>";
        // End intern row fluid div
        $html .= "</div>";
        $html .= '<div class="clr clear"></div>';
        return $html;
    }
Beispiel #19
0
	<div class="mat_email">
		<div id="mat_email">
			<fieldset class="adminform">
				<table class="admintable table">
					<tr>
						<td class="key" width="200px">
							<label for="ics_file" title="<?php 
echo JText::_('COM_MATUKIO_IMPORT_ICS_FILE');
?>
">
								<?php 
echo JText::_('COM_MATUKIO_IMPORT_ICS_FILE');
?>
:
								<?php 
echo MatukioHelperInput::getTooltip("COM_MATUKIO_TOOLTIP_IMPORT_ICS_FILE");
?>
							</label>
						</td>
						<td>
							<input type="file" id="ics_file" name="ics_file" class="input" />
						</td>
					</tr>
					<tr>
						<td class="key" width="200px">
							<label for="catid" title="<?php 
echo JText::_('COM_MATUKIO_CATEGORY');
?>
">
								<?php 
echo JText::_('COM_MATUKIO_CATEGORY');
:<br/>
							<?php 
$editor = JFactory::getEditor();
echo $editor->display("description", $this->organizer->description, 800, 400, 40, 20, 1);
?>
						</td>
					</tr>

					<tr>
						<td align="left" class="key">
							<?php 
echo JText::_('COM_MATUKIO_COMMENTS');
?>
:
							<?php 
echo MatukioHelperInput::getTooltip("COM_MATUKIO_TOOLTIP_ORGANIZER_COMMENTS");
?>
						</td>
						<td>
							<textarea class="text_area" cols="20" rows="5" name="comments" id="comments"
							          style="width:550px"><?php 
echo $this->organizer->comments;
?>
</textarea>
						</td>
					</tr>
				</table>

			</div>
			<input type="hidden" name="id" value="<?php 
echo $this->organizer->id;
:<br/>
							<?php 
$editor = JFactory::getEditor();
echo $editor->display("description", $this->location->description, 800, 400, 40, 20, 1);
?>
						</td>
					</tr>

					<tr>
						<td align="left" class="key">
							<?php 
echo JText::_('COM_MATUKIO_COMMENTS');
?>
:
							<?php 
echo MatukioHelperInput::getTooltip("COM_MATUKIO_TOOLTIP_LOCATION_COMMENTS");
?>
						</td>
						<td>
							<textarea class="text_area" cols="20" rows="5" name="comments" id="comments"
							          style="width:550px"><?php 
echo $this->location->comments;
?>
</textarea>
						</td>
					</tr>
				</table>

			</div>
			<input type="hidden" name="id" value="<?php 
echo $this->location->id;
" style="width: 350px;"/>
				</td>
			</tr>
			<tr>
				<td class="key" colspan="2">
					<label for="value_9"
					       title="<?php 
echo JText::_('COM_MATUKIO_TEMPLATE_INVOICE_EMAIL_TEMPLATE_TEXT');
?>
">
						<?php 
echo JText::_('COM_MATUKIO_TEMPLATE_INVOICE_EMAIL_TEMPLATE_TEXT');
?>
:
						<?php 
echo MatukioHelperInput::getTooltip("COM_MATUKIO_TOOLTIP_TEMPLATE_INVOICE_EMAIL_TEMPLATE_TEXT");
?>
					</label>
				</td>
			</tr>
			<tr>
				<td colspan="2">
					<?php 
$editor = JFactory::getEditor();
echo $editor->display("value[9]", $this->templates[8]->value, 800, 300, 40, 20, false, "value_9");
?>
					<input type="hidden" name="value_text[4]" value=""/>
				</td>
			</tr>
		</table>
	</fieldset>
echo $editor->display("value_text[6]", $this->templates[5]->value_text, 800, 300, 40, 20, false, "value_text_6");
?>
					</td>
				</tr>
				<tr>
					<td class="key" colspan="2">
						<label for="value_6" title="<?php 
echo JText::_('COM_MATUKIO_TEMPLATE_EXPORT_PARTICIPANTS_SINGLE');
?>
">
							<?php 
echo JText::_('COM_MATUKIO_TEMPLATE_EXPORT_PARTICIPANTS_SINGLE');
?>
:
							<?php 
echo MatukioHelperInput::getTooltip("COM_MATUKIO_TOOLTIP_TEMPLATE_EXPORT_PARTLIST_SINGLE");
?>
						</label>
					</td>
				</tr>
				<tr>
					<td colspan="2">
						<?php 
$editor = JFactory::getEditor();
echo $editor->display("value[6]", $this->templates[5]->value, 800, 300, 40, 20, false, "value_6");
?>
					</td>
				</tr>
			</table>
		</fieldset>
	</div>
?>
							</td>
							<td>
									<?php 
echo $this->select_percent;
?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php 
echo JText::_('COM_MATUKIO_FEE_DISCOUNT');
?>
:
								<?php 
echo MatukioHelperInput::getTooltip("COM_MATUKIO_TOOLTIP_FEE_DISCOUNT");
?>
							</td>
							<td>
									<?php 
echo $this->select_discount;
?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php 
echo JText::_('COM_MATUKIO_PUBLISHED_UP');
?>
:
							</td>