Added the option to add custom tabs to the edit view of any admin view
This commit is contained in:
864
admin/models/admin_custom_tabs.php
Normal file
864
admin/models/admin_custom_tabs.php
Normal file
@ -0,0 +1,864 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 30th April, 2015
|
||||
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
|
||||
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
|
||||
* @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\Registry\Registry;
|
||||
|
||||
/**
|
||||
* Componentbuilder Admin_custom_tabs Model
|
||||
*/
|
||||
class ComponentbuilderModelAdmin_custom_tabs extends JModelAdmin
|
||||
{
|
||||
/**
|
||||
* @var string The prefix to use with controller messages.
|
||||
* @since 1.6
|
||||
*/
|
||||
protected $text_prefix = 'COM_COMPONENTBUILDER';
|
||||
|
||||
/**
|
||||
* The type alias for this content type.
|
||||
*
|
||||
* @var string
|
||||
* @since 3.2
|
||||
*/
|
||||
public $typeAlias = 'com_componentbuilder.admin_custom_tabs';
|
||||
|
||||
/**
|
||||
* Returns a Table object, always creating it
|
||||
*
|
||||
* @param type $type The table type to instantiate
|
||||
* @param string $prefix A prefix for the table class name. Optional.
|
||||
* @param array $config Configuration array for model. Optional.
|
||||
*
|
||||
* @return JTable A database object
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
public function getTable($type = 'admin_custom_tabs', $prefix = 'ComponentbuilderTable', $config = array())
|
||||
{
|
||||
// add table path for when model gets used from other component
|
||||
$this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_componentbuilder/tables');
|
||||
// get instance of the table
|
||||
return JTable::getInstance($type, $prefix, $config);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get a single record.
|
||||
*
|
||||
* @param integer $pk The id of the primary key.
|
||||
*
|
||||
* @return mixed Object on success, false on failure.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
public function getItem($pk = null)
|
||||
{
|
||||
if ($item = parent::getItem($pk))
|
||||
{
|
||||
if (!empty($item->params) && !is_array($item->params))
|
||||
{
|
||||
// Convert the params field to an array.
|
||||
$registry = new Registry;
|
||||
$registry->loadString($item->params);
|
||||
$item->params = $registry->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->metadata))
|
||||
{
|
||||
// Convert the metadata field to an array.
|
||||
$registry = new Registry;
|
||||
$registry->loadString($item->metadata);
|
||||
$item->metadata = $registry->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->tabs))
|
||||
{
|
||||
// Convert the tabs field to an array.
|
||||
$tabs = new Registry;
|
||||
$tabs->loadString($item->tabs);
|
||||
$item->tabs = $tabs->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->id))
|
||||
{
|
||||
$item->tags = new JHelperTags;
|
||||
$item->tags->getTagIds($item->id, 'com_componentbuilder.admin_custom_tabs');
|
||||
}
|
||||
}
|
||||
|
||||
return $item;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get the record form.
|
||||
*
|
||||
* @param array $data Data for the form.
|
||||
* @param boolean $loadData True if the form is to load its own data (default case), false if not.
|
||||
* @param array $options Optional array of options for the form creation.
|
||||
*
|
||||
* @return mixed A JForm object on success, false on failure
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform'))
|
||||
{
|
||||
// set load data option
|
||||
$options['load_data'] = $loadData;
|
||||
// Get the form.
|
||||
$form = $this->loadForm('com_componentbuilder.admin_custom_tabs', 'admin_custom_tabs', $options);
|
||||
|
||||
if (empty($form))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
|
||||
// The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
|
||||
if ($jinput->get('a_id'))
|
||||
{
|
||||
$id = $jinput->get('a_id', 0, 'INT');
|
||||
}
|
||||
// The back end uses id so we use that the rest of the time and set it to 0 by default.
|
||||
else
|
||||
{
|
||||
$id = $jinput->get('id', 0, 'INT');
|
||||
}
|
||||
|
||||
$user = JFactory::getUser();
|
||||
|
||||
// Check for existing item.
|
||||
// Modify the form based on Edit State access controls.
|
||||
if ($id != 0 && (!$user->authorise('admin_custom_tabs.edit.state', 'com_componentbuilder.admin_custom_tabs.' . (int) $id))
|
||||
|| ($id == 0 && !$user->authorise('admin_custom_tabs.edit.state', 'com_componentbuilder')))
|
||||
{
|
||||
// Disable fields for display.
|
||||
$form->setFieldAttribute('ordering', 'disabled', 'true');
|
||||
$form->setFieldAttribute('published', 'disabled', 'true');
|
||||
// Disable fields while saving.
|
||||
$form->setFieldAttribute('ordering', 'filter', 'unset');
|
||||
$form->setFieldAttribute('published', 'filter', 'unset');
|
||||
}
|
||||
// If this is a new item insure the greated by is set.
|
||||
if (0 == $id)
|
||||
{
|
||||
// Set the created_by to this user
|
||||
$form->setValue('created_by', null, $user->id);
|
||||
}
|
||||
// Modify the form based on Edit Creaded By access controls.
|
||||
if ($id != 0 && (!$user->authorise('admin_custom_tabs.edit.created_by', 'com_componentbuilder.admin_custom_tabs.' . (int) $id))
|
||||
|| ($id == 0 && !$user->authorise('admin_custom_tabs.edit.created_by', 'com_componentbuilder')))
|
||||
{
|
||||
// Disable fields for display.
|
||||
$form->setFieldAttribute('created_by', 'disabled', 'true');
|
||||
// Disable fields for display.
|
||||
$form->setFieldAttribute('created_by', 'readonly', 'true');
|
||||
// Disable fields while saving.
|
||||
$form->setFieldAttribute('created_by', 'filter', 'unset');
|
||||
}
|
||||
// Modify the form based on Edit Creaded Date access controls.
|
||||
if ($id != 0 && (!$user->authorise('admin_custom_tabs.edit.created', 'com_componentbuilder.admin_custom_tabs.' . (int) $id))
|
||||
|| ($id == 0 && !$user->authorise('admin_custom_tabs.edit.created', 'com_componentbuilder')))
|
||||
{
|
||||
// Disable fields for display.
|
||||
$form->setFieldAttribute('created', 'disabled', 'true');
|
||||
// Disable fields while saving.
|
||||
$form->setFieldAttribute('created', 'filter', 'unset');
|
||||
}
|
||||
// Only load these values if no id is found
|
||||
if (0 == $id)
|
||||
{
|
||||
// Set redirected view name
|
||||
$redirectedView = $jinput->get('ref', null, 'STRING');
|
||||
// Set field name (or fall back to view name)
|
||||
$redirectedField = $jinput->get('field', $redirectedView, 'STRING');
|
||||
// Set redirected view id
|
||||
$redirectedId = $jinput->get('refid', 0, 'INT');
|
||||
// Set field id (or fall back to redirected view id)
|
||||
$redirectedValue = $jinput->get('field_id', $redirectedId, 'INT');
|
||||
if (0 != $redirectedValue && $redirectedField)
|
||||
{
|
||||
// Now set the local-redirected field default value
|
||||
$form->setValue($redirectedField, null, $redirectedValue);
|
||||
}
|
||||
}
|
||||
return $form;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get the script that have to be included on the form
|
||||
*
|
||||
* @return string script files
|
||||
*/
|
||||
public function getScript()
|
||||
{
|
||||
return 'administrator/components/com_componentbuilder/models/forms/admin_custom_tabs.js';
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to test whether a record can be deleted.
|
||||
*
|
||||
* @param object $record A record object.
|
||||
*
|
||||
* @return boolean True if allowed to delete the record. Defaults to the permission set in the component.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function canDelete($record)
|
||||
{
|
||||
if (!empty($record->id))
|
||||
{
|
||||
if ($record->published != -2)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$user = JFactory::getUser();
|
||||
// The record has been set. Check the record permissions.
|
||||
return $user->authorise('admin_custom_tabs.delete', 'com_componentbuilder.admin_custom_tabs.' . (int) $record->id);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to test whether a record can have its state edited.
|
||||
*
|
||||
* @param object $record A record object.
|
||||
*
|
||||
* @return boolean True if allowed to change the state of the record. Defaults to the permission set in the component.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function canEditState($record)
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
// The record has been set. Check the record permissions.
|
||||
$permission = $user->authorise('admin_custom_tabs.edit.state', 'com_componentbuilder.admin_custom_tabs.' . (int) $recordId);
|
||||
if (!$permission && !is_null($permission))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// In the absense of better information, revert to the component permissions.
|
||||
return $user->authorise('admin_custom_tabs.edit.state', 'com_componentbuilder');
|
||||
}
|
||||
|
||||
/**
|
||||
* Method override to check if you can edit an existing record.
|
||||
*
|
||||
* @param array $data An array of input data.
|
||||
* @param string $key The name of the key for the primary key.
|
||||
*
|
||||
* @return boolean
|
||||
* @since 2.5
|
||||
*/
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// Check specific edit permission then general edit permission.
|
||||
$user = JFactory::getUser();
|
||||
|
||||
return $user->authorise('admin_custom_tabs.edit', 'com_componentbuilder.admin_custom_tabs.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('admin_custom_tabs.edit', 'com_componentbuilder');
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare and sanitise the table data prior to saving.
|
||||
*
|
||||
* @param JTable $table A JTable object.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function prepareTable($table)
|
||||
{
|
||||
$date = JFactory::getDate();
|
||||
$user = JFactory::getUser();
|
||||
|
||||
if (isset($table->name))
|
||||
{
|
||||
$table->name = htmlspecialchars_decode($table->name, ENT_QUOTES);
|
||||
}
|
||||
|
||||
if (isset($table->alias) && empty($table->alias))
|
||||
{
|
||||
$table->generateAlias();
|
||||
}
|
||||
|
||||
if (empty($table->id))
|
||||
{
|
||||
$table->created = $date->toSql();
|
||||
// set the user
|
||||
if ($table->created_by == 0 || empty($table->created_by))
|
||||
{
|
||||
$table->created_by = $user->id;
|
||||
}
|
||||
// Set ordering to the last item if not set
|
||||
if (empty($table->ordering))
|
||||
{
|
||||
$db = JFactory::getDbo();
|
||||
$query = $db->getQuery(true)
|
||||
->select('MAX(ordering)')
|
||||
->from($db->quoteName('#__componentbuilder_admin_custom_tabs'));
|
||||
$db->setQuery($query);
|
||||
$max = $db->loadResult();
|
||||
|
||||
$table->ordering = $max + 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$table->modified = $date->toSql();
|
||||
$table->modified_by = $user->id;
|
||||
}
|
||||
|
||||
if (!empty($table->id))
|
||||
{
|
||||
// Increment the items version number.
|
||||
$table->version++;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get the data that should be injected in the form.
|
||||
*
|
||||
* @return mixed The data for the form.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function loadFormData()
|
||||
{
|
||||
// Check the session for previously entered form data.
|
||||
$data = JFactory::getApplication()->getUserState('com_componentbuilder.edit.admin_custom_tabs.data', array());
|
||||
|
||||
if (empty($data))
|
||||
{
|
||||
$data = $this->getItem();
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get the unique fields of this table.
|
||||
*
|
||||
* @return mixed An array of field names, boolean false if none is set.
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
protected function getUniqeFields()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to delete one or more records.
|
||||
*
|
||||
* @param array &$pks An array of record primary keys.
|
||||
*
|
||||
* @return boolean True if successful, false if an error occurs.
|
||||
*
|
||||
* @since 12.2
|
||||
*/
|
||||
public function delete(&$pks)
|
||||
{
|
||||
if (!parent::delete($pks))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the published state of one or more records.
|
||||
*
|
||||
* @param array &$pks A list of the primary keys to change.
|
||||
* @param integer $value The value of the published state.
|
||||
*
|
||||
* @return boolean True on success.
|
||||
*
|
||||
* @since 12.2
|
||||
*/
|
||||
public function publish(&$pks, $value = 1)
|
||||
{
|
||||
if (!parent::publish($pks, $value))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to perform batch operations on an item or a set of items.
|
||||
*
|
||||
* @param array $commands An array of commands to perform.
|
||||
* @param array $pks An array of item ids.
|
||||
* @param array $contexts An array of item contexts.
|
||||
*
|
||||
* @return boolean Returns true on success, false on failure.
|
||||
*
|
||||
* @since 12.2
|
||||
*/
|
||||
public function batch($commands, $pks, $contexts)
|
||||
{
|
||||
// Sanitize ids.
|
||||
$pks = array_unique($pks);
|
||||
JArrayHelper::toInteger($pks);
|
||||
|
||||
// Remove any values of zero.
|
||||
if (array_search(0, $pks, true))
|
||||
{
|
||||
unset($pks[array_search(0, $pks, true)]);
|
||||
}
|
||||
|
||||
if (empty($pks))
|
||||
{
|
||||
$this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED'));
|
||||
return false;
|
||||
}
|
||||
|
||||
$done = false;
|
||||
|
||||
// Set some needed variables.
|
||||
$this->user = JFactory::getUser();
|
||||
$this->table = $this->getTable();
|
||||
$this->tableClassName = get_class($this->table);
|
||||
$this->contentType = new JUcmType;
|
||||
$this->type = $this->contentType->getTypeByTable($this->tableClassName);
|
||||
$this->canDo = ComponentbuilderHelper::getActions('admin_custom_tabs');
|
||||
$this->batchSet = true;
|
||||
|
||||
if (!$this->canDo->get('core.batch'))
|
||||
{
|
||||
$this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION'));
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($this->type == false)
|
||||
{
|
||||
$type = new JUcmType;
|
||||
$this->type = $type->getTypeByAlias($this->typeAlias);
|
||||
}
|
||||
|
||||
$this->tagsObserver = $this->table->getObserverOfClass('JTableObserverTags');
|
||||
|
||||
if (!empty($commands['move_copy']))
|
||||
{
|
||||
$cmd = JArrayHelper::getValue($commands, 'move_copy', 'c');
|
||||
|
||||
if ($cmd == 'c')
|
||||
{
|
||||
$result = $this->batchCopy($commands, $pks, $contexts);
|
||||
|
||||
if (is_array($result))
|
||||
{
|
||||
foreach ($result as $old => $new)
|
||||
{
|
||||
$contexts[$new] = $contexts[$old];
|
||||
}
|
||||
$pks = array_values($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
elseif ($cmd == 'm' && !$this->batchMove($commands, $pks, $contexts))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$done = true;
|
||||
}
|
||||
|
||||
if (!$done)
|
||||
{
|
||||
$this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION'));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Clear the cache
|
||||
$this->cleanCache();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Batch copy items to a new category or current.
|
||||
*
|
||||
* @param integer $values The new values.
|
||||
* @param array $pks An array of row IDs.
|
||||
* @param array $contexts An array of item contexts.
|
||||
*
|
||||
* @return mixed An array of new IDs on success, boolean false on failure.
|
||||
*
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchCopy($values, $pks, $contexts)
|
||||
{
|
||||
if (empty($this->batchSet))
|
||||
{
|
||||
// Set some needed variables.
|
||||
$this->user = JFactory::getUser();
|
||||
$this->table = $this->getTable();
|
||||
$this->tableClassName = get_class($this->table);
|
||||
$this->canDo = ComponentbuilderHelper::getActions('admin_custom_tabs');
|
||||
}
|
||||
|
||||
if (!$this->canDo->get('admin_custom_tabs.create') && !$this->canDo->get('admin_custom_tabs.batch'))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// get list of uniqe fields
|
||||
$uniqeFields = $this->getUniqeFields();
|
||||
// remove move_copy from array
|
||||
unset($values['move_copy']);
|
||||
|
||||
// make sure published is set
|
||||
if (!isset($values['published']))
|
||||
{
|
||||
$values['published'] = 0;
|
||||
}
|
||||
elseif (isset($values['published']) && !$this->canDo->get('admin_custom_tabs.edit.state'))
|
||||
{
|
||||
$values['published'] = 0;
|
||||
}
|
||||
|
||||
$newIds = array();
|
||||
// Parent exists so let's proceed
|
||||
while (!empty($pks))
|
||||
{
|
||||
// Pop the first ID off the stack
|
||||
$pk = array_shift($pks);
|
||||
|
||||
$this->table->reset();
|
||||
|
||||
// only allow copy if user may edit this item.
|
||||
if (!$this->user->authorise('admin_custom_tabs.edit', $contexts[$pk]))
|
||||
{
|
||||
// Not fatal error
|
||||
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
|
||||
continue;
|
||||
}
|
||||
|
||||
// Check that the row actually exists
|
||||
if (!$this->table->load($pk))
|
||||
{
|
||||
if ($error = $this->table->getError())
|
||||
{
|
||||
// Fatal error
|
||||
$this->setError($error);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Not fatal error
|
||||
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// Only for strings
|
||||
if (ComponentbuilderHelper::checkString($this->table->admin_view) && !is_numeric($this->table->admin_view))
|
||||
{
|
||||
$this->table->admin_view = $this->generateUniqe('admin_view',$this->table->admin_view);
|
||||
}
|
||||
|
||||
// insert all set values
|
||||
if (ComponentbuilderHelper::checkArray($values))
|
||||
{
|
||||
foreach ($values as $key => $value)
|
||||
{
|
||||
if (strlen($value) > 0 && isset($this->table->$key))
|
||||
{
|
||||
$this->table->$key = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// update all uniqe fields
|
||||
if (ComponentbuilderHelper::checkArray($uniqeFields))
|
||||
{
|
||||
foreach ($uniqeFields as $uniqeField)
|
||||
{
|
||||
$this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField);
|
||||
}
|
||||
}
|
||||
|
||||
// Reset the ID because we are making a copy
|
||||
$this->table->id = 0;
|
||||
|
||||
// TODO: Deal with ordering?
|
||||
// $this->table->ordering = 1;
|
||||
|
||||
// Check the row.
|
||||
if (!$this->table->check())
|
||||
{
|
||||
$this->setError($this->table->getError());
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!empty($this->type))
|
||||
{
|
||||
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
|
||||
}
|
||||
|
||||
// Store the row.
|
||||
if (!$this->table->store())
|
||||
{
|
||||
$this->setError($this->table->getError());
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Get the new item ID
|
||||
$newId = $this->table->get('id');
|
||||
|
||||
// Add the new ID to the array
|
||||
$newIds[$pk] = $newId;
|
||||
}
|
||||
|
||||
// Clean the cache
|
||||
$this->cleanCache();
|
||||
|
||||
return $newIds;
|
||||
}
|
||||
|
||||
/**
|
||||
* Batch move items to a new category
|
||||
*
|
||||
* @param integer $value The new category ID.
|
||||
* @param array $pks An array of row IDs.
|
||||
* @param array $contexts An array of item contexts.
|
||||
*
|
||||
* @return boolean True if successful, false otherwise and internal error is set.
|
||||
*
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchMove($values, $pks, $contexts)
|
||||
{
|
||||
if (empty($this->batchSet))
|
||||
{
|
||||
// Set some needed variables.
|
||||
$this->user = JFactory::getUser();
|
||||
$this->table = $this->getTable();
|
||||
$this->tableClassName = get_class($this->table);
|
||||
$this->canDo = ComponentbuilderHelper::getActions('admin_custom_tabs');
|
||||
}
|
||||
|
||||
if (!$this->canDo->get('admin_custom_tabs.edit') && !$this->canDo->get('admin_custom_tabs.batch'))
|
||||
{
|
||||
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
|
||||
return false;
|
||||
}
|
||||
|
||||
// make sure published only updates if user has the permission.
|
||||
if (isset($values['published']) && !$this->canDo->get('admin_custom_tabs.edit.state'))
|
||||
{
|
||||
unset($values['published']);
|
||||
}
|
||||
// remove move_copy from array
|
||||
unset($values['move_copy']);
|
||||
|
||||
// Parent exists so we proceed
|
||||
foreach ($pks as $pk)
|
||||
{
|
||||
if (!$this->user->authorise('admin_custom_tabs.edit', $contexts[$pk]))
|
||||
{
|
||||
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check that the row actually exists
|
||||
if (!$this->table->load($pk))
|
||||
{
|
||||
if ($error = $this->table->getError())
|
||||
{
|
||||
// Fatal error
|
||||
$this->setError($error);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Not fatal error
|
||||
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// insert all set values.
|
||||
if (ComponentbuilderHelper::checkArray($values))
|
||||
{
|
||||
foreach ($values as $key => $value)
|
||||
{
|
||||
// Do special action for access.
|
||||
if ('access' === $key && strlen($value) > 0)
|
||||
{
|
||||
$this->table->$key = $value;
|
||||
}
|
||||
elseif (strlen($value) > 0 && isset($this->table->$key))
|
||||
{
|
||||
$this->table->$key = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Check the row.
|
||||
if (!$this->table->check())
|
||||
{
|
||||
$this->setError($this->table->getError());
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!empty($this->type))
|
||||
{
|
||||
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
|
||||
}
|
||||
|
||||
// Store the row.
|
||||
if (!$this->table->store())
|
||||
{
|
||||
$this->setError($this->table->getError());
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Clean the cache
|
||||
$this->cleanCache();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to save the form data.
|
||||
*
|
||||
* @param array $data The form data.
|
||||
*
|
||||
* @return boolean True on success.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
public function save($data)
|
||||
{
|
||||
$input = JFactory::getApplication()->input;
|
||||
$filter = JFilterInput::getInstance();
|
||||
|
||||
// set the metadata to the Item Data
|
||||
if (isset($data['metadata']) && isset($data['metadata']['author']))
|
||||
{
|
||||
$data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM');
|
||||
|
||||
$metadata = new JRegistry;
|
||||
$metadata->loadArray($data['metadata']);
|
||||
$data['metadata'] = (string) $metadata;
|
||||
}
|
||||
|
||||
// Set the tabs items to data.
|
||||
if (isset($data['tabs']) && is_array($data['tabs']))
|
||||
{
|
||||
$tabs = new JRegistry;
|
||||
$tabs->loadArray($data['tabs']);
|
||||
$data['tabs'] = (string) $tabs;
|
||||
}
|
||||
elseif (!isset($data['tabs']))
|
||||
{
|
||||
// Set the empty tabs to data
|
||||
$data['tabs'] = '';
|
||||
}
|
||||
|
||||
// Set the Params Items to data
|
||||
if (isset($data['params']) && is_array($data['params']))
|
||||
{
|
||||
$params = new JRegistry;
|
||||
$params->loadArray($data['params']);
|
||||
$data['params'] = (string) $params;
|
||||
}
|
||||
|
||||
// Alter the uniqe field for save as copy
|
||||
if ($input->get('task') === 'save2copy')
|
||||
{
|
||||
// Automatic handling of other uniqe fields
|
||||
$uniqeFields = $this->getUniqeFields();
|
||||
if (ComponentbuilderHelper::checkArray($uniqeFields))
|
||||
{
|
||||
foreach ($uniqeFields as $uniqeField)
|
||||
{
|
||||
$data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (parent::save($data))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to generate a uniqe value.
|
||||
*
|
||||
* @param string $field name.
|
||||
* @param string $value data.
|
||||
*
|
||||
* @return string New value.
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
protected function generateUniqe($field,$value)
|
||||
{
|
||||
|
||||
// set field value uniqe
|
||||
$table = $this->getTable();
|
||||
|
||||
while ($table->load(array($field => $value)))
|
||||
{
|
||||
$value = JString::increment($value);
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
protected function _generateNewTitle($title)
|
||||
{
|
||||
|
||||
// Alter the title
|
||||
$table = $this->getTable();
|
||||
|
||||
while ($table->load(array('title' => $title)))
|
||||
{
|
||||
$title = JString::increment($title);
|
||||
}
|
||||
|
||||
return $title;
|
||||
}
|
||||
}
|
@ -86,6 +86,12 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$item->metadata = $registry->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->php_import_headers))
|
||||
{
|
||||
// base64 Decode php_import_headers.
|
||||
$item->php_import_headers = base64_decode($item->php_import_headers);
|
||||
}
|
||||
|
||||
if (!empty($item->html_import_view))
|
||||
{
|
||||
// base64 Decode html_import_view.
|
||||
@ -98,10 +104,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$item->php_import_save = base64_decode($item->php_import_save);
|
||||
}
|
||||
|
||||
if (!empty($item->php_import_headers))
|
||||
if (!empty($item->php_getitem))
|
||||
{
|
||||
// base64 Decode php_import_headers.
|
||||
$item->php_import_headers = base64_decode($item->php_import_headers);
|
||||
// base64 Decode php_getitem.
|
||||
$item->php_getitem = base64_decode($item->php_getitem);
|
||||
}
|
||||
|
||||
if (!empty($item->php_getitems))
|
||||
@ -116,108 +122,108 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$item->php_getitems_after_all = base64_decode($item->php_getitems_after_all);
|
||||
}
|
||||
|
||||
if (!empty($item->css_view))
|
||||
{
|
||||
// base64 Decode css_view.
|
||||
$item->css_view = base64_decode($item->css_view);
|
||||
}
|
||||
|
||||
if (!empty($item->php_getlistquery))
|
||||
{
|
||||
// base64 Decode php_getlistquery.
|
||||
$item->php_getlistquery = base64_decode($item->php_getlistquery);
|
||||
}
|
||||
|
||||
if (!empty($item->css_view))
|
||||
{
|
||||
// base64 Decode css_view.
|
||||
$item->css_view = base64_decode($item->css_view);
|
||||
}
|
||||
|
||||
if (!empty($item->php_getform))
|
||||
{
|
||||
// base64 Decode php_getform.
|
||||
$item->php_getform = base64_decode($item->php_getform);
|
||||
}
|
||||
|
||||
if (!empty($item->css_views))
|
||||
{
|
||||
// base64 Decode css_views.
|
||||
$item->css_views = base64_decode($item->css_views);
|
||||
}
|
||||
|
||||
if (!empty($item->php_before_save))
|
||||
{
|
||||
// base64 Decode php_before_save.
|
||||
$item->php_before_save = base64_decode($item->php_before_save);
|
||||
}
|
||||
|
||||
if (!empty($item->css_views))
|
||||
{
|
||||
// base64 Decode css_views.
|
||||
$item->css_views = base64_decode($item->css_views);
|
||||
}
|
||||
|
||||
if (!empty($item->php_save))
|
||||
{
|
||||
// base64 Decode php_save.
|
||||
$item->php_save = base64_decode($item->php_save);
|
||||
}
|
||||
|
||||
if (!empty($item->javascript_view_file))
|
||||
{
|
||||
// base64 Decode javascript_view_file.
|
||||
$item->javascript_view_file = base64_decode($item->javascript_view_file);
|
||||
}
|
||||
|
||||
if (!empty($item->php_postsavehook))
|
||||
{
|
||||
// base64 Decode php_postsavehook.
|
||||
$item->php_postsavehook = base64_decode($item->php_postsavehook);
|
||||
}
|
||||
|
||||
if (!empty($item->javascript_view_file))
|
||||
{
|
||||
// base64 Decode javascript_view_file.
|
||||
$item->javascript_view_file = base64_decode($item->javascript_view_file);
|
||||
}
|
||||
|
||||
if (!empty($item->php_allowadd))
|
||||
{
|
||||
// base64 Decode php_allowadd.
|
||||
$item->php_allowadd = base64_decode($item->php_allowadd);
|
||||
}
|
||||
|
||||
if (!empty($item->javascript_view_footer))
|
||||
{
|
||||
// base64 Decode javascript_view_footer.
|
||||
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
|
||||
}
|
||||
|
||||
if (!empty($item->php_allowedit))
|
||||
{
|
||||
// base64 Decode php_allowedit.
|
||||
$item->php_allowedit = base64_decode($item->php_allowedit);
|
||||
}
|
||||
|
||||
if (!empty($item->javascript_view_footer))
|
||||
{
|
||||
// base64 Decode javascript_view_footer.
|
||||
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
|
||||
}
|
||||
|
||||
if (!empty($item->php_batchcopy))
|
||||
{
|
||||
// base64 Decode php_batchcopy.
|
||||
$item->php_batchcopy = base64_decode($item->php_batchcopy);
|
||||
}
|
||||
|
||||
if (!empty($item->javascript_views_file))
|
||||
{
|
||||
// base64 Decode javascript_views_file.
|
||||
$item->javascript_views_file = base64_decode($item->javascript_views_file);
|
||||
}
|
||||
|
||||
if (!empty($item->php_batchmove))
|
||||
{
|
||||
// base64 Decode php_batchmove.
|
||||
$item->php_batchmove = base64_decode($item->php_batchmove);
|
||||
}
|
||||
|
||||
if (!empty($item->javascript_views_file))
|
||||
{
|
||||
// base64 Decode javascript_views_file.
|
||||
$item->javascript_views_file = base64_decode($item->javascript_views_file);
|
||||
}
|
||||
|
||||
if (!empty($item->php_before_publish))
|
||||
{
|
||||
// base64 Decode php_before_publish.
|
||||
$item->php_before_publish = base64_decode($item->php_before_publish);
|
||||
}
|
||||
|
||||
if (!empty($item->javascript_views_footer))
|
||||
{
|
||||
// base64 Decode javascript_views_footer.
|
||||
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
|
||||
}
|
||||
|
||||
if (!empty($item->php_after_publish))
|
||||
{
|
||||
// base64 Decode php_after_publish.
|
||||
$item->php_after_publish = base64_decode($item->php_after_publish);
|
||||
}
|
||||
|
||||
if (!empty($item->javascript_views_footer))
|
||||
{
|
||||
// base64 Decode javascript_views_footer.
|
||||
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
|
||||
}
|
||||
|
||||
if (!empty($item->php_before_delete))
|
||||
{
|
||||
// base64 Decode php_before_delete.
|
||||
@ -230,36 +236,36 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$item->php_after_delete = base64_decode($item->php_after_delete);
|
||||
}
|
||||
|
||||
if (!empty($item->php_controller))
|
||||
{
|
||||
// base64 Decode php_controller.
|
||||
$item->php_controller = base64_decode($item->php_controller);
|
||||
}
|
||||
|
||||
if (!empty($item->php_document))
|
||||
{
|
||||
// base64 Decode php_document.
|
||||
$item->php_document = base64_decode($item->php_document);
|
||||
}
|
||||
|
||||
if (!empty($item->php_controller))
|
||||
{
|
||||
// base64 Decode php_controller.
|
||||
$item->php_controller = base64_decode($item->php_controller);
|
||||
}
|
||||
|
||||
if (!empty($item->php_model))
|
||||
{
|
||||
// base64 Decode php_model.
|
||||
$item->php_model = base64_decode($item->php_model);
|
||||
}
|
||||
|
||||
if (!empty($item->php_controller_list))
|
||||
{
|
||||
// base64 Decode php_controller_list.
|
||||
$item->php_controller_list = base64_decode($item->php_controller_list);
|
||||
}
|
||||
|
||||
if (!empty($item->sql))
|
||||
{
|
||||
// base64 Decode sql.
|
||||
$item->sql = base64_decode($item->sql);
|
||||
}
|
||||
|
||||
if (!empty($item->php_controller_list))
|
||||
{
|
||||
// base64 Decode php_controller_list.
|
||||
$item->php_controller_list = base64_decode($item->php_controller_list);
|
||||
}
|
||||
|
||||
if (!empty($item->php_model_list))
|
||||
{
|
||||
// base64 Decode php_model_list.
|
||||
@ -272,18 +278,18 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$item->php_import_display = base64_decode($item->php_import_display);
|
||||
}
|
||||
|
||||
if (!empty($item->php_ajaxmethod))
|
||||
{
|
||||
// base64 Decode php_ajaxmethod.
|
||||
$item->php_ajaxmethod = base64_decode($item->php_ajaxmethod);
|
||||
}
|
||||
|
||||
if (!empty($item->php_import))
|
||||
{
|
||||
// base64 Decode php_import.
|
||||
$item->php_import = base64_decode($item->php_import);
|
||||
}
|
||||
|
||||
if (!empty($item->php_ajaxmethod))
|
||||
{
|
||||
// base64 Decode php_ajaxmethod.
|
||||
$item->php_ajaxmethod = base64_decode($item->php_ajaxmethod);
|
||||
}
|
||||
|
||||
if (!empty($item->php_import_setdata))
|
||||
{
|
||||
// base64 Decode php_import_setdata.
|
||||
@ -296,10 +302,12 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$item->php_import_ext = base64_decode($item->php_import_ext);
|
||||
}
|
||||
|
||||
if (!empty($item->php_getitem))
|
||||
if (!empty($item->addtables))
|
||||
{
|
||||
// base64 Decode php_getitem.
|
||||
$item->php_getitem = base64_decode($item->php_getitem);
|
||||
// Convert the addtables field to an array.
|
||||
$addtables = new Registry;
|
||||
$addtables->loadString($item->addtables);
|
||||
$item->addtables = $addtables->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->addpermissions))
|
||||
@ -326,14 +334,6 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$item->addlinked_views = $addlinked_views->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->addtables))
|
||||
{
|
||||
// Convert the addtables field to an array.
|
||||
$addtables = new Registry;
|
||||
$addtables->loadString($item->addtables);
|
||||
$item->addtables = $addtables->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->alias_builder))
|
||||
{
|
||||
// Convert the alias_builder field to an array.
|
||||
@ -1220,6 +1220,19 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$data['system_name'] = $data['name_single'];
|
||||
}
|
||||
|
||||
// Set the addtables items to data.
|
||||
if (isset($data['addtables']) && is_array($data['addtables']))
|
||||
{
|
||||
$addtables = new JRegistry;
|
||||
$addtables->loadArray($data['addtables']);
|
||||
$data['addtables'] = (string) $addtables;
|
||||
}
|
||||
elseif (!isset($data['addtables']))
|
||||
{
|
||||
// Set the empty addtables to data
|
||||
$data['addtables'] = '';
|
||||
}
|
||||
|
||||
// Set the addpermissions items to data.
|
||||
if (isset($data['addpermissions']) && is_array($data['addpermissions']))
|
||||
{
|
||||
@ -1259,19 +1272,6 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$data['addlinked_views'] = '';
|
||||
}
|
||||
|
||||
// Set the addtables items to data.
|
||||
if (isset($data['addtables']) && is_array($data['addtables']))
|
||||
{
|
||||
$addtables = new JRegistry;
|
||||
$addtables->loadArray($data['addtables']);
|
||||
$data['addtables'] = (string) $addtables;
|
||||
}
|
||||
elseif (!isset($data['addtables']))
|
||||
{
|
||||
// Set the empty addtables to data
|
||||
$data['addtables'] = '';
|
||||
}
|
||||
|
||||
// Set the alias_builder items to data.
|
||||
if (isset($data['alias_builder']) && is_array($data['alias_builder']))
|
||||
{
|
||||
@ -1311,6 +1311,12 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$data['ajax_input'] = '';
|
||||
}
|
||||
|
||||
// Set the php_import_headers string to base64 string.
|
||||
if (isset($data['php_import_headers']))
|
||||
{
|
||||
$data['php_import_headers'] = base64_encode($data['php_import_headers']);
|
||||
}
|
||||
|
||||
// Set the html_import_view string to base64 string.
|
||||
if (isset($data['html_import_view']))
|
||||
{
|
||||
@ -1323,10 +1329,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$data['php_import_save'] = base64_encode($data['php_import_save']);
|
||||
}
|
||||
|
||||
// Set the php_import_headers string to base64 string.
|
||||
if (isset($data['php_import_headers']))
|
||||
// Set the php_getitem string to base64 string.
|
||||
if (isset($data['php_getitem']))
|
||||
{
|
||||
$data['php_import_headers'] = base64_encode($data['php_import_headers']);
|
||||
$data['php_getitem'] = base64_encode($data['php_getitem']);
|
||||
}
|
||||
|
||||
// Set the php_getitems string to base64 string.
|
||||
@ -1341,108 +1347,108 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$data['php_getitems_after_all'] = base64_encode($data['php_getitems_after_all']);
|
||||
}
|
||||
|
||||
// Set the css_view string to base64 string.
|
||||
if (isset($data['css_view']))
|
||||
{
|
||||
$data['css_view'] = base64_encode($data['css_view']);
|
||||
}
|
||||
|
||||
// Set the php_getlistquery string to base64 string.
|
||||
if (isset($data['php_getlistquery']))
|
||||
{
|
||||
$data['php_getlistquery'] = base64_encode($data['php_getlistquery']);
|
||||
}
|
||||
|
||||
// Set the css_view string to base64 string.
|
||||
if (isset($data['css_view']))
|
||||
{
|
||||
$data['css_view'] = base64_encode($data['css_view']);
|
||||
}
|
||||
|
||||
// Set the php_getform string to base64 string.
|
||||
if (isset($data['php_getform']))
|
||||
{
|
||||
$data['php_getform'] = base64_encode($data['php_getform']);
|
||||
}
|
||||
|
||||
// Set the css_views string to base64 string.
|
||||
if (isset($data['css_views']))
|
||||
{
|
||||
$data['css_views'] = base64_encode($data['css_views']);
|
||||
}
|
||||
|
||||
// Set the php_before_save string to base64 string.
|
||||
if (isset($data['php_before_save']))
|
||||
{
|
||||
$data['php_before_save'] = base64_encode($data['php_before_save']);
|
||||
}
|
||||
|
||||
// Set the css_views string to base64 string.
|
||||
if (isset($data['css_views']))
|
||||
{
|
||||
$data['css_views'] = base64_encode($data['css_views']);
|
||||
}
|
||||
|
||||
// Set the php_save string to base64 string.
|
||||
if (isset($data['php_save']))
|
||||
{
|
||||
$data['php_save'] = base64_encode($data['php_save']);
|
||||
}
|
||||
|
||||
// Set the javascript_view_file string to base64 string.
|
||||
if (isset($data['javascript_view_file']))
|
||||
{
|
||||
$data['javascript_view_file'] = base64_encode($data['javascript_view_file']);
|
||||
}
|
||||
|
||||
// Set the php_postsavehook string to base64 string.
|
||||
if (isset($data['php_postsavehook']))
|
||||
{
|
||||
$data['php_postsavehook'] = base64_encode($data['php_postsavehook']);
|
||||
}
|
||||
|
||||
// Set the javascript_view_file string to base64 string.
|
||||
if (isset($data['javascript_view_file']))
|
||||
{
|
||||
$data['javascript_view_file'] = base64_encode($data['javascript_view_file']);
|
||||
}
|
||||
|
||||
// Set the php_allowadd string to base64 string.
|
||||
if (isset($data['php_allowadd']))
|
||||
{
|
||||
$data['php_allowadd'] = base64_encode($data['php_allowadd']);
|
||||
}
|
||||
|
||||
// Set the javascript_view_footer string to base64 string.
|
||||
if (isset($data['javascript_view_footer']))
|
||||
{
|
||||
$data['javascript_view_footer'] = base64_encode($data['javascript_view_footer']);
|
||||
}
|
||||
|
||||
// Set the php_allowedit string to base64 string.
|
||||
if (isset($data['php_allowedit']))
|
||||
{
|
||||
$data['php_allowedit'] = base64_encode($data['php_allowedit']);
|
||||
}
|
||||
|
||||
// Set the javascript_view_footer string to base64 string.
|
||||
if (isset($data['javascript_view_footer']))
|
||||
{
|
||||
$data['javascript_view_footer'] = base64_encode($data['javascript_view_footer']);
|
||||
}
|
||||
|
||||
// Set the php_batchcopy string to base64 string.
|
||||
if (isset($data['php_batchcopy']))
|
||||
{
|
||||
$data['php_batchcopy'] = base64_encode($data['php_batchcopy']);
|
||||
}
|
||||
|
||||
// Set the javascript_views_file string to base64 string.
|
||||
if (isset($data['javascript_views_file']))
|
||||
{
|
||||
$data['javascript_views_file'] = base64_encode($data['javascript_views_file']);
|
||||
}
|
||||
|
||||
// Set the php_batchmove string to base64 string.
|
||||
if (isset($data['php_batchmove']))
|
||||
{
|
||||
$data['php_batchmove'] = base64_encode($data['php_batchmove']);
|
||||
}
|
||||
|
||||
// Set the javascript_views_file string to base64 string.
|
||||
if (isset($data['javascript_views_file']))
|
||||
{
|
||||
$data['javascript_views_file'] = base64_encode($data['javascript_views_file']);
|
||||
}
|
||||
|
||||
// Set the php_before_publish string to base64 string.
|
||||
if (isset($data['php_before_publish']))
|
||||
{
|
||||
$data['php_before_publish'] = base64_encode($data['php_before_publish']);
|
||||
}
|
||||
|
||||
// Set the javascript_views_footer string to base64 string.
|
||||
if (isset($data['javascript_views_footer']))
|
||||
{
|
||||
$data['javascript_views_footer'] = base64_encode($data['javascript_views_footer']);
|
||||
}
|
||||
|
||||
// Set the php_after_publish string to base64 string.
|
||||
if (isset($data['php_after_publish']))
|
||||
{
|
||||
$data['php_after_publish'] = base64_encode($data['php_after_publish']);
|
||||
}
|
||||
|
||||
// Set the javascript_views_footer string to base64 string.
|
||||
if (isset($data['javascript_views_footer']))
|
||||
{
|
||||
$data['javascript_views_footer'] = base64_encode($data['javascript_views_footer']);
|
||||
}
|
||||
|
||||
// Set the php_before_delete string to base64 string.
|
||||
if (isset($data['php_before_delete']))
|
||||
{
|
||||
@ -1455,36 +1461,36 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$data['php_after_delete'] = base64_encode($data['php_after_delete']);
|
||||
}
|
||||
|
||||
// Set the php_controller string to base64 string.
|
||||
if (isset($data['php_controller']))
|
||||
{
|
||||
$data['php_controller'] = base64_encode($data['php_controller']);
|
||||
}
|
||||
|
||||
// Set the php_document string to base64 string.
|
||||
if (isset($data['php_document']))
|
||||
{
|
||||
$data['php_document'] = base64_encode($data['php_document']);
|
||||
}
|
||||
|
||||
// Set the php_controller string to base64 string.
|
||||
if (isset($data['php_controller']))
|
||||
{
|
||||
$data['php_controller'] = base64_encode($data['php_controller']);
|
||||
}
|
||||
|
||||
// Set the php_model string to base64 string.
|
||||
if (isset($data['php_model']))
|
||||
{
|
||||
$data['php_model'] = base64_encode($data['php_model']);
|
||||
}
|
||||
|
||||
// Set the php_controller_list string to base64 string.
|
||||
if (isset($data['php_controller_list']))
|
||||
{
|
||||
$data['php_controller_list'] = base64_encode($data['php_controller_list']);
|
||||
}
|
||||
|
||||
// Set the sql string to base64 string.
|
||||
if (isset($data['sql']))
|
||||
{
|
||||
$data['sql'] = base64_encode($data['sql']);
|
||||
}
|
||||
|
||||
// Set the php_controller_list string to base64 string.
|
||||
if (isset($data['php_controller_list']))
|
||||
{
|
||||
$data['php_controller_list'] = base64_encode($data['php_controller_list']);
|
||||
}
|
||||
|
||||
// Set the php_model_list string to base64 string.
|
||||
if (isset($data['php_model_list']))
|
||||
{
|
||||
@ -1497,18 +1503,18 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$data['php_import_display'] = base64_encode($data['php_import_display']);
|
||||
}
|
||||
|
||||
// Set the php_ajaxmethod string to base64 string.
|
||||
if (isset($data['php_ajaxmethod']))
|
||||
{
|
||||
$data['php_ajaxmethod'] = base64_encode($data['php_ajaxmethod']);
|
||||
}
|
||||
|
||||
// Set the php_import string to base64 string.
|
||||
if (isset($data['php_import']))
|
||||
{
|
||||
$data['php_import'] = base64_encode($data['php_import']);
|
||||
}
|
||||
|
||||
// Set the php_ajaxmethod string to base64 string.
|
||||
if (isset($data['php_ajaxmethod']))
|
||||
{
|
||||
$data['php_ajaxmethod'] = base64_encode($data['php_ajaxmethod']);
|
||||
}
|
||||
|
||||
// Set the php_import_setdata string to base64 string.
|
||||
if (isset($data['php_import_setdata']))
|
||||
{
|
||||
@ -1519,12 +1525,6 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
if (isset($data['php_import_ext']))
|
||||
{
|
||||
$data['php_import_ext'] = base64_encode($data['php_import_ext']);
|
||||
}
|
||||
|
||||
// Set the php_getitem string to base64 string.
|
||||
if (isset($data['php_getitem']))
|
||||
{
|
||||
$data['php_getitem'] = base64_encode($data['php_getitem']);
|
||||
}
|
||||
|
||||
// Set the Params Items to data
|
||||
|
@ -31,8 +31,8 @@ class ComponentbuilderModelAdmin_views extends JModelList
|
||||
'a.name_single','name_single',
|
||||
'a.short_description','short_description',
|
||||
'a.add_fadein','add_fadein',
|
||||
'a.type','type',
|
||||
'a.add_custom_import','add_custom_import',
|
||||
'a.type','type',
|
||||
'a.add_custom_button','add_custom_button',
|
||||
'a.add_php_ajax','add_php_ajax'
|
||||
);
|
||||
@ -67,12 +67,12 @@ class ComponentbuilderModelAdmin_views extends JModelList
|
||||
$add_fadein = $this->getUserStateFromRequest($this->context . '.filter.add_fadein', 'filter_add_fadein');
|
||||
$this->setState('filter.add_fadein', $add_fadein);
|
||||
|
||||
$type = $this->getUserStateFromRequest($this->context . '.filter.type', 'filter_type');
|
||||
$this->setState('filter.type', $type);
|
||||
|
||||
$add_custom_import = $this->getUserStateFromRequest($this->context . '.filter.add_custom_import', 'filter_add_custom_import');
|
||||
$this->setState('filter.add_custom_import', $add_custom_import);
|
||||
|
||||
$type = $this->getUserStateFromRequest($this->context . '.filter.type', 'filter_type');
|
||||
$this->setState('filter.type', $type);
|
||||
|
||||
$add_custom_button = $this->getUserStateFromRequest($this->context . '.filter.add_custom_button', 'filter_add_custom_button');
|
||||
$this->setState('filter.add_custom_button', $add_custom_button);
|
||||
|
||||
@ -136,10 +136,10 @@ class ComponentbuilderModelAdmin_views extends JModelList
|
||||
{
|
||||
// convert add_fadein
|
||||
$item->add_fadein = $this->selectionTranslation($item->add_fadein, 'add_fadein');
|
||||
// convert type
|
||||
$item->type = $this->selectionTranslation($item->type, 'type');
|
||||
// convert add_custom_import
|
||||
$item->add_custom_import = $this->selectionTranslation($item->add_custom_import, 'add_custom_import');
|
||||
// convert type
|
||||
$item->type = $this->selectionTranslation($item->type, 'type');
|
||||
// convert add_custom_button
|
||||
$item->add_custom_button = $this->selectionTranslation($item->add_custom_button, 'add_custom_button');
|
||||
// convert add_php_ajax
|
||||
@ -172,19 +172,6 @@ class ComponentbuilderModelAdmin_views extends JModelList
|
||||
return $add_fadeinArray[$value];
|
||||
}
|
||||
}
|
||||
// Array of type language strings
|
||||
if ($name === 'type')
|
||||
{
|
||||
$typeArray = array(
|
||||
1 => 'COM_COMPONENTBUILDER_ADMIN_VIEW_READWRITE',
|
||||
2 => 'COM_COMPONENTBUILDER_ADMIN_VIEW_READONLY'
|
||||
);
|
||||
// Now check if value is found in this array
|
||||
if (isset($typeArray[$value]) && ComponentbuilderHelper::checkString($typeArray[$value]))
|
||||
{
|
||||
return $typeArray[$value];
|
||||
}
|
||||
}
|
||||
// Array of add_custom_import language strings
|
||||
if ($name === 'add_custom_import')
|
||||
{
|
||||
@ -198,6 +185,19 @@ class ComponentbuilderModelAdmin_views extends JModelList
|
||||
return $add_custom_importArray[$value];
|
||||
}
|
||||
}
|
||||
// Array of type language strings
|
||||
if ($name === 'type')
|
||||
{
|
||||
$typeArray = array(
|
||||
1 => 'COM_COMPONENTBUILDER_ADMIN_VIEW_READWRITE',
|
||||
2 => 'COM_COMPONENTBUILDER_ADMIN_VIEW_READONLY'
|
||||
);
|
||||
// Now check if value is found in this array
|
||||
if (isset($typeArray[$value]) && ComponentbuilderHelper::checkString($typeArray[$value]))
|
||||
{
|
||||
return $typeArray[$value];
|
||||
}
|
||||
}
|
||||
// Array of add_custom_button language strings
|
||||
if ($name === 'add_custom_button')
|
||||
{
|
||||
@ -282,7 +282,7 @@ class ComponentbuilderModelAdmin_views extends JModelList
|
||||
else
|
||||
{
|
||||
$search = $db->quote('%' . $db->escape($search) . '%');
|
||||
$query->where('(a.system_name LIKE '.$search.' OR a.name_single LIKE '.$search.' OR a.short_description LIKE '.$search.' OR a.description LIKE '.$search.' OR a.type LIKE '.$search.' OR a.name_list LIKE '.$search.')');
|
||||
$query->where('(a.system_name LIKE '.$search.' OR a.name_single LIKE '.$search.' OR a.short_description LIKE '.$search.' OR a.description LIKE '.$search.' OR a.name_list LIKE '.$search.' OR a.type LIKE '.$search.')');
|
||||
}
|
||||
}
|
||||
|
||||
@ -291,16 +291,16 @@ class ComponentbuilderModelAdmin_views extends JModelList
|
||||
{
|
||||
$query->where('a.add_fadein = ' . $db->quote($db->escape($add_fadein)));
|
||||
}
|
||||
// Filter by Type.
|
||||
if ($type = $this->getState('filter.type'))
|
||||
{
|
||||
$query->where('a.type = ' . $db->quote($db->escape($type)));
|
||||
}
|
||||
// Filter by Add_custom_import.
|
||||
if ($add_custom_import = $this->getState('filter.add_custom_import'))
|
||||
{
|
||||
$query->where('a.add_custom_import = ' . $db->quote($db->escape($add_custom_import)));
|
||||
}
|
||||
// Filter by Type.
|
||||
if ($type = $this->getState('filter.type'))
|
||||
{
|
||||
$query->where('a.type = ' . $db->quote($db->escape($type)));
|
||||
}
|
||||
// Filter by Add_custom_button.
|
||||
if ($add_custom_button = $this->getState('filter.add_custom_button'))
|
||||
{
|
||||
@ -376,78 +376,78 @@ class ComponentbuilderModelAdmin_views extends JModelList
|
||||
continue;
|
||||
}
|
||||
|
||||
// decode php_import_headers
|
||||
$item->php_import_headers = base64_decode($item->php_import_headers);
|
||||
// decode html_import_view
|
||||
$item->html_import_view = base64_decode($item->html_import_view);
|
||||
// decode php_import_save
|
||||
$item->php_import_save = base64_decode($item->php_import_save);
|
||||
// decode php_import_headers
|
||||
$item->php_import_headers = base64_decode($item->php_import_headers);
|
||||
// decode php_getitem
|
||||
$item->php_getitem = base64_decode($item->php_getitem);
|
||||
// decode php_getitems
|
||||
$item->php_getitems = base64_decode($item->php_getitems);
|
||||
// decode php_getitems_after_all
|
||||
$item->php_getitems_after_all = base64_decode($item->php_getitems_after_all);
|
||||
// decode css_view
|
||||
$item->css_view = base64_decode($item->css_view);
|
||||
// decode php_getlistquery
|
||||
$item->php_getlistquery = base64_decode($item->php_getlistquery);
|
||||
// decode css_view
|
||||
$item->css_view = base64_decode($item->css_view);
|
||||
// decode php_getform
|
||||
$item->php_getform = base64_decode($item->php_getform);
|
||||
// decode css_views
|
||||
$item->css_views = base64_decode($item->css_views);
|
||||
// decode php_before_save
|
||||
$item->php_before_save = base64_decode($item->php_before_save);
|
||||
// decode css_views
|
||||
$item->css_views = base64_decode($item->css_views);
|
||||
// decode php_save
|
||||
$item->php_save = base64_decode($item->php_save);
|
||||
// decode javascript_view_file
|
||||
$item->javascript_view_file = base64_decode($item->javascript_view_file);
|
||||
// decode php_postsavehook
|
||||
$item->php_postsavehook = base64_decode($item->php_postsavehook);
|
||||
// decode javascript_view_file
|
||||
$item->javascript_view_file = base64_decode($item->javascript_view_file);
|
||||
// decode php_allowadd
|
||||
$item->php_allowadd = base64_decode($item->php_allowadd);
|
||||
// decode javascript_view_footer
|
||||
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
|
||||
// decode php_allowedit
|
||||
$item->php_allowedit = base64_decode($item->php_allowedit);
|
||||
// decode javascript_view_footer
|
||||
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
|
||||
// decode php_batchcopy
|
||||
$item->php_batchcopy = base64_decode($item->php_batchcopy);
|
||||
// decode javascript_views_file
|
||||
$item->javascript_views_file = base64_decode($item->javascript_views_file);
|
||||
// decode php_batchmove
|
||||
$item->php_batchmove = base64_decode($item->php_batchmove);
|
||||
// decode javascript_views_file
|
||||
$item->javascript_views_file = base64_decode($item->javascript_views_file);
|
||||
// decode php_before_publish
|
||||
$item->php_before_publish = base64_decode($item->php_before_publish);
|
||||
// decode javascript_views_footer
|
||||
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
|
||||
// decode php_after_publish
|
||||
$item->php_after_publish = base64_decode($item->php_after_publish);
|
||||
// decode javascript_views_footer
|
||||
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
|
||||
// decode php_before_delete
|
||||
$item->php_before_delete = base64_decode($item->php_before_delete);
|
||||
// decode php_after_delete
|
||||
$item->php_after_delete = base64_decode($item->php_after_delete);
|
||||
// decode php_controller
|
||||
$item->php_controller = base64_decode($item->php_controller);
|
||||
// decode php_document
|
||||
$item->php_document = base64_decode($item->php_document);
|
||||
// decode php_controller
|
||||
$item->php_controller = base64_decode($item->php_controller);
|
||||
// decode php_model
|
||||
$item->php_model = base64_decode($item->php_model);
|
||||
// decode php_controller_list
|
||||
$item->php_controller_list = base64_decode($item->php_controller_list);
|
||||
// decode sql
|
||||
$item->sql = base64_decode($item->sql);
|
||||
// decode php_controller_list
|
||||
$item->php_controller_list = base64_decode($item->php_controller_list);
|
||||
// decode php_model_list
|
||||
$item->php_model_list = base64_decode($item->php_model_list);
|
||||
// decode php_import_display
|
||||
$item->php_import_display = base64_decode($item->php_import_display);
|
||||
// decode php_ajaxmethod
|
||||
$item->php_ajaxmethod = base64_decode($item->php_ajaxmethod);
|
||||
// decode php_import
|
||||
$item->php_import = base64_decode($item->php_import);
|
||||
// decode php_ajaxmethod
|
||||
$item->php_ajaxmethod = base64_decode($item->php_ajaxmethod);
|
||||
// decode php_import_setdata
|
||||
$item->php_import_setdata = base64_decode($item->php_import_setdata);
|
||||
// decode php_import_ext
|
||||
$item->php_import_ext = base64_decode($item->php_import_ext);
|
||||
// decode php_getitem
|
||||
$item->php_getitem = base64_decode($item->php_getitem);
|
||||
// unset the values we don't want exported.
|
||||
unset($item->asset_id);
|
||||
unset($item->checked_out);
|
||||
@ -512,8 +512,8 @@ class ComponentbuilderModelAdmin_views extends JModelList
|
||||
$id .= ':' . $this->getState('filter.name_single');
|
||||
$id .= ':' . $this->getState('filter.short_description');
|
||||
$id .= ':' . $this->getState('filter.add_fadein');
|
||||
$id .= ':' . $this->getState('filter.type');
|
||||
$id .= ':' . $this->getState('filter.add_custom_import');
|
||||
$id .= ':' . $this->getState('filter.type');
|
||||
$id .= ':' . $this->getState('filter.add_custom_button');
|
||||
$id .= ':' . $this->getState('filter.add_php_ajax');
|
||||
|
||||
|
237
admin/models/admins_custom_tabs.php
Normal file
237
admin/models/admins_custom_tabs.php
Normal file
@ -0,0 +1,237 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 30th April, 2015
|
||||
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
|
||||
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
|
||||
* @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
/**
|
||||
* Admins_custom_tabs Model
|
||||
*/
|
||||
class ComponentbuilderModelAdmins_custom_tabs extends JModelList
|
||||
{
|
||||
public function __construct($config = array())
|
||||
{
|
||||
if (empty($config['filter_fields']))
|
||||
{
|
||||
$config['filter_fields'] = array(
|
||||
'a.id','id',
|
||||
'a.published','published',
|
||||
'a.ordering','ordering',
|
||||
'a.created_by','created_by',
|
||||
'a.modified_by','modified_by'
|
||||
);
|
||||
}
|
||||
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
$app = JFactory::getApplication();
|
||||
|
||||
// Adjust the context to support modal layouts.
|
||||
if ($layout = $app->input->get('layout'))
|
||||
{
|
||||
$this->context .= '.' . $layout;
|
||||
}
|
||||
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
$this->setState('filter.access', $access);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
// List state information.
|
||||
parent::populateState($ordering, $direction);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get an array of data items.
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
public function getItems()
|
||||
{
|
||||
// check in items
|
||||
$this->checkInNow();
|
||||
|
||||
// load parent items
|
||||
$items = parent::getItems();
|
||||
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = (JFactory::getUser()->authorise('admin_custom_tabs.access', 'com_componentbuilder.admin_custom_tabs.' . (int) $item->id) && JFactory::getUser()->authorise('admin_custom_tabs.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
continue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// return items
|
||||
return $items;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to build an SQL query to load the list data.
|
||||
*
|
||||
* @return string An SQL query
|
||||
*/
|
||||
protected function getListQuery()
|
||||
{
|
||||
// Get the user object.
|
||||
$user = JFactory::getUser();
|
||||
// Create a new query object.
|
||||
$db = JFactory::getDBO();
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select some fields
|
||||
$query->select('a.*');
|
||||
|
||||
// From the componentbuilder_item table
|
||||
$query->from($db->quoteName('#__componentbuilder_admin_custom_tabs', 'a'));
|
||||
|
||||
// From the componentbuilder_admin_view table.
|
||||
$query->select($db->quoteName('g.system_name','admin_view_system_name'));
|
||||
$query->join('LEFT', $db->quoteName('#__componentbuilder_admin_view', 'g') . ' ON (' . $db->quoteName('a.admin_view') . ' = ' . $db->quoteName('g.id') . ')');
|
||||
|
||||
// Filter by published state
|
||||
$published = $this->getState('filter.published');
|
||||
if (is_numeric($published))
|
||||
{
|
||||
$query->where('a.published = ' . (int) $published);
|
||||
}
|
||||
elseif ($published === '')
|
||||
{
|
||||
$query->where('(a.published = 0 OR a.published = 1)');
|
||||
}
|
||||
|
||||
// Join over the asset groups.
|
||||
$query->select('ag.title AS access_level');
|
||||
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
|
||||
// Filter by access level.
|
||||
if ($access = $this->getState('filter.access'))
|
||||
{
|
||||
$query->where('a.access = ' . (int) $access);
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
{
|
||||
$groups = implode(',', $user->getAuthorisedViewLevels());
|
||||
$query->where('a.access IN (' . $groups . ')');
|
||||
}
|
||||
|
||||
// Add the list ordering clause.
|
||||
$orderCol = $this->state->get('list.ordering', 'a.id');
|
||||
$orderDirn = $this->state->get('list.direction', 'asc');
|
||||
if ($orderCol != '')
|
||||
{
|
||||
$query->order($db->escape($orderCol . ' ' . $orderDirn));
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get a store id based on model configuration state.
|
||||
*
|
||||
* @return string A store id.
|
||||
*
|
||||
*/
|
||||
protected function getStoreId($id = '')
|
||||
{
|
||||
// Compile the store id.
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
$id .= ':' . $this->getState('filter.ordering');
|
||||
$id .= ':' . $this->getState('filter.created_by');
|
||||
$id .= ':' . $this->getState('filter.modified_by');
|
||||
|
||||
return parent::getStoreId($id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
protected function checkInNow()
|
||||
{
|
||||
// Get set check in time
|
||||
$time = JComponentHelper::getParams('com_componentbuilder')->get('check_in');
|
||||
|
||||
if ($time)
|
||||
{
|
||||
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
// reset query
|
||||
$query = $db->getQuery(true);
|
||||
$query->select('*');
|
||||
$query->from($db->quoteName('#__componentbuilder_admin_custom_tabs'));
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
// Get Yesterdays date
|
||||
$date = JFactory::getDate()->modify($time)->toSql();
|
||||
// reset query
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Fields to update.
|
||||
$fields = array(
|
||||
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
|
||||
$db->quoteName('checked_out') . '=0'
|
||||
);
|
||||
|
||||
// Conditions for which records should be updated.
|
||||
$conditions = array(
|
||||
$db->quoteName('checked_out') . '!=0',
|
||||
$db->quoteName('checked_out_time') . '<\''.$date.'\''
|
||||
);
|
||||
|
||||
// Check table
|
||||
$query->update($db->quoteName('#__componentbuilder_admin_custom_tabs'))->set($fields)->where($conditions);
|
||||
|
||||
$db->setQuery($query);
|
||||
|
||||
$db->execute();
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
@ -251,6 +251,7 @@ class ComponentbuilderModelAjax extends JModelList
|
||||
'admin_fields' => 'admins_fields',
|
||||
'admin_fields_conditions' => 'admins_fields_conditions',
|
||||
'admin_fields_relations' => 'admins_fields_relations',
|
||||
'admin_custom_tabs' => 'admins_custom_tabs',
|
||||
'validation_rule' => 'validation_rules',
|
||||
'field' => 'fields',
|
||||
'component_admin_views' => 'components_admin_views' ,
|
||||
|
@ -130,6 +130,9 @@ class ComponentbuilderModelComponentbuilder extends JModelList
|
||||
'admin_fields_relations.create' => 'admin_fields_relations.create',
|
||||
'admins_fields_relations.access' => 'admin_fields_relations.access',
|
||||
'admin_fields_relations.access' => 'admin_fields_relations.access',
|
||||
'admin_custom_tabs.create' => 'admin_custom_tabs.create',
|
||||
'admins_custom_tabs.access' => 'admin_custom_tabs.access',
|
||||
'admin_custom_tabs.access' => 'admin_custom_tabs.access',
|
||||
'component_admin_views.create' => 'component_admin_views.create',
|
||||
'components_admin_views.access' => 'component_admin_views.access',
|
||||
'component_admin_views.access' => 'component_admin_views.access',
|
||||
|
@ -35,37 +35,55 @@ class JFormFieldViewtabs extends JFormFieldList
|
||||
*/
|
||||
public function getOptions()
|
||||
{
|
||||
// get the input from url
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
// get the view name & id
|
||||
$fieldsID = $jinput->getInt('id', 0);
|
||||
$db = JFactory::getDBO();
|
||||
$query = $db->getQuery(true);
|
||||
$query->select($db->quoteName(array('a.id','a.addtabs'),array('id','addtabs')));
|
||||
$query->from($db->quoteName('#__componentbuilder_admin_view', 'a'));
|
||||
$query->join('LEFT', $db->quoteName('#__componentbuilder_admin_fields', 'b') . ' ON (' . $db->quoteName('a.id') . ' = ' . $db->quoteName('b.admin_view') . ')');
|
||||
$query->where($db->quoteName('a.published') . ' >= 1');
|
||||
$query->where($db->quoteName('b.id') . ' = ' . (int) $fieldsID);
|
||||
$query->order('a.addtabs ASC');
|
||||
$db->setQuery((string)$query);
|
||||
$item = $db->loadObject();
|
||||
$options = array();
|
||||
if (isset($item->addtabs) && strlen($item->addtabs) > 5)
|
||||
{
|
||||
$items = json_decode($item->addtabs, true);
|
||||
$nr = 1;
|
||||
foreach($items as $itemName)
|
||||
{
|
||||
$options[] = JHtml::_('select.option', $nr, $itemName['name']);
|
||||
$nr++;
|
||||
}
|
||||
// get the input from url
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
// get the view name & id
|
||||
$fieldsID = $jinput->getInt('id', 0);
|
||||
$db = JFactory::getDBO();
|
||||
$query = $db->getQuery(true);
|
||||
$query->select($db->quoteName(array('a.id','a.addtabs'),array('id','addtabs')));
|
||||
$query->from($db->quoteName('#__componentbuilder_admin_view', 'a'));
|
||||
if ($fieldsID > 0)
|
||||
{
|
||||
$query->join('LEFT', $db->quoteName('#__componentbuilder_admin_fields', 'b') . ' ON (' . $db->quoteName('a.id') . ' = ' . $db->quoteName('b.admin_view') . ')');
|
||||
$query->where($db->quoteName('b.id') . ' = ' . (int) $fieldsID);
|
||||
}
|
||||
else
|
||||
{
|
||||
// get the refs if found
|
||||
$ref = $jinput->get('ref', 0, 'WORD');
|
||||
$refid = $jinput->getInt('refid', 0);
|
||||
if ('admin_view' === $ref && $refid > 0)
|
||||
{
|
||||
$query->where($db->quoteName('a.id') . ' = ' . (int) $refid);
|
||||
}
|
||||
else
|
||||
{
|
||||
// kry maar niks
|
||||
$query->where($db->quoteName('a.id') . ' = 0');
|
||||
}
|
||||
}
|
||||
$query->where($db->quoteName('a.published') . ' >= 1');
|
||||
$query->order('a.addtabs ASC');
|
||||
$db->setQuery((string)$query);
|
||||
$item = $db->loadObject();
|
||||
$options = array();
|
||||
if (isset($item->addtabs) && strlen($item->addtabs) > 5)
|
||||
{
|
||||
$items = json_decode($item->addtabs, true);
|
||||
$nr = 1;
|
||||
foreach($items as $itemName)
|
||||
{
|
||||
$options[] = JHtml::_('select.option', $nr, $itemName['name']);
|
||||
$nr++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$options[] = JHtml::_('select.option', 1, JText::_('COM_COMPONENTBUILDER_DETAILS'));
|
||||
}
|
||||
// add the default publish tab as an option
|
||||
$options[] = JHtml::_('select.option', 15, JText::_('COM_COMPONENTBUILDER_PUBLISHING'));
|
||||
$options[] = JHtml::_('select.option', 15, JText::_('COM_COMPONENTBUILDER_PUBLISHING'));
|
||||
return $options;
|
||||
}
|
||||
}
|
||||
|
11
admin/models/forms/admin_custom_tabs.js
Normal file
11
admin/models/forms/admin_custom_tabs.js
Normal file
@ -0,0 +1,11 @@
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 30th April, 2015
|
||||
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
|
||||
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
|
||||
* @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
|
203
admin/models/forms/admin_custom_tabs.xml
Normal file
203
admin/models/forms/admin_custom_tabs.xml
Normal file
@ -0,0 +1,203 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<form
|
||||
addrulepath="/administrator/components/com_componentbuilder/models/rules"
|
||||
addfieldpath="/administrator/components/com_componentbuilder/models/fields"
|
||||
>
|
||||
<fieldset name="details">
|
||||
<!-- Default Fields. -->
|
||||
<!-- Id Field. Type: Text (joomla) -->
|
||||
<field
|
||||
name="id"
|
||||
type="text" class="readonly" label="JGLOBAL_FIELD_ID_LABEL"
|
||||
description ="JGLOBAL_FIELD_ID_DESC" size="10" default="0"
|
||||
readonly="true"
|
||||
/>
|
||||
<!-- Date Created Field. Type: Calendar (joomla) -->
|
||||
<field
|
||||
name="created"
|
||||
type="calendar"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_CREATED_DATE_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_CREATED_DATE_DESC"
|
||||
size="22"
|
||||
format="%Y-%m-%d %H:%M:%S"
|
||||
filter="user_utc"
|
||||
/>
|
||||
<!-- User Created Field. Type: User (joomla) -->
|
||||
<field
|
||||
name="created_by"
|
||||
type="user"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_CREATED_BY_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_CREATED_BY_DESC"
|
||||
/>
|
||||
<!-- Published Field. Type: List (joomla) -->
|
||||
<field name="published" type="list" label="JSTATUS"
|
||||
description="JFIELD_PUBLISHED_DESC" class="chzn-color-state"
|
||||
filter="intval" size="1" default="1" >
|
||||
<option value="1">
|
||||
JPUBLISHED</option>
|
||||
<option value="0">
|
||||
JUNPUBLISHED</option>
|
||||
<option value="2">
|
||||
JARCHIVED</option>
|
||||
<option value="-2">
|
||||
JTRASHED</option>
|
||||
</field>
|
||||
<!-- Date Modified Field. Type: Calendar (joomla) -->
|
||||
<field name="modified" type="calendar" class="readonly"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_MODIFIED_DATE_LABEL" description="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_MODIFIED_DATE_DESC"
|
||||
size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" />
|
||||
<!-- User Modified Field. Type: User (joomla) -->
|
||||
<field name="modified_by" type="user"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_MODIFIED_BY_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_MODIFIED_BY_DESC"
|
||||
class="readonly"
|
||||
readonly="true"
|
||||
filter="unset"
|
||||
/>
|
||||
<!-- Access Field. Type: Accesslevel (joomla) -->
|
||||
<field name="access"
|
||||
type="accesslevel"
|
||||
label="JFIELD_ACCESS_LABEL"
|
||||
description="JFIELD_ACCESS_DESC"
|
||||
default="1"
|
||||
required="false"
|
||||
/>
|
||||
<!-- Ordering Field. Type: Numbers (joomla) -->
|
||||
<field
|
||||
name="ordering"
|
||||
type="number"
|
||||
class="inputbox validate-ordering"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_ORDERING_LABEL"
|
||||
description=""
|
||||
default="0"
|
||||
size="6"
|
||||
required="false"
|
||||
/>
|
||||
<!-- Version Field. Type: Text (joomla) -->
|
||||
<field
|
||||
name="version"
|
||||
type="text"
|
||||
class="readonly"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_VERSION_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_VERSION_DESC"
|
||||
size="6"
|
||||
readonly="true"
|
||||
filter="unset"
|
||||
/>
|
||||
<!-- Dynamic Fields. -->
|
||||
<!-- Admin_view Field. Type: Adminviewsreadonly. (custom) -->
|
||||
<field
|
||||
type="adminviewsreadonly"
|
||||
name="admin_view"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_ADMIN_VIEW_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_ADMIN_VIEW_DESCRIPTION"
|
||||
class="list_class"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
button="false"
|
||||
/>
|
||||
<!-- Tabs Field. Type: Subform. (joomla) -->
|
||||
<field
|
||||
type="subform"
|
||||
name="tabs"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_TABS_LABEL"
|
||||
layout="joomla.form.field.subform.repeatable-table"
|
||||
multiple="true"
|
||||
buttons="add,remove,move"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_TABS_DESCRIPTION"
|
||||
icon="list"
|
||||
max="5">
|
||||
<form hidden="true" name="list_tabs_modal" repeat="true">
|
||||
<!-- Tab Field. Type: Viewtabs. (custom) -->
|
||||
<field
|
||||
type="viewtabs"
|
||||
name="tab"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_TAB_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_TAB_DESCRIPTION"
|
||||
class="fieldMedium"
|
||||
multiple="false"
|
||||
default="1"
|
||||
required="false"
|
||||
button="false"
|
||||
/>
|
||||
<!-- Position Field. Type: List. (joomla) -->
|
||||
<field
|
||||
type="list"
|
||||
name="position"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_POSITION_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_POSITION_DESCRIPTION"
|
||||
class="list_class"
|
||||
multiple="false"
|
||||
required="false"
|
||||
default="1">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_BEFORE_SELECTED_TAB</option>
|
||||
<option value="2">
|
||||
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_AFTER_SELECTED_TAB</option>
|
||||
</field>
|
||||
<!-- Name Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
type="text"
|
||||
name="name"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_NAME_LABEL"
|
||||
size="40"
|
||||
maxlength="150"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_NAME_DESCRIPTION"
|
||||
class="text_area"
|
||||
readonly="false"
|
||||
disabled="false"
|
||||
required="false"
|
||||
filter="STRING"
|
||||
message="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_NAME_MESSAGE"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_NAME_HINT"
|
||||
/>
|
||||
<!-- Permission Field. Type: Checkbox. (joomla) -->
|
||||
<field
|
||||
type="checkbox"
|
||||
name="permission"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_PERMISSION_LABEL"
|
||||
value="1"
|
||||
required="false"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_PERMISSION_DESCRIPTION"
|
||||
class="inputbox"
|
||||
/>
|
||||
<!-- Html Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="html"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_HTML_LABEL"
|
||||
rows="20"
|
||||
cols="30"
|
||||
class="text_area tab_html"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_HTML_HINT"
|
||||
required="false"
|
||||
/>
|
||||
</form>
|
||||
</field>
|
||||
</fieldset>
|
||||
|
||||
<!-- Access Control Fields. -->
|
||||
<fieldset name="accesscontrol">
|
||||
<!-- Asset Id Field. Type: Hidden (joomla) -->
|
||||
<field
|
||||
name="asset_id"
|
||||
type="hidden"
|
||||
filter="unset"
|
||||
/>
|
||||
<!-- Rules Field. Type: Rules (joomla) -->
|
||||
<field
|
||||
name="rules"
|
||||
type="rules"
|
||||
label="Permissions in relation to this admin_custom_tabs"
|
||||
translate_label="false"
|
||||
filter="rules"
|
||||
validate="rules"
|
||||
class="inputbox"
|
||||
component="com_componentbuilder"
|
||||
section="admin_custom_tabs"
|
||||
/>
|
||||
</fieldset>
|
||||
</form>
|
@ -1273,6 +1273,8 @@ jQuery(document).ready(function()
|
||||
addButton('field','create_edit_buttons'); // <-- third
|
||||
// set button
|
||||
addButtonID('admin_fields_relations','create_edit_buttons', 1); // <-- forth
|
||||
// set button
|
||||
addButtonID('admin_custom_tabs','addtabs-lbl', 1); // <-- fifth
|
||||
});
|
||||
|
||||
function checkAliasField() {
|
||||
|
@ -128,11 +128,11 @@
|
||||
message="COM_COMPONENTBUILDER_ADMIN_VIEW_SHORT_DESCRIPTION_MESSAGE"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_SHORT_DESCRIPTION_HINT"
|
||||
/>
|
||||
<!-- Add_php_batchmove Field. Type: Radio. (joomla) -->
|
||||
<!-- Add_php_batchcopy Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_php_batchmove"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BATCHMOVE_LABEL"
|
||||
name="add_php_batchcopy"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BATCHCOPY_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
@ -142,11 +142,11 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Add_php_allowedit Field. Type: Radio. (joomla) -->
|
||||
<!-- Add_php_allowadd Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_php_allowedit"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_ALLOWEDIT_LABEL"
|
||||
name="add_php_allowadd"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_ALLOWADD_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
@ -156,11 +156,11 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Add_php_postsavehook Field. Type: Radio. (joomla) -->
|
||||
<!-- Add_php_save Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_php_postsavehook"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_POSTSAVEHOOK_LABEL"
|
||||
name="add_php_save"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_SAVE_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
@ -170,11 +170,11 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Add_php_before_save Field. Type: Radio. (joomla) -->
|
||||
<!-- Add_php_getform Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_php_before_save"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_SAVE_LABEL"
|
||||
name="add_php_getform"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETFORM_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
@ -184,25 +184,11 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Add_php_getlistquery Field. Type: Radio. (joomla) -->
|
||||
<!-- Add_php_getitems_after_all Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_php_getlistquery"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETLISTQUERY_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_YES</option>
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Add_php_getitems Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_php_getitems"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEMS_LABEL"
|
||||
name="add_php_getitems_after_all"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEMS_AFTER_ALL_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
@ -220,11 +206,11 @@
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_ICON_DESCRIPTION"
|
||||
directory=""
|
||||
/>
|
||||
<!-- Add_sql Field. Type: Radio. (joomla) -->
|
||||
<!-- Add_php_document Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_sql"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_SQL_LABEL"
|
||||
name="add_php_document"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_DOCUMENT_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
@ -278,11 +264,11 @@
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_ICON_ADD_DESCRIPTION"
|
||||
directory=""
|
||||
/>
|
||||
<!-- Add_php_after_publish Field. Type: Radio. (joomla) -->
|
||||
<!-- Add_php_before_publish Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_php_after_publish"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_PUBLISH_LABEL"
|
||||
name="add_php_before_publish"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_PUBLISH_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
@ -292,24 +278,12 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Html_import_view Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="html_import_view"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_HTML_IMPORT_VIEW_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_HTML_IMPORT_VIEW_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_HTML_IMPORT_VIEW_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Add_php_after_delete Field. Type: Radio. (joomla) -->
|
||||
<!-- Add_custom_import Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_php_after_delete"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_DELETE_LABEL"
|
||||
name="add_custom_import"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CUSTOM_IMPORT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CUSTOM_IMPORT_DESCRIPTION"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
@ -319,6 +293,71 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Add_php_before_delete Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_php_before_delete"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_DELETE_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_YES</option>
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Name_list Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
type="text"
|
||||
name="name_list"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_LIST_LABEL"
|
||||
size="40"
|
||||
maxlength="150"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_LIST_DESCRIPTION"
|
||||
class="inputbox"
|
||||
readonly="false"
|
||||
disabled="false"
|
||||
required="true"
|
||||
filter="STRING"
|
||||
message="COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_LIST_MESSAGE"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_LIST_HINT"
|
||||
/>
|
||||
<!-- Addtables Field. Type: Subform. (joomla) -->
|
||||
<field
|
||||
type="subform"
|
||||
name="addtables"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADDTABLES_LABEL"
|
||||
layout="joomla.form.field.subform.repeatable-table"
|
||||
multiple="true"
|
||||
icon="list">
|
||||
<form hidden="true" name="list_addtables_modal" repeat="true">
|
||||
<!-- Table Field. Type: Dbtables. (custom) -->
|
||||
<field
|
||||
type="dbtables"
|
||||
name="table"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_TABLE_LABEL"
|
||||
class="list_class"
|
||||
multiple="false"
|
||||
default="0"
|
||||
required="false"
|
||||
button="false"
|
||||
/>
|
||||
<!-- Sourcemap Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="sourcemap"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_SOURCEMAP_LABEL"
|
||||
rows="22"
|
||||
cols="30"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_SOURCEMAP_DESCRIPTION"
|
||||
class="text_area span4"
|
||||
filter="HTML"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_SOURCEMAP_HINT"
|
||||
required="false"
|
||||
/>
|
||||
</form>
|
||||
</field>
|
||||
<!-- Type Field. Type: List. (joomla) -->
|
||||
<field
|
||||
type="list"
|
||||
@ -334,34 +373,46 @@
|
||||
<option value="2">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_READONLY</option>
|
||||
</field>
|
||||
<!-- Note_beginner_import Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_beginner_import" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_BEGINNER_IMPORT_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_BEGINNER_IMPORT_DESCRIPTION" heading="h4" class="alert alert-info note_beginner_import" />
|
||||
<!-- Php_import_headers Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_import_headers"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_HEADERS_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_HEADERS_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_HEADERS_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Not_required Field. Type: Hidden. (joomla) -->
|
||||
<field
|
||||
type="hidden"
|
||||
name="not_required"
|
||||
default="[]"
|
||||
/>
|
||||
<!-- Php_import_save Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_import_save"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SAVE_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SAVE_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SAVE_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Note_on_permissions Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_on_permissions" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_PERMISSIONS_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_PERMISSIONS_DESCRIPTION" heading="h4" class="alert alert-info note_on_permissions" />
|
||||
<!-- Add_php_getitems_after_all Field. Type: Radio. (joomla) -->
|
||||
<!-- Add_php_getitems Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_php_getitems_after_all"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEMS_AFTER_ALL_LABEL"
|
||||
name="add_php_getitems"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEMS_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_YES</option>
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Note_on_permissions Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_on_permissions" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_PERMISSIONS_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_PERMISSIONS_DESCRIPTION" heading="h4" class="alert alert-info note_on_permissions" />
|
||||
<!-- Add_php_getlistquery Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_php_getlistquery"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETLISTQUERY_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
@ -444,11 +495,11 @@
|
||||
</field>
|
||||
</form>
|
||||
</field>
|
||||
<!-- Add_php_getform Field. Type: Radio. (joomla) -->
|
||||
<!-- Add_php_before_save Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_php_getform"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETFORM_LABEL"
|
||||
name="add_php_before_save"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_SAVE_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
@ -460,11 +511,11 @@
|
||||
</field>
|
||||
<!-- Note_on_tabs Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_on_tabs" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_TABS_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_TABS_DESCRIPTION" heading="h4" class="alert alert-info note_on_tabs" />
|
||||
<!-- Add_php_save Field. Type: Radio. (joomla) -->
|
||||
<!-- Add_php_postsavehook Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_php_save"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_SAVE_LABEL"
|
||||
name="add_php_postsavehook"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_POSTSAVEHOOK_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
@ -502,11 +553,27 @@
|
||||
/>
|
||||
</form>
|
||||
</field>
|
||||
<!-- Add_php_allowadd Field. Type: Radio. (joomla) -->
|
||||
<!-- Add_php_allowedit Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_php_allowadd"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_ALLOWADD_LABEL"
|
||||
name="add_php_allowedit"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_ALLOWEDIT_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_YES</option>
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Note_custom_tabs_note Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_custom_tabs_note" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CUSTOM_TABS_NOTE_DESCRIPTION" heading="h5" class="alert alert-success note_custom_tabs_note" />
|
||||
<!-- Add_php_batchmove Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_php_batchmove"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BATCHMOVE_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
@ -518,11 +585,11 @@
|
||||
</field>
|
||||
<!-- Note_on_linked_views Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_on_linked_views" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_LINKED_VIEWS_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_LINKED_VIEWS_DESCRIPTION" heading="h4" class="alert alert-info note_on_linked_views" />
|
||||
<!-- Add_php_batchcopy Field. Type: Radio. (joomla) -->
|
||||
<!-- Add_php_after_publish Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_php_batchcopy"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BATCHCOPY_LABEL"
|
||||
name="add_php_after_publish"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_PUBLISH_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
@ -621,11 +688,11 @@
|
||||
</field>
|
||||
</form>
|
||||
</field>
|
||||
<!-- Add_php_before_publish Field. Type: Radio. (joomla) -->
|
||||
<!-- Add_php_after_delete Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_php_before_publish"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_PUBLISH_LABEL"
|
||||
name="add_php_after_delete"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_DELETE_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
@ -637,11 +704,11 @@
|
||||
</field>
|
||||
<!-- Note_create_edit_notice Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_create_edit_notice" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_NOTICE_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_NOTICE_DESCRIPTION" heading="h4" class="alert alert-info note_create_edit_notice" />
|
||||
<!-- Add_php_before_delete Field. Type: Radio. (joomla) -->
|
||||
<!-- Add_sql Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_php_before_delete"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_DELETE_LABEL"
|
||||
name="add_sql"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_SQL_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
@ -665,74 +732,38 @@
|
||||
<option value="2">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_CUSTOM</option>
|
||||
</field>
|
||||
<!-- Add_php_document Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_php_document"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_DOCUMENT_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_YES</option>
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Note_beginner_import Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_beginner_import" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_BEGINNER_IMPORT_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_BEGINNER_IMPORT_DESCRIPTION" heading="h4" class="alert alert-info note_beginner_import" />
|
||||
<!-- Note_alias_builder_custom Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_alias_builder_custom" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ALIAS_BUILDER_CUSTOM_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ALIAS_BUILDER_CUSTOM_DESCRIPTION" heading="h4" class="alert alert-info note_alias_builder_custom" showon="alias_builder_type:2" />
|
||||
<!-- Addtables Field. Type: Subform. (joomla) -->
|
||||
<!-- Html_import_view Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="subform"
|
||||
name="addtables"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADDTABLES_LABEL"
|
||||
layout="joomla.form.field.subform.repeatable-table"
|
||||
multiple="true"
|
||||
icon="list">
|
||||
<form hidden="true" name="list_addtables_modal" repeat="true">
|
||||
<!-- Table Field. Type: Dbtables. (custom) -->
|
||||
<field
|
||||
type="dbtables"
|
||||
name="table"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_TABLE_LABEL"
|
||||
class="list_class"
|
||||
multiple="false"
|
||||
default="0"
|
||||
required="false"
|
||||
button="false"
|
||||
/>
|
||||
<!-- Sourcemap Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="sourcemap"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_SOURCEMAP_LABEL"
|
||||
rows="22"
|
||||
cols="30"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_SOURCEMAP_DESCRIPTION"
|
||||
class="text_area span4"
|
||||
filter="HTML"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_SOURCEMAP_HINT"
|
||||
required="false"
|
||||
/>
|
||||
</form>
|
||||
</field>
|
||||
type="textarea"
|
||||
name="html_import_view"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_HTML_IMPORT_VIEW_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_HTML_IMPORT_VIEW_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_HTML_IMPORT_VIEW_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Note_alias_builder_default Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_alias_builder_default" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ALIAS_BUILDER_DEFAULT_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ALIAS_BUILDER_DEFAULT_DESCRIPTION" heading="h4" class="alert alert-info note_alias_builder_default" showon="alias_builder_type:1" />
|
||||
<!-- Add_custom_import Field. Type: Radio. (joomla) -->
|
||||
<!-- Php_import_save Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_custom_import"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CUSTOM_IMPORT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CUSTOM_IMPORT_DESCRIPTION"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_YES</option>
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
type="textarea"
|
||||
name="php_import_save"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SAVE_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SAVE_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SAVE_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Alias_builder Field. Type: Aliasbuilder. (custom) -->
|
||||
<field
|
||||
type="aliasbuilder"
|
||||
@ -743,39 +774,25 @@
|
||||
multiple="true"
|
||||
showon="alias_builder_type:2"
|
||||
/>
|
||||
<!-- Php_import_headers Field. Type: Textarea. (joomla) -->
|
||||
<!-- Php_getitem Field. Type: Editor. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_import_headers"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_HEADERS_LABEL"
|
||||
rows="30"
|
||||
type="editor"
|
||||
name="php_getitem"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEM_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEM_DESCRIPTION"
|
||||
width="100%"
|
||||
height="450px"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_HEADERS_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
rows="30"
|
||||
buttons="no"
|
||||
syntax="php"
|
||||
editor="codemirror|none"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_HEADERS_HINT"
|
||||
required="true"
|
||||
validate="code"
|
||||
/>
|
||||
<!-- Note_create_edit_buttons Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_create_edit_buttons" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_BUTTONS_DESCRIPTION" class="note_create_edit_buttons" />
|
||||
<!-- Name_list Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
type="text"
|
||||
name="name_list"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_LIST_LABEL"
|
||||
size="40"
|
||||
maxlength="150"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_LIST_DESCRIPTION"
|
||||
class="inputbox"
|
||||
readonly="false"
|
||||
disabled="false"
|
||||
required="true"
|
||||
filter="STRING"
|
||||
message="COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_LIST_MESSAGE"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_LIST_HINT"
|
||||
/>
|
||||
<!-- Note_create_edit_display Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_create_edit_display" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_DISPLAY_DESCRIPTION" class="note_create_edit_display" />
|
||||
<!-- Php_getitems Field. Type: Editor. (joomla) -->
|
||||
<field
|
||||
type="editor"
|
||||
@ -793,6 +810,25 @@
|
||||
required="true"
|
||||
validate="code"
|
||||
/>
|
||||
<!-- Note_create_edit_display Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_create_edit_display" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_DISPLAY_DESCRIPTION" class="note_create_edit_display" />
|
||||
<!-- Php_getitems_after_all Field. Type: Editor. (joomla) -->
|
||||
<field
|
||||
type="editor"
|
||||
name="php_getitems_after_all"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEMS_AFTER_ALL_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEMS_AFTER_ALL_DESCRIPTION"
|
||||
width="100%"
|
||||
height="450px"
|
||||
cols="15"
|
||||
rows="30"
|
||||
buttons="no"
|
||||
syntax="php"
|
||||
editor="codemirror|none"
|
||||
filter="raw"
|
||||
required="true"
|
||||
validate="code"
|
||||
/>
|
||||
<!-- Add_css_view Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
@ -807,12 +843,12 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Php_getitems_after_all Field. Type: Editor. (joomla) -->
|
||||
<!-- Php_getlistquery Field. Type: Editor. (joomla) -->
|
||||
<field
|
||||
type="editor"
|
||||
name="php_getitems_after_all"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEMS_AFTER_ALL_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEMS_AFTER_ALL_DESCRIPTION"
|
||||
name="php_getlistquery"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETLISTQUERY_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETLISTQUERY_DESCRIPTION"
|
||||
width="100%"
|
||||
height="450px"
|
||||
cols="15"
|
||||
@ -841,12 +877,12 @@
|
||||
required="true"
|
||||
validate="code"
|
||||
/>
|
||||
<!-- Php_getlistquery Field. Type: Editor. (joomla) -->
|
||||
<!-- Php_getform Field. Type: Editor. (joomla) -->
|
||||
<field
|
||||
type="editor"
|
||||
name="php_getlistquery"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETLISTQUERY_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETLISTQUERY_DESCRIPTION"
|
||||
name="php_getform"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETFORM_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETFORM_DESCRIPTION"
|
||||
width="100%"
|
||||
height="450px"
|
||||
cols="15"
|
||||
@ -872,12 +908,12 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Php_getform Field. Type: Editor. (joomla) -->
|
||||
<!-- Php_before_save Field. Type: Editor. (joomla) -->
|
||||
<field
|
||||
type="editor"
|
||||
name="php_getform"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETFORM_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETFORM_DESCRIPTION"
|
||||
name="php_before_save"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_SAVE_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_SAVE_DESCRIPTION"
|
||||
width="100%"
|
||||
height="450px"
|
||||
cols="15"
|
||||
@ -906,12 +942,12 @@
|
||||
required="true"
|
||||
validate="code"
|
||||
/>
|
||||
<!-- Php_before_save Field. Type: Editor. (joomla) -->
|
||||
<!-- Php_save Field. Type: Editor. (joomla) -->
|
||||
<field
|
||||
type="editor"
|
||||
name="php_before_save"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_SAVE_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_SAVE_DESCRIPTION"
|
||||
name="php_save"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_SAVE_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_SAVE_DESCRIPTION"
|
||||
width="100%"
|
||||
height="450px"
|
||||
cols="15"
|
||||
@ -937,12 +973,12 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Php_save Field. Type: Editor. (joomla) -->
|
||||
<!-- Php_postsavehook Field. Type: Editor. (joomla) -->
|
||||
<field
|
||||
type="editor"
|
||||
name="php_save"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_SAVE_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_SAVE_DESCRIPTION"
|
||||
name="php_postsavehook"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_POSTSAVEHOOK_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_POSTSAVEHOOK_DESCRIPTION"
|
||||
width="100%"
|
||||
height="450px"
|
||||
cols="15"
|
||||
@ -971,12 +1007,12 @@
|
||||
required="true"
|
||||
validate="code"
|
||||
/>
|
||||
<!-- Php_postsavehook Field. Type: Editor. (joomla) -->
|
||||
<!-- Php_allowadd Field. Type: Editor. (joomla) -->
|
||||
<field
|
||||
type="editor"
|
||||
name="php_postsavehook"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_POSTSAVEHOOK_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_POSTSAVEHOOK_DESCRIPTION"
|
||||
name="php_allowadd"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_ALLOWADD_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_ALLOWADD_DESCRIPTION"
|
||||
width="100%"
|
||||
height="450px"
|
||||
cols="15"
|
||||
@ -1002,12 +1038,12 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Php_allowadd Field. Type: Editor. (joomla) -->
|
||||
<!-- Php_allowedit Field. Type: Editor. (joomla) -->
|
||||
<field
|
||||
type="editor"
|
||||
name="php_allowadd"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_ALLOWADD_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_ALLOWADD_DESCRIPTION"
|
||||
name="php_allowedit"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_ALLOWEDIT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_ALLOWEDIT_DESCRIPTION"
|
||||
width="100%"
|
||||
height="450px"
|
||||
cols="15"
|
||||
@ -1036,12 +1072,12 @@
|
||||
required="true"
|
||||
validate="code"
|
||||
/>
|
||||
<!-- Php_allowedit Field. Type: Editor. (joomla) -->
|
||||
<!-- Php_batchcopy Field. Type: Editor. (joomla) -->
|
||||
<field
|
||||
type="editor"
|
||||
name="php_allowedit"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_ALLOWEDIT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_ALLOWEDIT_DESCRIPTION"
|
||||
name="php_batchcopy"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHCOPY_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHCOPY_DESCRIPTION"
|
||||
width="100%"
|
||||
height="450px"
|
||||
cols="15"
|
||||
@ -1067,12 +1103,12 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Php_batchcopy Field. Type: Editor. (joomla) -->
|
||||
<!-- Php_batchmove Field. Type: Editor. (joomla) -->
|
||||
<field
|
||||
type="editor"
|
||||
name="php_batchcopy"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHCOPY_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHCOPY_DESCRIPTION"
|
||||
name="php_batchmove"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHMOVE_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHMOVE_DESCRIPTION"
|
||||
width="100%"
|
||||
height="450px"
|
||||
cols="15"
|
||||
@ -1101,12 +1137,12 @@
|
||||
required="true"
|
||||
validate="code"
|
||||
/>
|
||||
<!-- Php_batchmove Field. Type: Editor. (joomla) -->
|
||||
<!-- Php_before_publish Field. Type: Editor. (joomla) -->
|
||||
<field
|
||||
type="editor"
|
||||
name="php_batchmove"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHMOVE_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHMOVE_DESCRIPTION"
|
||||
name="php_before_publish"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_PUBLISH_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_PUBLISH_DESCRIPTION"
|
||||
width="100%"
|
||||
height="450px"
|
||||
cols="15"
|
||||
@ -1132,12 +1168,12 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Php_before_publish Field. Type: Editor. (joomla) -->
|
||||
<!-- Php_after_publish Field. Type: Editor. (joomla) -->
|
||||
<field
|
||||
type="editor"
|
||||
name="php_before_publish"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_PUBLISH_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_PUBLISH_DESCRIPTION"
|
||||
name="php_after_publish"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_PUBLISH_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_PUBLISH_DESCRIPTION"
|
||||
width="100%"
|
||||
height="450px"
|
||||
cols="15"
|
||||
@ -1166,12 +1202,12 @@
|
||||
required="true"
|
||||
validate="code"
|
||||
/>
|
||||
<!-- Php_after_publish Field. Type: Editor. (joomla) -->
|
||||
<!-- Php_before_delete Field. Type: Editor. (joomla) -->
|
||||
<field
|
||||
type="editor"
|
||||
name="php_after_publish"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_PUBLISH_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_PUBLISH_DESCRIPTION"
|
||||
name="php_before_delete"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_DELETE_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_DELETE_DESCRIPTION"
|
||||
width="100%"
|
||||
height="450px"
|
||||
cols="15"
|
||||
@ -1197,12 +1233,12 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Php_before_delete Field. Type: Editor. (joomla) -->
|
||||
<!-- Php_after_delete Field. Type: Editor. (joomla) -->
|
||||
<field
|
||||
type="editor"
|
||||
name="php_before_delete"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_DELETE_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_DELETE_DESCRIPTION"
|
||||
name="php_after_delete"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_DELETE_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_DELETE_DESCRIPTION"
|
||||
width="100%"
|
||||
height="450px"
|
||||
cols="15"
|
||||
@ -1723,16 +1759,16 @@
|
||||
</field>
|
||||
</form>
|
||||
</field>
|
||||
<!-- Php_after_delete Field. Type: Editor. (joomla) -->
|
||||
<!-- Php_document Field. Type: Editor. (joomla) -->
|
||||
<field
|
||||
type="editor"
|
||||
name="php_after_delete"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_DELETE_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_DELETE_DESCRIPTION"
|
||||
name="php_document"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_DOCUMENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_DOCUMENT_DESCRIPTION"
|
||||
width="100%"
|
||||
height="450px"
|
||||
cols="15"
|
||||
rows="30"
|
||||
rows="50"
|
||||
buttons="no"
|
||||
syntax="php"
|
||||
editor="codemirror|none"
|
||||
@ -1757,40 +1793,6 @@
|
||||
required="false"
|
||||
validate="code"
|
||||
/>
|
||||
<!-- Php_document Field. Type: Editor. (joomla) -->
|
||||
<field
|
||||
type="editor"
|
||||
name="php_document"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_DOCUMENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_DOCUMENT_DESCRIPTION"
|
||||
width="100%"
|
||||
height="450px"
|
||||
cols="15"
|
||||
rows="50"
|
||||
buttons="no"
|
||||
syntax="php"
|
||||
editor="codemirror|none"
|
||||
filter="raw"
|
||||
required="true"
|
||||
validate="code"
|
||||
/>
|
||||
<!-- Php_model Field. Type: Editor. (joomla) -->
|
||||
<field
|
||||
type="editor"
|
||||
name="php_model"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_MODEL_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_MODEL_DESCRIPTION"
|
||||
width="100%"
|
||||
height="450px"
|
||||
cols="15"
|
||||
rows="30"
|
||||
buttons="no"
|
||||
syntax="php"
|
||||
editor="codemirror|none"
|
||||
filter="raw"
|
||||
required="false"
|
||||
validate="code"
|
||||
/>
|
||||
<!-- Source Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
@ -1804,12 +1806,12 @@
|
||||
<option value="2">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_DUMP</option>
|
||||
</field>
|
||||
<!-- Php_controller_list Field. Type: Editor. (joomla) -->
|
||||
<!-- Php_model Field. Type: Editor. (joomla) -->
|
||||
<field
|
||||
type="editor"
|
||||
name="php_controller_list"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_LIST_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_LIST_DESCRIPTION"
|
||||
name="php_model"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_MODEL_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_MODEL_DESCRIPTION"
|
||||
width="100%"
|
||||
height="450px"
|
||||
cols="15"
|
||||
@ -1834,6 +1836,25 @@
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_SQL_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Php_controller_list Field. Type: Editor. (joomla) -->
|
||||
<field
|
||||
type="editor"
|
||||
name="php_controller_list"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_LIST_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_LIST_DESCRIPTION"
|
||||
width="100%"
|
||||
height="450px"
|
||||
cols="15"
|
||||
rows="30"
|
||||
buttons="no"
|
||||
syntax="php"
|
||||
editor="codemirror|none"
|
||||
filter="raw"
|
||||
required="false"
|
||||
validate="code"
|
||||
/>
|
||||
<!-- Note_advanced_import Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_advanced_import" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ADVANCED_IMPORT_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ADVANCED_IMPORT_DESCRIPTION" heading="h4" class="alert alert-success note_advanced_import" />
|
||||
<!-- Php_model_list Field. Type: Editor. (joomla) -->
|
||||
<field
|
||||
type="editor"
|
||||
@ -1851,8 +1872,19 @@
|
||||
required="false"
|
||||
validate="code"
|
||||
/>
|
||||
<!-- Note_advanced_import Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_advanced_import" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ADVANCED_IMPORT_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ADVANCED_IMPORT_DESCRIPTION" heading="h4" class="alert alert-success note_advanced_import" />
|
||||
<!-- Php_import_display Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_import_display"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DISPLAY_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DISPLAY_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DISPLAY_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Add_php_ajax Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
@ -1867,17 +1899,17 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Php_import_display Field. Type: Textarea. (joomla) -->
|
||||
<!-- Php_import Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_import_display"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DISPLAY_LABEL"
|
||||
name="php_import"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DISPLAY_DESCRIPTION"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DISPLAY_HINT"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Php_ajaxmethod Field. Type: Editor. (joomla) -->
|
||||
@ -1897,17 +1929,17 @@
|
||||
required="true"
|
||||
validate="code"
|
||||
/>
|
||||
<!-- Php_import Field. Type: Textarea. (joomla) -->
|
||||
<!-- Php_import_setdata Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_import"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_LABEL"
|
||||
name="php_import_setdata"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SETDATA_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DESCRIPTION"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SETDATA_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_HINT"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SETDATA_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Ajax_input Field. Type: Subform. (joomla) -->
|
||||
@ -2041,17 +2073,17 @@
|
||||
/>
|
||||
</form>
|
||||
</field>
|
||||
<!-- Php_import_setdata Field. Type: Textarea. (joomla) -->
|
||||
<!-- Php_import_ext Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_import_setdata"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SETDATA_LABEL"
|
||||
name="php_import_ext"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_EXT_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SETDATA_DESCRIPTION"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_EXT_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SETDATA_HINT"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_EXT_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Add_php_getitem Field. Type: Radio. (joomla) -->
|
||||
@ -2068,36 +2100,6 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Php_import_ext Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_import_ext"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_EXT_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_EXT_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_EXT_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Php_getitem Field. Type: Editor. (joomla) -->
|
||||
<field
|
||||
type="editor"
|
||||
name="php_getitem"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEM_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEM_DESCRIPTION"
|
||||
width="100%"
|
||||
height="450px"
|
||||
cols="15"
|
||||
rows="30"
|
||||
buttons="no"
|
||||
syntax="php"
|
||||
editor="codemirror|none"
|
||||
filter="raw"
|
||||
required="true"
|
||||
validate="code"
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
<!-- Access Control Fields. -->
|
||||
|
@ -700,8 +700,8 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
$tables = array(
|
||||
'validation_rule', 'fieldtype', 'field', 'admin_view', 'snippet', 'dynamic_get', 'custom_admin_view', 'site_view',
|
||||
'template', 'layout', 'joomla_component', 'language', 'language_translation', 'custom_code',
|
||||
'admin_fields', 'admin_fields_conditions', 'admin_fields_relations', 'component_admin_views', 'component_site_views',
|
||||
'component_custom_admin_views', 'component_updates', 'component_mysql_tweaks',
|
||||
'admin_fields', 'admin_fields_conditions', 'admin_fields_relations', 'admin_custom_tabs', 'component_admin_views',
|
||||
'component_site_views', 'component_custom_admin_views', 'component_updates', 'component_mysql_tweaks',
|
||||
'component_custom_admin_menus', 'component_config', 'component_dashboard', 'component_files_folders'
|
||||
);
|
||||
// get prefix
|
||||
@ -2161,6 +2161,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
case 'admin_fields':
|
||||
case 'admin_fields_conditions':
|
||||
case 'admin_fields_relations':
|
||||
case 'admin_custom_tabs':
|
||||
// diverged id already updated
|
||||
if (!$diverged)
|
||||
{
|
||||
@ -2217,7 +2218,10 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
$item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
|
||||
}
|
||||
// update the subform ids
|
||||
$this->updateSubformsIDs($item, $type, $updaterT);
|
||||
if (isset($updaterT) && ComponentbuilderHelper::checkArray($updaterT))
|
||||
{
|
||||
$this->updateSubformsIDs($item, $type, $updaterT);
|
||||
}
|
||||
}
|
||||
// remove all fields/columns not part of the current table
|
||||
$this->removingFields($type, $item);
|
||||
@ -2613,6 +2617,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
case 'admin_fields':
|
||||
case 'admin_fields_conditions':
|
||||
case 'admin_fields_relations':
|
||||
case 'admin_custom_tabs':
|
||||
// get by admin_view (since there should only be one of each name)
|
||||
$getter = array('admin_view');
|
||||
$this->specialValue = array();
|
||||
|
@ -310,6 +310,7 @@ class ComponentbuilderModelJoomla_components extends JModelList
|
||||
$this->setData('admin_fields', array_values($this->smartIDs['admin_view']), 'admin_view');
|
||||
$this->setData('admin_fields_conditions', array_values($this->smartIDs['admin_view']), 'admin_view');
|
||||
$this->setData('admin_fields_relations', array_values($this->smartIDs['admin_view']), 'admin_view');
|
||||
$this->setData('admin_custom_tabs', array_values($this->smartIDs['admin_view']), 'admin_view');
|
||||
}
|
||||
// add validation rules
|
||||
if (isset($this->smartIDs['validation_rule']) && ComponentbuilderHelper::checkArray($this->smartIDs['validation_rule']))
|
||||
@ -852,8 +853,8 @@ class ComponentbuilderModelJoomla_components extends JModelList
|
||||
$tables = array(
|
||||
'fieldtype', 'field', 'admin_view', 'snippet', 'dynamic_get', 'custom_admin_view', 'site_view',
|
||||
'template', 'layout', 'joomla_component', 'language', 'language_translation', 'custom_code',
|
||||
'admin_fields', 'admin_fields_conditions', 'admin_fields_relations', 'component_admin_views', 'component_site_views',
|
||||
'component_custom_admin_views', 'component_updates', 'component_mysql_tweaks',
|
||||
'admin_fields', 'admin_fields_conditions', 'admin_fields_relations', 'admin_custom_tabs', 'component_admin_views',
|
||||
'component_site_views', 'component_custom_admin_views', 'component_updates', 'component_mysql_tweaks',
|
||||
'component_custom_admin_menus', 'component_config', 'component_dashboard', 'component_files_folders'
|
||||
);
|
||||
// smart table loop
|
||||
|
Reference in New Issue
Block a user