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) + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Sermon Distributor](https://www.vdm.io/) + *Name*: [Sermon Distributor](https://www.vdm.io/)
+ *First Build*: 22nd October, 2015 + *First Build*: 22nd October, 2015
+ *Last Build*: 6th September, 2018 + *Last Build*: 4th April, 2019
+ *Version*: 2.0.x + *Version*: 2.0.x
+ *Copyright*: Copyright (C) 2015. All Rights Reserved + *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + *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**, > (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.) > never making one mistake or taking any coffee break.)
+ *Line count*: **66852** + *Line count*: **66821**
+ *File count*: **445** + *File count*: **445**
+ *Folder count*: **93** + *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) + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Sermon Distributor](https://www.vdm.io/) + *Name*: [Sermon Distributor](https://www.vdm.io/)
+ *First Build*: 22nd October, 2015 + *First Build*: 22nd October, 2015
+ *Last Build*: 6th September, 2018 + *Last Build*: 4th April, 2019
+ *Version*: 2.0.x + *Version*: 2.0.x
+ *Copyright*: Copyright (C) 2015. All Rights Reserved + *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + *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**, > (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.) > never making one mistake or taking any coffee break.)
+ *Line count*: **66852** + *Line count*: **66821**
+ *File count*: **445** + *File count*: **445**
+ *Folder count*: **93** + *Folder count*: **93**

View File

@ -1955,6 +1955,32 @@ abstract class SermondistributorHelper
return date('jS \o\f F Y',$date); 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 * Change to nice fancy day time and date
*/ */
@ -1991,6 +2017,30 @@ abstract class SermondistributorHelper
return date('G:i',$time); 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 * Check if string is a valid time stamp
*/ */
@ -3296,107 +3346,120 @@ 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(); $user = JFactory::getUser();
// load the JObject
$result = new JObject; $result = new JObject;
// make view name safe (just incase)
$view = self::safeString($view); $view = self::safeString($view);
if (self::checkString($views)) if (self::checkString($views))
{ {
$views = self::safeString($views); $views = self::safeString($views);
} }
// get all actions from component // get all actions from component
$actions = JAccess::getActions('com_sermondistributor', 'component'); $actions = JAccess::getActionsFromFile(
// set acctions only set in component settiongs 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'); $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 // loop the actions and set the permissions
foreach ($actions as $action) foreach ($actions as $action)
{ {
// check target action filter
if ($checkTarget && self::filterActions($view, $action->name, $target))
{
continue;
}
// set to use component default // set to use component default
$fallback = true; $fallback = true;
if (self::checkObject($record) && isset($record->id) && $record->id > 0 && !in_array($action->name,$componentActions)) // 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. // The record has been set. Check the record permissions.
$permission = $user->authorise($action->name, 'com_sermondistributor.'.$view.'.' . (int) $record->id); $permission = $user->authorise($action->name, 'com_' . $component . '.' . $view . '.' . (int) $record->id);
if (!$permission) // TODO removed && !is_null($permission) // 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)) // the correct target
{ $coreCheck = (array) explode('.', $action->name);
// If the owner matches 'me' then allow. // check that we have both local and global access
if (isset($record->created_by) && $record->created_by > 0 && ($record->created_by == $user->id)) 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); $result->set($action->name, true);
// set not to use component default // set not to use global default
// because we already validated it
$fallback = false; $fallback = false;
} }
else else
{ {
// do not allow edit
$result->set($action->name, false); $result->set($action->name, false);
// set not to use component default
$fallback = false; $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;
}
}
}
} }
elseif (self::checkString($views) && isset($record->catid) && $record->catid > 0) elseif (self::checkString($views) && isset($record->catid) && $record->catid > 0)
{ {
// make sure we use the core. action check for the categories // we are in item
if (strpos($action->name,$view) !== false && strpos($action->name,'core.') === false ) { $area = 'category';
// set the core check
$coreCheck = explode('.', $action->name); $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[0] = 'core'; $coreCheck[0] = 'core';
$categoryCheck = implode('.', $coreCheck); $categoryCheck = implode('.', $coreCheck);
} }
@ -3405,88 +3468,76 @@ abstract class SermondistributorHelper
$categoryCheck = $action->name; $categoryCheck = $action->name;
} }
// The record has a category. Check the category permissions. // 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 (!$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)) // check that we have both local and global access
{ if ($user->authorise('core.edit.own', 'com_' . $component . '.' . $views . '.category.' . (int) $record->catid) &&
// If the owner matches 'me' then allow. $user->authorise($core . '.edit.own', 'com_' . $component))
if (isset($record->created_by) && $record->created_by > 0 && ($record->created_by == $user->id))
{ {
// allow edit
$result->set($action->name, true); $result->set($action->name, true);
// set not to use component default // set not to use global default
// because we already validated it
$fallback = false; $fallback = false;
} }
else else
{ {
// do not allow edit
$result->set($action->name, false); $result->set($action->name, false);
// set not to use component default
$fallback = false; $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;
}
}
}
} }
} }
} }
// if allowed then fallback on component global settings // if allowed then fallback on component global settings
if ($fallback) 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; 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 * Get any component's model
**/ **/
@ -3534,7 +3585,7 @@ abstract class SermondistributorHelper
/** /**
* Add to asset Table * Add to asset Table
*/ */
public static function setAsset($id,$table) public static function setAsset($id, $table, $inherit = true)
{ {
$parent = JTable::getInstance('Asset'); $parent = JTable::getInstance('Asset');
$parent->loadByName('com_sermondistributor'); $parent->loadByName('com_sermondistributor');
@ -3566,7 +3617,7 @@ abstract class SermondistributorHelper
$asset->name = $name; $asset->name = $name;
$asset->title = $title; $asset->title = $title;
// get the default asset rules // get the default asset rules
$rules = self::getDefaultAssetRules('com_sermondistributor',$table); $rules = self::getDefaultAssetRules('com_sermondistributor', $table, $inherit);
if ($rules instanceof JAccessRules) if ($rules instanceof JAccessRules)
{ {
$asset->rules = (string) $rules; $asset->rules = (string) $rules;
@ -3596,7 +3647,12 @@ abstract class SermondistributorHelper
/** /**
* Gets the default asset Rules for a component/view. * 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. // Need to find the asset id by the name of the component.
$db = JFactory::getDbo(); $db = JFactory::getDbo();
@ -3606,10 +3662,14 @@ abstract class SermondistributorHelper
->where($db->quoteName('name') . ' = ' . $db->quote($component)); ->where($db->quoteName('name') . ' = ' . $db->quote($component));
$db->setQuery($query); $db->setQuery($query);
$db->execute(); $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(); $assetId = (int) $db->loadResult();
}
}
// get asset rules
$result = JAccess::getAssetRules($assetId); $result = JAccess::getAssetRules($assetId);
if ($result instanceof JAccessRules) if ($result instanceof JAccessRules)
{ {
@ -3623,27 +3683,25 @@ abstract class SermondistributorHelper
// remove since it is not part of this view // remove since it is not part of this view
unset($_result->$name); unset($_result->$name);
} }
else elseif ($inherit)
{ {
// clear the value since we inherit // clear the value since we inherit
$rule = array(); $rule = array();
} }
} }
// check if there are any view values remaining // check if there are any view values remaining
if (count((array)$_result)) if (count($_result))
{ {
$_result = json_encode($_result); $_result = json_encode($_result);
$_result = array($_result); $_result = array($_result);
// Instantiate and return the JAccessRules object for the asset rules. // Instantiate and return the JAccessRules object for the asset rules.
$rules = new JAccessRules($_result); $rules = new JAccessRules($_result);
// return filtered rules
return $rules; return $rules;
} }
}
return $result; return $result;
} }
}
return JAccess::getAssetRules(0);
}
/** /**
* xmlAppend * xmlAppend
@ -3848,11 +3906,11 @@ abstract class SermondistributorHelper
* *
* @input array The array to check * @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) 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 // also make sure the empty strings are removed
if ($removeEmptyString) if ($removeEmptyString)
@ -3866,7 +3924,7 @@ abstract class SermondistributorHelper
} }
return self::checkArray($array, false); return self::checkArray($array, false);
} }
return true; return $nr;
} }
return false; 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_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="Manual Updater Submenu"
COM_SERMONDISTRIBUTOR_MANUAL_UPDATER_SUBMENU_DESC="Allows the users in this group to submenu of Manual Updater" 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_DESC="All categories that are published"
COM_SERMONDISTRIBUTOR_MENU_CATEGORIES_OPTION="Categories" COM_SERMONDISTRIBUTOR_MENU_CATEGORIES_OPTION="Categories"
COM_SERMONDISTRIBUTOR_MENU_CATEGORIES_TITLE="Categories" COM_SERMONDISTRIBUTOR_MENU_CATEGORIES_TITLE="Categories"

View File

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

View File

@ -27,14 +27,19 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm(); $form = $displayData->getForm();
$fields = array( $fields = $displayData->get('fields') ?: array(
'description', 'description',
'externalsources' 'externalsources'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<div class="form-inline form-inline-header"> <div class="form-inline form-inline-header">
<?php foreach($fields as $field){ <?php foreach($fields as $field): ?>
echo $form->renderField($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> </div>

View File

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

View File

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

View File

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

View File

@ -27,13 +27,18 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm(); $form = $displayData->getForm();
$fields = array( $fields = $displayData->get('fields') ?: array(
'not_required' 'not_required'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<div class="form-inline form-inline-header"> <div class="form-inline form-inline-header">
<?php foreach($fields as $field){ <?php foreach($fields as $field): ?>
echo $form->renderField($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> </div>

View File

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

View File

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

View File

@ -27,14 +27,19 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm(); $form = $displayData->getForm();
$fields = array( $fields = $displayData->get('fields') ?: array(
'title', 'title',
'alias' 'alias'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<div class="form-inline form-inline-header"> <div class="form-inline form-inline-header">
<?php foreach($fields as $field){ <?php foreach($fields as $field): ?>
echo $form->renderField($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> </div>

View File

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

View File

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

View File

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

View File

@ -27,13 +27,18 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm(); $form = $displayData->getForm();
$fields = array( $fields = $displayData->get('fields') ?: array(
'not_required' 'not_required'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<div class="form-inline form-inline-header"> <div class="form-inline form-inline-header">
<?php foreach($fields as $field){ <?php foreach($fields as $field): ?>
echo $form->renderField($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> </div>

View File

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

View File

@ -27,14 +27,19 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm(); $form = $displayData->getForm();
$fields = array( $fields = $displayData->get('fields') ?: array(
'name', 'name',
'size' 'size'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<div class="form-inline form-inline-header"> <div class="form-inline form-inline-header">
<?php foreach($fields as $field){ <?php foreach($fields as $field): ?>
echo $form->renderField($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> </div>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -27,14 +27,19 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm(); $form = $displayData->getForm();
$fields = array( $fields = $displayData->get('fields') ?: array(
'name', 'name',
'alias' 'alias'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<div class="form-inline form-inline-header"> <div class="form-inline form-inline-header">
<?php foreach($fields as $field){ <?php foreach($fields as $field): ?>
echo $form->renderField($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> </div>

View File

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

View File

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

View File

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

View File

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

View File

@ -39,12 +39,20 @@ if ($_return = $jinput->get('return', null, 'base64'))
{ {
$return .= "&return=" . $_return; $return .= "&return=" . $_return;
} }
// check if return value was set
if (SermondistributorHelper::checkString($return))
{
// set the referral values // set the referral values
$ref = ($id) ? "&ref=preacher&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : ""; $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 // 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 // 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 // load the action object
$can = SermondistributorHelper::getActions('sermon'); $can = SermondistributorHelper::getActions('sermon');

View File

@ -27,14 +27,19 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm(); $form = $displayData->getForm();
$fields = array( $fields = $displayData->get('fields') ?: array(
'name', 'name',
'alias' 'alias'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<div class="form-inline form-inline-header"> <div class="form-inline form-inline-header">
<?php foreach($fields as $field){ <?php foreach($fields as $field): ?>
echo $form->renderField($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> </div>

View File

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

View File

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

View File

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

View File

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

View File

@ -39,10 +39,18 @@ if ($_return = $jinput->get('return', null, 'base64'))
{ {
$return .= "&return=" . $_return; $return .= "&return=" . $_return;
} }
// check if return value was set
if (SermondistributorHelper::checkString($return))
{
// set the referral values // set the referral values
$ref = ($id) ? "&ref=series&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : ""; $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 // 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 // load the action object
$can = SermondistributorHelper::getActions('sermon'); $can = SermondistributorHelper::getActions('sermon');

View File

@ -27,15 +27,20 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm(); $form = $displayData->getForm();
$fields = array( $fields = $displayData->get('fields') ?: array(
'name', 'name',
'alias', 'alias',
'preacher' 'preacher'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<div class="form-inline form-inline-header"> <div class="form-inline form-inline-header">
<?php foreach($fields as $field){ <?php foreach($fields as $field): ?>
echo $form->renderField($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> </div>

View File

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

View File

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

View File

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

View File

@ -27,14 +27,19 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm(); $form = $displayData->getForm();
$fields = array( $fields = $displayData->get('fields') ?: array(
'not_required', 'not_required',
'auto_sermons' 'auto_sermons'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<div class="form-inline form-inline-header"> <div class="form-inline form-inline-header">
<?php foreach($fields as $field){ <?php foreach($fields as $field): ?>
echo $form->renderField($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> </div>

View File

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

View File

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

View File

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

View File

@ -27,14 +27,19 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm(); $form = $displayData->getForm();
$fields = array( $fields = $displayData->get('fields') ?: array(
'filename', 'filename',
'sermon' 'sermon'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<div class="form-inline form-inline-header"> <div class="form-inline form-inline-header">
<?php foreach($fields as $field){ <?php foreach($fields as $field): ?>
echo $form->renderField($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> </div>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -46,7 +46,7 @@ class JFormFieldExternalsourcefiles extends JFormFieldList
* *
* @return array An array of JHtml options. * @return array An array of JHtml options.
*/ */
public function getOptions() protected function getOptions()
{ {
// set the default // set the default
$options[] = JHtml::_('select.option', '', JText::_('COM_SERMONDISTRIBUTOR_THE_LOCAL_LISTING_OF_THE_MANUAL_EXTERNAL_SOURCE_FOLDERS_IS_EMPTY')); $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. * @return array An array of JHtml options.
*/ */
public function getOptions() protected function getOptions()
{ {
// get local folder // get local folder
$localfolder = JComponentHelper::getParams('com_sermondistributor')->get('localfolder', JPATH_ROOT.'/images'); $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. * @return array An array of JHtml options.
*/ */
public function getOptions() protected function getOptions()
{ {
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $query = $db->getQuery(true);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -7,7 +7,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_preacher` (
`icon` CHAR(64) NOT NULL DEFAULT '', `icon` CHAR(64) NOT NULL DEFAULT '',
`name` VARCHAR(255) NOT NULL DEFAULT '', `name` VARCHAR(255) NOT NULL DEFAULT '',
`website` 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, `published` TINYINT(3) NOT NULL DEFAULT 1,
`created_by` INT(10) unsigned NOT NULL DEFAULT 0, `created_by` INT(10) unsigned NOT NULL DEFAULT 0,
`modified_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, `hits` INT(10) unsigned NOT NULL DEFAULT 0,
`access` INT(10) unsigned NOT NULL DEFAULT 0, `access` INT(10) unsigned NOT NULL DEFAULT 0,
`ordering` INT(11) NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0,
`metakey` TEXT NOT NULL DEFAULT '', `metakey` TEXT NOT NULL,
`metadesc` TEXT NOT NULL DEFAULT '', `metadesc` TEXT NOT NULL,
`metadata` TEXT NOT NULL DEFAULT '', `metadata` TEXT NOT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `idx_access` (`access`), KEY `idx_access` (`access`),
KEY `idx_checkout` (`checked_out`), KEY `idx_checkout` (`checked_out`),
@ -30,7 +30,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_preacher` (
KEY `idx_state` (`published`), KEY `idx_state` (`published`),
KEY `idx_name` (`name`), KEY `idx_name` (`name`),
KEY `idx_alias` (`alias`) 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` ( CREATE TABLE IF NOT EXISTS `#__sermondistributor_sermon` (
`id` INT(11) NOT NULL AUTO_INCREMENT, `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 '', `short_description` VARCHAR(255) NOT NULL DEFAULT '',
`source` TINYINT(1) NOT NULL DEFAULT 0, `source` TINYINT(1) NOT NULL DEFAULT 0,
`url` VARCHAR(255) NOT NULL DEFAULT '', `url` VARCHAR(255) NOT NULL DEFAULT '',
`params` text NOT NULL DEFAULT '', `params` text NOT NULL,
`published` TINYINT(3) NOT NULL DEFAULT 1, `published` TINYINT(3) NOT NULL DEFAULT 1,
`created_by` INT(10) unsigned NOT NULL DEFAULT 0, `created_by` INT(10) unsigned NOT NULL DEFAULT 0,
`modified_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, `hits` INT(10) unsigned NOT NULL DEFAULT 0,
`access` INT(10) unsigned NOT NULL DEFAULT 0, `access` INT(10) unsigned NOT NULL DEFAULT 0,
`ordering` INT(11) NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0,
`metakey` TEXT NOT NULL DEFAULT '', `metakey` TEXT NOT NULL,
`metadesc` TEXT NOT NULL DEFAULT '', `metadesc` TEXT NOT NULL,
`metadata` TEXT NOT NULL DEFAULT '', `metadata` TEXT NOT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `idx_access` (`access`), KEY `idx_access` (`access`),
KEY `idx_checkout` (`checked_out`), KEY `idx_checkout` (`checked_out`),
@ -80,7 +80,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_sermon` (
KEY `idx_link_type` (`link_type`), KEY `idx_link_type` (`link_type`),
KEY `idx_alias` (`alias`), KEY `idx_alias` (`alias`),
KEY `idx_build` (`build`) 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` ( CREATE TABLE IF NOT EXISTS `#__sermondistributor_series` (
`id` INT(11) NOT NULL AUTO_INCREMENT, `id` INT(11) NOT NULL AUTO_INCREMENT,
@ -90,7 +90,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_series` (
`icon` CHAR(64) NOT NULL DEFAULT '', `icon` CHAR(64) NOT NULL DEFAULT '',
`name` VARCHAR(255) NOT NULL DEFAULT '', `name` VARCHAR(255) NOT NULL DEFAULT '',
`scripture` 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, `published` TINYINT(3) NOT NULL DEFAULT 1,
`created_by` INT(10) unsigned NOT NULL DEFAULT 0, `created_by` INT(10) unsigned NOT NULL DEFAULT 0,
`modified_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, `hits` INT(10) unsigned NOT NULL DEFAULT 0,
`access` INT(10) unsigned NOT NULL DEFAULT 0, `access` INT(10) unsigned NOT NULL DEFAULT 0,
`ordering` INT(11) NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0,
`metakey` TEXT NOT NULL DEFAULT '', `metakey` TEXT NOT NULL,
`metadesc` TEXT NOT NULL DEFAULT '', `metadesc` TEXT NOT NULL,
`metadata` TEXT NOT NULL DEFAULT '', `metadata` TEXT NOT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `idx_access` (`access`), KEY `idx_access` (`access`),
KEY `idx_checkout` (`checked_out`), KEY `idx_checkout` (`checked_out`),
@ -113,7 +113,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_series` (
KEY `idx_state` (`published`), KEY `idx_state` (`published`),
KEY `idx_name` (`name`), KEY `idx_name` (`name`),
KEY `idx_alias` (`alias`) 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` ( CREATE TABLE IF NOT EXISTS `#__sermondistributor_statistic` (
`id` INT(11) NOT NULL AUTO_INCREMENT, `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, `preacher` INT(11) NOT NULL DEFAULT 0,
`series` INT(11) NOT NULL DEFAULT 0, `series` INT(11) NOT NULL DEFAULT 0,
`sermon` 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, `published` TINYINT(3) NOT NULL DEFAULT 1,
`created_by` INT(10) unsigned NOT NULL DEFAULT 0, `created_by` INT(10) unsigned NOT NULL DEFAULT 0,
`modified_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, `hits` INT(10) unsigned NOT NULL DEFAULT 0,
`access` INT(10) unsigned NOT NULL DEFAULT 0, `access` INT(10) unsigned NOT NULL DEFAULT 0,
`ordering` INT(11) NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0,
`metakey` TEXT NOT NULL DEFAULT '', `metakey` TEXT NOT NULL,
`metadesc` TEXT NOT NULL DEFAULT '', `metadesc` TEXT NOT NULL,
`metadata` TEXT NOT NULL DEFAULT '', `metadata` TEXT NOT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `idx_access` (`access`), KEY `idx_access` (`access`),
KEY `idx_checkout` (`checked_out`), KEY `idx_checkout` (`checked_out`),
@ -148,7 +148,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_statistic` (
KEY `idx_sermon` (`sermon`), KEY `idx_sermon` (`sermon`),
KEY `idx_preacher` (`preacher`), KEY `idx_preacher` (`preacher`),
KEY `idx_series` (`series`) 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` ( CREATE TABLE IF NOT EXISTS `#__sermondistributor_external_source` (
`id` INT(11) NOT NULL AUTO_INCREMENT, `id` INT(11) NOT NULL AUTO_INCREMENT,
@ -165,7 +165,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_external_source` (
`sharedurl` TEXT NOT NULL, `sharedurl` TEXT NOT NULL,
`update_method` TINYINT NOT NULL DEFAULT 0, `update_method` TINYINT NOT NULL DEFAULT 0,
`update_timer` INT(1) 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, `published` TINYINT(3) NOT NULL DEFAULT 1,
`created_by` INT(10) unsigned NOT NULL DEFAULT 0, `created_by` INT(10) unsigned NOT NULL DEFAULT 0,
`modified_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_build` (`build`),
KEY `idx_dropboxoptions` (`dropboxoptions`), KEY `idx_dropboxoptions` (`dropboxoptions`),
KEY `idx_permissiontype` (`permissiontype`) 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` ( CREATE TABLE IF NOT EXISTS `#__sermondistributor_local_listing` (
`id` INT(11) NOT NULL AUTO_INCREMENT, `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 '', `name` VARCHAR(255) NOT NULL DEFAULT '',
`size` INT(50) NOT NULL DEFAULT 0, `size` INT(50) NOT NULL DEFAULT 0,
`url` TEXT NOT NULL, `url` TEXT NOT NULL,
`params` text NOT NULL DEFAULT '', `params` text NOT NULL,
`published` TINYINT(3) NOT NULL DEFAULT 1, `published` TINYINT(3) NOT NULL DEFAULT 1,
`created_by` INT(10) unsigned NOT NULL DEFAULT 0, `created_by` INT(10) unsigned NOT NULL DEFAULT 0,
`modified_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_name` (`name`),
KEY `idx_build` (`build`), KEY `idx_build` (`build`),
KEY `idx_key` (`key`) 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` ( CREATE TABLE IF NOT EXISTS `#__sermondistributor_help_document` (
`id` INT(11) NOT NULL AUTO_INCREMENT, `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 '', `title` CHAR(64) NOT NULL DEFAULT '',
`type` TINYINT(1) NOT NULL DEFAULT 0, `type` TINYINT(1) NOT NULL DEFAULT 0,
`url` VARCHAR(255) NOT NULL DEFAULT '', `url` VARCHAR(255) NOT NULL DEFAULT '',
`params` text NOT NULL DEFAULT '', `params` text NOT NULL,
`published` TINYINT(3) NOT NULL DEFAULT 1, `published` TINYINT(3) NOT NULL DEFAULT 1,
`created_by` INT(10) unsigned NOT NULL DEFAULT 0, `created_by` INT(10) unsigned NOT NULL DEFAULT 0,
`modified_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, `hits` INT(10) unsigned NOT NULL DEFAULT 0,
`access` INT(10) unsigned NOT NULL DEFAULT 0, `access` INT(10) unsigned NOT NULL DEFAULT 0,
`ordering` INT(11) NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0,
`metakey` TEXT NOT NULL DEFAULT '', `metakey` TEXT NOT NULL,
`metadesc` TEXT NOT NULL DEFAULT '', `metadesc` TEXT NOT NULL,
`metadata` TEXT NOT NULL DEFAULT '', `metadata` TEXT NOT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `idx_access` (`access`), KEY `idx_access` (`access`),
KEY `idx_checkout` (`checked_out`), KEY `idx_checkout` (`checked_out`),
@ -261,7 +261,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_help_document` (
KEY `idx_article` (`article`), KEY `idx_article` (`article`),
KEY `idx_target` (`target`), KEY `idx_target` (`target`),
KEY `idx_alias` (`alias`) 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 // asset alread set so use saved rules
$assetId = (int) $db->loadResult(); $assetId = (int) $db->loadResult();
return JAccess::getAssetRules($assetId); return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
} }
// try again // try again
elseif ($try) elseif ($try)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -26,19 +26,9 @@ Joomla.submitbutton = function(task)
if (task == ''){ if (task == ''){
return false; return false;
} else { } else {
var isValid=true;
var action = task.split('.'); var action = task.split('.');
if (action[1] != 'cancel' && action[1] != 'close'){ if (action[1] == 'cancel' || action[1] == 'close' || document.formvalidator.isValid(document.getElementById("adminForm"))){
var forms = $$('form.form-validate'); Joomla.submitform(task, document.getElementById("adminForm"));
for (var i=0;i<forms.length;i++){
if (!document.formvalidator.isValid(forms[i])){
isValid = false;
break;
}
}
}
if (isValid){
Joomla.submitform(task);
return true; return true;
} else { } else {
alert(Joomla.JText._('external_source, some values are not acceptable.','Some values are unacceptable')); 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::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select'); JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive'); JHtml::_('behavior.keepalive');
$componentParams = JComponentHelper::getParams('com_sermondistributor'); $componentParams = $this->params; // will be removed just use $this->params instead
?> ?>
<script type="text/javascript"> <script type="text/javascript">
// waiting spinner // waiting spinner

View File

@ -36,6 +36,8 @@ class SermondistributorViewExternal_source extends JViewLegacy
*/ */
public function display($tpl = null) public function display($tpl = null)
{ {
// set params
$this->params = JComponentHelper::getParams('com_sermondistributor');
// Assign the variables // Assign the variables
$this->form = $this->get('Form'); $this->form = $this->get('Form');
$this->item = $this->get('Item'); $this->item = $this->get('Item');

View File

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

View File

@ -26,19 +26,9 @@ Joomla.submitbutton = function(task)
if (task == ''){ if (task == ''){
return false; return false;
} else { } else {
var isValid=true;
var action = task.split('.'); var action = task.split('.');
if (action[1] != 'cancel' && action[1] != 'close'){ if (action[1] == 'cancel' || action[1] == 'close' || document.formvalidator.isValid(document.getElementById("adminForm"))){
var forms = $$('form.form-validate'); Joomla.submitform(task, document.getElementById("adminForm"));
for (var i=0;i<forms.length;i++){
if (!document.formvalidator.isValid(forms[i])){
isValid = false;
break;
}
}
}
if (isValid){
Joomla.submitform(task);
return true; return true;
} else { } else {
alert(Joomla.JText._('help_document, some values are not acceptable.','Some values are unacceptable')); 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::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select'); JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive'); JHtml::_('behavior.keepalive');
$componentParams = JComponentHelper::getParams('com_sermondistributor'); $componentParams = $this->params; // will be removed just use $this->params instead
?> ?>
<script type="text/javascript"> <script type="text/javascript">
// waiting spinner // waiting spinner

View File

@ -36,6 +36,8 @@ class SermondistributorViewHelp_document extends JViewLegacy
*/ */
public function display($tpl = null) public function display($tpl = null)
{ {
// set params
$this->params = JComponentHelper::getParams('com_sermondistributor');
// Assign the variables // Assign the variables
$this->form = $this->get('Form'); $this->form = $this->get('Form');
$this->item = $this->get('Item'); $this->item = $this->get('Item');

View File

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

View File

@ -26,19 +26,9 @@ Joomla.submitbutton = function(task)
if (task == ''){ if (task == ''){
return false; return false;
} else { } else {
var isValid=true;
var action = task.split('.'); var action = task.split('.');
if (action[1] != 'cancel' && action[1] != 'close'){ if (action[1] == 'cancel' || action[1] == 'close' || document.formvalidator.isValid(document.getElementById("adminForm"))){
var forms = $$('form.form-validate'); Joomla.submitform(task, document.getElementById("adminForm"));
for (var i=0;i<forms.length;i++){
if (!document.formvalidator.isValid(forms[i])){
isValid = false;
break;
}
}
}
if (isValid){
Joomla.submitform(task);
return true; return true;
} else { } else {
alert(Joomla.JText._('local_listing, some values are not acceptable.','Some values are unacceptable')); 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::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select'); JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive'); JHtml::_('behavior.keepalive');
$componentParams = JComponentHelper::getParams('com_sermondistributor'); $componentParams = $this->params; // will be removed just use $this->params instead
?> ?>
<script type="text/javascript"> <script type="text/javascript">
// waiting spinner // waiting spinner

View File

@ -36,6 +36,8 @@ class SermondistributorViewLocal_listing extends JViewLegacy
*/ */
public function display($tpl = null) public function display($tpl = null)
{ {
// set params
$this->params = JComponentHelper::getParams('com_sermondistributor');
// Assign the variables // Assign the variables
$this->form = $this->get('Form'); $this->form = $this->get('Form');
$this->item = $this->get('Item'); $this->item = $this->get('Item');

View File

@ -94,7 +94,7 @@ $edit = "index.php?option=com_sermondistributor&view=local_listings&task=local_l
<td class="nowrap"> <td class="nowrap">
<div class="name"> <div class="name">
<?php if ($this->user->authorise('external_source.edit', 'com_sermondistributor.external_source.' . (int)$item->external_source)): ?> <?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 else: ?>
<?php echo $this->escape($item->external_source_description); ?> <?php echo $this->escape($item->external_source_description); ?>
<?php endif; ?> <?php endif; ?>

View File

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

View File

@ -26,19 +26,9 @@ Joomla.submitbutton = function(task)
if (task == ''){ if (task == ''){
return false; return false;
} else { } else {
var isValid=true;
var action = task.split('.'); var action = task.split('.');
if (action[1] != 'cancel' && action[1] != 'close'){ if (action[1] == 'cancel' || action[1] == 'close' || document.formvalidator.isValid(document.getElementById("adminForm"))){
var forms = $$('form.form-validate'); Joomla.submitform(task, document.getElementById("adminForm"));
for (var i=0;i<forms.length;i++){
if (!document.formvalidator.isValid(forms[i])){
isValid = false;
break;
}
}
}
if (isValid){
Joomla.submitform(task);
return true; return true;
} else { } else {
alert(Joomla.JText._('preacher, some values are not acceptable.','Some values are unacceptable')); 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::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select'); JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive'); JHtml::_('behavior.keepalive');
$componentParams = JComponentHelper::getParams('com_sermondistributor'); $componentParams = $this->params; // will be removed just use $this->params instead
?> ?>
<script type="text/javascript"> <script type="text/javascript">
// waiting spinner // waiting spinner

View File

@ -36,6 +36,8 @@ class SermondistributorViewPreacher extends JViewLegacy
*/ */
public function display($tpl = null) public function display($tpl = null)
{ {
// set params
$this->params = JComponentHelper::getParams('com_sermondistributor');
// Assign the variables // Assign the variables
$this->form = $this->get('Form'); $this->form = $this->get('Form');
$this->item = $this->get('Item'); $this->item = $this->get('Item');

View File

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

View File

@ -26,19 +26,9 @@ Joomla.submitbutton = function(task)
if (task == ''){ if (task == ''){
return false; return false;
} else { } else {
var isValid=true;
var action = task.split('.'); var action = task.split('.');
if (action[1] != 'cancel' && action[1] != 'close'){ if (action[1] == 'cancel' || action[1] == 'close' || document.formvalidator.isValid(document.getElementById("adminForm"))){
var forms = $$('form.form-validate'); Joomla.submitform(task, document.getElementById("adminForm"));
for (var i=0;i<forms.length;i++){
if (!document.formvalidator.isValid(forms[i])){
isValid = false;
break;
}
}
}
if (isValid){
Joomla.submitform(task);
return true; return true;
} else { } else {
alert(Joomla.JText._('series, some values are not acceptable.','Some values are unacceptable')); 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::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select'); JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive'); JHtml::_('behavior.keepalive');
$componentParams = JComponentHelper::getParams('com_sermondistributor'); $componentParams = $this->params; // will be removed just use $this->params instead
?> ?>
<script type="text/javascript"> <script type="text/javascript">
// waiting spinner // waiting spinner

View File

@ -36,6 +36,8 @@ class SermondistributorViewSeries extends JViewLegacy
*/ */
public function display($tpl = null) public function display($tpl = null)
{ {
// set params
$this->params = JComponentHelper::getParams('com_sermondistributor');
// Assign the variables // Assign the variables
$this->form = $this->get('Form'); $this->form = $this->get('Form');
$this->item = $this->get('Item'); $this->item = $this->get('Item');

View File

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

View File

@ -26,19 +26,9 @@ Joomla.submitbutton = function(task)
if (task == ''){ if (task == ''){
return false; return false;
} else { } else {
var isValid=true;
var action = task.split('.'); var action = task.split('.');
if (action[1] != 'cancel' && action[1] != 'close'){ if (action[1] == 'cancel' || action[1] == 'close' || document.formvalidator.isValid(document.getElementById("adminForm"))){
var forms = $$('form.form-validate'); Joomla.submitform(task, document.getElementById("adminForm"));
for (var i=0;i<forms.length;i++){
if (!document.formvalidator.isValid(forms[i])){
isValid = false;
break;
}
}
}
if (isValid){
Joomla.submitform(task);
return true; return true;
} else { } else {
alert(Joomla.JText._('sermon, some values are not acceptable.','Some values are unacceptable')); 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::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select'); JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive'); JHtml::_('behavior.keepalive');
$componentParams = JComponentHelper::getParams('com_sermondistributor'); $componentParams = $this->params; // will be removed just use $this->params instead
?> ?>
<script type="text/javascript"> <script type="text/javascript">
// waiting spinner // waiting spinner

View File

@ -36,6 +36,8 @@ class SermondistributorViewSermon extends JViewLegacy
*/ */
public function display($tpl = null) public function display($tpl = null)
{ {
// set params
$this->params = JComponentHelper::getParams('com_sermondistributor');
// Assign the variables // Assign the variables
$this->form = $this->get('Form'); $this->form = $this->get('Form');
$this->item = $this->get('Item'); $this->item = $this->get('Item');

View File

@ -88,7 +88,7 @@ $edit = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit";
<td class="nowrap"> <td class="nowrap">
<div class="name"> <div class="name">
<?php if ($this->user->authorise('preacher.edit', 'com_sermondistributor.preacher.' . (int)$item->preacher)): ?> <?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 else: ?>
<?php echo $this->escape($item->preacher_name); ?> <?php echo $this->escape($item->preacher_name); ?>
<?php endif; ?> <?php endif; ?>
@ -97,7 +97,7 @@ $edit = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit";
<td class="nowrap"> <td class="nowrap">
<div class="name"> <div class="name">
<?php if ($this->user->authorise('series.edit', 'com_sermondistributor.series.' . (int)$item->series)): ?> <?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 else: ?>
<?php echo $this->escape($item->series_name); ?> <?php echo $this->escape($item->series_name); ?>
<?php endif; ?> <?php endif; ?>

View File

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

View File

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