Updated with JCB v2.9.14

This commit is contained in:
Llewellyn van der Merwe 2019-04-04 13:52:38 +02:00
parent 899ff518c0
commit f2a8e42ab6
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
214 changed files with 11740 additions and 11506 deletions

View File

@ -23,7 +23,7 @@ The best way to see all your options is to install this component on you Joomla
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Sermon Distributor](https://www.vdm.io/)
+ *First Build*: 22nd October, 2015
+ *Last Build*: 6th September, 2018
+ *Last Build*: 4th April, 2019
+ *Version*: 2.0.x
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -36,7 +36,7 @@ due to [Automated Component Builder](https://www.vdm.io/joomla-component-builder
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> never making one mistake or taking any coffee break.)
+ *Line count*: **66852**
+ *Line count*: **66821**
+ *File count*: **445**
+ *Folder count*: **93**

View File

@ -23,7 +23,7 @@ The best way to see all your options is to install this component on you Joomla
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Sermon Distributor](https://www.vdm.io/)
+ *First Build*: 22nd October, 2015
+ *Last Build*: 6th September, 2018
+ *Last Build*: 4th April, 2019
+ *Version*: 2.0.x
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -36,7 +36,7 @@ due to [Automated Component Builder](https://www.vdm.io/joomla-component-builder
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> never making one mistake or taking any coffee break.)
+ *Line count*: **66852**
+ *Line count*: **66821**
+ *File count*: **445**
+ *Folder count*: **93**

View File

@ -1955,6 +1955,32 @@ abstract class SermondistributorHelper
return date('jS \o\f F Y',$date);
}
/**
* get date based in period past
*/
public static function fancyDynamicDate($date)
{
if (!self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
// older then year
$lastyear = date("Y", strtotime("-1 year"));
$tragetyear = date("Y", $date);
if ($tragetyear <= $lastyear)
{
return date('m/d/y', $date);
}
// same day
$yesterday = strtotime("-1 day");
if ($date > $yesterday)
{
return date('g:i A', $date);
}
// just month day
return date('M j', $date);
}
/**
* Change to nice fancy day time and date
*/
@ -1991,6 +2017,30 @@ abstract class SermondistributorHelper
return date('G:i',$time);
}
/**
* set the date as 2004/05 (for charts)
*/
public static function setYearMonth($date)
{
if (!self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
return date('Y/m', $date);
}
/**
* set the date as 2004/05/03 (for charts)
*/
public static function setYearMonthDay($date)
{
if (!self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
return date('Y/m/d', $date);
}
/**
* Check if string is a valid time stamp
*/
@ -3296,183 +3346,149 @@ abstract class SermondistributorHelper
}
/**
* Get the actions permissions
* Get the action permissions
*
* @param string $view The related view name
* @param int $record The item to act upon
* @param string $views The related list view name
* @param mixed $target Only get this permission (like edit, create, delete)
* @param string $component The target component
*
* @return object The JObject of permission/authorised actions
*
**/
public static function getActions($view,&$record = null,$views = null)
public static function getActions($view, &$record = null, $views = null, $target = null, $component = 'sermondistributor')
{
jimport('joomla.access.access');
// get the user object
$user = JFactory::getUser();
// load the JObject
$result = new JObject;
// make view name safe (just incase)
$view = self::safeString($view);
if (self::checkString($views))
{
$views = self::safeString($views);
}
// get all actions from component
$actions = JAccess::getActions('com_sermondistributor', 'component');
// set acctions only set in component settiongs
$componentActions = array('core.admin','core.manage','core.options','core.export');
$actions = JAccess::getActionsFromFile(
JPATH_ADMINISTRATOR . '/components/com_' . $component . '/access.xml',
"/access/section[@name='component']/"
);
// if non found then return empty JObject
if (empty($actions))
{
return $result;
}
// get created by if not found
if (self::checkObject($record) && !isset($record->created_by) && isset($record->id))
{
$record->created_by = self::getVar($view, $record->id, 'id', 'created_by', '=', $component);
}
// set actions only set in component settings
$componentActions = array('core.admin', 'core.manage', 'core.options', 'core.export');
// check if we have a target
$checkTarget = false;
if ($target)
{
// convert to an array
if (self::checkString($target))
{
$target = array($target);
}
// check if we are good to go
if (self::checkArray($target))
{
$checkTarget = true;
}
}
// loop the actions and set the permissions
foreach ($actions as $action)
{
// check target action filter
if ($checkTarget && self::filterActions($view, $action->name, $target))
{
continue;
}
// set to use component default
$fallback= true;
if (self::checkObject($record) && isset($record->id) && $record->id > 0 && !in_array($action->name,$componentActions))
$fallback = true;
// reset permission per/action
$permission = false;
$catpermission = false;
// set area
$area = 'comp';
// check if the record has an ID and the action is item related (not a component action)
if (self::checkObject($record) && isset($record->id) && $record->id > 0 && !in_array($action->name, $componentActions) &&
(strpos($action->name, 'core.') !== false || strpos($action->name, $view . '.') !== false))
{
// we are in item
$area = 'item';
// The record has been set. Check the record permissions.
$permission = $user->authorise($action->name, 'com_sermondistributor.'.$view.'.' . (int) $record->id);
if (!$permission) // TODO removed && !is_null($permission)
$permission = $user->authorise($action->name, 'com_' . $component . '.' . $view . '.' . (int) $record->id);
// if no permission found, check edit own
if (!$permission)
{
if ($action->name == 'core.edit' || $action->name == $view.'.edit')
// With edit, if the created_by matches current user then dig deeper.
if (($action->name === 'core.edit' || $action->name === $view . '.edit') && $record->created_by > 0 && ($record->created_by == $user->id))
{
if ($user->authorise('core.edit.own', 'com_sermondistributor.'.$view.'.' . (int) $record->id))
{
// If the owner matches 'me' then allow.
if (isset($record->created_by) && $record->created_by > 0 && ($record->created_by == $user->id))
// the correct target
$coreCheck = (array) explode('.', $action->name);
// check that we have both local and global access
if ($user->authorise($coreCheck[0] . '.edit.own', 'com_' . $component . '.' . $view . '.' . (int) $record->id) &&
$user->authorise($coreCheck[0] . '.edit.own', 'com_' . $component))
{
// allow edit
$result->set($action->name, true);
// set not to use component default
$fallback= false;
// set not to use global default
// because we already validated it
$fallback = false;
}
else
{
// do not allow edit
$result->set($action->name, false);
// set not to use component default
$fallback= false;
}
}
elseif ($user->authorise($view.'edit.own', 'com_sermondistributor.'.$view.'.' . (int) $record->id))
{
// If the owner matches 'me' then allow.
if (isset($record->created_by) && $record->created_by > 0 && ($record->created_by == $user->id))
{
$result->set($action->name, true);
// set not to use component default
$fallback= false;
}
else
{
$result->set($action->name, false);
// set not to use component default
$fallback= false;
}
}
elseif ($user->authorise('core.edit.own', 'com_sermondistributor'))
{
// If the owner matches 'me' then allow.
if (isset($record->created_by) && $record->created_by > 0 && ($record->created_by == $user->id))
{
$result->set($action->name, true);
// set not to use component default
$fallback= false;
}
else
{
$result->set($action->name, false);
// set not to use component default
$fallback= false;
}
}
elseif ($user->authorise($view.'edit.own', 'com_sermondistributor'))
{
// If the owner matches 'me' then allow.
if (isset($record->created_by) && $record->created_by > 0 && ($record->created_by == $user->id))
{
$result->set($action->name, true);
// set not to use component default
$fallback= false;
}
else
{
$result->set($action->name, false);
// set not to use component default
$fallback= false;
}
$fallback = false;
}
}
}
elseif (self::checkString($views) && isset($record->catid) && $record->catid > 0)
{
// we are in item
$area = 'category';
// set the core check
$coreCheck = explode('.', $action->name);
$core = $coreCheck[0];
// make sure we use the core. action check for the categories
if (strpos($action->name,$view) !== false && strpos($action->name,'core.') === false ) {
$coreCheck = explode('.',$action->name);
if (strpos($action->name, $view) !== false && strpos($action->name, 'core.') === false )
{
$coreCheck[0] = 'core';
$categoryCheck = implode('.',$coreCheck);
$categoryCheck = implode('.', $coreCheck);
}
else
{
$categoryCheck = $action->name;
}
// The record has a category. Check the category permissions.
$catpermission = $user->authorise($categoryCheck, 'com_sermondistributor.'.$views.'.category.' . (int) $record->catid);
$catpermission = $user->authorise($categoryCheck, 'com_' . $component . '.' . $views . '.category.' . (int) $record->catid);
if (!$catpermission && !is_null($catpermission))
{
if ($action->name == 'core.edit' || $action->name == $view.'.edit')
// With edit, if the created_by matches current user then dig deeper.
if (($action->name === 'core.edit' || $action->name === $view . '.edit') && $record->created_by > 0 && ($record->created_by == $user->id))
{
if ($user->authorise('core.edit.own', 'com_sermondistributor.'.$views.'.category.' . (int) $record->catid))
{
// If the owner matches 'me' then allow.
if (isset($record->created_by) && $record->created_by > 0 && ($record->created_by == $user->id))
// check that we have both local and global access
if ($user->authorise('core.edit.own', 'com_' . $component . '.' . $views . '.category.' . (int) $record->catid) &&
$user->authorise($core . '.edit.own', 'com_' . $component))
{
// allow edit
$result->set($action->name, true);
// set not to use component default
$fallback= false;
// set not to use global default
// because we already validated it
$fallback = false;
}
else
{
// do not allow edit
$result->set($action->name, false);
// set not to use component default
$fallback= false;
}
}
elseif ($user->authorise($view.'edit.own', 'com_sermondistributor.'.$views.'.category.' . (int) $record->catid))
{
// If the owner matches 'me' then allow.
if (isset($record->created_by) && $record->created_by > 0 && ($record->created_by == $user->id))
{
$result->set($action->name, true);
// set not to use component default
$fallback= false;
}
else
{
$result->set($action->name, false);
// set not to use component default
$fallback= false;
}
}
elseif ($user->authorise('core.edit.own', 'com_sermondistributor'))
{
// If the owner matches 'me' then allow.
if (isset($record->created_by) && $record->created_by > 0 && ($record->created_by == $user->id))
{
$result->set($action->name, true);
// set not to use component default
$fallback= false;
}
else
{
$result->set($action->name, false);
// set not to use component default
$fallback= false;
}
}
elseif ($user->authorise($view.'edit.own', 'com_sermondistributor'))
{
// If the owner matches 'me' then allow.
if (isset($record->created_by) && $record->created_by > 0 && ($record->created_by == $user->id))
{
$result->set($action->name, true);
// set not to use component default
$fallback= false;
}
else
{
$result->set($action->name, false);
// set not to use component default
$fallback= false;
}
$fallback = false;
}
}
}
@ -3481,12 +3497,47 @@ abstract class SermondistributorHelper
// if allowed then fallback on component global settings
if ($fallback)
{
$result->set($action->name, $user->authorise($action->name, 'com_sermondistributor'));
// if item/category blocks access then don't fall back on global
if ((($area === 'item') && !$permission) || (($area === 'category') && !$catpermission))
{
// do not allow
$result->set($action->name, false);
}
// Finally remember the global settings have the final say. (even if item allow)
// The local item permissions can block, but it can't open and override of global permissions.
// Since items are created by users and global permissions is set by system admin.
else
{
$result->set($action->name, $user->authorise($action->name, 'com_' . $component));
}
}
}
return $result;
}
/**
* Filter the action permissions
*
* @param string $action The action to check
* @param array $targets The array of target actions
*
* @return boolean true if action should be filtered out
*
**/
protected static function filterActions(&$view, &$action, &$targets)
{
foreach ($targets as $target)
{
if (strpos($action, $view . '.' . $target) !== false ||
strpos($action, 'core.' . $target) !== false)
{
return false;
break;
}
}
return true;
}
/**
* Get any component's model
**/
@ -3534,7 +3585,7 @@ abstract class SermondistributorHelper
/**
* Add to asset Table
*/
public static function setAsset($id,$table)
public static function setAsset($id, $table, $inherit = true)
{
$parent = JTable::getInstance('Asset');
$parent->loadByName('com_sermondistributor');
@ -3566,7 +3617,7 @@ abstract class SermondistributorHelper
$asset->name = $name;
$asset->title = $title;
// get the default asset rules
$rules = self::getDefaultAssetRules('com_sermondistributor',$table);
$rules = self::getDefaultAssetRules('com_sermondistributor', $table, $inherit);
if ($rules instanceof JAccessRules)
{
$asset->rules = (string) $rules;
@ -3596,7 +3647,12 @@ abstract class SermondistributorHelper
/**
* Gets the default asset Rules for a component/view.
*/
protected static function getDefaultAssetRules($component,$view)
protected static function getDefaultAssetRules($component, $view, $inherit = true)
{
// if new or inherited
$assetId = 0;
// Only get the actual item rules if not inheriting
if (!$inherit)
{
// Need to find the asset id by the name of the component.
$db = JFactory::getDbo();
@ -3606,10 +3662,14 @@ abstract class SermondistributorHelper
->where($db->quoteName('name') . ' = ' . $db->quote($component));
$db->setQuery($query);
$db->execute();
if ($db->loadRowList())
// check that there is a value
if ($db->getNumRows())
{
// asset alread set so use saved rules
// asset already set so use saved rules
$assetId = (int) $db->loadResult();
}
}
// get asset rules
$result = JAccess::getAssetRules($assetId);
if ($result instanceof JAccessRules)
{
@ -3623,27 +3683,25 @@ abstract class SermondistributorHelper
// remove since it is not part of this view
unset($_result->$name);
}
else
elseif ($inherit)
{
// clear the value since we inherit
$rule = array();
}
}
// check if there are any view values remaining
if (count((array)$_result))
if (count($_result))
{
$_result = json_encode($_result);
$_result = array($_result);
// Instantiate and return the JAccessRules object for the asset rules.
$rules = new JAccessRules($_result);
// return filtered rules
return $rules;
}
}
return $result;
}
}
return JAccess::getAssetRules(0);
}
/**
* xmlAppend
@ -3848,11 +3906,11 @@ abstract class SermondistributorHelper
*
* @input array The array to check
*
* @returns bool true on success
* @returns bool/int number of items in array on success
**/
public static function checkArray($array, $removeEmptyString = false)
{
if (isset($array) && is_array($array) && count((array)$array) > 0)
if (isset($array) && is_array($array) && ($nr = count((array)$array)) > 0)
{
// also make sure the empty strings are removed
if ($removeEmptyString)
@ -3866,7 +3924,7 @@ abstract class SermondistributorHelper
}
return self::checkArray($array, false);
}
return true;
return $nr;
}
return false;
}

View File

@ -120,7 +120,7 @@ COM_SERMONDISTRIBUTOR_MANUAL_UPDATER_EXTERNAL_SOURCES_BUTTON_ACCESS="Manual Upda
COM_SERMONDISTRIBUTOR_MANUAL_UPDATER_EXTERNAL_SOURCES_BUTTON_ACCESS_DESC=" Allows the users in this group to access the external sources button."
COM_SERMONDISTRIBUTOR_MANUAL_UPDATER_SUBMENU="Manual Updater Submenu"
COM_SERMONDISTRIBUTOR_MANUAL_UPDATER_SUBMENU_DESC="Allows the users in this group to submenu of Manual Updater"
COM_SERMONDISTRIBUTOR_MENU="&#187; Sermon Distributor"
COM_SERMONDISTRIBUTOR_MENU="Sermon Distributor"
COM_SERMONDISTRIBUTOR_MENU_CATEGORIES_DESC="All categories that are published"
COM_SERMONDISTRIBUTOR_MENU_CATEGORIES_OPTION="Categories"
COM_SERMONDISTRIBUTOR_MENU_CATEGORIES_TITLE="Categories"

View File

@ -33,16 +33,14 @@ $fields = $displayData->get('fields') ?: array(
'note_auto_externalsource'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<div class="control-group">
<div class="control-label">
<?php echo $form->getLabel($field); ?>
</div>
<div class="controls">
<?php echo $form->getInput($field); ?>
</div>
</div>
<?php endforeach; ?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>

View File

@ -27,14 +27,19 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = array(
$fields = $displayData->get('fields') ?: array(
'description',
'externalsources'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field){
echo $form->renderField($field);
} ?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>

View File

@ -33,16 +33,14 @@ $fields = $displayData->get('fields') ?: array(
'apicronjob_note'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<div class="control-group">
<div class="control-label">
<?php echo $form->getLabel($field); ?>
</div>
<div class="controls">
<?php echo $form->getInput($field); ?>
</div>
</div>
<?php endforeach; ?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>

View File

@ -37,20 +37,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -35,20 +35,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -27,13 +27,18 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = array(
$fields = $displayData->get('fields') ?: array(
'not_required'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field){
echo $form->renderField($field);
} ?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>

View File

@ -25,7 +25,6 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$app = JFactory::getApplication();
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
@ -37,20 +36,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -25,7 +25,6 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$app = JFactory::getApplication();
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
@ -38,20 +37,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -27,14 +27,19 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = array(
$fields = $displayData->get('fields') ?: array(
'title',
'alias'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field){
echo $form->renderField($field);
} ?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>

View File

@ -31,16 +31,14 @@ $fields = $displayData->get('fields') ?: array(
'content'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<div class="control-group">
<div class="control-label">
<?php echo $form->getLabel($field); ?>
</div>
<div class="controls">
<?php echo $form->getInput($field); ?>
</div>
</div>
<?php endforeach; ?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>

View File

@ -37,20 +37,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -35,20 +35,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -27,13 +27,18 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = array(
$fields = $displayData->get('fields') ?: array(
'not_required'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field){
echo $form->renderField($field);
} ?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>

View File

@ -25,7 +25,6 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$app = JFactory::getApplication();
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
@ -43,20 +42,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -27,14 +27,19 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = array(
$fields = $displayData->get('fields') ?: array(
'name',
'size'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field){
echo $form->renderField($field);
} ?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>

View File

@ -32,16 +32,14 @@ $fields = $displayData->get('fields') ?: array(
'url'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<div class="control-group">
<div class="control-label">
<?php echo $form->getLabel($field); ?>
</div>
<div class="controls">
<?php echo $form->getInput($field); ?>
</div>
</div>
<?php endforeach; ?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>

View File

@ -33,20 +33,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -33,20 +33,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -25,7 +25,6 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$app = JFactory::getApplication();
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
@ -37,20 +36,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -25,7 +25,6 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$app = JFactory::getApplication();
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
@ -38,20 +37,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -27,14 +27,19 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = array(
$fields = $displayData->get('fields') ?: array(
'name',
'alias'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field){
echo $form->renderField($field);
} ?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>

View File

@ -31,16 +31,14 @@ $fields = $displayData->get('fields') ?: array(
'description'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<div class="control-group">
<div class="control-label">
<?php echo $form->getLabel($field); ?>
</div>
<div class="controls">
<?php echo $form->getInput($field); ?>
</div>
</div>
<?php endforeach; ?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>

View File

@ -33,20 +33,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -34,20 +34,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -25,7 +25,6 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$app = JFactory::getApplication();
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
@ -43,20 +42,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -39,12 +39,20 @@ if ($_return = $jinput->get('return', null, 'base64'))
{
$return .= "&return=" . $_return;
}
// set the referral values
$ref = ($id) ? "&ref=preacher&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "";
// check if return value was set
if (SermondistributorHelper::checkString($return))
{
// set the referral values
$ref = ($id) ? "&ref=preacher&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "&return=" . urlencode(base64_encode($return));
}
else
{
$ref = ($id) ? "&ref=preacher&refid=" . $id : "";
}
// set the create new URL
$new = "index.php?option=com_sermondistributor&view=sermon&layout=edit".$ref;
$new = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit" . $ref;
// set the create new and close URL
$close_new = "index.php?option=com_sermondistributor&view=sermon&layout=edit";
$close_new = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit";
// load the action object
$can = SermondistributorHelper::getActions('sermon');

View File

@ -27,14 +27,19 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = array(
$fields = $displayData->get('fields') ?: array(
'name',
'alias'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field){
echo $form->renderField($field);
} ?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>

View File

@ -31,16 +31,14 @@ $fields = $displayData->get('fields') ?: array(
'description'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<div class="control-group">
<div class="control-label">
<?php echo $form->getLabel($field); ?>
</div>
<div class="controls">
<?php echo $form->getInput($field); ?>
</div>
</div>
<?php endforeach; ?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>

View File

@ -33,20 +33,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -33,20 +33,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -25,7 +25,6 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$app = JFactory::getApplication();
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
@ -43,20 +42,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -39,10 +39,18 @@ if ($_return = $jinput->get('return', null, 'base64'))
{
$return .= "&return=" . $_return;
}
// set the referral values
$ref = ($id) ? "&ref=series&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "";
// check if return value was set
if (SermondistributorHelper::checkString($return))
{
// set the referral values
$ref = ($id) ? "&ref=series&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "&return=" . urlencode(base64_encode($return));
}
else
{
$ref = ($id) ? "&ref=series&refid=" . $id : "";
}
// set the create new URL
$new = "index.php?option=com_sermondistributor&view=sermon&layout=edit".$ref;
$new = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit" . $ref;
// load the action object
$can = SermondistributorHelper::getActions('sermon');

View File

@ -27,15 +27,20 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = array(
$fields = $displayData->get('fields') ?: array(
'name',
'alias',
'preacher'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field){
echo $form->renderField($field);
} ?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>

View File

@ -31,16 +31,14 @@ $fields = $displayData->get('fields') ?: array(
'description'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<div class="control-group">
<div class="control-label">
<?php echo $form->getLabel($field); ?>
</div>
<div class="controls">
<?php echo $form->getInput($field); ?>
</div>
</div>
<?php endforeach; ?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>

View File

@ -35,20 +35,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -35,20 +35,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -27,14 +27,19 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = array(
$fields = $displayData->get('fields') ?: array(
'not_required',
'auto_sermons'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field){
echo $form->renderField($field);
} ?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>

View File

@ -40,16 +40,14 @@ $fields = $displayData->get('fields') ?: array(
'url'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<div class="control-group">
<div class="control-label">
<?php echo $form->getLabel($field); ?>
</div>
<div class="controls">
<?php echo $form->getInput($field); ?>
</div>
</div>
<?php endforeach; ?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>

View File

@ -25,7 +25,6 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$app = JFactory::getApplication();
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
@ -43,20 +42,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -39,8 +39,16 @@ if ($_return = $jinput->get('return', null, 'base64'))
{
$return .= "&return=" . $_return;
}
// set the referral values
$ref = ($id) ? "&ref=sermon&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "";
// check if return value was set
if (SermondistributorHelper::checkString($return))
{
// set the referral values
$ref = ($id) ? "&ref=sermon&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "&return=" . urlencode(base64_encode($return));
}
else
{
$ref = ($id) ? "&ref=sermon&refid=" . $id : "";
}
?>
<div class="form-vertical">

View File

@ -27,14 +27,19 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = array(
$fields = $displayData->get('fields') ?: array(
'filename',
'sermon'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field){
echo $form->renderField($field);
} ?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>

View File

@ -34,20 +34,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -33,20 +33,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -25,7 +25,6 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$app = JFactory::getApplication();
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
@ -43,20 +42,10 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>

View File

@ -46,7 +46,7 @@ class JFormFieldAdminviewfolderlist extends JFormFieldList
*
* @return array An array of JHtml options.
*/
public function getOptions()
protected function getOptions()
{
// get custom folder files
$localfolder = JPATH_COMPONENT_ADMINISTRATOR.'/views';

View File

@ -46,7 +46,7 @@ class JFormFieldArticles extends JFormFieldList
*
* @return array An array of JHtml options.
*/
public function getOptions()
protected function getOptions()
{
$db = JFactory::getDBO();
$query = $db->getQuery(true);

View File

@ -153,7 +153,7 @@ class JFormFieldExternalsource extends JFormFieldList
*
* @return array An array of JHtml options.
*/
public function getOptions()
protected function getOptions()
{
$db = JFactory::getDBO();
$query = $db->getQuery(true);

View File

@ -46,7 +46,7 @@ class JFormFieldExternalsourcefiles extends JFormFieldList
*
* @return array An array of JHtml options.
*/
public function getOptions()
protected function getOptions()
{
// set the default
$options[] = JHtml::_('select.option', '', JText::_('COM_SERMONDISTRIBUTOR_THE_LOCAL_LISTING_OF_THE_MANUAL_EXTERNAL_SOURCE_FOLDERS_IS_EMPTY'));

View File

@ -46,7 +46,7 @@ class JFormFieldLocalfiles extends JFormFieldList
*
* @return array An array of JHtml options.
*/
public function getOptions()
protected function getOptions()
{
// get local folder
$localfolder = JComponentHelper::getParams('com_sermondistributor')->get('localfolder', JPATH_ROOT.'/images');

View File

@ -46,7 +46,7 @@ class JFormFieldPreachers extends JFormFieldList
*
* @return array An array of JHtml options.
*/
public function getOptions()
protected function getOptions()
{
$db = JFactory::getDBO();
$query = $db->getQuery(true);

View File

@ -46,7 +46,7 @@ class JFormFieldSeries extends JFormFieldList
*
* @return array An array of JHtml options.
*/
public function getOptions()
protected function getOptions()
{
$db = JFactory::getDBO();
$query = $db->getQuery(true);

View File

@ -153,7 +153,7 @@ class JFormFieldSermon extends JFormFieldList
*
* @return array An array of JHtml options.
*/
public function getOptions()
protected function getOptions()
{
$db = JFactory::getDBO();
$query = $db->getQuery(true);

View File

@ -46,7 +46,7 @@ class JFormFieldSiteviewfolderlist extends JFormFieldList
*
* @return array An array of JHtml options.
*/
public function getOptions()
protected function getOptions()
{
// get custom folder files
$localfolder = JPATH_COMPONENT_SITE.'/views';

View File

@ -257,6 +257,7 @@ function vvvvvwj(update_method_vvvvvwj)
if (update_method_vvvvvwj == 2)
{
jQuery('#jform_update_timer').closest('.control-group').show();
// add required attribute to update_timer field
if (jform_vvvvvwjvwd_required)
{
updateFieldRequired('update_timer',0);
@ -265,11 +266,11 @@ function vvvvvwj(update_method_vvvvvwj)
jQuery('#jform_update_timer').addClass('required');
jform_vvvvvwjvwd_required = false;
}
}
else
{
jQuery('#jform_update_timer').closest('.control-group').hide();
// remove required attribute from update_timer field
if (!jform_vvvvvwjvwd_required)
{
updateFieldRequired('update_timer',1);
@ -389,6 +390,7 @@ function vvvvvwm(externalsources_vvvvvwm,update_method_vvvvvwm)
if (externalsources && update_method)
{
jQuery('#jform_oauthtoken').closest('.control-group').show();
// add required attribute to oauthtoken field
if (jform_vvvvvwmvwe_required)
{
updateFieldRequired('oauthtoken',0);
@ -397,11 +399,11 @@ function vvvvvwm(externalsources_vvvvvwm,update_method_vvvvvwm)
jQuery('#jform_oauthtoken').addClass('required');
jform_vvvvvwmvwe_required = false;
}
}
else
{
jQuery('#jform_oauthtoken').closest('.control-group').hide();
// remove required attribute from oauthtoken field
if (!jform_vvvvvwmvwe_required)
{
updateFieldRequired('oauthtoken',1);

View File

@ -117,6 +117,7 @@
label="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_UPDATE_METHOD_LABEL"
description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_UPDATE_METHOD_DESCRIPTION"
class="btn-group btn-group-yesno"
default=""
required="true">
<!-- Option Set. -->
<option value="1">
@ -202,7 +203,8 @@
class="list_class"
multiple="false"
filter="INT"
required="true">
required="true"
default="">
<!-- Option Set. -->
<option value="">
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_SELECT_AN_OPTION</option>
@ -225,6 +227,7 @@
name="folder"
label="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_FOLDER_LABEL"
description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_FOLDER_DESCRIPTION"
default=""
id="folder"
class="folders"
select="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_FOLDER_SELECT"
@ -302,6 +305,7 @@
name="sharedurl"
label="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_SHAREDURL_LABEL"
description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_SHAREDURL_DESCRIPTION"
default=""
id="sharedurl"
class="sharedurls"
select="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_SHAREDURL_SELECT"
@ -316,6 +320,7 @@
label="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_TSHAREDURL_LABEL"
size="40"
maxlength="120"
default=""
description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_TSHAREDURL_DESCRIPTION"
class="text_area span12"
required="false"
@ -336,6 +341,7 @@
label="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_OAUTHTOKEN_LABEL"
size="250"
maxlength="250"
default=""
description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_OAUTHTOKEN_DESCRIPTION"
class="text_area"
required="true"

View File

@ -58,6 +58,7 @@ function vvvvvwx(location_vvvvvwx)
if (location_vvvvvwx == 1)
{
jQuery('#jform_admin_view').closest('.control-group').show();
// add required attribute to admin_view field
if (jform_vvvvvwxvwf_required)
{
updateFieldRequired('admin_view',0);
@ -66,11 +67,11 @@ function vvvvvwx(location_vvvvvwx)
jQuery('#jform_admin_view').addClass('required');
jform_vvvvvwxvwf_required = false;
}
}
else
{
jQuery('#jform_admin_view').closest('.control-group').hide();
// remove required attribute from admin_view field
if (!jform_vvvvvwxvwf_required)
{
updateFieldRequired('admin_view',1);
@ -89,6 +90,7 @@ function vvvvvwy(location_vvvvvwy)
if (location_vvvvvwy == 2)
{
jQuery('#jform_site_view').closest('.control-group').show();
// add required attribute to site_view field
if (jform_vvvvvwyvwg_required)
{
updateFieldRequired('site_view',0);
@ -97,11 +99,11 @@ function vvvvvwy(location_vvvvvwy)
jQuery('#jform_site_view').addClass('required');
jform_vvvvvwyvwg_required = false;
}
}
else
{
jQuery('#jform_site_view').closest('.control-group').hide();
// remove required attribute from site_view field
if (!jform_vvvvvwyvwg_required)
{
updateFieldRequired('site_view',1);
@ -133,6 +135,7 @@ function vvvvvwz(type_vvvvvwz)
if (type)
{
jQuery('#jform_url').closest('.control-group').show();
// add required attribute to url field
if (jform_vvvvvwzvwh_required)
{
updateFieldRequired('url',0);
@ -141,11 +144,11 @@ function vvvvvwz(type_vvvvvwz)
jQuery('#jform_url').addClass('required');
jform_vvvvvwzvwh_required = false;
}
}
else
{
jQuery('#jform_url').closest('.control-group').hide();
// remove required attribute from url field
if (!jform_vvvvvwzvwh_required)
{
updateFieldRequired('url',1);
@ -188,6 +191,7 @@ function vvvvvxa(type_vvvvvxa)
if (type)
{
jQuery('#jform_article').closest('.control-group').show();
// add required attribute to article field
if (jform_vvvvvxavwi_required)
{
updateFieldRequired('article',0);
@ -196,11 +200,11 @@ function vvvvvxa(type_vvvvvxa)
jQuery('#jform_article').addClass('required');
jform_vvvvvxavwi_required = false;
}
}
else
{
jQuery('#jform_article').closest('.control-group').hide();
// remove required attribute from article field
if (!jform_vvvvvxavwi_required)
{
updateFieldRequired('article',1);
@ -243,6 +247,7 @@ function vvvvvxb(type_vvvvvxb)
if (type)
{
jQuery('#jform_content-lbl').closest('.control-group').show();
// add required attribute to content field
if (jform_vvvvvxbvwj_required)
{
updateFieldRequired('content',0);
@ -251,11 +256,11 @@ function vvvvvxb(type_vvvvvxb)
jQuery('#jform_content').addClass('required');
jform_vvvvvxbvwj_required = false;
}
}
else
{
jQuery('#jform_content-lbl').closest('.control-group').hide();
// remove required attribute from content field
if (!jform_vvvvvxbvwj_required)
{
updateFieldRequired('content',1);
@ -285,6 +290,7 @@ function vvvvvxc(target_vvvvvxc)
if (target_vvvvvxc == 1)
{
jQuery('#jform_groups').closest('.control-group').show();
// add required attribute to groups field
if (jform_vvvvvxcvwk_required)
{
updateFieldRequired('groups',0);
@ -293,11 +299,11 @@ function vvvvvxc(target_vvvvvxc)
jQuery('#jform_groups').addClass('required');
jform_vvvvvxcvwk_required = false;
}
}
else
{
jQuery('#jform_groups').closest('.control-group').hide();
// remove required attribute from groups field
if (!jform_vvvvvxcvwk_required)
{
updateFieldRequired('groups',1);

View File

@ -127,7 +127,8 @@
description="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_TYPE_DESCRIPTION"
class="list_class"
multiple="false"
required="true">
required="true"
default="">
<!-- Option Set. -->
<option value="">
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SELECT_AN_OPTION</option>
@ -154,6 +155,7 @@
label="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_LOCATION_LABEL"
description="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_LOCATION_DESCRIPTION"
class="btn-group"
default=""
required="true">
<!-- Option Set. -->
<option value="1">
@ -169,6 +171,7 @@
description="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ADMIN_VIEW_DESCRIPTION"
class="list_class"
multiple="false"
default=""
required="true"
button="false"
/>
@ -180,6 +183,7 @@
description="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SITE_VIEW_DESCRIPTION"
class="list_class"
multiple="false"
default=""
required="true"
button="false"
/>
@ -217,6 +221,7 @@
label="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_URL_LABEL"
size="60"
maxlength="150"
default=""
description="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_URL_DESCRIPTION"
class="text_area"
required="true"
@ -233,6 +238,7 @@
label="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_TARGET_LABEL"
description="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_TARGET_DESCRIPTION"
class="btn-group"
default=""
required="true">
<!-- Option Set. -->
<option value="1">

View File

@ -100,7 +100,8 @@
class="list_class"
multiple="false"
filter="INT"
required="true">
required="true"
default="">
<!-- Option Set. -->
<option value="">
COM_SERMONDISTRIBUTOR_LOCAL_LISTING_SELECT_AN_OPTION</option>

View File

@ -138,6 +138,7 @@
label="COM_SERMONDISTRIBUTOR_SERIES_SCRIPTURE_LABEL"
size="90"
maxlength="150"
default=""
description="COM_SERMONDISTRIBUTOR_SERIES_SCRIPTURE_DESCRIPTION"
class="text_area"
readonly="false"

View File

@ -79,6 +79,7 @@ function vvvvvvv(source_vvvvvvv)
if (source)
{
jQuery('#jform_build').closest('.control-group').show();
// add required attribute to build field
if (jform_vvvvvvvvvw_required)
{
updateFieldRequired('build',0);
@ -87,11 +88,11 @@ function vvvvvvv(source_vvvvvvv)
jQuery('#jform_build').addClass('required');
jform_vvvvvvvvvw_required = false;
}
}
else
{
jQuery('#jform_build').closest('.control-group').hide();
// remove required attribute from build field
if (!jform_vvvvvvvvvw_required)
{
updateFieldRequired('build',1);
@ -207,6 +208,7 @@ function vvvvvvy(source_vvvvvvy,build_vvvvvvy)
if (source && build)
{
jQuery('#jform_manual_files').closest('.control-group').show();
// add required attribute to manual_files field
if (jform_vvvvvvyvvx_required)
{
updateFieldRequired('manual_files',0);
@ -215,12 +217,12 @@ function vvvvvvy(source_vvvvvvy,build_vvvvvvy)
jQuery('#jform_manual_files').addClass('required');
jform_vvvvvvyvvx_required = false;
}
jQuery('.note_manual_externalsource').closest('.control-group').show();
}
else
{
jQuery('#jform_manual_files').closest('.control-group').hide();
// remove required attribute from manual_files field
if (!jform_vvvvvvyvvx_required)
{
updateFieldRequired('manual_files',1);
@ -287,6 +289,7 @@ function vvvvvvz(build_vvvvvvz,source_vvvvvvz)
if (build && source)
{
jQuery('#jform_manual_files').closest('.control-group').show();
// add required attribute to manual_files field
if (jform_vvvvvvzvvy_required)
{
updateFieldRequired('manual_files',0);
@ -295,12 +298,12 @@ function vvvvvvz(build_vvvvvvz,source_vvvvvvz)
jQuery('#jform_manual_files').addClass('required');
jform_vvvvvvzvvy_required = false;
}
jQuery('.note_manual_externalsource').closest('.control-group').show();
}
else
{
jQuery('#jform_manual_files').closest('.control-group').hide();
// remove required attribute from manual_files field
if (!jform_vvvvvvzvvy_required)
{
updateFieldRequired('manual_files',1);
@ -355,6 +358,7 @@ function vvvvvwa(source_vvvvvwa)
if (source)
{
jQuery('#jform_local_files').closest('.control-group').show();
// add required attribute to local_files field
if (jform_vvvvvwavvz_required)
{
updateFieldRequired('local_files',0);
@ -363,11 +367,11 @@ function vvvvvwa(source_vvvvvwa)
jQuery('#jform_local_files').addClass('required');
jform_vvvvvwavvz_required = false;
}
}
else
{
jQuery('#jform_local_files').closest('.control-group').hide();
// remove required attribute from local_files field
if (!jform_vvvvvwavvz_required)
{
updateFieldRequired('local_files',1);
@ -410,6 +414,7 @@ function vvvvvwb(source_vvvvvwb)
if (source)
{
jQuery('#jform_url').closest('.control-group').show();
// add required attribute to url field
if (jform_vvvvvwbvwa_required)
{
updateFieldRequired('url',0);
@ -418,11 +423,11 @@ function vvvvvwb(source_vvvvvwb)
jQuery('#jform_url').addClass('required');
jform_vvvvvwbvwa_required = false;
}
}
else
{
jQuery('#jform_url').closest('.control-group').hide();
// remove required attribute from url field
if (!jform_vvvvvwbvwa_required)
{
updateFieldRequired('url',1);

View File

@ -162,6 +162,7 @@
label="COM_SERMONDISTRIBUTOR_SERMON_CATID_LABEL"
extension="com_sermondistributor.sermons"
required="false"
default=""
description="COM_SERMONDISTRIBUTOR_SERMON_CATID_DESCRIPTION"
class="inputbox"
/>
@ -189,7 +190,8 @@
class="list_class"
multiple="false"
filter="INT"
required="true">
required="true"
default="">
<!-- Option Set. -->
<option value="">
COM_SERMONDISTRIBUTOR_SERMON_SELECT_SOURCE</option>
@ -267,7 +269,8 @@
class="list_class"
multiple="false"
filter="INT"
required="true">
required="true"
default="">
<!-- Option Set. -->
<option value="">
COM_SERMONDISTRIBUTOR_SERMON_SELECT_AN_OPTION</option>
@ -309,6 +312,7 @@
label="COM_SERMONDISTRIBUTOR_SERMON_URL_LABEL"
size="10"
maxlength="50"
default=""
description="COM_SERMONDISTRIBUTOR_SERMON_URL_DESCRIPTION"
class="text_area"
required="true"
@ -324,6 +328,7 @@
label="COM_SERMONDISTRIBUTOR_SERMON_SCRIPTURE_LABEL"
size="90"
maxlength="150"
default=""
description="COM_SERMONDISTRIBUTOR_SERMON_SCRIPTURE_DESCRIPTION"
class="text_area"
readonly="false"

View File

@ -7,7 +7,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_preacher` (
`icon` CHAR(64) NOT NULL DEFAULT '',
`name` VARCHAR(255) NOT NULL DEFAULT '',
`website` VARCHAR(255) NOT NULL DEFAULT '',
`params` text NOT NULL DEFAULT '',
`params` text NOT NULL,
`published` TINYINT(3) NOT NULL DEFAULT 1,
`created_by` INT(10) unsigned NOT NULL DEFAULT 0,
`modified_by` INT(10) unsigned NOT NULL DEFAULT 0,
@ -19,9 +19,9 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_preacher` (
`hits` INT(10) unsigned NOT NULL DEFAULT 0,
`access` INT(10) unsigned NOT NULL DEFAULT 0,
`ordering` INT(11) NOT NULL DEFAULT 0,
`metakey` TEXT NOT NULL DEFAULT '',
`metadesc` TEXT NOT NULL DEFAULT '',
`metadata` TEXT NOT NULL DEFAULT '',
`metakey` TEXT NOT NULL,
`metadesc` TEXT NOT NULL,
`metadata` TEXT NOT NULL,
PRIMARY KEY (`id`),
KEY `idx_access` (`access`),
KEY `idx_checkout` (`checked_out`),
@ -30,7 +30,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_preacher` (
KEY `idx_state` (`published`),
KEY `idx_name` (`name`),
KEY `idx_alias` (`alias`)
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `#__sermondistributor_sermon` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
@ -52,7 +52,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_sermon` (
`short_description` VARCHAR(255) NOT NULL DEFAULT '',
`source` TINYINT(1) NOT NULL DEFAULT 0,
`url` VARCHAR(255) NOT NULL DEFAULT '',
`params` text NOT NULL DEFAULT '',
`params` text NOT NULL,
`published` TINYINT(3) NOT NULL DEFAULT 1,
`created_by` INT(10) unsigned NOT NULL DEFAULT 0,
`modified_by` INT(10) unsigned NOT NULL DEFAULT 0,
@ -64,9 +64,9 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_sermon` (
`hits` INT(10) unsigned NOT NULL DEFAULT 0,
`access` INT(10) unsigned NOT NULL DEFAULT 0,
`ordering` INT(11) NOT NULL DEFAULT 0,
`metakey` TEXT NOT NULL DEFAULT '',
`metadesc` TEXT NOT NULL DEFAULT '',
`metadata` TEXT NOT NULL DEFAULT '',
`metakey` TEXT NOT NULL,
`metadesc` TEXT NOT NULL,
`metadata` TEXT NOT NULL,
PRIMARY KEY (`id`),
KEY `idx_access` (`access`),
KEY `idx_checkout` (`checked_out`),
@ -80,7 +80,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_sermon` (
KEY `idx_link_type` (`link_type`),
KEY `idx_alias` (`alias`),
KEY `idx_build` (`build`)
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `#__sermondistributor_series` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
@ -90,7 +90,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_series` (
`icon` CHAR(64) NOT NULL DEFAULT '',
`name` VARCHAR(255) NOT NULL DEFAULT '',
`scripture` VARCHAR(255) NOT NULL DEFAULT '',
`params` text NOT NULL DEFAULT '',
`params` text NOT NULL,
`published` TINYINT(3) NOT NULL DEFAULT 1,
`created_by` INT(10) unsigned NOT NULL DEFAULT 0,
`modified_by` INT(10) unsigned NOT NULL DEFAULT 0,
@ -102,9 +102,9 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_series` (
`hits` INT(10) unsigned NOT NULL DEFAULT 0,
`access` INT(10) unsigned NOT NULL DEFAULT 0,
`ordering` INT(11) NOT NULL DEFAULT 0,
`metakey` TEXT NOT NULL DEFAULT '',
`metadesc` TEXT NOT NULL DEFAULT '',
`metadata` TEXT NOT NULL DEFAULT '',
`metakey` TEXT NOT NULL,
`metadesc` TEXT NOT NULL,
`metadata` TEXT NOT NULL,
PRIMARY KEY (`id`),
KEY `idx_access` (`access`),
KEY `idx_checkout` (`checked_out`),
@ -113,7 +113,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_series` (
KEY `idx_state` (`published`),
KEY `idx_name` (`name`),
KEY `idx_alias` (`alias`)
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `#__sermondistributor_statistic` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
@ -123,7 +123,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_statistic` (
`preacher` INT(11) NOT NULL DEFAULT 0,
`series` INT(11) NOT NULL DEFAULT 0,
`sermon` INT(11) NOT NULL DEFAULT 0,
`params` text NOT NULL DEFAULT '',
`params` text NOT NULL,
`published` TINYINT(3) NOT NULL DEFAULT 1,
`created_by` INT(10) unsigned NOT NULL DEFAULT 0,
`modified_by` INT(10) unsigned NOT NULL DEFAULT 0,
@ -135,9 +135,9 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_statistic` (
`hits` INT(10) unsigned NOT NULL DEFAULT 0,
`access` INT(10) unsigned NOT NULL DEFAULT 0,
`ordering` INT(11) NOT NULL DEFAULT 0,
`metakey` TEXT NOT NULL DEFAULT '',
`metadesc` TEXT NOT NULL DEFAULT '',
`metadata` TEXT NOT NULL DEFAULT '',
`metakey` TEXT NOT NULL,
`metadesc` TEXT NOT NULL,
`metadata` TEXT NOT NULL,
PRIMARY KEY (`id`),
KEY `idx_access` (`access`),
KEY `idx_checkout` (`checked_out`),
@ -148,7 +148,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_statistic` (
KEY `idx_sermon` (`sermon`),
KEY `idx_preacher` (`preacher`),
KEY `idx_series` (`series`)
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `#__sermondistributor_external_source` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
@ -165,7 +165,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_external_source` (
`sharedurl` TEXT NOT NULL,
`update_method` TINYINT NOT NULL DEFAULT 0,
`update_timer` INT(1) NOT NULL DEFAULT 0,
`params` text NOT NULL DEFAULT '',
`params` text NOT NULL,
`published` TINYINT(3) NOT NULL DEFAULT 1,
`created_by` INT(10) unsigned NOT NULL DEFAULT 0,
`modified_by` INT(10) unsigned NOT NULL DEFAULT 0,
@ -187,7 +187,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_external_source` (
KEY `idx_build` (`build`),
KEY `idx_dropboxoptions` (`dropboxoptions`),
KEY `idx_permissiontype` (`permissiontype`)
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `#__sermondistributor_local_listing` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
@ -198,7 +198,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_local_listing` (
`name` VARCHAR(255) NOT NULL DEFAULT '',
`size` INT(50) NOT NULL DEFAULT 0,
`url` TEXT NOT NULL,
`params` text NOT NULL DEFAULT '',
`params` text NOT NULL,
`published` TINYINT(3) NOT NULL DEFAULT 1,
`created_by` INT(10) unsigned NOT NULL DEFAULT 0,
`modified_by` INT(10) unsigned NOT NULL DEFAULT 0,
@ -217,7 +217,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_local_listing` (
KEY `idx_name` (`name`),
KEY `idx_build` (`build`),
KEY `idx_key` (`key`)
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `#__sermondistributor_help_document` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
@ -234,7 +234,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_help_document` (
`title` CHAR(64) NOT NULL DEFAULT '',
`type` TINYINT(1) NOT NULL DEFAULT 0,
`url` VARCHAR(255) NOT NULL DEFAULT '',
`params` text NOT NULL DEFAULT '',
`params` text NOT NULL,
`published` TINYINT(3) NOT NULL DEFAULT 1,
`created_by` INT(10) unsigned NOT NULL DEFAULT 0,
`modified_by` INT(10) unsigned NOT NULL DEFAULT 0,
@ -246,9 +246,9 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_help_document` (
`hits` INT(10) unsigned NOT NULL DEFAULT 0,
`access` INT(10) unsigned NOT NULL DEFAULT 0,
`ordering` INT(11) NOT NULL DEFAULT 0,
`metakey` TEXT NOT NULL DEFAULT '',
`metadesc` TEXT NOT NULL DEFAULT '',
`metadata` TEXT NOT NULL DEFAULT '',
`metakey` TEXT NOT NULL,
`metadesc` TEXT NOT NULL,
`metadata` TEXT NOT NULL,
PRIMARY KEY (`id`),
KEY `idx_access` (`access`),
KEY `idx_checkout` (`checked_out`),
@ -261,7 +261,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_help_document` (
KEY `idx_article` (`article`),
KEY `idx_target` (`target`),
KEY `idx_alias` (`alias`)
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;

View File

@ -233,7 +233,7 @@ class SermondistributorTableExternal_source extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
return JAccess::getAssetRules($assetId);
return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)

View File

@ -233,7 +233,7 @@ class SermondistributorTableHelp_document extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
return JAccess::getAssetRules($assetId);
return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)

View File

@ -233,7 +233,7 @@ class SermondistributorTableLocal_listing extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
return JAccess::getAssetRules($assetId);
return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)

View File

@ -233,7 +233,7 @@ class SermondistributorTablePreacher extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
return JAccess::getAssetRules($assetId);
return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)

View File

@ -233,7 +233,7 @@ class SermondistributorTableSeries extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
return JAccess::getAssetRules($assetId);
return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)

View File

@ -236,7 +236,7 @@ class SermondistributorTableSermon extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
return JAccess::getAssetRules($assetId);
return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)

View File

@ -233,7 +233,7 @@ class SermondistributorTableStatistic extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
return JAccess::getAssetRules($assetId);
return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)

View File

@ -26,19 +26,9 @@ Joomla.submitbutton = function(task)
if (task == ''){
return false;
} else {
var isValid=true;
var action = task.split('.');
if (action[1] != 'cancel' && action[1] != 'close'){
var forms = $$('form.form-validate');
for (var i=0;i<forms.length;i++){
if (!document.formvalidator.isValid(forms[i])){
isValid = false;
break;
}
}
}
if (isValid){
Joomla.submitform(task);
if (action[1] == 'cancel' || action[1] == 'close' || document.formvalidator.isValid(document.getElementById("adminForm"))){
Joomla.submitform(task, document.getElementById("adminForm"));
return true;
} else {
alert(Joomla.JText._('external_source, some values are not acceptable.','Some values are unacceptable'));

View File

@ -30,7 +30,7 @@ JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
$componentParams = JComponentHelper::getParams('com_sermondistributor');
$componentParams = $this->params; // will be removed just use $this->params instead
?>
<script type="text/javascript">
// waiting spinner

View File

@ -36,13 +36,15 @@ class SermondistributorViewExternal_source extends JViewLegacy
*/
public function display($tpl = null)
{
// set params
$this->params = JComponentHelper::getParams('com_sermondistributor');
// Assign the variables
$this->form = $this->get('Form');
$this->item = $this->get('Item');
$this->script = $this->get('Script');
$this->state = $this->get('State');
// get action permissions
$this->canDo = SermondistributorHelper::getActions('external_source',$this->item);
$this->canDo = SermondistributorHelper::getActions('external_source', $this->item);
// get input
$jinput = JFactory::getApplication()->input;
$this->ref = $jinput->get('ref', 0, 'word');

View File

@ -50,6 +50,8 @@ class SermondistributorViewExternal_sources extends JViewLegacy
$this->listOrder = $this->escape($this->state->get('list.ordering'));
$this->listDirn = $this->escape($this->state->get('list.direction'));
$this->saveOrder = $this->listOrder == 'ordering';
// set the return here value
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
// get global action permissions
$this->canDo = SermondistributorHelper::getActions('external_source');
$this->canEdit = $this->canDo->get('external_source.edit');

View File

@ -26,19 +26,9 @@ Joomla.submitbutton = function(task)
if (task == ''){
return false;
} else {
var isValid=true;
var action = task.split('.');
if (action[1] != 'cancel' && action[1] != 'close'){
var forms = $$('form.form-validate');
for (var i=0;i<forms.length;i++){
if (!document.formvalidator.isValid(forms[i])){
isValid = false;
break;
}
}
}
if (isValid){
Joomla.submitform(task);
if (action[1] == 'cancel' || action[1] == 'close' || document.formvalidator.isValid(document.getElementById("adminForm"))){
Joomla.submitform(task, document.getElementById("adminForm"));
return true;
} else {
alert(Joomla.JText._('help_document, some values are not acceptable.','Some values are unacceptable'));

View File

@ -30,7 +30,7 @@ JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
$componentParams = JComponentHelper::getParams('com_sermondistributor');
$componentParams = $this->params; // will be removed just use $this->params instead
?>
<script type="text/javascript">
// waiting spinner

View File

@ -36,13 +36,15 @@ class SermondistributorViewHelp_document extends JViewLegacy
*/
public function display($tpl = null)
{
// set params
$this->params = JComponentHelper::getParams('com_sermondistributor');
// Assign the variables
$this->form = $this->get('Form');
$this->item = $this->get('Item');
$this->script = $this->get('Script');
$this->state = $this->get('State');
// get action permissions
$this->canDo = SermondistributorHelper::getActions('help_document',$this->item);
$this->canDo = SermondistributorHelper::getActions('help_document', $this->item);
// get input
$jinput = JFactory::getApplication()->input;
$this->ref = $jinput->get('ref', 0, 'word');

View File

@ -50,6 +50,8 @@ class SermondistributorViewHelp_documents extends JViewLegacy
$this->listOrder = $this->escape($this->state->get('list.ordering'));
$this->listDirn = $this->escape($this->state->get('list.direction'));
$this->saveOrder = $this->listOrder == 'ordering';
// set the return here value
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
// get global action permissions
$this->canDo = SermondistributorHelper::getActions('help_document');
$this->canEdit = $this->canDo->get('help_document.edit');
@ -242,7 +244,7 @@ class SermondistributorViewHelp_documents extends JViewLegacy
}
// Set Admin View Selection
$this->admin_viewOptions = JFormHelper::loadFieldType('Adminviewfolderlist')->getOptions();
$this->admin_viewOptions = JFormHelper::loadFieldType('Adminviewfolderlist')->options;
if ($this->admin_viewOptions)
{
// Admin View Filter
@ -264,7 +266,7 @@ class SermondistributorViewHelp_documents extends JViewLegacy
}
// Set Site View Selection
$this->site_viewOptions = JFormHelper::loadFieldType('Siteviewfolderlist')->getOptions();
$this->site_viewOptions = JFormHelper::loadFieldType('Siteviewfolderlist')->options;
if ($this->site_viewOptions)
{
// Site View Filter

View File

@ -26,19 +26,9 @@ Joomla.submitbutton = function(task)
if (task == ''){
return false;
} else {
var isValid=true;
var action = task.split('.');
if (action[1] != 'cancel' && action[1] != 'close'){
var forms = $$('form.form-validate');
for (var i=0;i<forms.length;i++){
if (!document.formvalidator.isValid(forms[i])){
isValid = false;
break;
}
}
}
if (isValid){
Joomla.submitform(task);
if (action[1] == 'cancel' || action[1] == 'close' || document.formvalidator.isValid(document.getElementById("adminForm"))){
Joomla.submitform(task, document.getElementById("adminForm"));
return true;
} else {
alert(Joomla.JText._('local_listing, some values are not acceptable.','Some values are unacceptable'));

View File

@ -30,7 +30,7 @@ JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
$componentParams = JComponentHelper::getParams('com_sermondistributor');
$componentParams = $this->params; // will be removed just use $this->params instead
?>
<script type="text/javascript">
// waiting spinner

View File

@ -36,13 +36,15 @@ class SermondistributorViewLocal_listing extends JViewLegacy
*/
public function display($tpl = null)
{
// set params
$this->params = JComponentHelper::getParams('com_sermondistributor');
// Assign the variables
$this->form = $this->get('Form');
$this->item = $this->get('Item');
$this->script = $this->get('Script');
$this->state = $this->get('State');
// get action permissions
$this->canDo = SermondistributorHelper::getActions('local_listing',$this->item);
$this->canDo = SermondistributorHelper::getActions('local_listing', $this->item);
// get input
$jinput = JFactory::getApplication()->input;
$this->ref = $jinput->get('ref', 0, 'word');

View File

@ -94,7 +94,7 @@ $edit = "index.php?option=com_sermondistributor&view=local_listings&task=local_l
<td class="nowrap">
<div class="name">
<?php if ($this->user->authorise('external_source.edit', 'com_sermondistributor.external_source.' . (int)$item->external_source)): ?>
<a href="index.php?option=com_sermondistributor&view=external_sources&task=external_source.edit&id=<?php echo $item->external_source; ?>&ref=local_listings"><?php echo $this->escape($item->external_source_description); ?></a>
<a href="index.php?option=com_sermondistributor&view=external_sources&task=external_source.edit&id=<?php echo $item->external_source; ?>&return=<?php echo $this->return_here; ?>"><?php echo $this->escape($item->external_source_description); ?></a>
<?php else: ?>
<?php echo $this->escape($item->external_source_description); ?>
<?php endif; ?>

View File

@ -50,6 +50,8 @@ class SermondistributorViewLocal_listings extends JViewLegacy
$this->listOrder = $this->escape($this->state->get('list.ordering'));
$this->listDirn = $this->escape($this->state->get('list.direction'));
$this->saveOrder = $this->listOrder == 'ordering';
// set the return here value
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
// get global action permissions
$this->canDo = SermondistributorHelper::getActions('local_listing');
$this->canEdit = $this->canDo->get('local_listing.edit');
@ -220,7 +222,7 @@ class SermondistributorViewLocal_listings extends JViewLegacy
}
// Set External Source Description Selection
$this->external_sourceDescriptionOptions = JFormHelper::loadFieldType('Externalsource')->getOptions();
$this->external_sourceDescriptionOptions = JFormHelper::loadFieldType('Externalsource')->options;
if ($this->external_sourceDescriptionOptions)
{
// External Source Description Filter

View File

@ -26,19 +26,9 @@ Joomla.submitbutton = function(task)
if (task == ''){
return false;
} else {
var isValid=true;
var action = task.split('.');
if (action[1] != 'cancel' && action[1] != 'close'){
var forms = $$('form.form-validate');
for (var i=0;i<forms.length;i++){
if (!document.formvalidator.isValid(forms[i])){
isValid = false;
break;
}
}
}
if (isValid){
Joomla.submitform(task);
if (action[1] == 'cancel' || action[1] == 'close' || document.formvalidator.isValid(document.getElementById("adminForm"))){
Joomla.submitform(task, document.getElementById("adminForm"));
return true;
} else {
alert(Joomla.JText._('preacher, some values are not acceptable.','Some values are unacceptable'));

View File

@ -30,7 +30,7 @@ JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
$componentParams = JComponentHelper::getParams('com_sermondistributor');
$componentParams = $this->params; // will be removed just use $this->params instead
?>
<script type="text/javascript">
// waiting spinner

View File

@ -36,13 +36,15 @@ class SermondistributorViewPreacher extends JViewLegacy
*/
public function display($tpl = null)
{
// set params
$this->params = JComponentHelper::getParams('com_sermondistributor');
// Assign the variables
$this->form = $this->get('Form');
$this->item = $this->get('Item');
$this->script = $this->get('Script');
$this->state = $this->get('State');
// get action permissions
$this->canDo = SermondistributorHelper::getActions('preacher',$this->item);
$this->canDo = SermondistributorHelper::getActions('preacher', $this->item);
// get input
$jinput = JFactory::getApplication()->input;
$this->ref = $jinput->get('ref', 0, 'word');

View File

@ -50,6 +50,8 @@ class SermondistributorViewPreachers extends JViewLegacy
$this->listOrder = $this->escape($this->state->get('list.ordering'));
$this->listDirn = $this->escape($this->state->get('list.direction'));
$this->saveOrder = $this->listOrder == 'ordering';
// set the return here value
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
// get global action permissions
$this->canDo = SermondistributorHelper::getActions('preacher');
$this->canEdit = $this->canDo->get('preacher.edit');

View File

@ -26,19 +26,9 @@ Joomla.submitbutton = function(task)
if (task == ''){
return false;
} else {
var isValid=true;
var action = task.split('.');
if (action[1] != 'cancel' && action[1] != 'close'){
var forms = $$('form.form-validate');
for (var i=0;i<forms.length;i++){
if (!document.formvalidator.isValid(forms[i])){
isValid = false;
break;
}
}
}
if (isValid){
Joomla.submitform(task);
if (action[1] == 'cancel' || action[1] == 'close' || document.formvalidator.isValid(document.getElementById("adminForm"))){
Joomla.submitform(task, document.getElementById("adminForm"));
return true;
} else {
alert(Joomla.JText._('series, some values are not acceptable.','Some values are unacceptable'));

View File

@ -30,7 +30,7 @@ JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
$componentParams = JComponentHelper::getParams('com_sermondistributor');
$componentParams = $this->params; // will be removed just use $this->params instead
?>
<script type="text/javascript">
// waiting spinner

View File

@ -36,13 +36,15 @@ class SermondistributorViewSeries extends JViewLegacy
*/
public function display($tpl = null)
{
// set params
$this->params = JComponentHelper::getParams('com_sermondistributor');
// Assign the variables
$this->form = $this->get('Form');
$this->item = $this->get('Item');
$this->script = $this->get('Script');
$this->state = $this->get('State');
// get action permissions
$this->canDo = SermondistributorHelper::getActions('series',$this->item);
$this->canDo = SermondistributorHelper::getActions('series', $this->item);
// get input
$jinput = JFactory::getApplication()->input;
$this->ref = $jinput->get('ref', 0, 'word');

View File

@ -50,6 +50,8 @@ class SermondistributorViewSeries_list extends JViewLegacy
$this->listOrder = $this->escape($this->state->get('list.ordering'));
$this->listDirn = $this->escape($this->state->get('list.direction'));
$this->saveOrder = $this->listOrder == 'ordering';
// set the return here value
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
// get global action permissions
$this->canDo = SermondistributorHelper::getActions('series');
$this->canEdit = $this->canDo->get('series.edit');

View File

@ -26,19 +26,9 @@ Joomla.submitbutton = function(task)
if (task == ''){
return false;
} else {
var isValid=true;
var action = task.split('.');
if (action[1] != 'cancel' && action[1] != 'close'){
var forms = $$('form.form-validate');
for (var i=0;i<forms.length;i++){
if (!document.formvalidator.isValid(forms[i])){
isValid = false;
break;
}
}
}
if (isValid){
Joomla.submitform(task);
if (action[1] == 'cancel' || action[1] == 'close' || document.formvalidator.isValid(document.getElementById("adminForm"))){
Joomla.submitform(task, document.getElementById("adminForm"));
return true;
} else {
alert(Joomla.JText._('sermon, some values are not acceptable.','Some values are unacceptable'));

View File

@ -30,7 +30,7 @@ JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
$componentParams = JComponentHelper::getParams('com_sermondistributor');
$componentParams = $this->params; // will be removed just use $this->params instead
?>
<script type="text/javascript">
// waiting spinner

View File

@ -36,13 +36,15 @@ class SermondistributorViewSermon extends JViewLegacy
*/
public function display($tpl = null)
{
// set params
$this->params = JComponentHelper::getParams('com_sermondistributor');
// Assign the variables
$this->form = $this->get('Form');
$this->item = $this->get('Item');
$this->script = $this->get('Script');
$this->state = $this->get('State');
// get action permissions
$this->canDo = SermondistributorHelper::getActions('sermon',$this->item);
$this->canDo = SermondistributorHelper::getActions('sermon', $this->item);
// get input
$jinput = JFactory::getApplication()->input;
$this->ref = $jinput->get('ref', 0, 'word');

View File

@ -88,7 +88,7 @@ $edit = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit";
<td class="nowrap">
<div class="name">
<?php if ($this->user->authorise('preacher.edit', 'com_sermondistributor.preacher.' . (int)$item->preacher)): ?>
<a href="index.php?option=com_sermondistributor&view=preachers&task=preacher.edit&id=<?php echo $item->preacher; ?>&ref=sermons"><?php echo $this->escape($item->preacher_name); ?></a>
<a href="index.php?option=com_sermondistributor&view=preachers&task=preacher.edit&id=<?php echo $item->preacher; ?>&return=<?php echo $this->return_here; ?>"><?php echo $this->escape($item->preacher_name); ?></a>
<?php else: ?>
<?php echo $this->escape($item->preacher_name); ?>
<?php endif; ?>
@ -97,7 +97,7 @@ $edit = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit";
<td class="nowrap">
<div class="name">
<?php if ($this->user->authorise('series.edit', 'com_sermondistributor.series.' . (int)$item->series)): ?>
<a href="index.php?option=com_sermondistributor&view=all_series&task=series.edit&id=<?php echo $item->series; ?>&ref=sermons"><?php echo $this->escape($item->series_name); ?></a>
<a href="index.php?option=com_sermondistributor&view=all_series&task=series.edit&id=<?php echo $item->series; ?>&return=<?php echo $this->return_here; ?>"><?php echo $this->escape($item->series_name); ?></a>
<?php else: ?>
<?php echo $this->escape($item->series_name); ?>
<?php endif; ?>

View File

@ -50,6 +50,8 @@ class SermondistributorViewSermons extends JViewLegacy
$this->listOrder = $this->escape($this->state->get('list.ordering'));
$this->listDirn = $this->escape($this->state->get('list.direction'));
$this->saveOrder = $this->listOrder == 'ordering';
// set the return here value
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
// get global action permissions
$this->canDo = SermondistributorHelper::getActions('sermon');
$this->canEdit = $this->canDo->get('sermon.edit');
@ -215,7 +217,7 @@ class SermondistributorViewSermons extends JViewLegacy
}
// Set Preacher Name Selection
$this->preacherNameOptions = JFormHelper::loadFieldType('Preachers')->getOptions();
$this->preacherNameOptions = JFormHelper::loadFieldType('Preachers')->options;
if ($this->preacherNameOptions)
{
// Preacher Name Filter
@ -237,7 +239,7 @@ class SermondistributorViewSermons extends JViewLegacy
}
// Set Series Name Selection
$this->seriesNameOptions = JFormHelper::loadFieldType('Series')->getOptions();
$this->seriesNameOptions = JFormHelper::loadFieldType('Series')->options;
if ($this->seriesNameOptions)
{
// Series Name Filter

View File

@ -26,19 +26,9 @@ Joomla.submitbutton = function(task)
if (task == ''){
return false;
} else {
var isValid=true;
var action = task.split('.');
if (action[1] != 'cancel' && action[1] != 'close'){
var forms = $$('form.form-validate');
for (var i=0;i<forms.length;i++){
if (!document.formvalidator.isValid(forms[i])){
isValid = false;
break;
}
}
}
if (isValid){
Joomla.submitform(task);
if (action[1] == 'cancel' || action[1] == 'close' || document.formvalidator.isValid(document.getElementById("adminForm"))){
Joomla.submitform(task, document.getElementById("adminForm"));
return true;
} else {
alert(Joomla.JText._('statistic, some values are not acceptable.','Some values are unacceptable'));

Some files were not shown because too many files have changed in this diff Show More