primo commit

This commit is contained in:
2024-12-17 17:34:10 +01:00
commit e650f8df99
16435 changed files with 2451012 additions and 0 deletions

View File

@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@ -0,0 +1,112 @@
<?php
/**
* @package JEM
* @copyright (C) 2013-2024 joomlaeventmanager.net
* @copyright (C) 2005-2009 Christoph Lukes
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
$function = Factory::getApplication()->input->getCmd('function', 'jSelectContact');
?>
<script>
function tableOrdering( order, dir, view )
{
var form = document.getElementById("adminForm");
form.filter_order.value = order;
form.filter_order_Dir.value = dir;
form.submit( view );
}
</script>
<div id="jem" class="jem_select_contact">
<h1 class='componentheading'>
<?php echo Text::_('COM_JEM_SELECT_CONTACT'); ?>
</h1>
<div class="clr"></div>
<form action="<?php echo Route::_('index.php?option=com_jem&view=editevent&layout=choosecontact&tmpl=component&function='.$this->escape($function).'&'.Session::getFormToken().'=1'); ?>" method="post" name="adminForm" id="adminForm">
<div id="jem_filter" class="floattext">
<div class="jem_fleft">
<?php
echo '<label for="filter_type">'.Text::_('COM_JEM_FILTER').'</label>&nbsp;';
echo $this->searchfilter.'&nbsp;';
?>
<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->lists['search']; ?>" class="inputbox" onChange="document.adminForm.submit();" />
<button type="submit" class="pointer btn btn-primary"><?php echo Text::_('JSEARCH_FILTER_SUBMIT'); ?></button>
<button type="button" class="pointer btn btn-secondary" onclick="document.getElementById('filter_search').value='';this.form.submit();"><?php echo Text::_('JSEARCH_FILTER_CLEAR'); ?></button>
<button type="button" class="pointer btn btn-primary" onclick="if (window.parent) window.parent.<?php echo $this->escape($function);?>('', '<?php echo Text::_('COM_JEM_SELECT_CONTACT') ?>');"><?php echo Text::_('COM_JEM_NOCONTACT')?></button>
</div>
<div class="jem_fright">
<?php
echo '<label for="limit">'.Text::_('COM_JEM_DISPLAY_NUM').'</label>&nbsp;';
echo $this->pagination->getLimitBox();
?>
</div>
</div>
<table class="eventtable table table-striped" style="width:100%" summary="jem">
<thead>
<tr>
<th width="7" class="sectiontableheader"><?php echo Text::_('COM_JEM_NUM'); ?></th>
<th align="left" class="sectiontableheader"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_NAME', 'con.name', $this->lists['order_Dir'], $this->lists['order'] ); ?></th>
<?php if (0) : /* removed because it maybe forbidden to show */ ?>
<th align="left" class="sectiontableheader"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_ADDRESS', 'con.address', $this->lists['order_Dir'], $this->lists['order'] ); ?></th>
<?php endif; ?>
<th align="left" class="sectiontableheader"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_CITY', 'con.suburb', $this->lists['order_Dir'], $this->lists['order'] ); ?></th>
<th align="left" class="sectiontableheader"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_STATE', 'con.state', $this->lists['order_Dir'], $this->lists['order'] ); ?></th>
<?php if (0) : /* removed because it maybe forbidden to show */ ?>
<th align="left" class="sectiontableheader"><?php echo Text::_('COM_JEM_EMAIL'); ?></th>
<th align="left" class="sectiontableheader"><?php echo Text::_('COM_JEM_TELEPHONE'); ?></th>
<?php endif; ?>
</tr>
</thead>
<tbody>
<?php if (empty($this->rows)) : ?>
<tr align="center"><td colspan="0"><?php echo Text::_('COM_JEM_NOCONTACTS'); ?></td></tr>
<?php else :?>
<?php foreach ($this->rows as $i => $row) : ?>
<tr class="row<?php echo $i % 2; ?>">
<td class="center"><?php echo $this->pagination->getRowOffset( $i ); ?></td>
<td align="left">
<span <?php echo JEMOutput::tooltip(Text::_('COM_JEM_SELECT'), $row->name, 'editlinktip'); ?>>
<a class="pointer" onclick="if (window.parent) window.parent.<?php echo $this->escape($function);?>('<?php echo $row->id; ?>', '<?php echo $this->escape(addslashes($row->name)); ?>');"><?php echo $this->escape($row->name); ?></a>
</span>
</td>
<?php if (0) : /* removed because it maybe forbidden to show */ ?>
<td align="left"><?php echo $this->escape($row->address); ?></td>
<?php endif; ?>
<td align="left"><?php echo $this->escape($row->suburb); ?></td>
<td align="left"><?php echo $this->escape($row->state); ?></td>
<?php if (0) : /* removed because it maybe forbidden to show */ ?>
<td align="left"><?php echo $this->escape($row->email_to); ?></td>
<td align="left"><?php echo $this->escape($row->telephone); ?></td>
<?php endif; ?>
</tr>
<?php endforeach; ?>
<?php endif; ?>
</tbody>
</table>
<input type="hidden" name="task" value="selectcontact" />
<input type="hidden" name="option" value="com_jem" />
<input type="hidden" name="tmpl" value="component" />
<input type="hidden" name="function" value="<?php echo $this->escape($function); ?>" />
<input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
</form>
<div class="pagination">
<?php echo $this->pagination->getPagesLinks(); ?>
</div>
</div>

View File

@ -0,0 +1,145 @@
<?php
/**
* @package JEM
* @copyright (C) 2013-2024 joomlaeventmanager.net
* @copyright (C) 2005-2009 Christoph Lukes
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Factory;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
$function = Factory::getApplication()->input->getCmd('function', 'jSelectUsers');
$checked = 0;
HTMLHelper::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR.'/helpers/html');
?>
<script>
function tableOrdering( order, dir, view )
{
var form = document.getElementById("adminForm");
form.filter_order.value = order;
form.filter_order_Dir.value = dir;
form.submit( view );
}
</script>
<script>
function checkList(form)
{
var r='', i, n, e;
for (i=0, n=form.elements.length; i<n; i++)
{
e = form.elements[i];
if (e.type == 'checkbox' && e.id.indexOf('cb') === 0 && e.checked)
{
if (r) { r += ','; }
r += e.value;
}
}
return r;
}
</script>
<div id="jem" class="jem_select_users">
<h1 class='componentheading'>
<?php echo Text::_('COM_JEM_SELECT_USERS_TO_INVITE'); ?>
</h1>
<div class="clr"></div>
<form action="<?php echo Route::_('index.php?option=com_jem&view=editevent&layout=chooseusers&tmpl=component&function='.$this->escape($function).'&'.Session::getFormToken().'=1'); ?>" method="post" name="adminForm" id="adminForm">
<?php if(0) : ?>
<div id="jem_filter" class="floattext">
<div class="jem_fleft">
<?php
echo '<label for="filter_type">'.Text::_('COM_JEM_FILTER').'</label>&nbsp;';
echo $this->searchfilter.'&nbsp;';
?>
<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->lists['search']; ?>" class="inputbox" onChange="document.adminForm.submit();" />
<button type="submit" class="pointer btn btn-primary"><?php echo Text::_('JSEARCH_FILTER_SUBMIT'); ?></button>
<button type="button" class="pointer btn btn-secondary" onclick="document.getElementById('filter_search').value='';this.form.submit();"><?php echo Text::_('JSEARCH_FILTER_CLEAR'); ?></button>
<?php /*<button type="button" class="pointer btn btn-primary" onclick="if (window.parent) window.parent.<?php echo $this->escape($function);?>('', '0');"><?php echo Text::_('COM_JEM_NOUSERS')?></button>*/ ?>
</div>
<div class="jem_fright">
<?php
echo '<label for="limit">'.Text::_('COM_JEM_DISPLAY_NUM').'</label>&nbsp;';
echo $this->pagination->getLimitBox();
?>
</div>
</div>
<?php endif; ?>
<table class="eventtable table table-striped" style="width:100%" summary="jem">
<thead>
<tr>
<th width="1%" class="sectiontableheader"><?php echo Text::_('COM_JEM_NUM'); ?></th>
<th width="1%" class="center"><input type="checkbox" name="checkall-toggle" value="" title="<?php echo Text::_('JGLOBAL_CHECK_ALL'); ?>" onclick="Joomla.checkAll(this)" /></th>
<th align="left" class="sectiontableheader"><?php echo Text::_('COM_JEM_NAME'); ?></th>
<th width="10%" class="center"><?php echo Text::_('COM_JEM_STATUS'); ?></th>
<th width="10%" class="center"><?php echo Text::_('COM_JEM_PLACES'); ?></th>
</tr>
</thead>
<tbody>
<?php if (empty($this->rows)) : ?>
<tr align="center"><td colspan="0"><?php echo Text::_('COM_JEM_NOUSERS'); ?></td></tr>
<?php else :?>
<?php foreach ($this->rows as $i => $row) : ?>
<tr class="row<?php echo $i % 2; ?>">
<td class="center"><?php echo $this->pagination->getRowOffset( $i ); ?></td>
<td class="center"><?php
//echo HTMLHelper::_('grid.id', $i, $row->id);
$cb = HTMLHelper::_('grid.id', $i, $row->id);
if ($row->status == 0) {
// JemHelper::addLogEntry('before: '.$cb, __METHOD__);
$cb = preg_replace('/(onclick=)/', 'checked $1', $cb);
++$checked;
// JemHelper::addLogEntry('after: '.$cb, __METHOD__);
}
echo $cb;
?></td>
<td align="left"><?php echo $this->escape($row->name); ?></td>
<td class="center"><?php echo jemhtml::toggleAttendanceStatus( 0, $row->status, false); ?></td>
<td align="left"><?php echo $this->escape($row->places); ?></td>
</tr>
<?php endforeach; ?>
<?php endif; ?>
</tbody>
</table>
<div class="jem-row jem-justify-start valign-baseline">
<div style="padding-right:5px;">
<?php echo Text::_('COM_JEM_SELECT');?>
</div>
<div style="padding-right:10px;">
<?php echo Text::_('COM_JEM_PLACES'); ?>
</div>
<div style="padding-right:10px;">
<input id="places" name="places" type="number" style="text-align: center; width:auto;" value="0" max="1" min="0">
</div>
</div>
<input type="hidden" name="task" value="selectusers" />
<input type="hidden" name="option" value="com_jem" />
<input type="hidden" name="tmpl" value="component" />
<input type="hidden" name="function" value="<?php echo $this->escape($function); ?>" />
<input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
<input type="hidden" name="boxchecked" value="<?php echo $checked; ?>" />
</form>
<div class="pagination">
<?php echo $this->pagination->getPagesLinks(); ?>
</div>
<div class="jem_fright">
<button type="button" class="pointer btn btn-primary" onclick="if (window.parent) window.parent.<?php echo $this->escape($function);?>(checkList(document.adminForm), document.adminForm.boxchecked.value);"><?php echo Text::_('COM_JEM_SAVE'); ?></button>
</div>
</div>

View File

@ -0,0 +1,100 @@
<?php
/**
* @package JEM
* @copyright (C) 2013-2024 joomlaeventmanager.net
* @copyright (C) 2005-2009 Christoph Lukes
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
*/
defined('_JEXEC') or die;
use Joomla\CMS\Router\Route;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Factory;
use Joomla\CMS\Session\Session;
$function = Factory::getApplication()->input->getCmd('function', 'jSelectVenue');
?>
<script>
function tableOrdering( order, dir, view )
{
var form = document.getElementById("adminForm");
form.filter_order.value = order;
form.filter_order_Dir.value = dir;
form.submit( view );
}
</script>
<div id="jem" class="jem_select_venue">
<h1 class='componentheading'>
<?php echo Text::_('COM_JEM_SELECT_VENUE'); ?>
</h1>
<div class="clr"></div>
<form action="<?php echo Route::_('index.php?option=com_jem&view=editevent&layout=choosevenue&tmpl=component&function='.$this->escape($function).'&'.Session::getFormToken().'=1'); ?>" method="post" name="adminForm" id="adminForm">
<div id="jem_filter" class="floattext">
<div class="jem_fleft">
<?php
echo '<label for="filter_type">'.Text::_('COM_JEM_FILTER').'</label>&nbsp;';
echo $this->searchfilter.'&nbsp;';
?>
<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->filter;?>" class="inputbox" onchange="document.adminForm.submit();" />
<button type="submit" class="pointer btn btn-primary"><?php echo Text::_('JSEARCH_FILTER_SUBMIT'); ?></button>
<button type="button" class="pointer btn btn-secondary" onclick="document.getElementById('filter_search').value='';this.form.submit();"><?php echo Text::_('JSEARCH_FILTER_CLEAR'); ?></button>
<button type="button" class="pointer btn btn-primary" onclick="if (window.parent) window.parent.<?php echo $this->escape($function);?>('', '<?php echo Text::_('COM_JEM_SELECT_VENUE') ?>');"><?php echo Text::_('COM_JEM_NOVENUE')?></button>
</div>
<div class="jem_fright">
<?php
echo '<label for="limit">'.Text::_('COM_JEM_DISPLAY_NUM').'</label>&nbsp;';
echo $this->pagination->getLimitBox();
?>
</div>
</div>
<table class="eventtable table table-striped" style="width:100%" summary="jem">
<thead>
<tr>
<th width="7" class="sectiontableheader" align="left"><?php echo Text::_('COM_JEM_NUM'); ?></th>
<th align="left" class="sectiontableheader" align="left"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_VENUE', 'l.venue', $this->lists['order_Dir'], $this->lists['order'], 'selectvenue' ); ?></th>
<th align="left" class="sectiontableheader" align="left"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_CITY', 'l.city', $this->lists['order_Dir'], $this->lists['order'], 'selectvenue' ); ?></th>
<th align="left" class="sectiontableheader" align="left"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_STATE', 'l.state', $this->lists['order_Dir'], $this->lists['order']); ?></th>
<th align="left" class="sectiontableheader" align="left"><?php echo Text::_('COM_JEM_COUNTRY'); ?></th>
</tr>
</thead>
<tbody>
<?php if (empty($this->rows)) : ?>
<tr align="center"><td colspan="0"><?php echo Text::_('COM_JEM_NOVENUES'); ?></td></tr>
<?php else :?>
<?php foreach ($this->rows as $i => $row) : ?>
<tr class="row<?php echo $i % 2; ?>">
<td><?php echo $this->pagination->getRowOffset( $i ); ?></td>
<td align="left">
<a class="pointer" onclick="if (window.parent) window.parent.<?php echo $this->escape($function);?>('<?php echo $row->id; ?>', '<?php echo $this->escape(addslashes($row->venue)); ?>');"><?php echo $this->escape($row->venue); ?></a>
</td>
<td align="left"><?php echo $this->escape($row->city); ?></td>
<td align="left"><?php echo $this->escape($row->state); ?></td>
<td align="left"><?php echo !empty($row->country) ? $this->escape($row->country) : ''; ?></td>
</tr>
<?php endforeach; ?>
<?php endif; ?>
</tbody>
</table>
<p>
<input type="hidden" name="task" value="selectvenue" />
<input type="hidden" name="option" value="com_jem" />
<input type="hidden" name="tmpl" value="component" />
<input type="hidden" name="function" value="<?php echo $this->escape($function); ?>" />
<input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
</p>
</form>
<div class="pagination">
<?php echo $this->pagination->getPagesLinks(); ?>
</div>
</div>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout hidden="true" />
</metadata>

View File

@ -0,0 +1,308 @@
<?php
/**
* @package JEM
* @copyright (C) 2013-2024 joomlaeventmanager.net
* @copyright (C) 2005-2009 Christoph Lukes
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
*/
defined('_JEXEC') or die;
use Joomla\CMS\Router\Route;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Factory;
$app = Factory::getApplication();
$document = $app->getDocument();
$wa = $document->getWebAssetManager();
$wa->useScript('keepalive')
->useScript('form.validate');
// Create shortcut to parameters.
$params = $this->params;
// $settings = json_decode($this->item->attribs);
?>
<script>
jQuery(document).ready(function($){
function checkmaxplaces(){
var maxplaces = $('jform_maxplaces');
if (maxplaces != null){
$('#jform_maxplaces').on('change', function(){
if ($('#event-available')) {
var val = parseInt($('#jform_maxplaces').val());
var booked = parseInt($('#event-booked').val());
$('event-available').val() = (val-booked);
}
});
$('#jform_maxplaces').on('keyup', function(){
if ($('event-available')) {
var val = parseInt($('jform_maxplaces').val());
var booked = parseInt($('event-booked').val());
$('event-available').val() = (val-booked);
}
});
}
}
checkmaxplaces();
});
</script>
<script>
$(document).ready(function () {
var $registraCheckbox = $('input[name="jform[registra]"]');
var $restOfContent = $(".jem-dl-rest").children("dd, dt");
$registraCheckbox.on("change", function () {
if ($(this).is(":checked")) {
$restOfContent.show();
} else {
$restOfContent.hide();
}
});
var $minBookedUserInput = $("#jform_minbookeduser");
var $maxBookedUserInput = $("#jform_maxbookeduser");
var $maxPlacesInput = $("#jform_maxplaces");
var $reservedPlacesInput = $("#jform_reservedplaces");
$minBookedUserInput
.add($maxBookedUserInput)
.add($maxPlacesInput)
.add($reservedPlacesInput)
.on("change", function () {
var minBookedUserValue = parseInt($minBookedUserInput.val());
var maxBookedUserValue = parseInt($maxBookedUserInput.val());
var maxPlacesValue = parseInt($maxPlacesInput.val());
var reservedPlacesValue = parseInt($reservedPlacesInput.val());
if (minBookedUserValue > maxPlacesValue && maxPlacesValue != 0) {
$minBookedUserInput.val(maxPlacesValue);
}
if (maxBookedUserValue > maxPlacesValue && maxPlacesValue != 0) {
$maxBookedUserInput.val(maxPlacesValue);
}
if (minBookedUserValue > maxBookedUserValue) {
$minBookedUserInput.val(maxBookedUserValue);
}
if (reservedPlacesValue > maxPlacesValue && maxPlacesValue != 0) {
$reservedPlacesInput.val(maxPlacesValue);
}
});
// Trigger the change event on page load to initialize the state
$registraCheckbox.change();
$minBookedUserInput.change();
});
</script>
<script>
Joomla.submitbutton = function(task) {
if (task == 'event.cancel' || document.formvalidator.isValid(document.getElementById('adminForm'))) {
<?php //echo $this->form->getField('articletext')->save(); ?>
Joomla.submitform(task);
} else {
alert('<?php echo $this->escape(Text::_('JGLOBAL_VALIDATION_FORM_FAILED'));?>');
}
}
</script>
<script>
// window.addEvent('domready', function(){
jQuery(document).ready(function($){
var showUnregistraUntil = function(){
var unregistra = $("#jform_unregistra");
var unregistramode = unregistra.val();
if (unregistramode == 2) {
document.getElementById('unregistra_until').style.display = '';
document.getElementById('jform_unregistra_until').style.display = '';
document.getElementById('jform_unregistra_until2').style.display = '';
} else {
document.getElementById('unregistra_until').style.display = 'none';
document.getElementById('jform_unregistra_until').style.display = 'none';
document.getElementById('jform_unregistra_until2').style.display = 'none';
}
}
$("#jform_unregistra").on('change', showUnregistraUntil);
showUnregistraUntil();
});
jQuery(document).ready(function($){
var showRegistraFrom = function(){
var registra = $("#jform_registra");
var registramode = registra.val();
if (registramode == 2) {
document.getElementById('registra_from').style.display = '';
document.getElementById('registra_until').style.display = '';
document.getElementById('jform_registra_from').style.display = '';
document.getElementById('jform_registra_from2').style.display = '';
document.getElementById('jform_registra_until').style.display = '';
document.getElementById('jform_registra_until2').style.display = '';
} else {
document.getElementById('registra_from').style.display = 'none';
document.getElementById('registra_until').style.display = 'none';
document.getElementById('jform_registra_from').style.display = 'none';
document.getElementById('jform_registra_from2').style.display = 'none';
document.getElementById('jform_registra_until').style.display = 'none';
document.getElementById('jform_registra_until2').style.display = 'none';
}
}
$("#jform_registra").on('change', showRegistraFrom);
showRegistraFrom();
});
</script>
<div id="jem" class="jem_editevent<?php echo $this->pageclass_sfx; ?>">
<div class="edit item-page">
<?php if ($params->get('show_page_heading')) : ?>
<h1>
<?php echo $this->escape($params->get('page_heading')); ?>
</h1>
<?php endif; ?>
<form enctype="multipart/form-data" action="<?php echo Route::_('index.php?option=com_jem&a_id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="adminForm" class="form-validate">
<button type="submit" class="btn btn-primary" onclick="Joomla.submitbutton('event.save')"><?php echo Text::_('JSAVE') ?></button>
<button type="cancel" class="btn btn-secondary" onclick="Joomla.submitbutton('event.cancel')"><?php echo Text::_('JCANCEL') ?></button>
<br>
<?php if ($this->item->recurrence_type > 0) : ?>
<div class="description warningrecurrence" style="clear: both;">
<div style="float:left;">
<?php echo JemOutput::recurrenceicon($this->item, false, false); ?>
</div>
<div class="floattext" style="margin-left:36px;">
<strong><?php echo Text::_('COM_JEM_EDITEVENT_WARN_RECURRENCE_TITLE'); ?></strong>
<br>
<?php
if (!empty($this->item->recurrence_type) && empty($this->item->recurrence_first_id)) {
echo nl2br(Text::_('COM_JEM_EDITEVENT_WARN_RECURRENCE_FIRST_TEXT'));
} else {
echo nl2br(Text::_('COM_JEM_EDITEVENT_WARN_RECURRENCE_TEXT'));
}
?>
</div>
</div>
<?php endif; ?>
<?php if ($this->params->get('showintrotext')) : ?>
<div class="description no_space floattext">
<?php echo $this->params->get('introtext'); ?>
</div>
<?php endif; ?>
<?php //echo HTMLHelper::_('tabs.start', 'det-pane'); ?>
<!-- DETAILS TAB -->
<?php //echo HTMLHelper::_('tabs.panel', Text::_('COM_JEM_EDITEVENT_INFO_TAB'), 'editevent-infotab'); ?>
<?php echo HTMLHelper::_('uitab.startTabSet', 'myTab', ['active' => 'editevent-infotab', 'recall' => true, 'breakpoint' => 768]); ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'editevent-infotab', Text::_('COM_JEM_EDITEVENT_INFO_TAB')); ?>
<fieldset>
<legend><?php echo Text::_('COM_JEM_EDITEVENT_DETAILS_LEGEND'); ?></legend>
<ul class="adminformlist">
<li><?php echo $this->form->getLabel('title'); ?><?php echo $this->form->getInput('title'); ?></li>
<?php if (is_null($this->item->id)):?>
<li><?php echo $this->form->getLabel('alias'); ?><?php echo $this->form->getInput('alias'); ?></li>
<?php endif; ?>
<li><?php echo $this->form->getLabel('dates'); ?><?php echo $this->form->getInput('dates'); ?></li>
<li><?php echo $this->form->getLabel('enddates'); ?><?php echo $this->form->getInput('enddates'); ?></li>
<li><?php echo $this->form->getLabel('times'); ?><?php echo $this->form->getInput('times'); ?></li>
<li><?php echo $this->form->getLabel('endtimes'); ?><?php echo $this->form->getInput('endtimes'); ?></li>
<li><?php echo $this->form->getLabel('cats'); ?><?php echo $this->form->getInput('cats'); ?></li>
<li><?php echo $this->form->getLabel('locid'); ?> <?php echo $this->form->getInput('locid'); ?></li>
</ul>
</fieldset>
<!-- EVENTDESCRIPTION -->
<fieldset>
<legend><?php echo Text::_('COM_JEM_EVENT_DESCRIPTION'); ?></legend>
<div class="clr"></div>
<?php echo $this->form->getLabel('articletext'); ?>
<div class="clr"><br></div>
<?php echo $this->form->getInput('articletext'); ?>
</fieldset>
<!-- IMAGE -->
<?php if ($this->item->datimage || $this->jemsettings->imageenabled != 0) : ?>
<fieldset class="jem_fldst_image">
<legend><?php echo Text::_('COM_JEM_IMAGE'); ?></legend>
<?php
if ($this->item->datimage) :
echo JemOutput::flyer($this->item, $this->dimage, 'event', 'datimage');
?><input type="hidden" name="datimage" id="datimage" value="<?php echo $this->item->datimage; ?>" /><?php
endif;
?>
<?php if ($this->jemsettings->imageenabled != 0) : ?>
<ul class="adminformlist">
<li>
<?php /* We get field with id 'jform_userfile' and name 'jform[userfile]' */ ?>
<?php echo $this->form->getLabel('userfile'); ?> <?php echo $this->form->getInput('userfile'); ?>
</li>
<li>
<button type="button" class="button3" onclick="document.getElementById('jform_userfile').val() = ''"><?php echo Text::_('JSEARCH_FILTER_CLEAR') ?></button>
</li>
<?php
if ($this->item->datimage) :
echo HTMLHelper::image('media/com_jem/images/publish_r.png', null, array('id' => 'userfile-remove', 'data-id' => $this->item->id, 'data-type' => 'events', 'title' => Text::_('COM_JEM_REMOVE_IMAGE')));
endif;
?>
<input type="hidden" name="removeimage" id="removeimage" value="0" />
</ul>
<?php endif; ?>
</fieldset>
<?php endif; ?>
<!-- EXTENDED TAB -->
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'editevent-extendedtab', Text::_('COM_JEM_EDITEVENT_EXTENDED_TAB')); ?>
<?php //echo HTMLHelper::_('tabs.panel', Text::_('COM_JEM_EDITEVENT_EXTENDED_TAB'), 'editevent-extendedtab'); ?>
<?php echo $this->loadTemplate('extended'); ?>
<!-- PUBLISH TAB -->
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'editevent-publishtab', Text::_('COM_JEM_EDITEVENT_PUBLISH_TAB')); ?>
<?php //echo HTMLHelper::_('tabs.panel', Text::_('COM_JEM_EDITEVENT_PUBLISH_TAB'), 'editevent-publishtab'); ?>
<?php echo $this->loadTemplate('publish'); ?>
<!-- ATTACHMENTS TAB -->
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php if (!empty($this->item->attachments) || ($this->jemsettings->attachmentenabled != 0)) : ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'event-attachments', Text::_('COM_JEM_EVENT_ATTACHMENTS_TAB')); ?>
<?php //echo HTMLHelper::_('tabs.panel', Text::_('COM_JEM_EVENT_ATTACHMENTS_TAB'), 'event-attachments'); ?>
<?php echo $this->loadTemplate('attachments'); ?>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php endif; ?>
<!-- OTHER TAB -->
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'event-other', Text::_('COM_JEM_EVENT_OTHER_TAB')); ?>
<?php //echo HTMLHelper::_('tabs.panel', Text::_('COM_JEM_EVENT_OTHER_TAB'), 'event-other'); ?>
<?php echo $this->loadTemplate('other'); ?>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php //echo HTMLHelper::_('tabs.end'); ?>
<input type="hidden" name="task" value="" />
<input type="hidden" name="return" value="<?php echo $this->return_page; ?>" />
<input type="hidden" name="author_ip" value="<?php echo $this->item->author_ip; ?>" />
<?php if ($this->params->get('enable_category', 0) == 1) : ?>
<input type="hidden" name="jform[catid]" value="<?php echo $this->params->get('catid', 1); ?>" />
<?php endif; ?>
<?php echo HTMLHelper::_('form.token'); ?>
</form>
</div>
<div class="copyright">
<?php echo JemOutput::footer(); ?>
</div>
</div>

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout title="COM_JEM_EDITEVENT_VIEW_DEFAULT_TITLE">
<message>
<![CDATA[COM_JEM_EDITEVENT_VIEW_DEFAULT_DESC]]>
</message>
</layout>
<fields name="params">
<fieldset name="basic">
<field name="introtext"
type="textarea"
filter="safehtml"
default=""
rows="8"
cols="30"
label="COM_JEM_INTROTEXT_FIELD"
description="COM_JEM_INTROTEXT_FIELD_DESC"
/>
<field name="showintrotext"
type="radio"
default="0"
label="COM_JEM_DISPLAY_INTROTEXT"
description="COM_JEM_DISPLAY_INTROTEXT_DESC"
class="btn-group btn-group-yesno"
>
<option value="1">COM_JEM_SHOW</option>
<option value="0">COM_JEM_HIDE</option>
</field>
</fieldset>
</fields>
</metadata>

View File

@ -0,0 +1,92 @@
<?php
/**
* @package JEM
* @copyright (C) 2013-2024 joomlaeventmanager.net
* @copyright (C) 2005-2009 Christoph Lukes
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
*/
defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Session\Session;
?>
<fieldset>
<legend><?php echo Text::_('COM_JEM_ATTACHMENTS_LEGEND'); ?></legend>
<table class="adminform" id="el-attachments">
<tbody>
<?php foreach ($this->item->attachments as $file): ?>
<tr>
<td>
<div>
<div class="title"><?php echo Text::_('COM_JEM_ATTACHMENT_FILE');?></div>
<input class="readonly" type="text" readonly="readonly" value="<?php echo $file->file; ?>" />
<input type="hidden" name="attached-id[]" value="<?php echo $file->id; ?>" />
</div>
<div>
<div class="title"><?php echo Text::_('COM_JEM_ATTACHMENT_NAME'); ?></div>
<?php /* name is always editable, also if attachemnt upload is not allowed */ ?>
<input type="text" name="attached-name[]" style="width: 100%" value="<?php echo $file->name; ?>" />
</div>
<div>
<div class="title"><?php echo Text::_('COM_JEM_ATTACHMENT_DESCRIPTION'); ?></div>
<?php /* description is always editable, also if attachemnt upload is not allowed */ ?>
<input type="text" name="attached-desc[]" style="width: 100%" value="<?php echo $file->description; ?>" />
</div>
</td>
<td>
<div>
<div class="title"><?php echo Text::_('COM_JEM_ATTACHMENT_ACCESS'); ?></div>
<?php
$attribs = array('class'=>'inputbox', 'size'=>'7');
/* if attachment upload is not allowed changing access level should also not possible */
if ($this->jemsettings->attachmentenabled == 0) :
$attribs['disabled'] = 'disabled';
endif;
echo HTMLHelper::_('select.genericlist', $this->access, 'attached-access[]', $attribs, 'value', 'text', $file->access);
?>
</div>
</td>
<td class="center">
<?php if ($this->jemsettings->attachmentenabled != 0) : ?>
<div>
<div class="title"><?php echo Text::_('COM_JEM_ATTACHMENT_REMOVE'); ?></div>
<?php echo JemOutput::removebutton(Text::_('COM_JEM_GLOBAL_REMOVE_ATTACHEMENT'), array('id' => 'attach-remove'.$file->id.':'.Session::getFormToken(),'class' => 'attach-remove','title'=>Text::_('COM_JEM_GLOBAL_REMOVE_ATTACHEMENT'))); ?>
</div>
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
<?php if ($this->jemsettings->attachmentenabled != 0) : ?>
<tr>
<td width="100%">
<div>
<div class="title"><?php echo Text::_('COM_JEM_ATTACHMENT_FILE'); ?></div>
<input type="file" name="attach[]" class="attach-field" /><input type="reset" value="<?php echo Text::_('JSEARCH_FILTER_CLEAR') ?>" class="btn btn-primary">
</div>
<div>
<div class="title"><?php echo Text::_('COM_JEM_ATTACHMENT_NAME'); ?></div>
<input type="text" name="attach-name[]" class="attach-name" value="" />
</div>
<div>
<div class="title"><?php echo Text::_('COM_JEM_ATTACHMENT_DESCRIPTION'); ?></div>
<input type="text" name="attach-desc[]" class="attach-desc" value="" />
</div>
</td>
<td>
<div>
<div class="title"><?php echo Text::_('COM_JEM_ATTACHMENT_ACCESS'); ?></div>
<?php echo HTMLHelper::_('select.genericlist', $this->access, 'attach-access[]', array('class'=>'inputbox', 'size'=>'7'), 'value', 'text', 1); ?>
</div>
</td>
<td>&nbsp;</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</fieldset>

View File

@ -0,0 +1,244 @@
<?php
/**
* @package JEM
* @copyright (C) 2013-2024 joomlaeventmanager.net
* @copyright (C) 2005-2009 Christoph Lukes
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Date\Date;
?>
<!-- RECURRENCE START -->
<div>
<fieldset class="panelform">
<legend><?php echo Text::_('COM_JEM_RECURRENCE'); ?></legend>
<ul class="adminformlist">
<li><?php echo $this->form->getLabel('recurrence_type'); ?> <?php echo $this->form->getInput('recurrence_type', null, $this->item->recurrence_type); ?></li>
<li id="recurrence_output"><label></label></li>
<li id="counter_row" style="display: none;">
<?php echo $this->form->getLabel('recurrence_limit_date'); ?>
<?php echo $this->form->getInput('recurrence_limit_date', null, $this->item->recurrence_limit_date); ?>
<br><div class="recurrence_notice"><small>
<?php
switch ($this->item->recurrence_type) {
case 1:
$anticipation = $this->jemsettings->recurrence_anticipation_day;
break;
case 2:
$anticipation = $this->jemsettings->recurrence_anticipation_week;
break;
case 3:
$anticipation = $this->jemsettings->recurrence_anticipation_month;
break;
case 4:
$anticipation = $this->jemsettings->recurrence_anticipation_week;
break;
case 5:
$anticipation = $this->jemsettings->recurrence_anticipation_year;
break;
default:
$anticipation = $this->jemsettings->recurrence_anticipation_day;
break;
}
$limitdate = new Date('now +' . $anticipation . 'month');
$limitdate = JemOutput::formatLongDateTime($limitdate->format('Y-m-d'), '');
echo Text::sprintf(Text::_('COM_JEM_EDITEVENT_NOTICE_GENSHIELD'), $limitdate);
?></small></div>
</li>
</ul>
<input type="hidden" name="recurrence_number" id="recurrence_number" value="<?php echo $this->item->recurrence_number;?>" />
<input type="hidden" name="recurrence_number_saved" id="recurrence_number_saved" value="<?php echo $this->item->recurrence_number;?>"></input>
<input type="hidden" name="recurrence_byday" id="recurrence_byday" value="<?php echo $this->item->recurrence_byday;?>" />
<script>
<!--
var $select_output = new Array();
$select_output[1] = "<?php
echo Text::_('COM_JEM_OUTPUT_DAY');
?>";
$select_output[2] = "<?php
echo Text::_('COM_JEM_OUTPUT_WEEK');
?>";
$select_output[3] = "<?php
echo Text::_('COM_JEM_OUTPUT_MONTH');
?>";
$select_output[4] = "<?php
echo Text::_('COM_JEM_OUTPUT_WEEKDAY');
?>";
$select_output[5] = "<?php
echo Text::_('COM_JEM_OUTPUT_YEAR');
?>";
var $weekday = new Array();
$weekday[0] = new Array("MO", "<?php echo Text::_('COM_JEM_MONDAY'); ?>");
$weekday[1] = new Array("TU", "<?php echo Text::_('COM_JEM_TUESDAY'); ?>");
$weekday[2] = new Array("WE", "<?php echo Text::_('COM_JEM_WEDNESDAY'); ?>");
$weekday[3] = new Array("TH", "<?php echo Text::_('COM_JEM_THURSDAY'); ?>");
$weekday[4] = new Array("FR", "<?php echo Text::_('COM_JEM_FRIDAY'); ?>");
$weekday[5] = new Array("SA", "<?php echo Text::_('COM_JEM_SATURDAY'); ?>");
$weekday[6] = new Array("SU", "<?php echo Text::_('COM_JEM_SUNDAY'); ?>");
var $before_last = "<?php
echo Text::_('COM_JEM_BEFORE_LAST');
?>";
var $last = "<?php
echo Text::_('COM_JEM_LAST');
?>";
start_recurrencescript("jform_recurrence_type");
-->
</script>
<?php /* show "old" recurrence settings for information */
if (!empty($this->item->recurr_bak->recurrence_type)) {
$recurr_type = '';
$rlDate = $this->item->recurr_bak->recurrence_limit_date;
$recurrence_first_id = $this->item->recurr_bak->recurrence_first_id;
if (!empty($rlDate)) {
$recurr_limit_date = JemOutput::formatdate($rlDate);
} else {
$recurr_limit_date = Text::_('COM_JEM_UNLIMITED');
}
switch ($this->item->recurr_bak->recurrence_type) {
case 1:
$recurr_type = Text::_('COM_JEM_DAILY');
$recurr_info = str_ireplace('[placeholder]',
$this->item->recurr_bak->recurrence_number,
Text::_('COM_JEM_OUTPUT_DAY'));
break;
case 2:
$recurr_type = Text::_('COM_JEM_WEEKLY');
$recurr_info = str_ireplace('[placeholder]',
$this->item->recurr_bak->recurrence_number,
Text::_('COM_JEM_OUTPUT_WEEK'));
break;
case 3:
$recurr_type = Text::_('COM_JEM_MONTHLY');
$recurr_info = str_ireplace('[placeholder]',
$this->item->recurr_bak->recurrence_number,
Text::_('COM_JEM_OUTPUT_MONTH'));
break;
case 4:
$recurr_type = Text::_('COM_JEM_WEEKDAY');
$recurr_byday = preg_replace('/(,)([^ ,]+)/', '$1 $2', $this->item->recurr_bak->recurrence_byday);
$recurr_days = str_ireplace(array('MO', 'TU', 'WE', 'TH', 'FR', 'SA', 'SO'),
array(Text::_('COM_JEM_MONDAY'), Text::_('COM_JEM_TUESDAY'),
Text::_('COM_JEM_WEDNESDAY'), Text::_('COM_JEM_THURSDAY'),
Text::_('COM_JEM_FRIDAY'), Text::_('COM_JEM_SATURDAY'),
Text::_('COM_JEM_SUNDAY')),
$recurr_byday);
$recurr_num = str_ireplace(array('6', '7'),
array(Text::_('COM_JEM_LAST'), Text::_('COM_JEM_BEFORE_LAST')),
$this->item->recurr_bak->recurrence_number);
$recurr_info = str_ireplace(array('[placeholder]', '[placeholder_weekday]'),
array($recurr_num, $recurr_days),
Text::_('COM_JEM_OUTPUT_WEEKDAY'));
break;
case 5:
$recurr_type = Text::_('COM_JEM_YEARLY');
$recurr_info = str_ireplace('[placeholder]',
$this->item->recurr_bak->recurrence_number,
Text::_('COM_JEM_OUTPUT_YEAR'));
break;
default:
break;
}
if (!empty($recurr_type)) {
?>
<hr class="jem-hr" />
<p><strong><?php echo Text::_('COM_JEM_RECURRING_INFO_TITLE'); ?></strong></p>
<ul class="adminformlist">
<li>
<label><?php echo Text::_('COM_JEM_RECURRING_FIRST_EVENT_ID'); ?></label>
<input type="text" class="readonly" readonly="readonly" value="<?php echo $recurrence_first_id; ?>">
</li>
<li>
<label><?php echo Text::_('COM_JEM_RECURRENCE'); ?></label>
<input type="text" class="readonly" readonly="readonly" value="<?php echo $recurr_type; ?>">
</li>
<li>
<div class="clear"></div>
<label> </label>
<?php echo $recurr_info; ?>
</li>
<li>
<label><?php echo Text::_('COM_JEM_RECURRENCE_COUNTER'); ?></label>
<input type="text" class="readonly" readonly="readonly" value="<?php echo $recurr_limit_date; ?>">
</li>
</ul>
<?php
}
} ?>
</fieldset>
<!-- RECURRENCE END -->
<!-- CONTACT START -->
<fieldset class="adminform">
<legend><?php echo Text::_('COM_JEM_CONTACT'); ?></legend>
<ul class="adminformlist">
<li><?php echo $this->form->getLabel('contactid'); ?> <?php echo $this->form->getInput('contactid'); ?></li>
</ul>
</fieldset>
<!-- CONTACT END -->
<!-- REGISTRATION START -->
<fieldset class="panelform">
<legend><?php echo Text::_('COM_JEM_EVENT_REGISTRATION_LEGEND'); ?></legend>
<ul class="adminformlist">
<?php if ($this->jemsettings->showfroregistra == 0) : ?>
<li><?php echo $this->form->getLabel('registra'); ?> <?php echo Text::_('JNO'); ?></li>
<?php else : ?>
<?php if ($this->jemsettings->showfroregistra == 1) : ?>
<li><?php echo $this->form->getLabel('registra'); ?> <?php echo Text::_('JYES'); ?></li>
<?php else : ?>
<li><?php echo $this->form->getLabel('registra'); ?> <?php echo $this->form->getInput('registra'); ?></li>
<li><div id="registra_from"><label><?php echo Text::_('COM_JEM_EVENT_FIELD_REGISTRATION_FROM');?></label><?php echo $this->form->getInput('registra_from'); ?><span id="jform_registra_from2"> <?php echo Text::_('COM_JEM_EVENT_FIELD_REGISTRATION_FROM_POSTFIX'); ?></span></div></li>
<li><div id="registra_until"><label><?php echo Text::_('COM_JEM_EVENT_FIELD_REGISTRATION_UNTIL');?></label><?php echo $this->form->getInput('registra_until'); ?><span id="jform_registra_until2"> <?php echo Text::_('COM_JEM_EVENT_FIELD_REGISTRATION_UNTIL_POSTFIX'); ?></span></div></li>
<?php endif; ?>
<br/>
<?php if ($this->jemsettings->regallowinvitation == 1) : ?>
<li><?php echo $this->form->getLabel('reginvitedonly'); ?> <?php echo $this->form->getInput('reginvitedonly'); ?></li>
<br/>
<?php endif; ?>
<li><?php echo $this->form->getLabel('unregistra'); ?> <?php echo $this->form->getInput('unregistra'); ?></li>
<br/>
<li><div id="unregistra_until"><label></label><?php echo $this->form->getInput('unregistra_until'); ?><span id="jform_unregistra_until2"> <?php echo Text::_('COM_JEM_EVENT_FIELD_ANNULATION_UNTIL_POSTFIX'); ?></span></div></li>
<br/>
<li><?php echo $this->form->getLabel('maxplaces'); ?> <?php echo $this->form->getInput('maxplaces'); ?></li>
<br/>
<li><?php echo $this->form->getLabel('minbookeduser'); ?> <?php echo $this->form->getInput('minbookeduser'); ?></li>
<br/>
<li><?php echo $this->form->getLabel('maxbookeduser'); ?> <?php echo $this->form->getInput('maxbookeduser'); ?></li>
<br/>
<li><label style='margin-top: 1rem;'><?php echo Text::_ ('COM_JEM_EDITEVENT_FIELD_RESERVED_PLACES');?></label> <?php echo $this->form->getInput('reservedplaces'); ?></li>
<br/>
<li><?php echo $this->form->getLabel('waitinglist'); ?> <?php echo $this->form->getInput('waitinglist'); ?></li>
<br/>
<li><?php echo $this->form->getLabel('requestanswer'); ?> <?php echo $this->form->getInput('requestanswer'); ?></li>
<br/>
<li><?php echo $this->form->getLabel('seriesbooking'); ?> <?php echo $this->form->getInput('seriesbooking'); ?></li>
<br/>
<li><?php echo $this->form->getLabel('singlebooking'); ?> <?php echo $this->form->getInput('singlebooking'); ?></li>
<br/>
<?php if ($this->jemsettings->regallowinvitation == 1) : ?>
<li><?php echo $this->form->getLabel('invited'); ?> <?php echo $this->form->getInput('invited'); ?></li>
<br/>
<?php endif; ?>
<li><label style='margin-top: 1rem;'><?php echo Text::_ ('COM_JEM_EDITEVENT_FIELD_BOOKED_PLACES');?></label> <?php echo '<input id="event-booked" class="form-control readonly inputbox" type="text" readonly="true" value="' . $this->item->booked . '" />'; ?></li>
<br/>
<?php if ($this->item->maxplaces): ?>
<li><?php echo $this->form->getLabel('avplaces'); ?> <?php echo '<input id="event-available" class="form-control readonly inputbox" type="text" readonly="true" value="' . ($this->item->maxplaces-$this->item->booked-$this->item->reservedplaces) . '" />'; ?></li>
<?php endif; ?>
<?php endif; ?>
</ul>
</fieldset>
</div>
<!-- REGISTRATION END -->

View File

@ -0,0 +1,36 @@
<?php
/**
* @package JEM
* @copyright (C) 2013-2024 joomlaeventmanager.net
* @copyright (C) 2005-2009 Christoph Lukes
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
*/
defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;
$max_custom_fields = $this->settings->get('global_editevent_maxnumcustomfields', -1); // default to All
?>
<!-- CUSTOM FIELDS -->
<?php if ($max_custom_fields != 0) : ?>
<fieldset class="panelform">
<legend><?php echo Text::_('COM_JEM_EVENT_CUSTOMFIELDS_LEGEND'); ?></legend>
<ul class="adminformlist">
<?php
$fields = $this->form->getFieldset('custom');
if ($max_custom_fields < 0) :
$max_custom_fields = count($fields);
endif;
$cnt = 0;
foreach($fields as $field) :
if (++$cnt <= $max_custom_fields) :
?><li><?php echo $field->label; ?><?php echo $field->input; ?></li><?php
endif;
endforeach;
?>
</ul>
</fieldset>
<?php endif; ?>

View File

@ -0,0 +1,79 @@
<?php
/**
* @package JEM
* @copyright (C) 2013-2024 joomlaeventmanager.net
* @copyright (C) 2005-2009 Christoph Lukes
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
*/
defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper;
$max_custom_fields = $this->settings->get('global_editevent_maxnumcustomfields', -1); // default to All
?>
<!--START PUBLISHING FIELDSET -->
<fieldset>
<legend><?php echo Text::_('COM_JEM_EDITEVENT_PUBLISH_TAB'); ?></legend>
<ul class="adminformlist">
<li><?php echo $this->form->getLabel('featured'); ?><?php echo $this->form->getInput('featured'); ?></li>
<li><?php echo $this->form->getLabel('published'); ?><?php echo $this->form->getInput('published'); ?></li>
<li><?php echo $this->form->getLabel('access'); ?><?php
echo HTMLHelper::_('select.genericlist', $this->access, 'jform[access]',
array('list.attr' => ' class="inputbox" size="1"', 'list.select' => $this->item->access, 'option.attr' => 'disabled', 'id' => 'access'));
?>
</li>
</ul>
</fieldset>
<!-- START META FIELDSET -->
<fieldset class="">
<legend><?php echo Text::_('COM_JEM_META_HANDLING'); ?></legend>
<div class="formelm-area">
<input class="inputbox" type="button" onclick="insert_keyword('[title]')" value="<?php echo Text::_ ( 'COM_JEM_TITLE' ); ?>" />
<input class="inputbox" type="button" onclick="insert_keyword('[a_name]')" value="<?php echo Text::_ ( 'COM_JEM_VENUE' );?>" />
<input class="inputbox" type="button" onclick="insert_keyword('[categories]')" value="<?php echo Text::_ ( 'COM_JEM_CATEGORIES' );?>" />
<input class="inputbox" type="button" onclick="insert_keyword('[dates]')" value="<?php echo Text::_ ( 'COM_JEM_DATE' );?>" />
<input class="inputbox" type="button" onclick="insert_keyword('[times]')" value="<?php echo Text::_ ( 'COM_JEM_TIME' );?>" />
<input class="inputbox" type="button" onclick="insert_keyword('[enddates]')" value="<?php echo Text::_ ( 'COM_JEM_ENDDATE' );?>" />
<input class="inputbox" type="button" onclick="insert_keyword('[endtimes]')" value="<?php echo Text::_ ( 'COM_JEM_ENDTIME' );?>" />
<br /><br />
<label for="meta_keywords">
<?php echo Text::_('COM_JEM_META_KEYWORDS').':';?>
</label>
<?php
if (! empty ( $this->item->meta_keywords )) {
$meta_keywords = $this->item->meta_keywords;
} else {
$meta_keywords = $this->jemsettings->meta_keywords;
}
?>
<textarea class="inputbox" name="meta_keywords" id="meta_keywords" rows="5" cols="40" maxlength="150" onfocus="get_inputbox('meta_keywords')" onblur="change_metatags()"><?php echo $meta_keywords; ?></textarea>
</div>
<div class="formelm-area">
<label for="meta_description">
<?php echo Text::_ ( 'COM_JEM_META_DESCRIPTION' ) . ':';?>
</label>
<?php
if (! empty ( $this->item->meta_description )) {
$meta_description = $this->item->meta_description;
} else {
$meta_description = $this->jemsettings->meta_description;
}
?>
<textarea class="inputbox" name="meta_description" id="meta_description" rows="5" cols="40" maxlength="200" onfocus="get_inputbox('meta_description')" onblur="change_metatags()"><?php echo $meta_description;?></textarea>
</div>
<!-- include the metatags end-->
<script>
<!--
starter("<?php
echo Text::_ ( 'COM_JEM_META_ERROR' );
?>"); // window.onload is already in use, call the function manualy instead
-->
</script>
</fieldset>
<!-- END META FIELDSET -->

View File

@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@ -0,0 +1,117 @@
<?php
/**
* @package JEM
* @copyright (C) 2013-2024 joomlaeventmanager.net
* @copyright (C) 2005-2009 Christoph Lukes
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
$function = Factory::getApplication()->input->getCmd('function', 'jSelectContact');
?>
<script>
function tableOrdering( order, dir, view )
{
var form = document.getElementById("adminForm");
form.filter_order.value = order;
form.filter_order_Dir.value = dir;
form.submit( view );
}
</script>
<div id="jem" class="jem_select_contact">
<h1 class='componentheading'>
<?php echo Text::_('COM_JEM_SELECT_CONTACT'); ?>
</h1>
<div class="clr"></div>
<form action="<?php echo Route::_('index.php?option=com_jem&view=editevent&layout=choosecontact&tmpl=component&function='.$this->escape($function).'&'.Session::getFormToken().'=1'); ?>" method="post" name="adminForm" id="adminForm">
<div class="jem-row valign-baseline">
<div id="jem_filter" class="jem-form jem-row jem-justify-start">
<div>
<?php
echo '<label for="filter_type">'.Text::_('COM_JEM_FILTER').'</label>';
?>
</div>
<div class="jem-row jem-justify-start jem-nowrap">
<?php echo $this->searchfilter; ?>
<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->lists['search']; ?>" class="inputbox" onChange="document.adminForm.submit();" />
</div>
<div class="jem-row jem-justify-start jem-nowrap">
<button type="submit" class="pointer btn btn-primary"><?php echo Text::_('JSEARCH_FILTER_SUBMIT'); ?></button>
<button type="button" class="pointer btn btn-secondary" onclick="document.getElementById('filter_search').value='';this.form.submit();"><?php echo Text::_('JSEARCH_FILTER_CLEAR'); ?></button>
<button type="button" class="pointer btn btn-primary" onclick="if (window.parent) window.parent.<?php echo $this->escape($function);?>('', '<?php echo Text::_('COM_JEM_SELECT_CONTACT') ?>');"><?php echo Text::_('COM_JEM_NOCONTACT')?></button>
</div>
</div>
<div class="jem-row jem-justify-start jem-nowrap">
<div>
<?php echo '<label for="limit">'.Text::_('COM_JEM_DISPLAY_NUM').'</label>&nbsp;'; ?>
</div>
<div>&nbsp;</div>
<div>
<?php echo $this->pagination->getLimitBox(); ?>
</div>
</div>
</div>
<hr class="jem-hr"/>
<div class="jem-sort jem-sort-small">
<div class="jem-list-row jem-small-list">
<div class="sectiontableheader jem-contact-number"><?php echo Text::_('COM_JEM_NUM'); ?></div>
<div class="sectiontableheader jem-contact-name"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_NAME', 'con.name', $this->lists['order_Dir'], $this->lists['order'] ); ?></div>
<div class="sectiontableheader jem-contact-city"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_CITY', 'con.suburb', $this->lists['order_Dir'], $this->lists['order'] ); ?></div>
<div class="sectiontableheader jem-contact-state"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_STATE', 'con.state', $this->lists['order_Dir'], $this->lists['order'] ); ?></div>
</div>
</div>
<ul class="eventlist eventtable">
<?php if (empty($this->rows)) : ?>
<li class="jem-event jem-list-row jem-small-list"><?php echo Text::_('COM_JEM_NOCONTACTS'); ?></li>
<?php else :?>
<?php foreach ($this->rows as $i => $row) : ?>
<li class="jem-event jem-list-row jem-small-list row<?php echo $i % 2; ?>">
<div class="jem-event-info-small jem-contact-number">
<?php echo $this->pagination->getRowOffset( $i ); ?>
</div>
<div class="jem-event-info-small jem-contact-name">
<span <?php echo JEMOutput::tooltip(Text::_('COM_JEM_SELECT'), $row->name, 'editlinktip selectcontact'); ?>>
<a class="pointer" onclick="if (window.parent) window.parent.<?php echo $this->escape($function);?>('<?php echo $row->id; ?>', '<?php echo $this->escape(addslashes($row->name)); ?>');"><?php echo $this->escape($row->name); ?></a>
</span>
</div>
<div class="jem-event-info-small jem-contact-city">
<?php echo $this->escape($row->suburb); ?>
</div>
<div class="jem-event-info-small jem-contact-state">
<?php echo $this->escape($row->state); ?>
</div>
</li>
<?php endforeach; ?>
<?php endif; ?>
</ul>
<input type="hidden" name="task" value="selectcontact" />
<input type="hidden" name="option" value="com_jem" />
<input type="hidden" name="tmpl" value="component" />
<input type="hidden" name="function" value="<?php echo $this->escape($function); ?>" />
<input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
</form>
<div class="pagination">
<?php echo $this->pagination->getPagesLinks(); ?>
</div>
</div>

View File

@ -0,0 +1,172 @@
<?php
/**
* @package JEM
* @copyright (C) 2013-2024 joomlaeventmanager.net
* @copyright (C) 2005-2009 Christoph Lukes
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Factory;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
$function = Factory::getApplication()->input->getCmd('function', 'jSelectUsers');
$checked = 0;
HTMLHelper::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR.'/helpers/html');
?>
<script>
function tableOrdering( order, dir, view )
{
var form = document.getElementById("adminForm");
form.filter_order.value = order;
form.filter_order_Dir.value = dir;
form.submit( view );
}
</script>
<script>
function checkList(form)
{
var r='', i, n, e;
for (i=0, n=form.elements.length; i<n; i++)
{
e = form.elements[i];
if (e.type == 'checkbox' && e.id.indexOf('cb') === 0 && e.checked)
{
if (r) { r += ','; }
r += e.value;
}
}
return r;
}
</script>
<div id="jem" class="jem_select_users">
<h1 class='componentheading'>
<?php echo Text::_('COM_JEM_SELECT_USERS_TO_INVITE'); ?>
</h1>
<div class="clr"></div>
<form action="<?php echo Route::_('index.php?option=com_jem&view=editevent&layout=chooseusers&tmpl=component&function='.$this->escape($function).'&'.Session::getFormToken().'=1'); ?>" method="post" name="adminForm" id="adminForm">
<?php if(0) : ?>
<div class="jem-row valign-baseline">
<div id="jem_filter" class="jem-form jem-row jem-justify-start">
<div>
<?php
echo '<label for="filter_type">'.Text::_('COM_JEM_FILTER').'</label>&nbsp;';
?>
</div>
<div class="jem-row jem-justify-start jem-nowrap">
<?php echo $this->searchfilter.'&nbsp;'; ?>
<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->lists['search']; ?>" class="inputbox" onChange="document.adminForm.submit();" />
</div>
<div class="jem-row jem-justify-start jem-nowrap">
<button type="submit" class="pointer btn btn-primary"><?php echo Text::_('JSEARCH_FILTER_SUBMIT'); ?></button>
<button type="button" class="pointer btn btn-secondary" onclick="document.getElementById('filter_search').value='';this.form.submit();"><?php echo Text::_('JSEARCH_FILTER_CLEAR'); ?></button>
<?php /*<button type="button" class="pointer btn btn-primary" onclick="if (window.parent) window.parent.<?php echo $this->escape($function);?>('', '0');"><?php echo Text::_('COM_JEM_NOUSERS')?></button>*/ ?>
</div>
</div>
<div class="jem-row jem-justify-start jem-nowrap">
<div>
<?php echo '<label for="limit">'.Text::_('COM_JEM_DISPLAY_NUM').'</label>&nbsp;'; ?>
</div>
<div>&nbsp;</div>
<div>
<?php echo $this->pagination->getLimitBox(); ?>
</div>
</div>
</div>
<?php endif;?>
<hr class="jem-hr"/>
<div class="jem-sort jem-sort-small">
<div class="jem-list-row jem-small-list">
<div class="sectiontableheader jem-users-number"><?php echo Text::_('COM_JEM_NUM'); ?></div>
<div class="sectiontableheader jem-users-checkall"><input type="checkbox" name="checkall-toggle" value="" title="<?php echo Text::_('JGLOBAL_CHECK_ALL'); ?>" onclick="Joomla.checkAll(this)" /></div>
<div class="sectiontableheader jem-users-name"><?php echo Text::_('COM_JEM_NAME'); ?></div>
<div class="sectiontableheader jem-users-state"><?php echo Text::_('COM_JEM_STATUS'); ?></div>
<div class="sectiontableheader jem-users-state"><?php echo Text::_('COM_JEM_PLACES'); ?></div>
</div>
</div>
<ul class="eventlist eventtable">
<?php if (empty($this->rows)) : ?>
<li class="jem-event jem-list-row jem-small-list"><?php echo Text::_('COM_JEM_NOUSERS'); ?></li>
<?php else :?>
<?php foreach ($this->rows as $i => $row) : ?>
<li class="jem-event jem-list-row jem-small-list row<?php echo $i % 2; ?>">
<div class="jem-event-info-small jem-users-number">
<?php echo $this->pagination->getRowOffset( $i ); ?>
</div>
<div class="jem-event-info-small jem-users-checkall">
<?php
//echo HTMLHelper::_('grid.id', $i, $row->id);
$cb = HTMLHelper::_('grid.id', $i, $row->id);
if ($row->status == 0) {
// JemHelper::addLogEntry('before: '.$cb, __METHOD__);
$cb = preg_replace('/(onclick=)/', 'checked $1', $cb);
++$checked;
// JemHelper::addLogEntry('after: '.$cb, __METHOD__);
}
echo $cb;
?>
</div>
<div class="jem-event-info-small jem-users-name">
<?php echo $this->escape($row->name); ?>
</div>
<div class="jem-event-info-small jem-users-state">
<?php echo jemhtml::toggleAttendanceStatus( 0, $row->status, false); ?>
</div>
<div class="jem-event-info-small jem-users-places">
<?php echo $this->escape($row->places); ?>
</div>
</li>
<?php endforeach; ?>
<?php endif; ?>
</ul>
<hr class="jem-hr"/>
<div class="jem-row jem-justify-start valign-baseline">
<div style="padding-right:5px;">
<?php echo Text::_('COM_JEM_SELECT');?>
</div>
<div style="padding-right:10px;">
<?php echo Text::_('COM_JEM_PLACES'); ?>
</div>
<div style="padding-right:10px;">
<input id="places" name="places" type="number" style="text-align: center; width:auto;" value="0" max="1" min="0">
</div>
</div>
<input type="hidden" name="task" value="selectusers" />
<input type="hidden" name="option" value="com_jem" />
<input type="hidden" name="tmpl" value="component" />
<input type="hidden" name="function" value="<?php echo $this->escape($function); ?>" />
<input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
<input type="hidden" name="boxchecked" value="<?php echo $checked; ?>" />
</form>
<div class="pagination">
<?php echo $this->pagination->getPagesLinks(); ?>
</div>
<hr class="jem-hr"/>
<div class="jem-row jem-justify-end">
<button type="button" class="pointer btn btn-primary" onclick="if (window.parent) window.parent.<?php echo $this->escape($function);?>(checkList(document.adminForm), document.adminForm.boxchecked.value);"><?php echo Text::_('COM_JEM_SAVE'); ?></button>
</div>
</div>

View File

@ -0,0 +1,122 @@
<?php
/**
* @package JEM
* @copyright (C) 2013-2024 joomlaeventmanager.net
* @copyright (C) 2005-2009 Christoph Lukes
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
$function = Factory::getApplication()->input->getCmd('function', 'jSelectVenue');
?>
<script>
function tableOrdering( order, dir, view )
{
var form = document.getElementById("adminForm");
form.filter_order.value = order;
form.filter_order_Dir.value = dir;
form.submit( view );
}
</script>
<div id="jem" class="jem_select_venue">
<h1 class='componentheading'>
<?php echo Text::_('COM_JEM_SELECT_VENUE'); ?>
</h1>
<div class="clr"></div>
<form action="<?php echo Route::_('index.php?option=com_jem&view=editevent&layout=choosevenue&tmpl=component&function='.$this->escape($function).'&'.Session::getFormToken().'=1'); ?>" method="post" name="adminForm" id="adminForm">
<div class="jem-row valign-baseline">
<div id="jem_filter" class="jem-form jem-row jem-justify-start">
<div>
<?php
echo '<label for="filter_type">'.Text::_('COM_JEM_FILTER').'</label>';
?>
</div>
<div class="jem-row jem-justify-start jem-nowrap">
<?php echo $this->searchfilter; ?>
<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->filter;?>" class="inputbox" onchange="document.adminForm.submit();" />
</div>
<div class="jem-row jem-justify-start jem-nowrap">
<button type="submit" class="pointer btn btn-primary"><?php echo Text::_('JSEARCH_FILTER_SUBMIT'); ?></button>
<button type="button" class="pointer btn btn-secondary" onclick="document.getElementById('filter_search').value='';this.form.submit();"><?php echo Text::_('JSEARCH_FILTER_CLEAR'); ?></button>
<button type="button" class="pointer btn btn-primary" onclick="if (window.parent) window.parent.<?php echo $this->escape($function);?>('', '<?php echo Text::_('COM_JEM_SELECT_VENUE') ?>');"><?php echo Text::_('COM_JEM_NOVENUE')?></button>
</div>
</div>
<div class="jem-row jem-justify-start jem-nowrap">
<div>
<?php echo '<label for="limit">'.Text::_('COM_JEM_DISPLAY_NUM').'</label>&nbsp;'; ?>
</div>
<div>&nbsp;</div>
<div>
<?php echo $this->pagination->getLimitBox(); ?>
</div>
</div>
</div>
<hr class="jem-hr"/>
<div class="jem-sort jem-sort-small">
<div class="jem-list-row jem-small-list">
<div class="sectiontableheader jem-venue-number"><?php echo Text::_('COM_JEM_NUM'); ?></div>
<div class="sectiontableheader jem-venue-name"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_VENUE', 'l.venue', $this->lists['order_Dir'], $this->lists['order'], 'selectvenue' ); ?></div>
<div class="sectiontableheader jem-venue-city"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_CITY', 'l.city', $this->lists['order_Dir'], $this->lists['order'], 'selectvenue' ); ?></div>
<div class="sectiontableheader jem-venue-state"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_STATE', 'l.state', $this->lists['order_Dir'], $this->lists['order']); ?></div>
<div class="sectiontableheader jem-venue-country"><?php echo Text::_('COM_JEM_COUNTRY'); ?></div>
</div>
</div>
<ul class="eventlist eventtable">
<?php if (empty($this->rows)) : ?>
<li class="jem-event jem-list-row jem-small-list"><?php echo Text::_('COM_JEM_NOVENUES'); ?></li>
<?php else :?>
<?php foreach ($this->rows as $i => $row) : ?>
<li class="jem-event jem-list-row jem-small-list row<?php echo $i % 2; ?>">
<div class="jem-event-info-small jem-venue-number">
<?php echo $this->pagination->getRowOffset( $i ); ?>
</div>
<div class="jem-event-info-small jem-venue-name">
<span <?php echo JEMOutput::tooltip(Text::_('COM_JEM_SELECT'), $row->venue, 'editlinktip selectvenue'); ?>>
<a class="pointer" onclick="if (window.parent) window.parent.<?php echo $this->escape($function);?>('<?php echo $row->id; ?>', '<?php echo $this->escape(addslashes($row->venue)); ?>');"><?php echo $this->escape($row->venue); ?></a>
</span>
</div>
<div class="jem-event-info-small jem-venue-city">
<?php echo $this->escape($row->city); ?>
</div>
<div class="jem-event-info-small jem-venue-state">
<?php echo $this->escape($row->state); ?>
</div>
<div class="jem-event-info-small jem-venue-country">
<?php echo !empty($row->country) ? $this->escape($row->country) : '-'; ?>
</div>
</li>
<?php endforeach; ?>
<?php endif; ?>
</ul>
<input type="hidden" name="task" value="selectvenue" />
<input type="hidden" name="option" value="com_jem" />
<input type="hidden" name="tmpl" value="component" />
<input type="hidden" name="function" value="<?php echo $this->escape($function); ?>" />
<input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
</form>
<div class="pagination">
<?php echo $this->pagination->getPagesLinks(); ?>
</div>
</div>

View File

@ -0,0 +1,319 @@
<?php
/**
* @package JEM
* @copyright (C) 2013-2024 joomlaeventmanager.net
* @copyright (C) 2005-2009 Christoph Lukes
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
*/
defined('_JEXEC') or die;
use Joomla\CMS\Router\Route;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Factory;
$app = Factory::getApplication();
$document = $app->getDocument();
$wa = $document->getWebAssetManager();
$wa->useScript('keepalive')
->useScript('form.validate');
// Create shortcut to parameters.
$params = $this->params;
// $settings = json_decode($this->item->attribs);
?>
<script>
jQuery(document).ready(function($){
function checkmaxplaces(){
var maxplaces = $('jform_maxplaces');
if (maxplaces != null){
$('#jform_maxplaces').on('change', function(){
if ($('#event-available')) {
var val = parseInt($('#jform_maxplaces').val());
var booked = parseInt($('#event-booked').val());
$('event-available').val() = (val-booked);
}
});
$('#jform_maxplaces').on('keyup', function(){
if ($('event-available')) {
var val = parseInt($('jform_maxplaces').val());
var booked = parseInt($('event-booked').val());
$('event-available').val() = (val-booked);
}
});
}
}
checkmaxplaces();
});
</script>
<script>
$(document).ready(function () {
var $registraCheckbox = $('input[name="jform[registra]"]');
var $restOfContent = $(".jem-dl-rest").children("dd, dt");
$registraCheckbox.on("change", function () {
if ($(this).is(":checked")) {
$restOfContent.show();
} else {
$restOfContent.hide();
}
});
var $minBookedUserInput = $("#jform_minbookeduser");
var $maxBookedUserInput = $("#jform_maxbookeduser");
var $maxPlacesInput = $("#jform_maxplaces");
var $reservedPlacesInput = $("#jform_reservedplaces");
$minBookedUserInput
.add($maxBookedUserInput)
.add($maxPlacesInput)
.add($reservedPlacesInput)
.on("change", function () {
var minBookedUserValue = parseInt($minBookedUserInput.val());
var maxBookedUserValue = parseInt($maxBookedUserInput.val());
var maxPlacesValue = parseInt($maxPlacesInput.val());
var reservedPlacesValue = parseInt($reservedPlacesInput.val());
if (minBookedUserValue > maxPlacesValue && maxPlacesValue != 0) {
$minBookedUserInput.val(maxPlacesValue);
}
if (maxBookedUserValue > maxPlacesValue && maxPlacesValue != 0) {
$maxBookedUserInput.val(maxPlacesValue);
}
if (minBookedUserValue > maxBookedUserValue) {
$minBookedUserInput.val(maxBookedUserValue);
}
if (reservedPlacesValue > maxPlacesValue && maxPlacesValue != 0) {
$reservedPlacesInput.val(maxPlacesValue);
}
});
// Trigger the change event on page load to initialize the state
$registraCheckbox.change();
$minBookedUserInput.change();
});
</script>
<script>
Joomla.submitbutton = function(task) {
if (task == 'event.cancel' || document.formvalidator.isValid(document.getElementById('adminForm'))) {
<?php //echo $this->form->getField('articletext')->save(); ?>
Joomla.submitform(task);
} else {
alert('<?php echo $this->escape(Text::_('JGLOBAL_VALIDATION_FORM_FAILED'));?>');
}
}
</script>
<script>
// window.addEvent('domready', function(){
jQuery(document).ready(function($){
var showUnregistraUntil = function(){
var unregistra = $("#jform_unregistra");
var unregistramode = unregistra.val();
if (unregistramode == 2) {
document.getElementById('unregistra_until').style.display = '';
document.getElementById('unregistra_until2').style.display = '';
document.getElementById('jform_unregistra_until').style.display = '';
document.getElementById('jform_unregistra_until2').style.display = '';
} else {
document.getElementById('unregistra_until').style.display = 'none';
document.getElementById('unregistra_until2').style.display = 'none';
document.getElementById('jform_unregistra_until').style.display = 'none';
document.getElementById('jform_unregistra_until2').style.display = 'none';
}
}
$("#jform_unregistra").on('change', showUnregistraUntil);
showUnregistraUntil();
});
jQuery(document).ready(function($){
var showRegistraFrom = function(){
var registra = $("#jform_registra");
var registramode = registra.val();
if (registramode == 2) {
document.getElementById('registra_from').style.display = '';
document.getElementById('registra_from2').style.display = '';
document.getElementById('registra_until').style.display = '';
document.getElementById('registra_until2').style.display = '';
document.getElementById('jform_registra_from').style.display = '';
document.getElementById('jform_registra_from2').style.display = '';
document.getElementById('jform_registra_until').style.display = '';
document.getElementById('jform_registra_until2').style.display = '';
} else {
document.getElementById('registra_from').style.display = 'none';
document.getElementById('registra_from2').style.display = 'none';
document.getElementById('registra_until').style.display = 'none';
document.getElementById('registra_until2').style.display = 'none';
document.getElementById('jform_registra_from').style.display = 'none';
document.getElementById('jform_registra_from2').style.display = 'none';
document.getElementById('jform_registra_until').style.display = 'none';
document.getElementById('jform_registra_until2').style.display = 'none';
}
}
$("#jform_registra").on('change', showRegistraFrom);
showRegistraFrom();
});
</script>
<div id="jem" class="jem_editevent<?php echo $this->pageclass_sfx; ?>">
<div class="edit item-page">
<?php if ($params->get('show_page_heading')) : ?>
<h1>
<?php echo $this->escape($params->get('page_heading')); ?>
</h1>
<?php endif; ?>
<form enctype="multipart/form-data" action="<?php echo Route::_('index.php?option=com_jem&a_id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="adminForm" class="form-validate">
<button type="submit" class="btn btn-primary" onclick="Joomla.submitbutton('event.save')"><?php echo Text::_('JSAVE') ?></button>
<button type="cancel" class="btn btn-secondary" onclick="Joomla.submitbutton('event.cancel')"><?php echo Text::_('JCANCEL') ?></button>
<br>
<?php if ($this->item->recurrence_type > 0) : ?>
<div class="description warningrecurrence" style="clear: both;">
<div style="float:left;">
<?php echo JemOutput::recurrenceicon($this->item, false, false); ?>
</div>
<div class="floattext" style="margin-left:36px;">
<strong><?php echo Text::_('COM_JEM_EDITEVENT_WARN_RECURRENCE_TITLE'); ?></strong>
<br>
<?php
if (!empty($this->item->recurrence_type) && empty($this->item->recurrence_first_id)) {
echo nl2br(Text::_('COM_JEM_EDITEVENT_WARN_RECURRENCE_FIRST_TEXT'));
} else {
echo nl2br(Text::_('COM_JEM_EDITEVENT_WARN_RECURRENCE_TEXT'));
}
?>
</div>
</div>
<?php endif; ?>
<?php if ($this->params->get('showintrotext')) : ?>
<div class="description no_space floattext">
<?php echo $this->params->get('introtext'); ?>
</div>
<?php endif; ?>
<?php //echo HTMLHelper::_('tabs.start', 'det-pane'); ?>
<!-- DETAILS TAB -->
<?php //echo HTMLHelper::_('tabs.panel', Text::_('COM_JEM_EDITEVENT_INFO_TAB'), 'editevent-infotab'); ?>
<?php echo HTMLHelper::_('uitab.startTabSet', 'myTab', ['active' => 'editevent-infotab', 'recall' => true, 'breakpoint' => 768]); ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'editevent-infotab', Text::_('COM_JEM_EDITEVENT_INFO_TAB')); ?>
<fieldset class="adminform">
<legend><?php echo Text::_('COM_JEM_EDITEVENT_DETAILS_LEGEND'); ?></legend>
<dl class="jem-dl">
<dt><?php echo $this->form->getLabel('title'); ?></dt>
<dd><?php echo $this->form->getInput('title'); ?></dd>
<?php if (is_null($this->item->id)) : ?>
<dt><?php echo $this->form->getLabel('alias'); ?></dt>
<dd><?php echo $this->form->getInput('alias'); ?></dd>
<?php endif; ?>
<dt><?php echo $this->form->getLabel('dates'); ?></dt>
<dd><?php echo $this->form->getInput('dates'); ?></dd>
<dt><?php echo $this->form->getLabel('enddates'); ?></dt>
<dd><?php echo $this->form->getInput('enddates'); ?></dd>
<dt><?php echo $this->form->getLabel('times'); ?></dt>
<dd><?php echo $this->form->getInput('times'); ?></dd>
<dt><?php echo $this->form->getLabel('endtimes'); ?></dt>
<dd><?php echo $this->form->getInput('endtimes'); ?></dd>
<dt><?php echo $this->form->getLabel('cats'); ?></dt>
<dd><?php echo $this->form->getInput('cats'); ?></dd>
<dt><?php echo $this->form->getLabel('locid'); ?></dt>
<dd><?php echo $this->form->getInput('locid'); ?></dd>
</dl>
</fieldset>
<!-- EVENTDESCRIPTION -->
<fieldset class="adminform">
<legend><?php echo Text::_('COM_JEM_EDITEVENT_DESCRIPTION_LEGEND'); ?></legend>
<div>
<?php echo $this->form->getLabel('articletext'); ?>
<?php echo $this->form->getInput('articletext'); ?>
</div>
</fieldset>
<!-- IMAGE -->
<?php if ($this->item->datimage || $this->jemsettings->imageenabled != 0) : ?>
<fieldset class="jem_fldst_image">
<legend><?php echo Text::_('COM_JEM_IMAGE'); ?></legend>
<?php if ($this->jemsettings->imageenabled != 0) : ?>
<dl class="adminformlist jem-dl">
<dt><?php echo $this->form->getLabel('userfile'); ?></dt>
<?php if ($this->item->datimage) : ?>
<dd>
<?php echo JEMOutput::flyer($this->item, $this->dimage, 'event', 'datimage'); ?>
<input type="hidden" name="datimage" id="datimage" value="<?php echo $this->item->datimage; ?>" />
</dd>
<dt> </dt>
<?php endif; ?>
<dd><?php echo $this->form->getInput('userfile'); ?></dd>
<dt> </dt>
<dd><button type="button" class="button3 btn btn-secondary" onclick="document.getElementById('jform_userfile').value = ''"><?php echo Text::_('JSEARCH_FILTER_CLEAR') ?></button></dd>
<?php if ($this->item->datimage) : ?>
<dt><?php echo Text::_('COM_JEM_REMOVE_IMAGE'); ?></dt>
<dd><?php
echo HTMLHelper::image('media/com_jem/images/publish_r.png', null, array('id' => 'userfile-remove', 'data-id' => $this->item->id, 'data-type' => 'events', 'title' => Text::_('COM_JEM_REMOVE_IMAGE'), 'class' => 'btn')); ?>
</dd>
<?php endif; ?>
</dl>
<input type="hidden" name="removeimage" id="removeimage" value="0" />
<?php endif; ?>
</fieldset>
<?php endif; ?>
<!-- EXTENDED TAB -->
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'editevent-extendedtab', Text::_('COM_JEM_EDITEVENT_EXTENDED_TAB')); ?>
<?php //echo HTMLHelper::_('tabs.panel', Text::_('COM_JEM_EDITEVENT_EXTENDED_TAB'), 'editevent-extendedtab'); ?>
<?php echo $this->loadTemplate('extended'); ?>
<!-- PUBLISH TAB -->
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'editevent-publishtab', Text::_('COM_JEM_EDITEVENT_PUBLISH_TAB')); ?>
<?php //echo HTMLHelper::_('tabs.panel', Text::_('COM_JEM_EDITEVENT_PUBLISH_TAB'), 'editevent-publishtab'); ?>
<?php echo $this->loadTemplate('publish'); ?>
<!-- ATTACHMENTS TAB -->
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php if (!empty($this->item->attachments) || ($this->jemsettings->attachmentenabled != 0)) : ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'event-attachments', Text::_('COM_JEM_EVENT_ATTACHMENTS_TAB')); ?>
<?php //echo HTMLHelper::_('tabs.panel', Text::_('COM_JEM_EVENT_ATTACHMENTS_TAB'), 'event-attachments'); ?>
<?php echo $this->loadTemplate('attachments'); ?>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php endif; ?>
<!-- OTHER TAB -->
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'event-other', Text::_('COM_JEM_EVENT_OTHER_TAB')); ?>
<?php //echo HTMLHelper::_('tabs.panel', Text::_('COM_JEM_EVENT_OTHER_TAB'), 'event-other'); ?>
<?php echo $this->loadTemplate('other'); ?>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php //echo HTMLHelper::_('tabs.end'); ?>
<input type="hidden" name="task" value="" />
<input type="hidden" name="return" value="<?php echo $this->return_page; ?>" />
<input type="hidden" name="author_ip" value="<?php echo $this->item->author_ip; ?>" />
<?php if ($this->params->get('enable_category', 0) == 1) : ?>
<input type="hidden" name="jform[catid]" value="<?php echo $this->params->get('catid', 1); ?>" />
<?php endif; ?>
<?php echo HTMLHelper::_('form.token'); ?>
</form>
</div>
<div class="copyright">
<?php echo JemOutput::footer(); ?>
</div>
</div>

View File

@ -0,0 +1,90 @@
<?php
/**
* @package JEM
* @copyright (C) 2013-2024 joomlaeventmanager.net
* @copyright (C) 2005-2009 Christoph Lukes
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
*/
defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Session\Session;
?>
<fieldset>
<legend><?php echo Text::_('COM_JEM_ATTACHMENTS_LEGEND'); ?></legend>
<table class="adminform">
<tbody>
<?php foreach ($this->item->attachments as $file) : ?>
<tr>
<td style="width: 100%;">
<dl class="jem-dl">
<dt><?php echo Text::_('COM_JEM_ATTACHMENT_FILE'); ?></dt>
<dd><input class="readonly" type="text" readonly="readonly" value="<?php echo $file->file; ?>" /></dd>
<dd><input type="hidden" name="attached-id[]" value="<?php echo $file->id; ?>" /></dd>
<dt><?php echo Text::_('COM_JEM_ATTACHMENT_NAME'); ?></dt>
<?php /* name is always editable, also if attachemnt upload is not allowed */ ?>
<dd><input type="text" name="attached-name[]" value="<?php echo $file->name; ?>" /></dd>
<dt><?php echo Text::_('COM_JEM_ATTACHMENT_DESCRIPTION'); ?></dt>
<?php /* description is always editable, also if attachemnt upload is not allowed */ ?>
<dd><input type="text" name="attached-desc[]" value="<?php echo $file->description; ?>" /></dd>
</dl>
<?php if ($this->jemsettings->attachmentenabled != 0) : ?>
<?php //This button just deletes the dl because two times more getParent() in attachment.js is required
?>
<?php echo Text::_('COM_JEM_GLOBAL_REMOVE_ATTACHEMENT') . ' ' . $file->name; ?>
<?php echo JemOutput::removebutton(Text::_('COM_JEM_GLOBAL_REMOVE_ATTACHEMENT'), array('id' => 'attach-remove' . $file->id . ':' . Session::getFormToken(), 'class' => 'attach-remove', 'title' => Text::_('COM_JEM_GLOBAL_REMOVE_ATTACHEMENT'))); ?>
<?php endif; ?>
</td>
<td>
<div>
<div><?php echo Text::_('COM_JEM_ATTACHMENT_ACCESS'); ?></div>
<?php
$attribs = array('class' => 'inputbox form-control', 'size' => '7');
/* if attachment upload is not allowed changing access level should also not possible */
if ($this->jemsettings->attachmentenabled == 0) :
$attribs['disabled'] = 'disabled';
endif;
echo HTMLHelper::_('select.genericlist', $this->access, 'attached-access[]', $attribs, 'value', 'text', $file->access);
?>
</div>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<p>&nbsp;</p>
<legend><?php echo Text::_('COM_JEM_ADD_USER_REGISTRATIONS') . ' ' . Text::_('COM_JEM_ATTACHMENTS_LEGEND'); ?></legend>
<table class="adminform" id="el-attachments">
<tbody>
<?php if ($this->jemsettings->attachmentenabled != 0) : ?>
<tr>
<td style="width: 100%;">
<dl class="jem-dl">
<dt><?php echo Text::_('COM_JEM_ATTACHMENT_FILE'); ?></dt>
<dd><input type="file" name="attach[]" class="attach-field" /><input type="reset" value="<?php echo Text::_('JSEARCH_FILTER_CLEAR') ?>" class="btn btn-primary"></dd>
<dt><?php echo Text::_('COM_JEM_ATTACHMENT_NAME'); ?></dt>
<dd><input type="text" name="attach-name[]" class="attach-name" value="" /></dd>
<dt><?php echo Text::_('COM_JEM_ATTACHMENT_DESCRIPTION'); ?></dt>
<dd><input type="text" name="attach-desc[]" class="attach-desc" value="" /></dd>
</dl>
</td>
<td>
<div>
<div><?php echo Text::_('COM_JEM_ATTACHMENT_ACCESS'); ?></div>
<?php echo HTMLHelper::_('select.genericlist', $this->access, 'attach-access[]', array('class' => 'inputbox form-control', 'size' => '7'), 'value', 'text', 1); ?>
</div>
</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</fieldset>

View File

@ -0,0 +1,250 @@
<?php
/**
* @package JEM
* @copyright (C) 2013-2024 joomlaeventmanager.net
* @copyright (C) 2005-2009 Christoph Lukes
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Date\Date;
?>
<!-- RECURRENCE START -->
<fieldset class="panelform" style="margin:0">
<legend><?php echo Text::_('COM_JEM_RECURRENCE'); ?></legend>
<dl class="adminformlist jem-dl">
<dt><?php echo $this->form->getLabel('recurrence_type'); ?></dt>
<dd><?php echo $this->form->getInput('recurrence_type', null, $this->item->recurrence_type); ?></dd>
<dt> </dt>
<dd id="recurrence_output">
</dd>
<dt> </dt>
<dd>
<div id="counter_row" style="display: none;">
<?php echo $this->form->getLabel('recurrence_limit_date'); ?>
<?php echo $this->form->getInput('recurrence_limit_date', null, $this->item->recurrence_limit_date); ?>
<br>
<div class="recurrence_notice"><small>
<?php
switch ($this->item->recurrence_type) {
case 1:
$anticipation = $this->jemsettings->recurrence_anticipation_day;
break;
case 2:
$anticipation = $this->jemsettings->recurrence_anticipation_week;
break;
case 3:
$anticipation = $this->jemsettings->recurrence_anticipation_month;
break;
case 4:
$anticipation = $this->jemsettings->recurrence_anticipation_week;
break;
case 5:
$anticipation = $this->jemsettings->recurrence_anticipation_year;
break;
default:
$anticipation = $this->jemsettings->recurrence_anticipation_day;
break;
}
$limitdate = new Date('now +' . $anticipation . 'month');
$limitdate = JemOutput::formatLongDateTime($limitdate->format('Y-m-d'), '');
echo Text::sprintf(Text::_('COM_JEM_EDITEVENT_NOTICE_GENSHIELD'), $limitdate);
?></small></div>
</div>
</dd>
</dl>
<input type="hidden" name="recurrence_number" id="recurrence_number" value="<?php echo $this->item->recurrence_number; ?>" />
<input type="hidden" name="recurrence_number_saved" id="recurrence_number_saved" value="<?php echo $this->item->recurrence_number;?>"></input>
<input type="hidden" name="recurrence_byday" id="recurrence_byday" value="<?php echo $this->item->recurrence_byday; ?>" />
<script>
<!--
var $select_output = new Array();
$select_output[1] = "<?php
echo Text::_('COM_JEM_OUTPUT_DAY');
?>";
$select_output[2] = "<?php
echo Text::_('COM_JEM_OUTPUT_WEEK');
?>";
$select_output[3] = "<?php
echo Text::_('COM_JEM_OUTPUT_MONTH');
?>";
$select_output[4] = "<?php
echo Text::_('COM_JEM_OUTPUT_WEEKDAY');
?>";
$select_output[5] = "<?php
echo Text::_('COM_JEM_OUTPUT_YEAR');
?>";
var $weekday = new Array();
$weekday[0] = new Array("MO", "<?php echo Text::_('COM_JEM_MONDAY'); ?>");
$weekday[1] = new Array("TU", "<?php echo Text::_('COM_JEM_TUESDAY'); ?>");
$weekday[2] = new Array("WE", "<?php echo Text::_('COM_JEM_WEDNESDAY'); ?>");
$weekday[3] = new Array("TH", "<?php echo Text::_('COM_JEM_THURSDAY'); ?>");
$weekday[4] = new Array("FR", "<?php echo Text::_('COM_JEM_FRIDAY'); ?>");
$weekday[5] = new Array("SA", "<?php echo Text::_('COM_JEM_SATURDAY'); ?>");
$weekday[6] = new Array("SU", "<?php echo Text::_('COM_JEM_SUNDAY'); ?>");
var $before_last = "<?php
echo Text::_('COM_JEM_BEFORE_LAST');
?>";
var $last = "<?php
echo Text::_('COM_JEM_LAST');
?>";
start_recurrencescript("jform_recurrence_type");
-->
</script>
<?php /* show "old" recurrence settings for information */
if (!empty($this->item->recurr_bak->recurrence_type)) {
$recurr_type = '';
$rlDate = $this->item->recurr_bak->recurrence_limit_date;
$recurrence_first_id = $this->item->recurr_bak->recurrence_first_id;
if (!empty($rlDate)) {
$recurr_limit_date = JemOutput::formatdate($rlDate);
} else {
$recurr_limit_date = Text::_('COM_JEM_UNLIMITED');
}
switch ($this->item->recurr_bak->recurrence_type) {
case 1:
$recurr_type = Text::_('COM_JEM_DAILY');
$recurr_info = str_ireplace('[placeholder]',
$this->item->recurr_bak->recurrence_number,
Text::_('COM_JEM_OUTPUT_DAY'));
break;
case 2:
$recurr_type = Text::_('COM_JEM_WEEKLY');
$recurr_info = str_ireplace('[placeholder]',
$this->item->recurr_bak->recurrence_number,
Text::_('COM_JEM_OUTPUT_WEEK'));
break;
case 3:
$recurr_type = Text::_('COM_JEM_MONTHLY');
$recurr_info = str_ireplace('[placeholder]',
$this->item->recurr_bak->recurrence_number,
Text::_('COM_JEM_OUTPUT_MONTH'));
break;
case 4:
$recurr_type = Text::_('COM_JEM_WEEKDAY');
$recurr_byday = preg_replace('/(,)([^ ,]+)/', '$1 $2', $this->item->recurr_bak->recurrence_byday);
$recurr_days = str_ireplace(array('MO', 'TU', 'WE', 'TH', 'FR', 'SA', 'SO'),
array(Text::_('COM_JEM_MONDAY'), Text::_('COM_JEM_TUESDAY'),
Text::_('COM_JEM_WEDNESDAY'), Text::_('COM_JEM_THURSDAY'),
Text::_('COM_JEM_FRIDAY'), Text::_('COM_JEM_SATURDAY'),
Text::_('COM_JEM_SUNDAY')),
$recurr_byday);
$recurr_num = str_ireplace(array('6', '7'),
array(Text::_('COM_JEM_LAST'), Text::_('COM_JEM_BEFORE_LAST')),
$this->item->recurr_bak->recurrence_number);
$recurr_info = str_ireplace(array('[placeholder]', '[placeholder_weekday]'),
array($recurr_num, $recurr_days),
Text::_('COM_JEM_OUTPUT_WEEKDAY'));
break;
case 5:
$recurr_type = Text::_('COM_JEM_YEARLY');
$recurr_info = str_ireplace('[placeholder]',
$this->item->recurr_bak->recurrence_number,
Text::_('COM_JEM_OUTPUT_YEAR'));
break;
default:
break;
}
if (!empty($recurr_type)) {
?>
<hr class="jem-hr" />
<p><strong><?php echo Text::_('COM_JEM_RECURRING_INFO_TITLE'); ?></strong></p>
<dl class="adminformlist jem-dl">
<dt><label><?php echo Text::_('COM_JEM_RECURRING_FIRST_EVENT_ID'); ?></label></dt>
<dd><input type="text" class="readonly" readonly="readonly" value="<?php echo $recurrence_first_id; ?>"></dd>
<dt><label><?php echo Text::_('COM_JEM_RECURRENCE'); ?></label></dt>
<dd><input type="text" class="readonly" readonly="readonly" value="<?php echo $recurr_type; ?>"></dd>
<dt><label> </label></dt>
<dd><?php echo $recurr_info; ?></dd>
<dt><label><?php echo Text::_('COM_JEM_RECURRENCE_COUNTER'); ?></label></dt>
<dd><input type="text" class="readonly" readonly="readonly" value="<?php echo $recurr_limit_date; ?>"></dd>
</dl>
<?php
}
} ?>
</fieldset>
<!-- RECURRENCE END -->
<hr />
<!-- CONTACT START -->
<fieldset class="panelform" style="margin:0">
<legend><?php echo Text::_('COM_JEM_EDITEVENT_FIELD_CONTACT'); ?></legend>
<dl class="jem-dl">
<dt><?php echo $this->form->getLabel('contactid'); ?></dt>
<dd><?php echo $this->form->getInput('contactid'); ?></dd>
</dl>
</fieldset>
<!-- CONTACT END -->
<hr />
<!-- REGISTRATION START -->
<fieldset class="" style="margin:0">
<legend><?php echo Text::_('COM_JEM_EVENT_REGISTRATION_LEGEND'); ?></legend>
<dl class="adminformlist jem-dl">
<?php if ($this->jemsettings->showfroregistra == 0) : ?>
<dt><?php echo $this->form->getLabel('registra'); ?></dt>
<dd><?php echo Text::_('JNO'); ?></dd>
<?php else : ?>
<?php if ($this->jemsettings->showfroregistra == 1) : ?>
<dt><?php echo $this->form->getLabel('registra'); ?></dt>
<dd><?php echo Text::_('JYES'); ?></dd>
<?php else : ?>
<dt><?php echo $this->form->getLabel('registra'); ?></dt>
<dd><?php echo $this->form->getInput('registra'); ?></dd>
<dt><div id="registra_from"><span id="jform_registra_from2"><?php echo Text::_('COM_JEM_EVENT_FIELD_REGISTRATION_FROM'); ?><?php echo Text::_('COM_JEM_EVENT_FIELD_REGISTRATION_FROM_POSTFIX'); ?></span></div></dt>
<dd><div id="registra_from2"><?php echo $this->form->getInput('registra_from'); ?></div> </dd>
<dt><div id="registra_until"><span id="jform_registra_until2"><?php echo Text::_('COM_JEM_EVENT_FIELD_REGISTRATION_UNTIL'); ?><?php echo Text::_('COM_JEM_EVENT_FIELD_REGISTRATION_UNTIL_POSTFIX'); ?></span></div></dt>
<dd><div id="registra_until2"><?php echo $this->form->getInput('registra_until'); ?></span></div></dd>
<?php endif; ?>
</dl>
<dl class="adminformlist jem-dl jem-dl-rest">
<?php if ($this->jemsettings->regallowinvitation == 1) : ?>
<dt><?php echo $this->form->getLabel('reginvitedonly'); ?></dt>
<dd><?php echo $this->form->getInput('reginvitedonly'); ?></dd>
<?php endif; ?>
<dt><?php echo $this->form->getLabel('unregistra'); ?></dt>
<dd><?php echo $this->form->getInput('unregistra'); ?></dd>
<dt><div id="unregistra_until"><span id="jform_unregistra_until2"><?php echo Text::_('COM_JEM_EVENT_FIELD_ANNULATION_UNTIL'); ?></span></div></dt>
<dd><div id="unregistra_until2"><?php echo $this->form->getInput('unregistra_until'); ?></div></dd>
<dt><?php echo $this->form->getLabel('maxplaces'); ?></dt>
<dd><?php echo $this->form->getInput('maxplaces'); ?></dd>
<dt><?php echo $this->form->getLabel('minbookeduser'); ?></dt>
<dd><?php echo $this->form->getInput('minbookeduser'); ?></dd>
<dt><?php echo $this->form->getLabel('maxbookeduser'); ?></dt>
<dd><?php echo $this->form->getInput('maxbookeduser'); ?></dd>
<dt><label style='margin-top: 1rem;'><?php echo Text::_ ('COM_JEM_EDITEVENT_FIELD_RESERVED_PLACES');?></label><br></dt>
<dd><?php echo $this->form->getInput('reservedplaces'); ?></dd>
<dt><?php echo $this->form->getLabel('waitinglist'); ?></dt>
<dd><?php echo $this->form->getInput('waitinglist'); ?></dd>
<dt><?php echo $this->form->getLabel('requestanswer'); ?></dt>
<dd><?php echo $this->form->getInput('requestanswer'); ?></dd>
<dt><?php echo $this->form->getLabel('seriesbooking'); ?></dt>
<dd><?php echo $this->form->getInput('seriesbooking'); ?></dd>
<dt><?php echo $this->form->getLabel('singlebooking'); ?></dt>
<dd><?php echo $this->form->getInput('singlebooking'); ?></dd>
<?php if ($this->jemsettings->regallowinvitation == 1) : ?>
<dt><?php echo $this->form->getLabel('invited'); ?></dt>
<dd><?php echo $this->form->getInput('invited'); ?></dd>
<?php endif; ?>
<dt><label style='margin-top: 1rem;'><?php echo Text::_ ('COM_JEM_EDITEVENT_FIELD_BOOKED_PLACES');?></label><br></dt>
<dd><?php echo '<input id="event-booked" class="form-control readonly inputbox" type="text" readonly="true" value="' . $this->item->booked . '" />'; ?></dd>
<?php if ($this->item->maxplaces) : ?>
<dt><?php echo $this->form->getLabel('avplaces'); ?></dt>
<dd><?php echo '<input id="event-available" class="form-control readonly inputbox" type="text" readonly="true" value="' . ($this->item->maxplaces-$this->item->booked-$this->item->reservedplaces) . '" />'; ?></dd>
<?php endif; ?>
<?php endif; ?>
</dl>
</fieldset>

View File

@ -0,0 +1,38 @@
<?php
/**
* @package JEM
* @copyright (C) 2013-2024 joomlaeventmanager.net
* @copyright (C) 2005-2009 Christoph Lukes
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
*/
defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;
$max_custom_fields = $this->settings->get('global_editevent_maxnumcustomfields', -1); // default to All
?>
<!-- CUSTOM FIELDS -->
<?php if ($max_custom_fields != 0) : ?>
<fieldset class="panelform">
<legend><?php echo Text::_('COM_JEM_EVENT_CUSTOMFIELDS_LEGEND'); ?></legend>
<dl class="adminformlist jem-dl-long">
<?php
$fields = $this->form->getFieldset('custom');
if ($max_custom_fields < 0) :
$max_custom_fields = count($fields);
endif;
$cnt = 0;
foreach ($fields as $field) :
if (++$cnt <= $max_custom_fields) :
?>
<dt><?php echo $field->label; ?></dt>
<dd><?php echo $field->input; ?></dd>
<?php
endif;
endforeach;
?>
</dl>
</fieldset>
<?php endif; ?>

View File

@ -0,0 +1,91 @@
<?php
/**
* @package JEM
* @copyright (C) 2013-2024 joomlaeventmanager.net
* @copyright (C) 2005-2009 Christoph Lukes
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
*/
defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper;
?>
<fieldset class="adminform">
<legend><?php echo Text::_('COM_JEM_EDITEVENT_PUBLISH_TAB'); ?></legend>
<dl class="jem-dl">
<dt><?php echo $this->form->getLabel('featured'); ?></dt>
<dd><?php echo $this->form->getInput('featured'); ?></dd>
<dt><?php echo $this->form->getLabel('published'); ?></dt>
<dd><?php echo $this->form->getInput('published'); ?></dd>
<dt><?php echo $this->form->getLabel('access'); ?></dt>
<dd><?php
echo HTMLHelper::_(
'select.genericlist',
$this->access,
'jform[access]',
array('list.attr' => ' class="form-select inputbox" size="1"', 'list.select' => $this->item->access, 'option.attr' => 'disabled', 'id' => 'access')
);
?>
</dd>
<p>&nbsp;</p>
</fieldset>
<!-- START META FIELDSET -->
<fieldset class="adminform">
<legend><?php echo Text::_('COM_JEM_METADATA'); ?></legend>
<div class="formelm-area">
<input class="inputbox btn btn-secondary" type="button" onclick="insert_keyword('[title]')" value="<?php echo Text::_('COM_JEM_TITLE'); ?>" />
<input class="inputbox btn btn-secondary" type="button" onclick="insert_keyword('[a_name]')" value="<?php echo Text::_('COM_JEM_VENUE'); ?>" />
<input class="inputbox btn btn-secondary" type="button" onclick="insert_keyword('[categories]')" value="<?php echo Text::_('COM_JEM_CATEGORIES'); ?>" />
<input class="inputbox btn btn-secondary" type="button" onclick="insert_keyword('[dates]')" value="<?php echo Text::_('COM_JEM_DATE'); ?>" />
<input class="inputbox btn btn-secondary" type="button" onclick="insert_keyword('[times]')" value="<?php echo Text::_('COM_JEM_TIME'); ?>" />
<input class="inputbox btn btn-secondary" type="button" onclick="insert_keyword('[enddates]')" value="<?php echo Text::_('COM_JEM_ENDDATE'); ?>" />
<input class="inputbox btn btn-secondary" type="button" onclick="insert_keyword('[endtimes]')" value="<?php echo Text::_('COM_JEM_ENDTIME'); ?>" />
<br />
<br />
<?php
if (!empty($this->item->meta_keywords)) {
$meta_keywords = $this->item->meta_keywords;
} else {
$meta_keywords = $this->jemsettings->meta_keywords;
}
?>
<dl class="jem-dl">
<dt>
<label for="meta_keywords">
<?php echo Text::_('COM_JEM_META_KEYWORDS') . ':'; ?>
</label>
</dt>
<dd><textarea class="inputbox" name="meta_keywords" id="meta_keywords" rows="5" cols="40" maxlength="150" onfocus="get_inputbox('meta_keywords')" onblur="change_metatags()"><?php echo $meta_keywords; ?></textarea></dd>
</dl>
</div>
<div class="formelm-area">
<?php
if (!empty($this->item->meta_description)) {
$meta_description = $this->item->meta_description;
} else {
$meta_description = $this->jemsettings->meta_description;
}
?>
<dl class="jem-dl">
<dt>
<label for="meta_description">
<?php echo Text::_('COM_JEM_META_DESCRIPTION') . ':'; ?>
</label>
</dt>
<dd><textarea class="inputbox" name="meta_description" id="meta_description" rows="5" cols="40" maxlength="200" onfocus="get_inputbox('meta_description')" onblur="change_metatags()"><?php echo $meta_description; ?></textarea></dd>
</dl>
</div>
<!-- include the metatags end-->
<script>
<!--
starter("<?php
echo Text::_('COM_JEM_META_ERROR');
?>"); // window.onload is already in use, call the function manualy instead
-->
</script>
</fieldset>

View File

@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@ -0,0 +1,424 @@
<?php
/**
* @package JEM
* @copyright (C) 2013-2024 joomlaeventmanager.net
* @copyright (C) 2005-2009 Christoph Lukes
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\Factory;
/**
* Editevent-View
*/
class JemViewEditevent extends JemView
{
protected $form;
protected $item;
protected $return_page;
protected $state;
/**
* Editevent-View
*/
public function display($tpl = null)
{
if ($this->getLayout() == 'choosevenue') {
$this->_displaychoosevenue($tpl);
return;
}
if ($this->getLayout() == 'choosecontact') {
$this->_displaychoosecontact($tpl);
return;
}
if ($this->getLayout() == 'chooseusers') {
$this->_displaychooseusers($tpl);
return;
}
// Initialise variables.
$jemsettings = JemHelper::config();
$settings = JemHelper::globalattribs();
$app = Factory::getApplication();
$user = JemFactory::getUser();
$userId = $user->get('id');
$document = $app->getDocument();
$model = $this->getModel();
$menu = $app->getMenu();
$menuitem = $menu->getActive();
$pathway = $app->getPathway();
$url = Uri::root();
// Get model data.
$this->state = $this->get('State');
$this->item = $this->get('Item');
$this->params = $this->state->get('params');
// Create a shortcut for $item and params.
$item = $this->item;
$params = $this->params;
$this->form = $this->get('Form');
$this->return_page = $this->get('ReturnPage');
$this->invited = (array)$this->get('InvitedUsers');
// check for data error
if (empty($item)) {
$app->enqueueMessage(Text::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error');
return false;
}
// check for guest
if ($userId == 0) {
$app->enqueueMessage(Text::_('JERROR_ALERTNOAUTHOR'), 'error');
return false;
}
if (empty($item->id)) {
$authorised = (bool)$user->can('add', 'event');
} else {
$authorised = (bool)$item->params->get('access-edit');
}
$access = isset($item->access) ? $item->access : 0;
$authorised = $authorised && in_array($access, $user->getAuthorisedViewLevels());
if ($authorised !== true) {
$app->enqueueMessage(Text::_('JERROR_ALERTNOAUTHOR'), 'error');
return false;
}
// Decide which parameters should take priority
$useMenuItemParams = ($menuitem && ($menuitem->query['option'] == 'com_jem')
&& ($menuitem->query['view'] == 'editevent')
&& (0 == $item->id) && (!isset($_GET['from_id']))); // menu item is always for new event
$title = ($item->id == 0) ? Text::_('COM_JEM_EDITEVENT_ADD_EVENT')
: Text::sprintf('COM_JEM_EDITEVENT_EDIT_EVENT', $item->title);
if ($useMenuItemParams) {
$pagetitle = $menuitem->title ? $menuitem->title : $title;
$params->def('page_title', $pagetitle);
$params->def('page_heading', $pagetitle);
$pathwayKeys = array_keys($pathway->getPathway());
$lastPathwayEntryIndex = end($pathwayKeys);
$pathway->setItemName($lastPathwayEntryIndex, $menuitem->title);
//$pathway->setItemName(1, $menuitem->title);
// Load layout from menu item if one is set else from event if there is one set
if (isset($menuitem->query['layout'])) {
$this->setLayout($menuitem->query['layout']);
} elseif ($layout = $item->params->get('event_layout')) {
$this->setLayout($layout);
}
$item->params->merge($params);
} else {
$pagetitle = $title;
$params->set('page_title', $pagetitle);
$params->set('page_heading', $pagetitle);
$params->set('show_page_heading', 1); // ensure page heading is shown
$params->set('introtext', ''); // there is definitely no introtext.
$params->set('showintrotext', 0);
$pathway->addItem($pagetitle, ''); // link not required here so '' is ok
// Check for alternative layouts (since we are not in an edit-event menu item)
// Load layout from event if one is set
if ($layout = $item->params->get('event_layout')) {
$this->setLayout($layout);
}
$temp = clone($params);
$temp->merge($item->params);
$item->params = $temp;
}
if (!empty($this->item) && isset($this->item->id)) {
// $this->item->images = json_decode($this->item->images);
// $this->item->urls = json_decode($this->item->urls);
$tmp = new stdClass();
// check for recurrence
if (($this->item->recurrence_type != 0) || ($this->item->recurrence_first_id != 0)) {
$tmp->recurrence_type = 0;
$tmp->recurrence_first_id = 0;
}
// $tmp->images = $this->item->images;
// $tmp->urls = $this->item->urls;
$this->form->bind($tmp);
}
if (empty($item->id)) {
if (!empty($item->catid)) {
$this->form->setFieldAttribute('cats', 'prefer', $item->catid);
}
if (!empty($item->locid)) {
$tmp = new stdClass();
$tmp->locid = $item->locid;
$this->form->bind($tmp);
}
}
// Check for errors.
$errors = $this->get('Errors');
if (is_array($errors) && count($errors)) {
Factory::getApplication()->enqueueMessage(implode("\n", $errors), 'warning');
return false;
}
$access2 = JemHelper::getAccesslevelOptions(true, $access);
$this->access = $access2;
// Load css
JemHelper::loadCss('jem');
JemHelper::loadCustomCss();
// Load scripts
$wa = Factory::getApplication()->getDocument()->getWebAssetManager();
$wa->registerScript('jem.attachments', 'com_jem/attachments.js')->useScript('jem.attachments');
$wa->registerScript('jem.recurrence', 'com_jem/recurrence.js')->useScript('jem.recurrence');
$wa->registerScript('jem.seo', 'com_jem/seo.js')->useScript('jem.seo');
$wa->registerScript('jem.unlimited', 'com_jem/unlimited.js')->useScript('jem.unlimited');
$wa->registerScript('jem.other', 'com_jem/other.js')->useScript('jem.other');
// Escape strings for HTML output
$pageclass_sfx = $item->params->get('pageclass_sfx');
$this->pageclass_sfx = $pageclass_sfx ? htmlspecialchars($pageclass_sfx) : $pageclass_sfx;
$this->dimage = JemImage::flyercreator($this->item->datimage, 'event');
$this->jemsettings = $jemsettings;
$this->settings = $settings;
$this->infoimage = HTMLHelper::_('image', 'com_jem/icon-16-hint.png', Text::_('COM_JEM_NOTES'), NULL, true);
$this->user = $user;
$permissions = new stdClass();
$permissions->canAddVenue = $user->can('add', 'venue');
$this->permissions = $permissions;
if ($params->get('enable_category') == 1) {
$this->form->setFieldAttribute('catid', 'default', $params->get('catid', 1));
$this->form->setFieldAttribute('catid', 'readonly', 'true');
}
// disable for non-publishers
if (empty($item->params) || !$item->params->get('access-change', false)) {
$this->form->setFieldAttribute('published', 'default', 0);
$this->form->setFieldAttribute('published', 'readonly', 'true');
}
// configure image field: show max. file size, and possibly mark field as required
$tip = Text::_('COM_JEM_UPLOAD_IMAGE');
if ((int)$jemsettings->sizelimit > 0) {
$tip .= ' <br/>' . Text::sprintf('COM_JEM_MAX_FILE_SIZE_1', (int)$jemsettings->sizelimit);
}
$this->form->setFieldAttribute('userfile', 'description', $tip);
if ($jemsettings->imageenabled == 2) {
$this->form->setFieldAttribute('userfile', 'required', 'true');
}
// configure invited field
if ($jemsettings->regallowinvitation == 1) {
$this->form->setValue('invited', null, implode(',', $this->invited));
$this->form->setFieldAttribute('invited', 'eventid', (int)$this->item->id);
}
$this->_prepareDocument();
parent::display($tpl);
}
/**
* Prepares the document
*/
protected function _prepareDocument()
{
$app = Factory::getApplication();
$title = $this->params->get('page_title');
if ($app->get('sitename_pagetitles', 0) == 1) {
$title = Text::sprintf('JPAGETITLE', $app->get('sitename'), $title);
}
elseif ($app->get('sitename_pagetitles', 0) == 2) {
$title = Text::sprintf('JPAGETITLE', $title, $app->get('sitename'));
}
$this->document->setTitle($title);
// TODO: Is it useful to have meta data in an edit view?
// Also shouldn't be "robots" set to "noindex, nofollow"?
if ($this->params->get('menu-meta_description')) {
$this->document->setDescription($this->params->get('menu-meta_description'));
}
if ($this->params->get('menu-meta_keywords')) {
$this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords'));
}
if ($this->params->get('robots')) {
$this->document->setMetadata('robots', $this->params->get('robots'));
}
}
/**
* Creates the output for the venue select listing
*/
protected function _displaychoosevenue($tpl)
{
$app = Factory::getApplication();
$jinput = Factory::getApplication()->input;
$jemsettings = JemHelper::config();
// $db = Factory::getContainer()->get('DatabaseDriver');
$document = $app->getDocument();
$filter_order = $app->getUserStateFromRequest('com_jem.selectvenue.filter_order', 'filter_order', 'l.venue', 'cmd');
$filter_order_Dir = $app->getUserStateFromRequest('com_jem.selectvenue.filter_order_Dir', 'filter_order_Dir', 'ASC', 'word');
$filter_type = $app->getUserStateFromRequest('com_jem.selectvenue.filter_type', 'filter_type', 0, 'int');
$filter_state = $app->getUserStateFromRequest('com_jem.selectvenue.filter_state', 'filter_state', '*', 'word');
$search = $app->getUserStateFromRequest('com_jem.selectvenue.filter_search', 'filter_search', '', 'string');
$limitstart = $jinput->get('limitstart', '0', 'int');
$limit = $app->getUserStateFromRequest('com_jem.selectvenue.limit', 'limit', $jemsettings->display_num, 'int');
// Get/Create the model
$rows = $this->get('Venues');
$pagination = $this->get('VenuesPagination');
// filter state
$lists['state'] = HTMLHelper::_('grid.state', $filter_state);
// table ordering
$lists['order_Dir'] = $filter_order_Dir;
$lists['order'] = $filter_order;
$document->setTitle(Text::_('COM_JEM_SELECT_VENUE'));
JemHelper::loadCss('jem');
$filters = array();
$filters[] = HTMLHelper::_('select.option', '1', Text::_('COM_JEM_VENUE'));
$filters[] = HTMLHelper::_('select.option', '2', Text::_('COM_JEM_CITY'));
$filters[] = HTMLHelper::_('select.option', '3', Text::_('COM_JEM_STATE'));
$searchfilter = HTMLHelper::_('select.genericlist', $filters, 'filter_type', array('size'=>'1','class'=>'inputbox'), 'value', 'text', $filter_type);
$this->rows = $rows;
$this->searchfilter = $searchfilter;
$this->pagination = $pagination;
$this->lists = $lists;
$this->filter = $search;
parent::display($tpl);
}
/**
* Creates the output for the contact select listing
*/
protected function _displaychoosecontact($tpl)
{
$app = Factory::getApplication();
$jinput = Factory::getApplication()->input;
$jemsettings = JemHelper::config();
// $db = Factory::getContainer()->get('DatabaseDriver');
$document = $app->getDocument();
$filter_order = $app->getUserStateFromRequest('com_jem.selectcontact.filter_order', 'filter_order', 'con.name', 'cmd');
$filter_order_Dir = $app->getUserStateFromRequest('com_jem.selectcontact.filter_order_Dir', 'filter_order_Dir', '', 'word');
$filter_type = $app->getUserStateFromRequest('com_jem.selectcontact.filter_type', 'filter_type', 0, 'int');
$search = $app->getUserStateFromRequest('com_jem.selectcontact.filter_search', 'filter_search', '', 'string');
$limitstart = $jinput->get('limitstart', '0', 'int');
$limit = $app->getUserStateFromRequest('com_jem.selectcontact.limit', 'limit', $jemsettings->display_num, 'int');
// Load css
JemHelper::loadCss('jem');
$document->setTitle(Text::_('COM_JEM_SELECT_CONTACT'));
// Get/Create the model
$rows = $this->get('Contacts');
$pagination = $this->get('ContactsPagination');
// table ordering
$lists['order_Dir'] = $filter_order_Dir;
$lists['order'] = $filter_order;
//Build search filter
$filters = array();
$filters[] = HTMLHelper::_('select.option', '1', Text::_('COM_JEM_NAME'));
/* $filters[] = HTMLHelper::_('select.option', '2', Text::_('COM_JEM_ADDRESS')); */ // data security
$filters[] = HTMLHelper::_('select.option', '3', Text::_('COM_JEM_CITY'));
$filters[] = HTMLHelper::_('select.option', '4', Text::_('COM_JEM_STATE'));
$searchfilter = HTMLHelper::_('select.genericlist', $filters, 'filter_type', array('size'=>'1','class'=>'inputbox'), 'value', 'text', $filter_type);
// search filter
$lists['search']= $search;
//assign data to template
$this->searchfilter = $searchfilter;
$this->lists = $lists;
$this->rows = $rows;
$this->pagination = $pagination;
parent::display($tpl);
}
/**
* Creates the output for the users select listing
*/
protected function _displaychooseusers($tpl)
{
$app = Factory::getApplication();
$jinput = $app->input;
$jemsettings = JemHelper::config();
// $db = Factory::getContainer()->get('DatabaseDriver');
$document = $app->getDocument();
$model = $this->getModel();
// no filters, hard-coded
$filter_order = 'usr.name';
$filter_order_Dir = '';
$filter_type = '';
$search = '';
$limitstart = 0;
$limit = 0;
$eventId = $jinput->getInt('a_id', 0);
// Load css
JemHelper::loadCss('jem');
$document->setTitle(Text::_('COM_JEM_SELECT_USERS_TO_INVITE'));
// Get/Create the model
$model->setState('event.id', $eventId);
$rows = $this->get('Users');
$pagination = $this->get('UsersPagination');
// table ordering
$lists['order_Dir'] = $filter_order_Dir;
$lists['order'] = $filter_order;
//Build search filter - unused
$filters = array();
$filters[] = HTMLHelper::_('select.option', '1', Text::_('COM_JEM_NAME'));
$searchfilter = HTMLHelper::_('select.genericlist', $filters, 'filter_type', array('size'=>'1','class'=>'inputbox'), 'value', 'text', $filter_type);
// search filter - unused
$lists['search']= $search;
//assign data to template
$this->searchfilter = $searchfilter;
$this->lists = $lists;
$this->rows = $rows;
$this->pagination = $pagination;
parent::display($tpl);
}
}
?>