Added the feature to add custom Joomla fields to your components, requested in gh-247. Added plugin events to the dynamic get area. Added the script to remove field build in relation to component when component gets uninstalled. Improved the getForm method in the model to allow the passing of options to the form. Made further improvements to the implementation of the return parameter across the component redirecting behavior. Made some changes to the list layout views using the field relations area.

This commit is contained in:
2018-08-23 03:37:42 +02:00
parent 5a8124fa29
commit fdc66fe4c7
96 changed files with 4102 additions and 2851 deletions

View File

@ -124,15 +124,18 @@ class ComponentbuilderModelAdmin_fields extends JModelAdmin
*
* @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)
{
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_fields', 'admin_fields', array('control' => 'jform', 'load_data' => $loadData));
$form = $this->loadForm('com_componentbuilder.admin_fields', 'admin_fields', $options);
if (empty($form))
{

View File

@ -124,15 +124,18 @@ class ComponentbuilderModelAdmin_fields_conditions extends JModelAdmin
*
* @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)
{
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_fields_conditions', 'admin_fields_conditions', array('control' => 'jform', 'load_data' => $loadData));
$form = $this->loadForm('com_componentbuilder.admin_fields_conditions', 'admin_fields_conditions', $options);
if (empty($form))
{

View File

@ -104,15 +104,18 @@ class ComponentbuilderModelAdmin_fields_relations extends JModelAdmin
*
* @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)
{
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_fields_relations', 'admin_fields_relations', array('control' => 'jform', 'load_data' => $loadData));
$form = $this->loadForm('com_componentbuilder.admin_fields_relations', 'admin_fields_relations', $options);
if (empty($form))
{

View File

@ -435,15 +435,18 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
*
* @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)
{
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_view', 'admin_view', array('control' => 'jform', 'load_data' => $loadData));
$form = $this->loadForm('com_componentbuilder.admin_view', 'admin_view', $options);
if (empty($form))
{

View File

@ -1501,16 +1501,24 @@ class ComponentbuilderModelAjax extends JModelList
$templateString = array();
// get the view name & id
$values = $this->getViewID();
// check if we are in the correct view.
// set a return value
$return_url = 'index.php?option=com_componentbuilder&view=' . (string) $values['a_view'] . '&layout=edit&id=' . (int) $values['a_id'];
if (isset($values['a_return']))
{
$return_url .= '&return=' . (string) $values['a_return'];
}
// start the ref builder
$ref = '';
if (!is_null($values['a_id']) && $values['a_id'] > 0 && strlen($values['a_view']))
{
// set the return ref
$this->ref = '&ref=' . $values['a_view'] . '&refid=' . $values['a_id'];
$ref = '&ref=' . $values['a_view'] . '&refid=' . $values['a_id'] . '&return=' . urlencode(base64_encode($return_url));
}
// load the template data
foreach ($results as $result)
{
$edit = ($button = $this->addEditLink($result->id, 'template', 'templates')) ? $button : '';
$editget = (isset($result->dynamic_get) && $result->dynamic_get > 0 && $button = $this->addEditLink($result->dynamic_get, 'dynamic_get', 'dynamic_gets')) ? $button : '';
$edit = (($button = ComponentbuilderHelper::getEditButton($result->id, 'template', 'templates', $ref)) !== false) ? $button : '';
$editget = (isset($result->dynamic_get) && $result->dynamic_get > 0 && ($button = ComponentbuilderHelper::getEditButton($result->dynamic_get, 'dynamic_get', 'dynamic_gets', $ref)) !== false) ? $button : '';
$result->name = (ComponentbuilderHelper::checkString($result->name)) ? $result->name : JText::_('COM_COMPONENTBUILDER_NONE_SELECTED');
$templateString[] = "<td><b>".$result->name."</b> ".$editget."</td><td><code>&lt;?php echo \$this->loadTemplate('".ComponentbuilderHelper::safeString($result->alias)."'); ?&gt;</code> ".$edit."</td>";
}
@ -1546,16 +1554,23 @@ class ComponentbuilderModelAjax extends JModelList
$layoutString = array();
// get the view name & id
$values = $this->getViewID();
// check if we are in the correct view.
// set a return value
$return_url = 'index.php?option=com_componentbuilder&view=' . (string) $values['a_view'] . '&layout=edit&id=' . (int) $values['a_id'];
if (isset($values['a_return']))
{
$return_url .= '&return=' . (string) $values['a_return'];
}
// start the ref builder
$ref = '';
if (!is_null($values['a_id']) && $values['a_id'] > 0 && strlen($values['a_view']))
{
// set the return ref
$this->ref = '&ref=' . $values['a_view'] . '&refid=' . $values['a_id'];
$ref = '&ref=' . $values['a_view'] . '&refid=' . $values['a_id'] . '&return=' . urlencode(base64_encode($return_url));
}
foreach ($results as $result)
{
$edit = ($button = $this->addEditLink($result->id, 'layout', 'layouts')) ? $button : '';
$editget = (isset($result->dynamic_get) && $result->dynamic_get > 0 && $button = $this->addEditLink($result->dynamic_get, 'dynamic_get', 'dynamic_gets')) ? $button : '';
$edit = (($button = ComponentbuilderHelper::getEditButton($result->id, 'layout', 'layouts', $ref)) !== false) ? $button : '';
$editget = (isset($result->dynamic_get) && $result->dynamic_get > 0 && ($button = ComponentbuilderHelper::getEditButton($result->dynamic_get, 'dynamic_get', 'dynamic_gets', $ref)) !== false) ? $button : '';
$result->name = (ComponentbuilderHelper::checkString($result->name)) ? $result->name : JText::_('COM_COMPONENTBUILDER_NONE_SELECTED');
switch ($result->gettype)

View File

@ -135,15 +135,18 @@ class ComponentbuilderModelComponent_admin_views extends JModelAdmin
*
* @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)
{
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.component_admin_views', 'component_admin_views', array('control' => 'jform', 'load_data' => $loadData));
$form = $this->loadForm('com_componentbuilder.component_admin_views', 'component_admin_views', $options);
if (empty($form))
{

View File

@ -135,15 +135,18 @@ class ComponentbuilderModelComponent_config extends JModelAdmin
*
* @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)
{
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.component_config', 'component_config', array('control' => 'jform', 'load_data' => $loadData));
$form = $this->loadForm('com_componentbuilder.component_config', 'component_config', $options);
if (empty($form))
{

View File

@ -135,15 +135,18 @@ class ComponentbuilderModelComponent_custom_admin_menus extends JModelAdmin
*
* @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)
{
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.component_custom_admin_menus', 'component_custom_admin_menus', array('control' => 'jform', 'load_data' => $loadData));
$form = $this->loadForm('com_componentbuilder.component_custom_admin_menus', 'component_custom_admin_menus', $options);
if (empty($form))
{

View File

@ -135,15 +135,18 @@ class ComponentbuilderModelComponent_custom_admin_views extends JModelAdmin
*
* @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)
{
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.component_custom_admin_views', 'component_custom_admin_views', array('control' => 'jform', 'load_data' => $loadData));
$form = $this->loadForm('com_componentbuilder.component_custom_admin_views', 'component_custom_admin_views', $options);
if (empty($form))
{

View File

@ -141,15 +141,18 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin
*
* @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)
{
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.component_dashboard', 'component_dashboard', array('control' => 'jform', 'load_data' => $loadData));
$form = $this->loadForm('com_componentbuilder.component_dashboard', 'component_dashboard', $options);
if (empty($form))
{

View File

@ -160,15 +160,18 @@ class ComponentbuilderModelComponent_files_folders extends JModelAdmin
*
* @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)
{
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.component_files_folders', 'component_files_folders', array('control' => 'jform', 'load_data' => $loadData));
$form = $this->loadForm('com_componentbuilder.component_files_folders', 'component_files_folders', $options);
if (empty($form))
{

View File

@ -135,15 +135,18 @@ class ComponentbuilderModelComponent_mysql_tweaks extends JModelAdmin
*
* @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)
{
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.component_mysql_tweaks', 'component_mysql_tweaks', array('control' => 'jform', 'load_data' => $loadData));
$form = $this->loadForm('com_componentbuilder.component_mysql_tweaks', 'component_mysql_tweaks', $options);
if (empty($form))
{

View File

@ -135,15 +135,18 @@ class ComponentbuilderModelComponent_site_views extends JModelAdmin
*
* @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)
{
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.component_site_views', 'component_site_views', array('control' => 'jform', 'load_data' => $loadData));
$form = $this->loadForm('com_componentbuilder.component_site_views', 'component_site_views', $options);
if (empty($form))
{

View File

@ -135,15 +135,18 @@ class ComponentbuilderModelComponent_updates extends JModelAdmin
*
* @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)
{
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.component_updates', 'component_updates', array('control' => 'jform', 'load_data' => $loadData));
$form = $this->loadForm('com_componentbuilder.component_updates', 'component_updates', $options);
if (empty($form))
{

View File

@ -86,22 +86,16 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
$item->metadata = $registry->toArray();
}
if (!empty($item->php_jview_display))
{
// base64 Decode php_jview_display.
$item->php_jview_display = base64_decode($item->php_jview_display);
}
if (!empty($item->php_view))
{
// base64 Decode php_view.
$item->php_view = base64_decode($item->php_view);
}
if (!empty($item->php_document))
if (!empty($item->php_jview_display))
{
// base64 Decode php_document.
$item->php_document = base64_decode($item->php_document);
// base64 Decode php_jview_display.
$item->php_jview_display = base64_decode($item->php_jview_display);
}
if (!empty($item->default))
@ -134,6 +128,12 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
$item->css_document = base64_decode($item->css_document);
}
if (!empty($item->php_document))
{
// base64 Decode php_document.
$item->php_document = base64_decode($item->php_document);
}
if (!empty($item->css))
{
// base64 Decode css.
@ -158,6 +158,14 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
$item->php_model = base64_decode($item->php_model);
}
if (!empty($item->custom_get))
{
// Convert the custom_get field to an array.
$custom_get = new Registry;
$custom_get->loadString($item->custom_get);
$item->custom_get = $custom_get->toArray();
}
if (!empty($item->ajax_input))
{
// Convert the ajax_input field to an array.
@ -174,14 +182,6 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
$item->libraries = $libraries->toArray();
}
if (!empty($item->custom_get))
{
// Convert the custom_get field to an array.
$custom_get = new Registry;
$custom_get->loadString($item->custom_get);
$item->custom_get = $custom_get->toArray();
}
if (!empty($item->custom_button))
{
// Convert the custom_button field to an array.
@ -252,15 +252,18 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
*
* @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)
{
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.custom_admin_view', 'custom_admin_view', array('control' => 'jform', 'load_data' => $loadData));
$form = $this->loadForm('com_componentbuilder.custom_admin_view', 'custom_admin_view', $options);
if (empty($form))
{
@ -973,6 +976,19 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
// always reset the snippets
$data['snippet'] = 0;
// Set the custom_get items to data.
if (isset($data['custom_get']) && is_array($data['custom_get']))
{
$custom_get = new JRegistry;
$custom_get->loadArray($data['custom_get']);
$data['custom_get'] = (string) $custom_get;
}
elseif (!isset($data['custom_get']))
{
// Set the empty custom_get to data
$data['custom_get'] = '';
}
// Set the ajax_input items to data.
if (isset($data['ajax_input']) && is_array($data['ajax_input']))
{
@ -999,19 +1015,6 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
$data['libraries'] = '';
}
// Set the custom_get items to data.
if (isset($data['custom_get']) && is_array($data['custom_get']))
{
$custom_get = new JRegistry;
$custom_get->loadArray($data['custom_get']);
$data['custom_get'] = (string) $custom_get;
}
elseif (!isset($data['custom_get']))
{
// Set the empty custom_get to data
$data['custom_get'] = '';
}
// Set the custom_button items to data.
if (isset($data['custom_button']) && is_array($data['custom_button']))
{
@ -1025,22 +1028,16 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
$data['custom_button'] = '';
}
// Set the php_jview_display string to base64 string.
if (isset($data['php_jview_display']))
{
$data['php_jview_display'] = base64_encode($data['php_jview_display']);
}
// Set the php_view string to base64 string.
if (isset($data['php_view']))
{
$data['php_view'] = base64_encode($data['php_view']);
}
// Set the php_document string to base64 string.
if (isset($data['php_document']))
// Set the php_jview_display string to base64 string.
if (isset($data['php_jview_display']))
{
$data['php_document'] = base64_encode($data['php_document']);
$data['php_jview_display'] = base64_encode($data['php_jview_display']);
}
// Set the default string to base64 string.
@ -1073,6 +1070,12 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
$data['css_document'] = base64_encode($data['css_document']);
}
// Set the php_document string to base64 string.
if (isset($data['php_document']))
{
$data['php_document'] = base64_encode($data['php_document']);
}
// Set the css string to base64 string.
if (isset($data['css']))
{

View File

@ -29,8 +29,10 @@ class ComponentbuilderModelCustom_admin_views extends JModelList
'a.modified_by','modified_by',
'a.system_name','system_name',
'a.name','name',
'a.codename','codename',
'a.description','description'
'a.description','description',
'a.main_get','main_get',
'a.add_php_ajax','add_php_ajax',
'a.add_custom_button','add_custom_button'
);
}
@ -57,11 +59,17 @@ class ComponentbuilderModelCustom_admin_views extends JModelList
$name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name');
$this->setState('filter.name', $name);
$codename = $this->getUserStateFromRequest($this->context . '.filter.codename', 'filter_codename');
$this->setState('filter.codename', $codename);
$description = $this->getUserStateFromRequest($this->context . '.filter.description', 'filter_description');
$this->setState('filter.description', $description);
$this->setState('filter.description', $description);
$main_get = $this->getUserStateFromRequest($this->context . '.filter.main_get', 'filter_main_get');
$this->setState('filter.main_get', $main_get);
$add_php_ajax = $this->getUserStateFromRequest($this->context . '.filter.add_php_ajax', 'filter_add_php_ajax');
$this->setState('filter.add_php_ajax', $add_php_ajax);
$add_custom_button = $this->getUserStateFromRequest($this->context . '.filter.add_custom_button', 'filter_add_custom_button');
$this->setState('filter.add_custom_button', $add_custom_button);
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
$this->setState('filter.sorting', $sorting);
@ -111,10 +119,59 @@ class ComponentbuilderModelCustom_admin_views extends JModelList
}
}
}
}
// set selection value to a translatable value
if (ComponentbuilderHelper::checkArray($items))
{
foreach ($items as $nr => &$item)
{
// convert add_php_ajax
$item->add_php_ajax = $this->selectionTranslation($item->add_php_ajax, 'add_php_ajax');
// convert add_custom_button
$item->add_custom_button = $this->selectionTranslation($item->add_custom_button, 'add_custom_button');
}
}
// return items
return $items;
}
/**
* Method to convert selection values to translatable string.
*
* @return translatable string
*/
public function selectionTranslation($value,$name)
{
// Array of add_php_ajax language strings
if ($name === 'add_php_ajax')
{
$add_php_ajaxArray = array(
1 => 'COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES',
0 => 'COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO'
);
// Now check if value is found in this array
if (isset($add_php_ajaxArray[$value]) && ComponentbuilderHelper::checkString($add_php_ajaxArray[$value]))
{
return $add_php_ajaxArray[$value];
}
}
// Array of add_custom_button language strings
if ($name === 'add_custom_button')
{
$add_custom_buttonArray = array(
1 => 'COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES',
0 => 'COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO'
);
// Now check if value is found in this array
if (isset($add_custom_buttonArray[$value]) && ComponentbuilderHelper::checkString($add_custom_buttonArray[$value]))
{
return $add_custom_buttonArray[$value];
}
}
return $value;
}
/**
@ -136,9 +193,9 @@ class ComponentbuilderModelCustom_admin_views extends JModelList
// From the componentbuilder_item table
$query->from($db->quoteName('#__componentbuilder_custom_admin_view', 'a'));
// From the componentbuilder_snippet table.
$query->select($db->quoteName('g.name','snippet_name'));
$query->join('LEFT', $db->quoteName('#__componentbuilder_snippet', 'g') . ' ON (' . $db->quoteName('a.snippet') . ' = ' . $db->quoteName('g.id') . ')');
// From the componentbuilder_dynamic_get table.
$query->select($db->quoteName('g.name','main_get_name'));
$query->join('LEFT', $db->quoteName('#__componentbuilder_dynamic_get', 'g') . ' ON (' . $db->quoteName('a.main_get') . ' = ' . $db->quoteName('g.id') . ')');
// Filter by published state
$published = $this->getState('filter.published');
@ -176,10 +233,25 @@ class ComponentbuilderModelCustom_admin_views extends JModelList
else
{
$search = $db->quote('%' . $db->escape($search) . '%');
$query->where('(a.system_name LIKE '.$search.' OR a.name LIKE '.$search.' OR a.codename LIKE '.$search.' OR a.description LIKE '.$search.')');
$query->where('(a.system_name LIKE '.$search.' OR a.name LIKE '.$search.' OR a.description LIKE '.$search.' OR a.main_get LIKE '.$search.' OR g.name LIKE '.$search.' OR a.codename LIKE '.$search.')');
}
}
// Filter by main_get.
if ($main_get = $this->getState('filter.main_get'))
{
$query->where('a.main_get = ' . $db->quote($db->escape($main_get)));
}
// Filter by Add_php_ajax.
if ($add_php_ajax = $this->getState('filter.add_php_ajax'))
{
$query->where('a.add_php_ajax = ' . $db->quote($db->escape($add_php_ajax)));
}
// Filter by Add_custom_button.
if ($add_custom_button = $this->getState('filter.add_custom_button'))
{
$query->where('a.add_custom_button = ' . $db->quote($db->escape($add_custom_button)));
}
// Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
@ -245,12 +317,10 @@ class ComponentbuilderModelCustom_admin_views extends JModelList
continue;
}
// decode php_jview_display
$item->php_jview_display = base64_decode($item->php_jview_display);
// decode php_view
$item->php_view = base64_decode($item->php_view);
// decode php_document
$item->php_document = base64_decode($item->php_document);
// decode php_jview_display
$item->php_jview_display = base64_decode($item->php_jview_display);
// decode default
$item->default = base64_decode($item->default);
// decode php_jview
@ -261,6 +331,8 @@ class ComponentbuilderModelCustom_admin_views extends JModelList
$item->javascript_file = base64_decode($item->javascript_file);
// decode css_document
$item->css_document = base64_decode($item->css_document);
// decode php_document
$item->php_document = base64_decode($item->php_document);
// decode css
$item->css = base64_decode($item->css);
// decode php_ajaxmethod
@ -331,8 +403,10 @@ class ComponentbuilderModelCustom_admin_views extends JModelList
$id .= ':' . $this->getState('filter.modified_by');
$id .= ':' . $this->getState('filter.system_name');
$id .= ':' . $this->getState('filter.name');
$id .= ':' . $this->getState('filter.codename');
$id .= ':' . $this->getState('filter.description');
$id .= ':' . $this->getState('filter.description');
$id .= ':' . $this->getState('filter.main_get');
$id .= ':' . $this->getState('filter.add_php_ajax');
$id .= ':' . $this->getState('filter.add_custom_button');
return parent::getStoreId($id);
}

View File

@ -102,15 +102,18 @@ class ComponentbuilderModelCustom_code extends JModelAdmin
*
* @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)
{
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.custom_code', 'custom_code', array('control' => 'jform', 'load_data' => $loadData));
$form = $this->loadForm('com_componentbuilder.custom_code', 'custom_code', $options);
if (empty($form))
{

View File

@ -124,10 +124,10 @@ class ComponentbuilderModelCustom_codes extends JModelList
if ($item->target == 2)
{
$item->component_system_name = $item->system_name;
$item->path = '<code>[CUSTO'.'MCODE='.$item->id.']</code>'; // so it is not detected
$item->path = '[CUSTO'.'MCODE='.$item->id.']'; // so it is not detected
if (ComponentbuilderHelper::checkString($item->function_name))
{
$item->path = '<code>[CUSTO'.'MCODE='.$item->function_name.']</code>'; // so it is not detected
$item->path = '[CUSTO'.'MCODE='.$item->function_name.']'; // so it is not detected
}
$item->type = 2;
}
@ -372,10 +372,10 @@ class ComponentbuilderModelCustom_codes extends JModelList
if ($item->target == 2)
{
$item->component_system_name = $item->system_name;
$item->path = '<code>[CUSTO'.'MCODE='.$item->id.']</code>'; // so it is not detected
$item->path = '[CUSTO'.'MCODE='.$item->id.']'; // so it is not detected
if (ComponentbuilderHelper::checkString($item->function_name))
{
$item->path = '<code>[CUSTO'.'MCODE='.$item->function_name.']</code>'; // so it is not detected
$item->path = '[CUSTO'.'MCODE='.$item->function_name.']'; // so it is not detected
}
$item->type = 2;
}

View File

@ -134,6 +134,14 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
$item->php_calculation = base64_decode($item->php_calculation);
}
if (!empty($item->join_db_table))
{
// Convert the join_db_table field to an array.
$join_db_table = new Registry;
$join_db_table->loadString($item->join_db_table);
$item->join_db_table = $join_db_table->toArray();
}
if (!empty($item->filter))
{
// Convert the filter field to an array.
@ -174,12 +182,10 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
$item->join_view_table = $join_view_table->toArray();
}
if (!empty($item->join_db_table))
if (!empty($item->plugin_events))
{
// Convert the join_db_table field to an array.
$join_db_table = new Registry;
$join_db_table->loadString($item->join_db_table);
$item->join_db_table = $join_db_table->toArray();
// JSON Decode plugin_events.
$item->plugin_events = json_decode($item->plugin_events);
}
@ -259,15 +265,18 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
*
* @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)
{
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.dynamic_get', 'dynamic_get', array('control' => 'jform', 'load_data' => $loadData));
$form = $this->loadForm('com_componentbuilder.dynamic_get', 'dynamic_get', $options);
if (empty($form))
{
@ -977,6 +986,19 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
$data['metadata'] = (string) $metadata;
}
// Set the join_db_table items to data.
if (isset($data['join_db_table']) && is_array($data['join_db_table']))
{
$join_db_table = new JRegistry;
$join_db_table->loadArray($data['join_db_table']);
$data['join_db_table'] = (string) $join_db_table;
}
elseif (!isset($data['join_db_table']))
{
// Set the empty join_db_table to data
$data['join_db_table'] = '';
}
// Set the filter items to data.
if (isset($data['filter']) && is_array($data['filter']))
{
@ -1042,17 +1064,10 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
$data['join_view_table'] = '';
}
// Set the join_db_table items to data.
if (isset($data['join_db_table']) && is_array($data['join_db_table']))
// Set the plugin_events string to JSON string.
if (isset($data['plugin_events']))
{
$join_db_table = new JRegistry;
$join_db_table->loadArray($data['join_db_table']);
$data['join_db_table'] = (string) $join_db_table;
}
elseif (!isset($data['join_db_table']))
{
// Set the empty join_db_table to data
$data['join_db_table'] = '';
$data['plugin_events'] = (string) json_encode($data['plugin_events']);
}
// Set the php_custom_get string to base64 string.

View File

@ -157,15 +157,18 @@ class ComponentbuilderModelField extends JModelAdmin
*
* @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)
{
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.field', 'field', array('control' => 'jform', 'load_data' => $loadData));
$form = $this->loadForm('com_componentbuilder.field', 'field', $options);
if (empty($form))
{

View File

@ -307,15 +307,18 @@ class ComponentbuilderModelFieldtype extends JModelAdmin
*
* @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)
{
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.fieldtype', 'fieldtype', array('control' => 'jform', 'load_data' => $loadData));
$form = $this->loadForm('com_componentbuilder.fieldtype', 'fieldtype', $options);
if (empty($form))
{

View File

@ -615,6 +615,17 @@
description="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_HISTORY_DESCRIPTION"
class="inputbox"
/>
<!-- Joomla_fields Field. Type: Checkbox. (joomla) -->
<field
type="checkbox"
name="joomla_fields"
label="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_JOOMLA_FIELDS_LABEL"
value="1"
default="1"
required="false"
description="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_JOOMLA_FIELDS_DESCRIPTION"
class="inputbox"
/>
<!-- Metadata Field. Type: Checkbox. (joomla) -->
<field
type="checkbox"

View File

@ -114,19 +114,6 @@
message="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NAME_MESSAGE"
hint="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NAME_HINT"
/>
<!-- Codename Field. Type: Text. (joomla) -->
<field
type="text"
name="codename"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_CODENAME_LABEL"
size="80"
maxlength="150"
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_CODENAME_DESCRIPTION"
class="text_area"
filter="CMD"
message="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_CODENAME_MESSAGE"
hint="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_CODENAME_HINT"
/>
<!-- Description Field. Type: Text. (joomla) -->
<field
type="text"
@ -143,33 +130,15 @@
message="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_DESCRIPTION_MESSAGE"
hint="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_DESCRIPTION_HINT"
/>
<!-- Snippet Field. Type: Snippets. (custom) -->
<!-- Main_get Field. Type: Maingets. (custom) -->
<field
type="snippets"
name="snippet"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_SNIPPET_LABEL"
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_SNIPPET_DESCRIPTION"
class="list_class"
type="maingets"
name="main_get"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MAIN_GET_LABEL"
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MAIN_GET_DESCRIPTION"
multiple="false"
required="false"
button="true"
/>
<!-- Php_jview_display Field. Type: Editor. (joomla) -->
<field
type="editor"
name="php_jview_display"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_JVIEW_DISPLAY_LABEL"
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_JVIEW_DISPLAY_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="php"
editor="codemirror|none"
filter="raw"
required="true"
validate="code"
button="true"
/>
<!-- Php_view Field. Type: Editor. (joomla) -->
<field
@ -188,16 +157,16 @@
required="true"
validate="code"
/>
<!-- Php_document Field. Type: Editor. (joomla) -->
<!-- Php_jview_display Field. Type: Editor. (joomla) -->
<field
type="editor"
name="php_document"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_DOCUMENT_LABEL"
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_DOCUMENT_DESCRIPTION"
name="php_jview_display"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_JVIEW_DISPLAY_LABEL"
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_JVIEW_DISPLAY_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="50"
rows="30"
buttons="no"
syntax="php"
editor="codemirror|none"
@ -205,6 +174,199 @@
required="true"
validate="code"
/>
<!-- Add_css Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_css"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_CSS_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES</option>
<option value="0">
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO</option>
</field>
<!-- Note_add_language_string Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_add_language_string" label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_ADD_LANGUAGE_STRING_LABEL" description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_ADD_LANGUAGE_STRING_DESCRIPTION" heading="h4" class="note_add_language_string" />
<!-- Add_javascript_file Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_javascript_file"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_JAVASCRIPT_FILE_LABEL"
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_JAVASCRIPT_FILE_DESCRIPTION"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES</option>
<option value="0">
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO</option>
</field>
<!-- Add_css_document Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_css_document"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_CSS_DOCUMENT_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES</option>
<option value="0">
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO</option>
</field>
<!-- Note_libraries_selection Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_libraries_selection" label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_LIBRARIES_SELECTION_LABEL" description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_LIBRARIES_SELECTION_DESCRIPTION" heading="h4" class="alert alert-info note_libraries_selection" />
<!-- Add_js_document Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_js_document"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_JS_DOCUMENT_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES</option>
<option value="0">
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO</option>
</field>
<!-- Note_snippet_usage Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_snippet_usage" label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_SNIPPET_USAGE_LABEL" heading="h4" class="snippet-usage note_snippet_usage" />
<!-- Default Field. Type: Editor. (joomla) -->
<field
type="editor"
name="default"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_DEFAULT_LABEL"
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_DEFAULT_DESCRIPTION"
width="100%"
height="500px"
cols="15"
rows="30"
buttons="no"
syntax="html"
editor="codemirror|none"
filter="raw"
required="true"
validate="code"
/>
<!-- Note_uikit_snippet Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_uikit_snippet" label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_UIKIT_SNIPPET_LABEL" heading="h4" class="snippet-code note_uikit_snippet" />
<!-- Snippet Field. Type: Snippets. (custom) -->
<field
type="snippets"
name="snippet"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_SNIPPET_LABEL"
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_SNIPPET_DESCRIPTION"
class="list_class"
multiple="false"
required="false"
button="true"
/>
<!-- Icon Field. Type: Media. (joomla) -->
<field
type="media"
name="icon"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ICON_LABEL"
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ICON_DESCRIPTION"
directory=""
/>
<!-- Php_jview Field. Type: Editor. (joomla) -->
<field
type="editor"
name="php_jview"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_JVIEW_LABEL"
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_JVIEW_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="php"
editor="codemirror|none"
filter="raw"
required="true"
validate="code"
/>
<!-- Not_required Field. Type: Hidden. (joomla) -->
<field
type="hidden"
name="not_required"
default="[]"
/>
<!-- Codename Field. Type: Text. (joomla) -->
<field
type="text"
name="codename"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_CODENAME_LABEL"
size="80"
maxlength="150"
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_CODENAME_DESCRIPTION"
class="text_area"
filter="CMD"
message="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_CODENAME_MESSAGE"
hint="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_CODENAME_HINT"
/>
<!-- Custom_get Field. Type: Customgets. (custom) -->
<field
type="customgets"
name="custom_get"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_CUSTOM_GET_LABEL"
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_CUSTOM_GET_DESCRIPTION"
multiple="true"
/>
<!-- Js_document Field. Type: Editor. (joomla) -->
<field
type="editor"
name="js_document"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_JS_DOCUMENT_LABEL"
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_JS_DOCUMENT_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="javascript"
editor="codemirror|none"
filter="raw"
required="true"
validate="code"
/>
<!-- Add_php_ajax Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_php_ajax"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_PHP_AJAX_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES</option>
<option value="0">
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO</option>
</field>
<!-- Javascript_file Field. Type: Editor. (joomla) -->
<field
type="editor"
name="javascript_file"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_JAVASCRIPT_FILE_LABEL"
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_JAVASCRIPT_FILE_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="javascript"
editor="codemirror|none"
filter="raw"
required="true"
validate="code"
/>
<!-- Ajax_input Field. Type: Subform. (joomla) -->
<field
type="subform"
@ -336,179 +498,6 @@
/>
</form>
</field>
<!-- Add_php_ajax Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_php_ajax"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_PHP_AJAX_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES</option>
<option value="0">
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO</option>
</field>
<!-- Add_css Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_css"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_CSS_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES</option>
<option value="0">
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO</option>
</field>
<!-- Note_add_language_string Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_add_language_string" label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_ADD_LANGUAGE_STRING_LABEL" description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_ADD_LANGUAGE_STRING_DESCRIPTION" heading="h4" class="note_add_language_string" />
<!-- Add_js_document Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_js_document"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_JS_DOCUMENT_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES</option>
<option value="0">
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO</option>
</field>
<!-- Default Field. Type: Editor. (joomla) -->
<field
type="editor"
name="default"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_DEFAULT_LABEL"
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_DEFAULT_DESCRIPTION"
width="100%"
height="500px"
cols="15"
rows="30"
buttons="no"
syntax="html"
editor="codemirror|none"
filter="raw"
required="true"
validate="code"
/>
<!-- Note_snippet_usage Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_snippet_usage" label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_SNIPPET_USAGE_LABEL" heading="h4" class="snippet-usage note_snippet_usage" />
<!-- Note_uikit_snippet Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_uikit_snippet" label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_UIKIT_SNIPPET_LABEL" heading="h4" class="snippet-code note_uikit_snippet" />
<!-- Icon Field. Type: Media. (joomla) -->
<field
type="media"
name="icon"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ICON_LABEL"
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ICON_DESCRIPTION"
directory=""
/>
<!-- Php_jview Field. Type: Editor. (joomla) -->
<field
type="editor"
name="php_jview"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_JVIEW_LABEL"
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_JVIEW_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="php"
editor="codemirror|none"
filter="raw"
required="true"
validate="code"
/>
<!-- Note_libraries_selection Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_libraries_selection" label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_LIBRARIES_SELECTION_LABEL" description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_LIBRARIES_SELECTION_DESCRIPTION" heading="h4" class="alert alert-info note_libraries_selection" />
<!-- Add_javascript_file Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_javascript_file"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_JAVASCRIPT_FILE_LABEL"
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_JAVASCRIPT_FILE_DESCRIPTION"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES</option>
<option value="0">
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO</option>
</field>
<!-- Libraries Field. Type: Libraries. (custom) -->
<field
type="libraries"
name="libraries"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_LIBRARIES_LABEL"
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_LIBRARIES_DESCRIPTION"
class="list_class"
multiple="true"
default="0"
required="false"
button="true"
/>
<!-- Js_document Field. Type: Editor. (joomla) -->
<field
type="editor"
name="js_document"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_JS_DOCUMENT_LABEL"
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_JS_DOCUMENT_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="javascript"
editor="codemirror|none"
filter="raw"
required="true"
validate="code"
/>
<!-- Add_css_document Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_css_document"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_CSS_DOCUMENT_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES</option>
<option value="0">
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO</option>
</field>
<!-- Javascript_file Field. Type: Editor. (joomla) -->
<field
type="editor"
name="javascript_file"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_JAVASCRIPT_FILE_LABEL"
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_JAVASCRIPT_FILE_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="javascript"
editor="codemirror|none"
filter="raw"
required="true"
validate="code"
/>
<!-- Not_required Field. Type: Hidden. (joomla) -->
<field
type="hidden"
name="not_required"
default="[]"
/>
<!-- Css_document Field. Type: Editor. (joomla) -->
<field
type="editor"
@ -526,13 +515,22 @@
required="true"
validate="code"
/>
<!-- Custom_get Field. Type: Customgets. (custom) -->
<!-- Php_document Field. Type: Editor. (joomla) -->
<field
type="customgets"
name="custom_get"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_CUSTOM_GET_LABEL"
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_CUSTOM_GET_DESCRIPTION"
multiple="true"
type="editor"
name="php_document"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_DOCUMENT_LABEL"
description="COM_COMPONENTBUILDER_CUSTOM_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"
/>
<!-- Css Field. Type: Editor. (joomla) -->
<field
@ -551,14 +549,16 @@
required="true"
validate="code"
/>
<!-- Main_get Field. Type: Maingets. (custom) -->
<!-- Libraries Field. Type: Libraries. (custom) -->
<field
type="maingets"
name="main_get"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MAIN_GET_LABEL"
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MAIN_GET_DESCRIPTION"
multiple="false"
required="true"
type="libraries"
name="libraries"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_LIBRARIES_LABEL"
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_LIBRARIES_DESCRIPTION"
class="list_class"
multiple="true"
default="0"
required="false"
button="true"
/>
<!-- Php_ajaxmethod Field. Type: Editor. (joomla) -->

View File

@ -9,43 +9,43 @@
*/
// Some Global Values
jform_vvvvwacvzr_required = false;
jform_vvvvwadvzs_required = false;
jform_vvvvwadvzt_required = false;
jform_vvvvwadvzu_required = false;
jform_vvvvwadvzr_required = false;
jform_vvvvwaevzs_required = false;
jform_vvvvwaevzt_required = false;
jform_vvvvwaevzu_required = false;
// Initial Script
jQuery(document).ready(function()
{
var target_vvvvwac = jQuery("#jform_target input[type='radio']:checked").val();
vvvvwac(target_vvvvwac);
var target_vvvvwad = jQuery("#jform_target input[type='radio']:checked").val();
vvvvwad(target_vvvvwad);
var target_vvvvwae = jQuery("#jform_target input[type='radio']:checked").val();
var type_vvvvwae = jQuery("#jform_type input[type='radio']:checked").val();
vvvvwae(target_vvvvwae,type_vvvvwae);
vvvvwae(target_vvvvwae);
var type_vvvvwaf = jQuery("#jform_type input[type='radio']:checked").val();
var target_vvvvwaf = jQuery("#jform_target input[type='radio']:checked").val();
vvvvwaf(type_vvvvwaf,target_vvvvwaf);
var type_vvvvwaf = jQuery("#jform_type input[type='radio']:checked").val();
vvvvwaf(target_vvvvwaf,type_vvvvwaf);
var type_vvvvwag = jQuery("#jform_type input[type='radio']:checked").val();
var target_vvvvwag = jQuery("#jform_target input[type='radio']:checked").val();
vvvvwag(type_vvvvwag,target_vvvvwag);
});
// the vvvvwac function
function vvvvwac(target_vvvvwac)
// the vvvvwad function
function vvvvwad(target_vvvvwad)
{
// set the function logic
if (target_vvvvwac == 2)
if (target_vvvvwad == 2)
{
jQuery('#jform_function_name').closest('.control-group').show();
if (jform_vvvvwacvzr_required)
if (jform_vvvvwadvzr_required)
{
updateFieldRequired('function_name',0);
jQuery('#jform_function_name').prop('required','required');
jQuery('#jform_function_name').attr('aria-required',true);
jQuery('#jform_function_name').addClass('required');
jform_vvvvwacvzr_required = false;
jform_vvvvwadvzr_required = false;
}
jQuery('.note_jcb_placeholder').closest('.control-group').show();
@ -54,99 +54,99 @@ function vvvvwac(target_vvvvwac)
else
{
jQuery('#jform_function_name').closest('.control-group').hide();
if (!jform_vvvvwacvzr_required)
if (!jform_vvvvwadvzr_required)
{
updateFieldRequired('function_name',1);
jQuery('#jform_function_name').removeAttr('required');
jQuery('#jform_function_name').removeAttr('aria-required');
jQuery('#jform_function_name').removeClass('required');
jform_vvvvwacvzr_required = true;
jform_vvvvwadvzr_required = true;
}
jQuery('.note_jcb_placeholder').closest('.control-group').hide();
jQuery('#jform_system_name').closest('.control-group').hide();
}
}
// the vvvvwad function
function vvvvwad(target_vvvvwad)
// the vvvvwae function
function vvvvwae(target_vvvvwae)
{
// set the function logic
if (target_vvvvwad == 1)
if (target_vvvvwae == 1)
{
jQuery('#jform_component').closest('.control-group').show();
if (jform_vvvvwadvzs_required)
if (jform_vvvvwaevzs_required)
{
updateFieldRequired('component',0);
jQuery('#jform_component').prop('required','required');
jQuery('#jform_component').attr('aria-required',true);
jQuery('#jform_component').addClass('required');
jform_vvvvwadvzs_required = false;
jform_vvvvwaevzs_required = false;
}
jQuery('#jform_path').closest('.control-group').show();
if (jform_vvvvwadvzt_required)
if (jform_vvvvwaevzt_required)
{
updateFieldRequired('path',0);
jQuery('#jform_path').prop('required','required');
jQuery('#jform_path').attr('aria-required',true);
jQuery('#jform_path').addClass('required');
jform_vvvvwadvzt_required = false;
jform_vvvvwaevzt_required = false;
}
jQuery('#jform_from_line').closest('.control-group').show();
jQuery('#jform_hashtarget').closest('.control-group').show();
jQuery('#jform_to_line').closest('.control-group').show();
jQuery('#jform_type').closest('.control-group').show();
if (jform_vvvvwadvzu_required)
if (jform_vvvvwaevzu_required)
{
updateFieldRequired('type',0);
jQuery('#jform_type').prop('required','required');
jQuery('#jform_type').attr('aria-required',true);
jQuery('#jform_type').addClass('required');
jform_vvvvwadvzu_required = false;
jform_vvvvwaevzu_required = false;
}
}
else
{
jQuery('#jform_component').closest('.control-group').hide();
if (!jform_vvvvwadvzs_required)
if (!jform_vvvvwaevzs_required)
{
updateFieldRequired('component',1);
jQuery('#jform_component').removeAttr('required');
jQuery('#jform_component').removeAttr('aria-required');
jQuery('#jform_component').removeClass('required');
jform_vvvvwadvzs_required = true;
jform_vvvvwaevzs_required = true;
}
jQuery('#jform_path').closest('.control-group').hide();
if (!jform_vvvvwadvzt_required)
if (!jform_vvvvwaevzt_required)
{
updateFieldRequired('path',1);
jQuery('#jform_path').removeAttr('required');
jQuery('#jform_path').removeAttr('aria-required');
jQuery('#jform_path').removeClass('required');
jform_vvvvwadvzt_required = true;
jform_vvvvwaevzt_required = true;
}
jQuery('#jform_from_line').closest('.control-group').hide();
jQuery('#jform_hashtarget').closest('.control-group').hide();
jQuery('#jform_to_line').closest('.control-group').hide();
jQuery('#jform_type').closest('.control-group').hide();
if (!jform_vvvvwadvzu_required)
if (!jform_vvvvwaevzu_required)
{
updateFieldRequired('type',1);
jQuery('#jform_type').removeAttr('required');
jQuery('#jform_type').removeAttr('aria-required');
jQuery('#jform_type').removeClass('required');
jform_vvvvwadvzu_required = true;
jform_vvvvwaevzu_required = true;
}
}
}
// the vvvvwae function
function vvvvwae(target_vvvvwae,type_vvvvwae)
// the vvvvwaf function
function vvvvwaf(target_vvvvwaf,type_vvvvwaf)
{
// set the function logic
if (target_vvvvwae == 1 && type_vvvvwae == 1)
if (target_vvvvwaf == 1 && type_vvvvwaf == 1)
{
jQuery('#jform_hashendtarget').closest('.control-group').show();
jQuery('#jform_to_line').closest('.control-group').show();
@ -158,11 +158,11 @@ function vvvvwae(target_vvvvwae,type_vvvvwae)
}
}
// the vvvvwaf function
function vvvvwaf(type_vvvvwaf,target_vvvvwaf)
// the vvvvwag function
function vvvvwag(type_vvvvwag,target_vvvvwag)
{
// set the function logic
if (type_vvvvwaf == 1 && target_vvvvwaf == 1)
if (type_vvvvwag == 1 && target_vvvvwag == 1)
{
jQuery('#jform_hashendtarget').closest('.control-group').show();
jQuery('#jform_to_line').closest('.control-group').show();

View File

@ -100,6 +100,9 @@ jQuery(document).ready(function()
var gettype_vvvvwaa = jQuery("#jform_gettype").val();
var add_php_router_parse_vvvvwaa = jQuery("#jform_add_php_router_parse input[type='radio']:checked").val();
vvvvwaa(gettype_vvvvwaa,add_php_router_parse_vvvvwaa);
var gettype_vvvvwac = jQuery("#jform_gettype").val();
vvvvwac(gettype_vvvvwac);
});
// the vvvvvzd function
@ -1378,6 +1381,44 @@ function add_php_router_parse_vvvvwaa_SomeFunc(add_php_router_parse_vvvvwaa)
return false;
}
// the vvvvwac function
function vvvvwac(gettype_vvvvwac)
{
if (isSet(gettype_vvvvwac) && gettype_vvvvwac.constructor !== Array)
{
var temp_vvvvwac = gettype_vvvvwac;
var gettype_vvvvwac = [];
gettype_vvvvwac.push(temp_vvvvwac);
}
else if (!isSet(gettype_vvvvwac))
{
var gettype_vvvvwac = [];
}
var gettype = gettype_vvvvwac.some(gettype_vvvvwac_SomeFunc);
// set this function logic
if (gettype)
{
jQuery('#jform_plugin_events').closest('.control-group').show();
}
else
{
jQuery('#jform_plugin_events').closest('.control-group').hide();
}
}
// the vvvvwac Some function
function gettype_vvvvwac_SomeFunc(gettype_vvvvwac)
{
// set the function logic
if (gettype_vvvvwac == 1)
{
return true;
}
return false;
}
// update required fields
function updateFieldRequired(name,status)
{

File diff suppressed because it is too large Load Diff

View File

@ -9,151 +9,96 @@
*/
// Some Global Values
jform_vvvvwaovzx_required = false;
jform_vvvvwapvzy_required = false;
jform_vvvvwaqvzz_required = false;
jform_vvvvwarwaa_required = false;
jform_vvvvwauwab_required = false;
jform_vvvvwavwac_required = false;
jform_vvvvwawwad_required = false;
jform_vvvvwaxwae_required = false;
jform_vvvvwapvzx_required = false;
jform_vvvvwaqvzy_required = false;
jform_vvvvwarvzz_required = false;
jform_vvvvwaswaa_required = false;
jform_vvvvwavwab_required = false;
jform_vvvvwawwac_required = false;
jform_vvvvwaxwad_required = false;
jform_vvvvwaywae_required = false;
// Initial Script
jQuery(document).ready(function()
{
var datalenght_vvvvwao = jQuery("#jform_datalenght").val();
vvvvwao(datalenght_vvvvwao);
var datalenght_vvvvwap = jQuery("#jform_datalenght").val();
vvvvwap(datalenght_vvvvwap);
var datadefault_vvvvwap = jQuery("#jform_datadefault").val();
vvvvwap(datadefault_vvvvwap);
var datatype_vvvvwaq = jQuery("#jform_datatype").val();
vvvvwaq(datatype_vvvvwaq);
var datadefault_vvvvwaq = jQuery("#jform_datadefault").val();
vvvvwaq(datadefault_vvvvwaq);
var datatype_vvvvwar = jQuery("#jform_datatype").val();
vvvvwar(datatype_vvvvwar);
var store_vvvvwas = jQuery("#jform_store").val();
var datatype_vvvvwas = jQuery("#jform_datatype").val();
vvvvwas(store_vvvvwas,datatype_vvvvwas);
vvvvwas(datatype_vvvvwas);
var add_css_view_vvvvwau = jQuery("#jform_add_css_view input[type='radio']:checked").val();
vvvvwau(add_css_view_vvvvwau);
var store_vvvvwat = jQuery("#jform_store").val();
var datatype_vvvvwat = jQuery("#jform_datatype").val();
vvvvwat(store_vvvvwat,datatype_vvvvwat);
var add_css_views_vvvvwav = jQuery("#jform_add_css_views input[type='radio']:checked").val();
vvvvwav(add_css_views_vvvvwav);
var add_css_view_vvvvwav = jQuery("#jform_add_css_view input[type='radio']:checked").val();
vvvvwav(add_css_view_vvvvwav);
var add_javascript_view_footer_vvvvwaw = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val();
vvvvwaw(add_javascript_view_footer_vvvvwaw);
var add_css_views_vvvvwaw = jQuery("#jform_add_css_views input[type='radio']:checked").val();
vvvvwaw(add_css_views_vvvvwaw);
var add_javascript_views_footer_vvvvwax = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val();
vvvvwax(add_javascript_views_footer_vvvvwax);
var add_javascript_view_footer_vvvvwax = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val();
vvvvwax(add_javascript_view_footer_vvvvwax);
var add_javascript_views_footer_vvvvway = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val();
vvvvway(add_javascript_views_footer_vvvvway);
});
// the vvvvwao function
function vvvvwao(datalenght_vvvvwao)
// the vvvvwap function
function vvvvwap(datalenght_vvvvwap)
{
if (isSet(datalenght_vvvvwao) && datalenght_vvvvwao.constructor !== Array)
if (isSet(datalenght_vvvvwap) && datalenght_vvvvwap.constructor !== Array)
{
var temp_vvvvwao = datalenght_vvvvwao;
var datalenght_vvvvwao = [];
datalenght_vvvvwao.push(temp_vvvvwao);
var temp_vvvvwap = datalenght_vvvvwap;
var datalenght_vvvvwap = [];
datalenght_vvvvwap.push(temp_vvvvwap);
}
else if (!isSet(datalenght_vvvvwao))
else if (!isSet(datalenght_vvvvwap))
{
var datalenght_vvvvwao = [];
var datalenght_vvvvwap = [];
}
var datalenght = datalenght_vvvvwao.some(datalenght_vvvvwao_SomeFunc);
var datalenght = datalenght_vvvvwap.some(datalenght_vvvvwap_SomeFunc);
// set this function logic
if (datalenght)
{
jQuery('#jform_datalenght_other').closest('.control-group').show();
if (jform_vvvvwaovzx_required)
if (jform_vvvvwapvzx_required)
{
updateFieldRequired('datalenght_other',0);
jQuery('#jform_datalenght_other').prop('required','required');
jQuery('#jform_datalenght_other').attr('aria-required',true);
jQuery('#jform_datalenght_other').addClass('required');
jform_vvvvwaovzx_required = false;
jform_vvvvwapvzx_required = false;
}
}
else
{
jQuery('#jform_datalenght_other').closest('.control-group').hide();
if (!jform_vvvvwaovzx_required)
if (!jform_vvvvwapvzx_required)
{
updateFieldRequired('datalenght_other',1);
jQuery('#jform_datalenght_other').removeAttr('required');
jQuery('#jform_datalenght_other').removeAttr('aria-required');
jQuery('#jform_datalenght_other').removeClass('required');
jform_vvvvwaovzx_required = true;
}
}
}
// the vvvvwao Some function
function datalenght_vvvvwao_SomeFunc(datalenght_vvvvwao)
{
// set the function logic
if (datalenght_vvvvwao == 'Other')
{
return true;
}
return false;
}
// the vvvvwap function
function vvvvwap(datadefault_vvvvwap)
{
if (isSet(datadefault_vvvvwap) && datadefault_vvvvwap.constructor !== Array)
{
var temp_vvvvwap = datadefault_vvvvwap;
var datadefault_vvvvwap = [];
datadefault_vvvvwap.push(temp_vvvvwap);
}
else if (!isSet(datadefault_vvvvwap))
{
var datadefault_vvvvwap = [];
}
var datadefault = datadefault_vvvvwap.some(datadefault_vvvvwap_SomeFunc);
// set this function logic
if (datadefault)
{
jQuery('#jform_datadefault_other').closest('.control-group').show();
if (jform_vvvvwapvzy_required)
{
updateFieldRequired('datadefault_other',0);
jQuery('#jform_datadefault_other').prop('required','required');
jQuery('#jform_datadefault_other').attr('aria-required',true);
jQuery('#jform_datadefault_other').addClass('required');
jform_vvvvwapvzy_required = false;
}
}
else
{
jQuery('#jform_datadefault_other').closest('.control-group').hide();
if (!jform_vvvvwapvzy_required)
{
updateFieldRequired('datadefault_other',1);
jQuery('#jform_datadefault_other').removeAttr('required');
jQuery('#jform_datadefault_other').removeAttr('aria-required');
jQuery('#jform_datadefault_other').removeClass('required');
jform_vvvvwapvzy_required = true;
jform_vvvvwapvzx_required = true;
}
}
}
// the vvvvwap Some function
function datadefault_vvvvwap_SomeFunc(datadefault_vvvvwap)
function datalenght_vvvvwap_SomeFunc(datalenght_vvvvwap)
{
// set the function logic
if (datadefault_vvvvwap == 'Other')
if (datalenght_vvvvwap == 'Other')
{
return true;
}
@ -161,58 +106,54 @@ function datadefault_vvvvwap_SomeFunc(datadefault_vvvvwap)
}
// the vvvvwaq function
function vvvvwaq(datatype_vvvvwaq)
function vvvvwaq(datadefault_vvvvwaq)
{
if (isSet(datatype_vvvvwaq) && datatype_vvvvwaq.constructor !== Array)
if (isSet(datadefault_vvvvwaq) && datadefault_vvvvwaq.constructor !== Array)
{
var temp_vvvvwaq = datatype_vvvvwaq;
var datatype_vvvvwaq = [];
datatype_vvvvwaq.push(temp_vvvvwaq);
var temp_vvvvwaq = datadefault_vvvvwaq;
var datadefault_vvvvwaq = [];
datadefault_vvvvwaq.push(temp_vvvvwaq);
}
else if (!isSet(datatype_vvvvwaq))
else if (!isSet(datadefault_vvvvwaq))
{
var datatype_vvvvwaq = [];
var datadefault_vvvvwaq = [];
}
var datatype = datatype_vvvvwaq.some(datatype_vvvvwaq_SomeFunc);
var datadefault = datadefault_vvvvwaq.some(datadefault_vvvvwaq_SomeFunc);
// set this function logic
if (datatype)
if (datadefault)
{
jQuery('#jform_datadefault').closest('.control-group').show();
jQuery('#jform_datalenght').closest('.control-group').show();
jQuery('#jform_indexes').closest('.control-group').show();
if (jform_vvvvwaqvzz_required)
jQuery('#jform_datadefault_other').closest('.control-group').show();
if (jform_vvvvwaqvzy_required)
{
updateFieldRequired('indexes',0);
jQuery('#jform_indexes').prop('required','required');
jQuery('#jform_indexes').attr('aria-required',true);
jQuery('#jform_indexes').addClass('required');
jform_vvvvwaqvzz_required = false;
updateFieldRequired('datadefault_other',0);
jQuery('#jform_datadefault_other').prop('required','required');
jQuery('#jform_datadefault_other').attr('aria-required',true);
jQuery('#jform_datadefault_other').addClass('required');
jform_vvvvwaqvzy_required = false;
}
}
else
{
jQuery('#jform_datadefault').closest('.control-group').hide();
jQuery('#jform_datalenght').closest('.control-group').hide();
jQuery('#jform_indexes').closest('.control-group').hide();
if (!jform_vvvvwaqvzz_required)
jQuery('#jform_datadefault_other').closest('.control-group').hide();
if (!jform_vvvvwaqvzy_required)
{
updateFieldRequired('indexes',1);
jQuery('#jform_indexes').removeAttr('required');
jQuery('#jform_indexes').removeAttr('aria-required');
jQuery('#jform_indexes').removeClass('required');
jform_vvvvwaqvzz_required = true;
updateFieldRequired('datadefault_other',1);
jQuery('#jform_datadefault_other').removeAttr('required');
jQuery('#jform_datadefault_other').removeAttr('aria-required');
jQuery('#jform_datadefault_other').removeClass('required');
jform_vvvvwaqvzy_required = true;
}
}
}
// the vvvvwaq Some function
function datatype_vvvvwaq_SomeFunc(datatype_vvvvwaq)
function datadefault_vvvvwaq_SomeFunc(datadefault_vvvvwaq)
{
// set the function logic
if (datatype_vvvvwaq == 'CHAR' || datatype_vvvvwaq == 'VARCHAR' || datatype_vvvvwaq == 'DATETIME' || datatype_vvvvwaq == 'DATE' || datatype_vvvvwaq == 'TIME' || datatype_vvvvwaq == 'INT' || datatype_vvvvwaq == 'TINYINT' || datatype_vvvvwaq == 'BIGINT' || datatype_vvvvwaq == 'FLOAT' || datatype_vvvvwaq == 'DECIMAL' || datatype_vvvvwaq == 'DOUBLE')
if (datadefault_vvvvwaq == 'Other')
{
return true;
}
@ -238,27 +179,31 @@ function vvvvwar(datatype_vvvvwar)
// set this function logic
if (datatype)
{
jQuery('#jform_store').closest('.control-group').show();
if (jform_vvvvwarwaa_required)
jQuery('#jform_datadefault').closest('.control-group').show();
jQuery('#jform_datalenght').closest('.control-group').show();
jQuery('#jform_indexes').closest('.control-group').show();
if (jform_vvvvwarvzz_required)
{
updateFieldRequired('store',0);
jQuery('#jform_store').prop('required','required');
jQuery('#jform_store').attr('aria-required',true);
jQuery('#jform_store').addClass('required');
jform_vvvvwarwaa_required = false;
updateFieldRequired('indexes',0);
jQuery('#jform_indexes').prop('required','required');
jQuery('#jform_indexes').attr('aria-required',true);
jQuery('#jform_indexes').addClass('required');
jform_vvvvwarvzz_required = false;
}
}
else
{
jQuery('#jform_store').closest('.control-group').hide();
if (!jform_vvvvwarwaa_required)
jQuery('#jform_datadefault').closest('.control-group').hide();
jQuery('#jform_datalenght').closest('.control-group').hide();
jQuery('#jform_indexes').closest('.control-group').hide();
if (!jform_vvvvwarvzz_required)
{
updateFieldRequired('store',1);
jQuery('#jform_store').removeAttr('required');
jQuery('#jform_store').removeAttr('aria-required');
jQuery('#jform_store').removeClass('required');
jform_vvvvwarwaa_required = true;
updateFieldRequired('indexes',1);
jQuery('#jform_indexes').removeAttr('required');
jQuery('#jform_indexes').removeAttr('aria-required');
jQuery('#jform_indexes').removeClass('required');
jform_vvvvwarvzz_required = true;
}
}
}
@ -267,7 +212,7 @@ function vvvvwar(datatype_vvvvwar)
function datatype_vvvvwar_SomeFunc(datatype_vvvvwar)
{
// set the function logic
if (datatype_vvvvwar == 'CHAR' || datatype_vvvvwar == 'VARCHAR' || datatype_vvvvwar == 'TEXT' || datatype_vvvvwar == 'MEDIUMTEXT' || datatype_vvvvwar == 'LONGTEXT')
if (datatype_vvvvwar == 'CHAR' || datatype_vvvvwar == 'VARCHAR' || datatype_vvvvwar == 'DATETIME' || datatype_vvvvwar == 'DATE' || datatype_vvvvwar == 'TIME' || datatype_vvvvwar == 'INT' || datatype_vvvvwar == 'TINYINT' || datatype_vvvvwar == 'BIGINT' || datatype_vvvvwar == 'FLOAT' || datatype_vvvvwar == 'DECIMAL' || datatype_vvvvwar == 'DOUBLE')
{
return true;
}
@ -275,20 +220,8 @@ function datatype_vvvvwar_SomeFunc(datatype_vvvvwar)
}
// the vvvvwas function
function vvvvwas(store_vvvvwas,datatype_vvvvwas)
function vvvvwas(datatype_vvvvwas)
{
if (isSet(store_vvvvwas) && store_vvvvwas.constructor !== Array)
{
var temp_vvvvwas = store_vvvvwas;
var store_vvvvwas = [];
store_vvvvwas.push(temp_vvvvwas);
}
else if (!isSet(store_vvvvwas))
{
var store_vvvvwas = [];
}
var store = store_vvvvwas.some(store_vvvvwas_SomeFunc);
if (isSet(datatype_vvvvwas) && datatype_vvvvwas.constructor !== Array)
{
var temp_vvvvwas = datatype_vvvvwas;
@ -303,27 +236,33 @@ function vvvvwas(store_vvvvwas,datatype_vvvvwas)
// set this function logic
if (store && datatype)
if (datatype)
{
jQuery('.note_whmcs_encryption').closest('.control-group').show();
jQuery('#jform_store').closest('.control-group').show();
if (jform_vvvvwaswaa_required)
{
updateFieldRequired('store',0);
jQuery('#jform_store').prop('required','required');
jQuery('#jform_store').attr('aria-required',true);
jQuery('#jform_store').addClass('required');
jform_vvvvwaswaa_required = false;
}
}
else
{
jQuery('.note_whmcs_encryption').closest('.control-group').hide();
jQuery('#jform_store').closest('.control-group').hide();
if (!jform_vvvvwaswaa_required)
{
updateFieldRequired('store',1);
jQuery('#jform_store').removeAttr('required');
jQuery('#jform_store').removeAttr('aria-required');
jQuery('#jform_store').removeClass('required');
jform_vvvvwaswaa_required = true;
}
}
}
// the vvvvwas Some function
function store_vvvvwas_SomeFunc(store_vvvvwas)
{
// set the function logic
if (store_vvvvwas == 4)
{
return true;
}
return false;
}
// the vvvvwas Some function
function datatype_vvvvwas_SomeFunc(datatype_vvvvwas)
{
@ -335,126 +274,187 @@ function datatype_vvvvwas_SomeFunc(datatype_vvvvwas)
return false;
}
// the vvvvwau function
function vvvvwau(add_css_view_vvvvwau)
// the vvvvwat function
function vvvvwat(store_vvvvwat,datatype_vvvvwat)
{
if (isSet(store_vvvvwat) && store_vvvvwat.constructor !== Array)
{
var temp_vvvvwat = store_vvvvwat;
var store_vvvvwat = [];
store_vvvvwat.push(temp_vvvvwat);
}
else if (!isSet(store_vvvvwat))
{
var store_vvvvwat = [];
}
var store = store_vvvvwat.some(store_vvvvwat_SomeFunc);
if (isSet(datatype_vvvvwat) && datatype_vvvvwat.constructor !== Array)
{
var temp_vvvvwat = datatype_vvvvwat;
var datatype_vvvvwat = [];
datatype_vvvvwat.push(temp_vvvvwat);
}
else if (!isSet(datatype_vvvvwat))
{
var datatype_vvvvwat = [];
}
var datatype = datatype_vvvvwat.some(datatype_vvvvwat_SomeFunc);
// set this function logic
if (store && datatype)
{
jQuery('.note_whmcs_encryption').closest('.control-group').show();
}
else
{
jQuery('.note_whmcs_encryption').closest('.control-group').hide();
}
}
// the vvvvwat Some function
function store_vvvvwat_SomeFunc(store_vvvvwat)
{
// set the function logic
if (add_css_view_vvvvwau == 1)
if (store_vvvvwat == 4)
{
return true;
}
return false;
}
// the vvvvwat Some function
function datatype_vvvvwat_SomeFunc(datatype_vvvvwat)
{
// set the function logic
if (datatype_vvvvwat == 'CHAR' || datatype_vvvvwat == 'VARCHAR' || datatype_vvvvwat == 'TEXT' || datatype_vvvvwat == 'MEDIUMTEXT' || datatype_vvvvwat == 'LONGTEXT')
{
return true;
}
return false;
}
// the vvvvwav function
function vvvvwav(add_css_view_vvvvwav)
{
// set the function logic
if (add_css_view_vvvvwav == 1)
{
jQuery('#jform_css_view-lbl').closest('.control-group').show();
if (jform_vvvvwauwab_required)
if (jform_vvvvwavwab_required)
{
updateFieldRequired('css_view',0);
jQuery('#jform_css_view').prop('required','required');
jQuery('#jform_css_view').attr('aria-required',true);
jQuery('#jform_css_view').addClass('required');
jform_vvvvwauwab_required = false;
jform_vvvvwavwab_required = false;
}
}
else
{
jQuery('#jform_css_view-lbl').closest('.control-group').hide();
if (!jform_vvvvwauwab_required)
if (!jform_vvvvwavwab_required)
{
updateFieldRequired('css_view',1);
jQuery('#jform_css_view').removeAttr('required');
jQuery('#jform_css_view').removeAttr('aria-required');
jQuery('#jform_css_view').removeClass('required');
jform_vvvvwauwab_required = true;
jform_vvvvwavwab_required = true;
}
}
}
// the vvvvwav function
function vvvvwav(add_css_views_vvvvwav)
// the vvvvwaw function
function vvvvwaw(add_css_views_vvvvwaw)
{
// set the function logic
if (add_css_views_vvvvwav == 1)
if (add_css_views_vvvvwaw == 1)
{
jQuery('#jform_css_views-lbl').closest('.control-group').show();
if (jform_vvvvwavwac_required)
if (jform_vvvvwawwac_required)
{
updateFieldRequired('css_views',0);
jQuery('#jform_css_views').prop('required','required');
jQuery('#jform_css_views').attr('aria-required',true);
jQuery('#jform_css_views').addClass('required');
jform_vvvvwavwac_required = false;
jform_vvvvwawwac_required = false;
}
}
else
{
jQuery('#jform_css_views-lbl').closest('.control-group').hide();
if (!jform_vvvvwavwac_required)
if (!jform_vvvvwawwac_required)
{
updateFieldRequired('css_views',1);
jQuery('#jform_css_views').removeAttr('required');
jQuery('#jform_css_views').removeAttr('aria-required');
jQuery('#jform_css_views').removeClass('required');
jform_vvvvwavwac_required = true;
jform_vvvvwawwac_required = true;
}
}
}
// the vvvvwaw function
function vvvvwaw(add_javascript_view_footer_vvvvwaw)
// the vvvvwax function
function vvvvwax(add_javascript_view_footer_vvvvwax)
{
// set the function logic
if (add_javascript_view_footer_vvvvwaw == 1)
if (add_javascript_view_footer_vvvvwax == 1)
{
jQuery('#jform_javascript_view_footer-lbl').closest('.control-group').show();
if (jform_vvvvwawwad_required)
if (jform_vvvvwaxwad_required)
{
updateFieldRequired('javascript_view_footer',0);
jQuery('#jform_javascript_view_footer').prop('required','required');
jQuery('#jform_javascript_view_footer').attr('aria-required',true);
jQuery('#jform_javascript_view_footer').addClass('required');
jform_vvvvwawwad_required = false;
jform_vvvvwaxwad_required = false;
}
}
else
{
jQuery('#jform_javascript_view_footer-lbl').closest('.control-group').hide();
if (!jform_vvvvwawwad_required)
if (!jform_vvvvwaxwad_required)
{
updateFieldRequired('javascript_view_footer',1);
jQuery('#jform_javascript_view_footer').removeAttr('required');
jQuery('#jform_javascript_view_footer').removeAttr('aria-required');
jQuery('#jform_javascript_view_footer').removeClass('required');
jform_vvvvwawwad_required = true;
jform_vvvvwaxwad_required = true;
}
}
}
// the vvvvwax function
function vvvvwax(add_javascript_views_footer_vvvvwax)
// the vvvvway function
function vvvvway(add_javascript_views_footer_vvvvway)
{
// set the function logic
if (add_javascript_views_footer_vvvvwax == 1)
if (add_javascript_views_footer_vvvvway == 1)
{
jQuery('#jform_javascript_views_footer-lbl').closest('.control-group').show();
if (jform_vvvvwaxwae_required)
if (jform_vvvvwaywae_required)
{
updateFieldRequired('javascript_views_footer',0);
jQuery('#jform_javascript_views_footer').prop('required','required');
jQuery('#jform_javascript_views_footer').attr('aria-required',true);
jQuery('#jform_javascript_views_footer').addClass('required');
jform_vvvvwaxwae_required = false;
jform_vvvvwaywae_required = false;
}
}
else
{
jQuery('#jform_javascript_views_footer-lbl').closest('.control-group').hide();
if (!jform_vvvvwaxwae_required)
if (!jform_vvvvwaywae_required)
{
updateFieldRequired('javascript_views_footer',1);
jQuery('#jform_javascript_views_footer').removeAttr('required');
jQuery('#jform_javascript_views_footer').removeAttr('aria-required');
jQuery('#jform_javascript_views_footer').removeClass('required');
jform_vvvvwaxwae_required = true;
jform_vvvvwaywae_required = true;
}
}
}

View File

@ -9,24 +9,21 @@
*/
// Some Global Values
jform_vvvvwbiwaq_required = false;
jform_vvvvwbjwar_required = false;
jform_vvvvwbkwas_required = false;
jform_vvvvwblwat_required = false;
jform_vvvvwbmwau_required = false;
jform_vvvvwbnwav_required = false;
jform_vvvvwbjwaq_required = false;
jform_vvvvwbkwar_required = false;
jform_vvvvwblwas_required = false;
jform_vvvvwbmwat_required = false;
jform_vvvvwbnwau_required = false;
jform_vvvvwbowav_required = false;
// Initial Script
jQuery(document).ready(function()
{
var location_vvvvwbi = jQuery("#jform_location input[type='radio']:checked").val();
vvvvwbi(location_vvvvwbi);
var location_vvvvwbj = jQuery("#jform_location input[type='radio']:checked").val();
vvvvwbj(location_vvvvwbj);
var type_vvvvwbk = jQuery("#jform_type").val();
vvvvwbk(type_vvvvwbk);
var location_vvvvwbk = jQuery("#jform_location input[type='radio']:checked").val();
vvvvwbk(location_vvvvwbk);
var type_vvvvwbl = jQuery("#jform_type").val();
vvvvwbl(type_vvvvwbl);
@ -34,127 +31,75 @@ jQuery(document).ready(function()
var type_vvvvwbm = jQuery("#jform_type").val();
vvvvwbm(type_vvvvwbm);
var target_vvvvwbn = jQuery("#jform_target input[type='radio']:checked").val();
vvvvwbn(target_vvvvwbn);
var type_vvvvwbn = jQuery("#jform_type").val();
vvvvwbn(type_vvvvwbn);
var target_vvvvwbo = jQuery("#jform_target input[type='radio']:checked").val();
vvvvwbo(target_vvvvwbo);
});
// the vvvvwbi function
function vvvvwbi(location_vvvvwbi)
// the vvvvwbj function
function vvvvwbj(location_vvvvwbj)
{
// set the function logic
if (location_vvvvwbi == 1)
if (location_vvvvwbj == 1)
{
jQuery('#jform_admin_view').closest('.control-group').show();
if (jform_vvvvwbiwaq_required)
if (jform_vvvvwbjwaq_required)
{
updateFieldRequired('admin_view',0);
jQuery('#jform_admin_view').prop('required','required');
jQuery('#jform_admin_view').attr('aria-required',true);
jQuery('#jform_admin_view').addClass('required');
jform_vvvvwbiwaq_required = false;
jform_vvvvwbjwaq_required = false;
}
}
else
{
jQuery('#jform_admin_view').closest('.control-group').hide();
if (!jform_vvvvwbiwaq_required)
if (!jform_vvvvwbjwaq_required)
{
updateFieldRequired('admin_view',1);
jQuery('#jform_admin_view').removeAttr('required');
jQuery('#jform_admin_view').removeAttr('aria-required');
jQuery('#jform_admin_view').removeClass('required');
jform_vvvvwbiwaq_required = true;
jform_vvvvwbjwaq_required = true;
}
}
}
// the vvvvwbj function
function vvvvwbj(location_vvvvwbj)
// the vvvvwbk function
function vvvvwbk(location_vvvvwbk)
{
// set the function logic
if (location_vvvvwbj == 2)
if (location_vvvvwbk == 2)
{
jQuery('#jform_site_view').closest('.control-group').show();
if (jform_vvvvwbjwar_required)
if (jform_vvvvwbkwar_required)
{
updateFieldRequired('site_view',0);
jQuery('#jform_site_view').prop('required','required');
jQuery('#jform_site_view').attr('aria-required',true);
jQuery('#jform_site_view').addClass('required');
jform_vvvvwbjwar_required = false;
jform_vvvvwbkwar_required = false;
}
}
else
{
jQuery('#jform_site_view').closest('.control-group').hide();
if (!jform_vvvvwbjwar_required)
if (!jform_vvvvwbkwar_required)
{
updateFieldRequired('site_view',1);
jQuery('#jform_site_view').removeAttr('required');
jQuery('#jform_site_view').removeAttr('aria-required');
jQuery('#jform_site_view').removeClass('required');
jform_vvvvwbjwar_required = true;
jform_vvvvwbkwar_required = true;
}
}
}
// the vvvvwbk function
function vvvvwbk(type_vvvvwbk)
{
if (isSet(type_vvvvwbk) && type_vvvvwbk.constructor !== Array)
{
var temp_vvvvwbk = type_vvvvwbk;
var type_vvvvwbk = [];
type_vvvvwbk.push(temp_vvvvwbk);
}
else if (!isSet(type_vvvvwbk))
{
var type_vvvvwbk = [];
}
var type = type_vvvvwbk.some(type_vvvvwbk_SomeFunc);
// set this function logic
if (type)
{
jQuery('#jform_url').closest('.control-group').show();
if (jform_vvvvwbkwas_required)
{
updateFieldRequired('url',0);
jQuery('#jform_url').prop('required','required');
jQuery('#jform_url').attr('aria-required',true);
jQuery('#jform_url').addClass('required');
jform_vvvvwbkwas_required = false;
}
}
else
{
jQuery('#jform_url').closest('.control-group').hide();
if (!jform_vvvvwbkwas_required)
{
updateFieldRequired('url',1);
jQuery('#jform_url').removeAttr('required');
jQuery('#jform_url').removeAttr('aria-required');
jQuery('#jform_url').removeClass('required');
jform_vvvvwbkwas_required = true;
}
}
}
// the vvvvwbk Some function
function type_vvvvwbk_SomeFunc(type_vvvvwbk)
{
// set the function logic
if (type_vvvvwbk == 3)
{
return true;
}
return false;
}
// the vvvvwbl function
function vvvvwbl(type_vvvvwbl)
{
@ -174,27 +119,27 @@ function vvvvwbl(type_vvvvwbl)
// set this function logic
if (type)
{
jQuery('#jform_article').closest('.control-group').show();
if (jform_vvvvwblwat_required)
jQuery('#jform_url').closest('.control-group').show();
if (jform_vvvvwblwas_required)
{
updateFieldRequired('article',0);
jQuery('#jform_article').prop('required','required');
jQuery('#jform_article').attr('aria-required',true);
jQuery('#jform_article').addClass('required');
jform_vvvvwblwat_required = false;
updateFieldRequired('url',0);
jQuery('#jform_url').prop('required','required');
jQuery('#jform_url').attr('aria-required',true);
jQuery('#jform_url').addClass('required');
jform_vvvvwblwas_required = false;
}
}
else
{
jQuery('#jform_article').closest('.control-group').hide();
if (!jform_vvvvwblwat_required)
jQuery('#jform_url').closest('.control-group').hide();
if (!jform_vvvvwblwas_required)
{
updateFieldRequired('article',1);
jQuery('#jform_article').removeAttr('required');
jQuery('#jform_article').removeAttr('aria-required');
jQuery('#jform_article').removeClass('required');
jform_vvvvwblwat_required = true;
updateFieldRequired('url',1);
jQuery('#jform_url').removeAttr('required');
jQuery('#jform_url').removeAttr('aria-required');
jQuery('#jform_url').removeClass('required');
jform_vvvvwblwas_required = true;
}
}
}
@ -203,7 +148,7 @@ function vvvvwbl(type_vvvvwbl)
function type_vvvvwbl_SomeFunc(type_vvvvwbl)
{
// set the function logic
if (type_vvvvwbl == 1)
if (type_vvvvwbl == 3)
{
return true;
}
@ -229,27 +174,27 @@ function vvvvwbm(type_vvvvwbm)
// set this function logic
if (type)
{
jQuery('#jform_content-lbl').closest('.control-group').show();
if (jform_vvvvwbmwau_required)
jQuery('#jform_article').closest('.control-group').show();
if (jform_vvvvwbmwat_required)
{
updateFieldRequired('content',0);
jQuery('#jform_content').prop('required','required');
jQuery('#jform_content').attr('aria-required',true);
jQuery('#jform_content').addClass('required');
jform_vvvvwbmwau_required = false;
updateFieldRequired('article',0);
jQuery('#jform_article').prop('required','required');
jQuery('#jform_article').attr('aria-required',true);
jQuery('#jform_article').addClass('required');
jform_vvvvwbmwat_required = false;
}
}
else
{
jQuery('#jform_content-lbl').closest('.control-group').hide();
if (!jform_vvvvwbmwau_required)
jQuery('#jform_article').closest('.control-group').hide();
if (!jform_vvvvwbmwat_required)
{
updateFieldRequired('content',1);
jQuery('#jform_content').removeAttr('required');
jQuery('#jform_content').removeAttr('aria-required');
jQuery('#jform_content').removeClass('required');
jform_vvvvwbmwau_required = true;
updateFieldRequired('article',1);
jQuery('#jform_article').removeAttr('required');
jQuery('#jform_article').removeAttr('aria-required');
jQuery('#jform_article').removeClass('required');
jform_vvvvwbmwat_required = true;
}
}
}
@ -258,7 +203,7 @@ function vvvvwbm(type_vvvvwbm)
function type_vvvvwbm_SomeFunc(type_vvvvwbm)
{
// set the function logic
if (type_vvvvwbm == 2)
if (type_vvvvwbm == 1)
{
return true;
}
@ -266,32 +211,87 @@ function type_vvvvwbm_SomeFunc(type_vvvvwbm)
}
// the vvvvwbn function
function vvvvwbn(target_vvvvwbn)
function vvvvwbn(type_vvvvwbn)
{
if (isSet(type_vvvvwbn) && type_vvvvwbn.constructor !== Array)
{
var temp_vvvvwbn = type_vvvvwbn;
var type_vvvvwbn = [];
type_vvvvwbn.push(temp_vvvvwbn);
}
else if (!isSet(type_vvvvwbn))
{
var type_vvvvwbn = [];
}
var type = type_vvvvwbn.some(type_vvvvwbn_SomeFunc);
// set this function logic
if (type)
{
jQuery('#jform_content-lbl').closest('.control-group').show();
if (jform_vvvvwbnwau_required)
{
updateFieldRequired('content',0);
jQuery('#jform_content').prop('required','required');
jQuery('#jform_content').attr('aria-required',true);
jQuery('#jform_content').addClass('required');
jform_vvvvwbnwau_required = false;
}
}
else
{
jQuery('#jform_content-lbl').closest('.control-group').hide();
if (!jform_vvvvwbnwau_required)
{
updateFieldRequired('content',1);
jQuery('#jform_content').removeAttr('required');
jQuery('#jform_content').removeAttr('aria-required');
jQuery('#jform_content').removeClass('required');
jform_vvvvwbnwau_required = true;
}
}
}
// the vvvvwbn Some function
function type_vvvvwbn_SomeFunc(type_vvvvwbn)
{
// set the function logic
if (target_vvvvwbn == 1)
if (type_vvvvwbn == 2)
{
return true;
}
return false;
}
// the vvvvwbo function
function vvvvwbo(target_vvvvwbo)
{
// set the function logic
if (target_vvvvwbo == 1)
{
jQuery('#jform_groups').closest('.control-group').show();
if (jform_vvvvwbnwav_required)
if (jform_vvvvwbowav_required)
{
updateFieldRequired('groups',0);
jQuery('#jform_groups').prop('required','required');
jQuery('#jform_groups').attr('aria-required',true);
jQuery('#jform_groups').addClass('required');
jform_vvvvwbnwav_required = false;
jform_vvvvwbowav_required = false;
}
}
else
{
jQuery('#jform_groups').closest('.control-group').hide();
if (!jform_vvvvwbnwav_required)
if (!jform_vvvvwbowav_required)
{
updateFieldRequired('groups',1);
jQuery('#jform_groups').removeAttr('required');
jQuery('#jform_groups').removeAttr('aria-required');
jQuery('#jform_groups').removeClass('required');
jform_vvvvwbnwav_required = true;
jform_vvvvwbowav_required = true;
}
}
}

View File

@ -54,14 +54,6 @@
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"

View File

@ -101,19 +101,6 @@
message="COM_COMPONENTBUILDER_LAYOUT_NAME_MESSAGE"
hint="COM_COMPONENTBUILDER_LAYOUT_NAME_HINT"
/>
<!-- Alias Field. Type: Text. (joomla) -->
<field
type="text"
name="alias"
label="COM_COMPONENTBUILDER_LAYOUT_ALIAS_LABEL"
size="40"
maxlength="50"
description="COM_COMPONENTBUILDER_LAYOUT_ALIAS_DESCRIPTION"
class="text_area"
filter="CMD"
message="COM_COMPONENTBUILDER_LAYOUT_ALIAS_MESSAGE"
hint="COM_COMPONENTBUILDER_LAYOUT_ALIAS_HINT"
/>
<!-- Description Field. Type: Text. (joomla) -->
<field
type="text"
@ -227,6 +214,19 @@
/>
<!-- Note_libraries_selection Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_libraries_selection" label="COM_COMPONENTBUILDER_LAYOUT_NOTE_LIBRARIES_SELECTION_LABEL" description="COM_COMPONENTBUILDER_LAYOUT_NOTE_LIBRARIES_SELECTION_DESCRIPTION" heading="h4" class="alert alert-info note_libraries_selection" />
<!-- Alias Field. Type: Text. (joomla) -->
<field
type="text"
name="alias"
label="COM_COMPONENTBUILDER_LAYOUT_ALIAS_LABEL"
size="40"
maxlength="50"
description="COM_COMPONENTBUILDER_LAYOUT_ALIAS_DESCRIPTION"
class="text_area"
filter="CMD"
message="COM_COMPONENTBUILDER_LAYOUT_ALIAS_MESSAGE"
hint="COM_COMPONENTBUILDER_LAYOUT_ALIAS_HINT"
/>
</fieldset>
<!-- Access Control Fields. -->

View File

@ -9,15 +9,12 @@
*/
// Some Global Values
jform_vvvvwahvzv_required = false;
jform_vvvvwanvzw_required = false;
jform_vvvvwaivzv_required = false;
jform_vvvvwaovzw_required = false;
// Initial Script
jQuery(document).ready(function()
{
var how_vvvvwag = jQuery("#jform_how").val();
vvvvwag(how_vvvvwag);
var how_vvvvwah = jQuery("#jform_how").val();
vvvvwah(how_vvvvwah);
@ -36,48 +33,13 @@ jQuery(document).ready(function()
var how_vvvvwam = jQuery("#jform_how").val();
vvvvwam(how_vvvvwam);
var type_vvvvwan = jQuery("#jform_type input[type='radio']:checked").val();
vvvvwan(type_vvvvwan);
var how_vvvvwan = jQuery("#jform_how").val();
vvvvwan(how_vvvvwan);
var type_vvvvwao = jQuery("#jform_type input[type='radio']:checked").val();
vvvvwao(type_vvvvwao);
});
// the vvvvwag function
function vvvvwag(how_vvvvwag)
{
if (isSet(how_vvvvwag) && how_vvvvwag.constructor !== Array)
{
var temp_vvvvwag = how_vvvvwag;
var how_vvvvwag = [];
how_vvvvwag.push(temp_vvvvwag);
}
else if (!isSet(how_vvvvwag))
{
var how_vvvvwag = [];
}
var how = how_vvvvwag.some(how_vvvvwag_SomeFunc);
// set this function logic
if (how)
{
jQuery('#jform_addconditions-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_addconditions-lbl').closest('.control-group').hide();
}
}
// the vvvvwag Some function
function how_vvvvwag_SomeFunc(how_vvvvwag)
{
// set the function logic
if (how_vvvvwag == 2)
{
return true;
}
return false;
}
// the vvvvwah function
function vvvvwah(how_vvvvwah)
{
@ -97,28 +59,11 @@ function vvvvwah(how_vvvvwah)
// set this function logic
if (how)
{
jQuery('#jform_php_setdocument').closest('.control-group').show();
if (jform_vvvvwahvzv_required)
{
updateFieldRequired('php_setdocument',0);
jQuery('#jform_php_setdocument').prop('required','required');
jQuery('#jform_php_setdocument').attr('aria-required',true);
jQuery('#jform_php_setdocument').addClass('required');
jform_vvvvwahvzv_required = false;
}
jQuery('#jform_addconditions-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_php_setdocument').closest('.control-group').hide();
if (!jform_vvvvwahvzv_required)
{
updateFieldRequired('php_setdocument',1);
jQuery('#jform_php_setdocument').removeAttr('required');
jQuery('#jform_php_setdocument').removeAttr('aria-required');
jQuery('#jform_php_setdocument').removeClass('required');
jform_vvvvwahvzv_required = true;
}
jQuery('#jform_addconditions-lbl').closest('.control-group').hide();
}
}
@ -126,7 +71,7 @@ function vvvvwah(how_vvvvwah)
function how_vvvvwah_SomeFunc(how_vvvvwah)
{
// set the function logic
if (how_vvvvwah == 3)
if (how_vvvvwah == 2)
{
return true;
}
@ -152,11 +97,28 @@ function vvvvwai(how_vvvvwai)
// set this function logic
if (how)
{
jQuery('.note_display_library_config').closest('.control-group').show();
jQuery('#jform_php_setdocument').closest('.control-group').show();
if (jform_vvvvwaivzv_required)
{
updateFieldRequired('php_setdocument',0);
jQuery('#jform_php_setdocument').prop('required','required');
jQuery('#jform_php_setdocument').attr('aria-required',true);
jQuery('#jform_php_setdocument').addClass('required');
jform_vvvvwaivzv_required = false;
}
}
else
{
jQuery('.note_display_library_config').closest('.control-group').hide();
jQuery('#jform_php_setdocument').closest('.control-group').hide();
if (!jform_vvvvwaivzv_required)
{
updateFieldRequired('php_setdocument',1);
jQuery('#jform_php_setdocument').removeAttr('required');
jQuery('#jform_php_setdocument').removeAttr('aria-required');
jQuery('#jform_php_setdocument').removeClass('required');
jform_vvvvwaivzv_required = true;
}
}
}
@ -164,7 +126,7 @@ function vvvvwai(how_vvvvwai)
function how_vvvvwai_SomeFunc(how_vvvvwai)
{
// set the function logic
if (how_vvvvwai == 2 || how_vvvvwai == 3)
if (how_vvvvwai == 3)
{
return true;
}
@ -190,11 +152,11 @@ function vvvvwaj(how_vvvvwaj)
// set this function logic
if (how)
{
jQuery('.note_display_library_files_folders_urls').closest('.control-group').show();
jQuery('.note_display_library_config').closest('.control-group').show();
}
else
{
jQuery('.note_display_library_files_folders_urls').closest('.control-group').hide();
jQuery('.note_display_library_config').closest('.control-group').hide();
}
}
@ -202,7 +164,7 @@ function vvvvwaj(how_vvvvwaj)
function how_vvvvwaj_SomeFunc(how_vvvvwaj)
{
// set the function logic
if (how_vvvvwaj == 1 || how_vvvvwaj == 2 || how_vvvvwaj == 3)
if (how_vvvvwaj == 2 || how_vvvvwaj == 3)
{
return true;
}
@ -228,15 +190,11 @@ function vvvvwak(how_vvvvwak)
// set this function logic
if (how)
{
jQuery('.note_no_behaviour_one').closest('.control-group').show();
jQuery('.note_no_behaviour_three').closest('.control-group').show();
jQuery('.note_no_behaviour_two').closest('.control-group').show();
jQuery('.note_display_library_files_folders_urls').closest('.control-group').show();
}
else
{
jQuery('.note_no_behaviour_one').closest('.control-group').hide();
jQuery('.note_no_behaviour_three').closest('.control-group').hide();
jQuery('.note_no_behaviour_two').closest('.control-group').hide();
jQuery('.note_display_library_files_folders_urls').closest('.control-group').hide();
}
}
@ -244,7 +202,7 @@ function vvvvwak(how_vvvvwak)
function how_vvvvwak_SomeFunc(how_vvvvwak)
{
// set the function logic
if (how_vvvvwak == 0)
if (how_vvvvwak == 1 || how_vvvvwak == 2 || how_vvvvwak == 3)
{
return true;
}
@ -270,13 +228,15 @@ function vvvvwal(how_vvvvwal)
// set this function logic
if (how)
{
jQuery('.note_yes_behaviour_one').closest('.control-group').show();
jQuery('.note_yes_behaviour_two').closest('.control-group').show();
jQuery('.note_no_behaviour_one').closest('.control-group').show();
jQuery('.note_no_behaviour_three').closest('.control-group').show();
jQuery('.note_no_behaviour_two').closest('.control-group').show();
}
else
{
jQuery('.note_yes_behaviour_one').closest('.control-group').hide();
jQuery('.note_yes_behaviour_two').closest('.control-group').hide();
jQuery('.note_no_behaviour_one').closest('.control-group').hide();
jQuery('.note_no_behaviour_three').closest('.control-group').hide();
jQuery('.note_no_behaviour_two').closest('.control-group').hide();
}
}
@ -284,7 +244,7 @@ function vvvvwal(how_vvvvwal)
function how_vvvvwal_SomeFunc(how_vvvvwal)
{
// set the function logic
if (how_vvvvwal == 1)
if (how_vvvvwal == 0)
{
return true;
}
@ -307,6 +267,46 @@ function vvvvwam(how_vvvvwam)
var how = how_vvvvwam.some(how_vvvvwam_SomeFunc);
// set this function logic
if (how)
{
jQuery('.note_yes_behaviour_one').closest('.control-group').show();
jQuery('.note_yes_behaviour_two').closest('.control-group').show();
}
else
{
jQuery('.note_yes_behaviour_one').closest('.control-group').hide();
jQuery('.note_yes_behaviour_two').closest('.control-group').hide();
}
}
// the vvvvwam Some function
function how_vvvvwam_SomeFunc(how_vvvvwam)
{
// set the function logic
if (how_vvvvwam == 1)
{
return true;
}
return false;
}
// the vvvvwan function
function vvvvwan(how_vvvvwan)
{
if (isSet(how_vvvvwan) && how_vvvvwan.constructor !== Array)
{
var temp_vvvvwan = how_vvvvwan;
var how_vvvvwan = [];
how_vvvvwan.push(temp_vvvvwan);
}
else if (!isSet(how_vvvvwan))
{
var how_vvvvwan = [];
}
var how = how_vvvvwan.some(how_vvvvwan_SomeFunc);
// set this function logic
if (how)
{
@ -322,44 +322,44 @@ function vvvvwam(how_vvvvwam)
}
}
// the vvvvwam Some function
function how_vvvvwam_SomeFunc(how_vvvvwam)
// the vvvvwan Some function
function how_vvvvwan_SomeFunc(how_vvvvwan)
{
// set the function logic
if (how_vvvvwam == 4)
if (how_vvvvwan == 4)
{
return true;
}
return false;
}
// the vvvvwan function
function vvvvwan(type_vvvvwan)
// the vvvvwao function
function vvvvwao(type_vvvvwao)
{
// set the function logic
if (type_vvvvwan == 2)
if (type_vvvvwao == 2)
{
jQuery('#jform_libraries').closest('.control-group').show();
if (jform_vvvvwanvzw_required)
if (jform_vvvvwaovzw_required)
{
updateFieldRequired('libraries',0);
jQuery('#jform_libraries').prop('required','required');
jQuery('#jform_libraries').attr('aria-required',true);
jQuery('#jform_libraries').addClass('required');
jform_vvvvwanvzw_required = false;
jform_vvvvwaovzw_required = false;
}
}
else
{
jQuery('#jform_libraries').closest('.control-group').hide();
if (!jform_vvvvwanvzw_required)
if (!jform_vvvvwaovzw_required)
{
updateFieldRequired('libraries',1);
jQuery('#jform_libraries').removeAttr('required');
jQuery('#jform_libraries').removeAttr('aria-required');
jQuery('#jform_libraries').removeClass('required');
jform_vvvvwanvzw_required = true;
jform_vvvvwaovzw_required = true;
}
}
}

View File

@ -9,175 +9,42 @@
*/
// Some Global Values
jform_vvvvwaywag_required = false;
jform_vvvvwaywah_required = false;
jform_vvvvwaywai_required = false;
jform_vvvvwaywaj_required = false;
jform_vvvvwaywak_required = false;
jform_vvvvwazwal_required = false;
jform_vvvvwbawam_required = false;
jform_vvvvwbcwan_required = false;
jform_vvvvwbewao_required = false;
jform_vvvvwazwag_required = false;
jform_vvvvwazwah_required = false;
jform_vvvvwazwai_required = false;
jform_vvvvwazwaj_required = false;
jform_vvvvwazwak_required = false;
jform_vvvvwbawal_required = false;
jform_vvvvwbbwam_required = false;
jform_vvvvwbdwan_required = false;
jform_vvvvwbfwao_required = false;
// Initial Script
jQuery(document).ready(function()
{
var protocol_vvvvway = jQuery("#jform_protocol").val();
vvvvway(protocol_vvvvway);
var protocol_vvvvwaz = jQuery("#jform_protocol").val();
vvvvwaz(protocol_vvvvwaz);
var protocol_vvvvwba = jQuery("#jform_protocol").val();
var authentication_vvvvwba = jQuery("#jform_authentication").val();
vvvvwba(protocol_vvvvwba,authentication_vvvvwba);
vvvvwba(protocol_vvvvwba);
var protocol_vvvvwbc = jQuery("#jform_protocol").val();
var authentication_vvvvwbc = jQuery("#jform_authentication").val();
vvvvwbc(protocol_vvvvwbc,authentication_vvvvwbc);
var protocol_vvvvwbb = jQuery("#jform_protocol").val();
var authentication_vvvvwbb = jQuery("#jform_authentication").val();
vvvvwbb(protocol_vvvvwbb,authentication_vvvvwbb);
var protocol_vvvvwbe = jQuery("#jform_protocol").val();
var authentication_vvvvwbe = jQuery("#jform_authentication").val();
vvvvwbe(protocol_vvvvwbe,authentication_vvvvwbe);
var protocol_vvvvwbd = jQuery("#jform_protocol").val();
var authentication_vvvvwbd = jQuery("#jform_authentication").val();
vvvvwbd(protocol_vvvvwbd,authentication_vvvvwbd);
var protocol_vvvvwbg = jQuery("#jform_protocol").val();
var authentication_vvvvwbg = jQuery("#jform_authentication").val();
vvvvwbg(protocol_vvvvwbg,authentication_vvvvwbg);
var protocol_vvvvwbf = jQuery("#jform_protocol").val();
var authentication_vvvvwbf = jQuery("#jform_authentication").val();
vvvvwbf(protocol_vvvvwbf,authentication_vvvvwbf);
var protocol_vvvvwbh = jQuery("#jform_protocol").val();
var authentication_vvvvwbh = jQuery("#jform_authentication").val();
vvvvwbh(protocol_vvvvwbh,authentication_vvvvwbh);
});
// the vvvvway function
function vvvvway(protocol_vvvvway)
{
if (isSet(protocol_vvvvway) && protocol_vvvvway.constructor !== Array)
{
var temp_vvvvway = protocol_vvvvway;
var protocol_vvvvway = [];
protocol_vvvvway.push(temp_vvvvway);
}
else if (!isSet(protocol_vvvvway))
{
var protocol_vvvvway = [];
}
var protocol = protocol_vvvvway.some(protocol_vvvvway_SomeFunc);
// set this function logic
if (protocol)
{
jQuery('#jform_authentication').closest('.control-group').show();
if (jform_vvvvwaywag_required)
{
updateFieldRequired('authentication',0);
jQuery('#jform_authentication').prop('required','required');
jQuery('#jform_authentication').attr('aria-required',true);
jQuery('#jform_authentication').addClass('required');
jform_vvvvwaywag_required = false;
}
jQuery('#jform_host').closest('.control-group').show();
if (jform_vvvvwaywah_required)
{
updateFieldRequired('host',0);
jQuery('#jform_host').prop('required','required');
jQuery('#jform_host').attr('aria-required',true);
jQuery('#jform_host').addClass('required');
jform_vvvvwaywah_required = false;
}
jQuery('#jform_port').closest('.control-group').show();
if (jform_vvvvwaywai_required)
{
updateFieldRequired('port',0);
jQuery('#jform_port').prop('required','required');
jQuery('#jform_port').attr('aria-required',true);
jQuery('#jform_port').addClass('required');
jform_vvvvwaywai_required = false;
}
jQuery('#jform_path').closest('.control-group').show();
if (jform_vvvvwaywaj_required)
{
updateFieldRequired('path',0);
jQuery('#jform_path').prop('required','required');
jQuery('#jform_path').attr('aria-required',true);
jQuery('#jform_path').addClass('required');
jform_vvvvwaywaj_required = false;
}
jQuery('.note_ssh_security').closest('.control-group').show();
jQuery('#jform_username').closest('.control-group').show();
if (jform_vvvvwaywak_required)
{
updateFieldRequired('username',0);
jQuery('#jform_username').prop('required','required');
jQuery('#jform_username').attr('aria-required',true);
jQuery('#jform_username').addClass('required');
jform_vvvvwaywak_required = false;
}
}
else
{
jQuery('#jform_authentication').closest('.control-group').hide();
if (!jform_vvvvwaywag_required)
{
updateFieldRequired('authentication',1);
jQuery('#jform_authentication').removeAttr('required');
jQuery('#jform_authentication').removeAttr('aria-required');
jQuery('#jform_authentication').removeClass('required');
jform_vvvvwaywag_required = true;
}
jQuery('#jform_host').closest('.control-group').hide();
if (!jform_vvvvwaywah_required)
{
updateFieldRequired('host',1);
jQuery('#jform_host').removeAttr('required');
jQuery('#jform_host').removeAttr('aria-required');
jQuery('#jform_host').removeClass('required');
jform_vvvvwaywah_required = true;
}
jQuery('#jform_port').closest('.control-group').hide();
if (!jform_vvvvwaywai_required)
{
updateFieldRequired('port',1);
jQuery('#jform_port').removeAttr('required');
jQuery('#jform_port').removeAttr('aria-required');
jQuery('#jform_port').removeClass('required');
jform_vvvvwaywai_required = true;
}
jQuery('#jform_path').closest('.control-group').hide();
if (!jform_vvvvwaywaj_required)
{
updateFieldRequired('path',1);
jQuery('#jform_path').removeAttr('required');
jQuery('#jform_path').removeAttr('aria-required');
jQuery('#jform_path').removeClass('required');
jform_vvvvwaywaj_required = true;
}
jQuery('.note_ssh_security').closest('.control-group').hide();
jQuery('#jform_username').closest('.control-group').hide();
if (!jform_vvvvwaywak_required)
{
updateFieldRequired('username',1);
jQuery('#jform_username').removeAttr('required');
jQuery('#jform_username').removeAttr('aria-required');
jQuery('#jform_username').removeClass('required');
jform_vvvvwaywak_required = true;
}
}
}
// the vvvvway Some function
function protocol_vvvvway_SomeFunc(protocol_vvvvway)
{
// set the function logic
if (protocol_vvvvway == 2)
{
return true;
}
return false;
}
// the vvvvwaz function
function vvvvwaz(protocol_vvvvwaz)
{
@ -197,29 +64,105 @@ function vvvvwaz(protocol_vvvvwaz)
// set this function logic
if (protocol)
{
jQuery('.note_ftp_signature').closest('.control-group').show();
jQuery('#jform_signature').closest('.control-group').show();
if (jform_vvvvwazwal_required)
jQuery('#jform_authentication').closest('.control-group').show();
if (jform_vvvvwazwag_required)
{
updateFieldRequired('signature',0);
jQuery('#jform_signature').prop('required','required');
jQuery('#jform_signature').attr('aria-required',true);
jQuery('#jform_signature').addClass('required');
jform_vvvvwazwal_required = false;
updateFieldRequired('authentication',0);
jQuery('#jform_authentication').prop('required','required');
jQuery('#jform_authentication').attr('aria-required',true);
jQuery('#jform_authentication').addClass('required');
jform_vvvvwazwag_required = false;
}
jQuery('#jform_host').closest('.control-group').show();
if (jform_vvvvwazwah_required)
{
updateFieldRequired('host',0);
jQuery('#jform_host').prop('required','required');
jQuery('#jform_host').attr('aria-required',true);
jQuery('#jform_host').addClass('required');
jform_vvvvwazwah_required = false;
}
jQuery('#jform_port').closest('.control-group').show();
if (jform_vvvvwazwai_required)
{
updateFieldRequired('port',0);
jQuery('#jform_port').prop('required','required');
jQuery('#jform_port').attr('aria-required',true);
jQuery('#jform_port').addClass('required');
jform_vvvvwazwai_required = false;
}
jQuery('#jform_path').closest('.control-group').show();
if (jform_vvvvwazwaj_required)
{
updateFieldRequired('path',0);
jQuery('#jform_path').prop('required','required');
jQuery('#jform_path').attr('aria-required',true);
jQuery('#jform_path').addClass('required');
jform_vvvvwazwaj_required = false;
}
jQuery('.note_ssh_security').closest('.control-group').show();
jQuery('#jform_username').closest('.control-group').show();
if (jform_vvvvwazwak_required)
{
updateFieldRequired('username',0);
jQuery('#jform_username').prop('required','required');
jQuery('#jform_username').attr('aria-required',true);
jQuery('#jform_username').addClass('required');
jform_vvvvwazwak_required = false;
}
}
else
{
jQuery('.note_ftp_signature').closest('.control-group').hide();
jQuery('#jform_signature').closest('.control-group').hide();
if (!jform_vvvvwazwal_required)
jQuery('#jform_authentication').closest('.control-group').hide();
if (!jform_vvvvwazwag_required)
{
updateFieldRequired('signature',1);
jQuery('#jform_signature').removeAttr('required');
jQuery('#jform_signature').removeAttr('aria-required');
jQuery('#jform_signature').removeClass('required');
jform_vvvvwazwal_required = true;
updateFieldRequired('authentication',1);
jQuery('#jform_authentication').removeAttr('required');
jQuery('#jform_authentication').removeAttr('aria-required');
jQuery('#jform_authentication').removeClass('required');
jform_vvvvwazwag_required = true;
}
jQuery('#jform_host').closest('.control-group').hide();
if (!jform_vvvvwazwah_required)
{
updateFieldRequired('host',1);
jQuery('#jform_host').removeAttr('required');
jQuery('#jform_host').removeAttr('aria-required');
jQuery('#jform_host').removeClass('required');
jform_vvvvwazwah_required = true;
}
jQuery('#jform_port').closest('.control-group').hide();
if (!jform_vvvvwazwai_required)
{
updateFieldRequired('port',1);
jQuery('#jform_port').removeAttr('required');
jQuery('#jform_port').removeAttr('aria-required');
jQuery('#jform_port').removeClass('required');
jform_vvvvwazwai_required = true;
}
jQuery('#jform_path').closest('.control-group').hide();
if (!jform_vvvvwazwaj_required)
{
updateFieldRequired('path',1);
jQuery('#jform_path').removeAttr('required');
jQuery('#jform_path').removeAttr('aria-required');
jQuery('#jform_path').removeClass('required');
jform_vvvvwazwaj_required = true;
}
jQuery('.note_ssh_security').closest('.control-group').hide();
jQuery('#jform_username').closest('.control-group').hide();
if (!jform_vvvvwazwak_required)
{
updateFieldRequired('username',1);
jQuery('#jform_username').removeAttr('required');
jQuery('#jform_username').removeAttr('aria-required');
jQuery('#jform_username').removeClass('required');
jform_vvvvwazwak_required = true;
}
}
}
@ -228,7 +171,7 @@ function vvvvwaz(protocol_vvvvwaz)
function protocol_vvvvwaz_SomeFunc(protocol_vvvvwaz)
{
// set the function logic
if (protocol_vvvvwaz == 1)
if (protocol_vvvvwaz == 2)
{
return true;
}
@ -236,7 +179,7 @@ function protocol_vvvvwaz_SomeFunc(protocol_vvvvwaz)
}
// the vvvvwba function
function vvvvwba(protocol_vvvvwba,authentication_vvvvwba)
function vvvvwba(protocol_vvvvwba)
{
if (isSet(protocol_vvvvwba) && protocol_vvvvwba.constructor !== Array)
{
@ -250,43 +193,33 @@ function vvvvwba(protocol_vvvvwba,authentication_vvvvwba)
}
var protocol = protocol_vvvvwba.some(protocol_vvvvwba_SomeFunc);
if (isSet(authentication_vvvvwba) && authentication_vvvvwba.constructor !== Array)
{
var temp_vvvvwba = authentication_vvvvwba;
var authentication_vvvvwba = [];
authentication_vvvvwba.push(temp_vvvvwba);
}
else if (!isSet(authentication_vvvvwba))
{
var authentication_vvvvwba = [];
}
var authentication = authentication_vvvvwba.some(authentication_vvvvwba_SomeFunc);
// set this function logic
if (protocol && authentication)
if (protocol)
{
jQuery('#jform_password').closest('.control-group').show();
if (jform_vvvvwbawam_required)
jQuery('.note_ftp_signature').closest('.control-group').show();
jQuery('#jform_signature').closest('.control-group').show();
if (jform_vvvvwbawal_required)
{
updateFieldRequired('password',0);
jQuery('#jform_password').prop('required','required');
jQuery('#jform_password').attr('aria-required',true);
jQuery('#jform_password').addClass('required');
jform_vvvvwbawam_required = false;
updateFieldRequired('signature',0);
jQuery('#jform_signature').prop('required','required');
jQuery('#jform_signature').attr('aria-required',true);
jQuery('#jform_signature').addClass('required');
jform_vvvvwbawal_required = false;
}
}
else
{
jQuery('#jform_password').closest('.control-group').hide();
if (!jform_vvvvwbawam_required)
jQuery('.note_ftp_signature').closest('.control-group').hide();
jQuery('#jform_signature').closest('.control-group').hide();
if (!jform_vvvvwbawal_required)
{
updateFieldRequired('password',1);
jQuery('#jform_password').removeAttr('required');
jQuery('#jform_password').removeAttr('aria-required');
jQuery('#jform_password').removeClass('required');
jform_vvvvwbawam_required = true;
updateFieldRequired('signature',1);
jQuery('#jform_signature').removeAttr('required');
jQuery('#jform_signature').removeAttr('aria-required');
jQuery('#jform_signature').removeClass('required');
jform_vvvvwbawal_required = true;
}
}
}
@ -295,206 +228,273 @@ function vvvvwba(protocol_vvvvwba,authentication_vvvvwba)
function protocol_vvvvwba_SomeFunc(protocol_vvvvwba)
{
// set the function logic
if (protocol_vvvvwba == 2)
if (protocol_vvvvwba == 1)
{
return true;
}
return false;
}
// the vvvvwba Some function
function authentication_vvvvwba_SomeFunc(authentication_vvvvwba)
// the vvvvwbb function
function vvvvwbb(protocol_vvvvwbb,authentication_vvvvwbb)
{
if (isSet(protocol_vvvvwbb) && protocol_vvvvwbb.constructor !== Array)
{
var temp_vvvvwbb = protocol_vvvvwbb;
var protocol_vvvvwbb = [];
protocol_vvvvwbb.push(temp_vvvvwbb);
}
else if (!isSet(protocol_vvvvwbb))
{
var protocol_vvvvwbb = [];
}
var protocol = protocol_vvvvwbb.some(protocol_vvvvwbb_SomeFunc);
if (isSet(authentication_vvvvwbb) && authentication_vvvvwbb.constructor !== Array)
{
var temp_vvvvwbb = authentication_vvvvwbb;
var authentication_vvvvwbb = [];
authentication_vvvvwbb.push(temp_vvvvwbb);
}
else if (!isSet(authentication_vvvvwbb))
{
var authentication_vvvvwbb = [];
}
var authentication = authentication_vvvvwbb.some(authentication_vvvvwbb_SomeFunc);
// set this function logic
if (protocol && authentication)
{
jQuery('#jform_password').closest('.control-group').show();
if (jform_vvvvwbbwam_required)
{
updateFieldRequired('password',0);
jQuery('#jform_password').prop('required','required');
jQuery('#jform_password').attr('aria-required',true);
jQuery('#jform_password').addClass('required');
jform_vvvvwbbwam_required = false;
}
}
else
{
jQuery('#jform_password').closest('.control-group').hide();
if (!jform_vvvvwbbwam_required)
{
updateFieldRequired('password',1);
jQuery('#jform_password').removeAttr('required');
jQuery('#jform_password').removeAttr('aria-required');
jQuery('#jform_password').removeClass('required');
jform_vvvvwbbwam_required = true;
}
}
}
// the vvvvwbb Some function
function protocol_vvvvwbb_SomeFunc(protocol_vvvvwbb)
{
// set the function logic
if (authentication_vvvvwba == 1 || authentication_vvvvwba == 3 || authentication_vvvvwba == 5)
if (protocol_vvvvwbb == 2)
{
return true;
}
return false;
}
// the vvvvwbc function
function vvvvwbc(protocol_vvvvwbc,authentication_vvvvwbc)
// the vvvvwbb Some function
function authentication_vvvvwbb_SomeFunc(authentication_vvvvwbb)
{
if (isSet(protocol_vvvvwbc) && protocol_vvvvwbc.constructor !== Array)
// set the function logic
if (authentication_vvvvwbb == 1 || authentication_vvvvwbb == 3 || authentication_vvvvwbb == 5)
{
var temp_vvvvwbc = protocol_vvvvwbc;
var protocol_vvvvwbc = [];
protocol_vvvvwbc.push(temp_vvvvwbc);
return true;
}
else if (!isSet(protocol_vvvvwbc))
{
var protocol_vvvvwbc = [];
}
var protocol = protocol_vvvvwbc.some(protocol_vvvvwbc_SomeFunc);
return false;
}
if (isSet(authentication_vvvvwbc) && authentication_vvvvwbc.constructor !== Array)
// the vvvvwbd function
function vvvvwbd(protocol_vvvvwbd,authentication_vvvvwbd)
{
if (isSet(protocol_vvvvwbd) && protocol_vvvvwbd.constructor !== Array)
{
var temp_vvvvwbc = authentication_vvvvwbc;
var authentication_vvvvwbc = [];
authentication_vvvvwbc.push(temp_vvvvwbc);
var temp_vvvvwbd = protocol_vvvvwbd;
var protocol_vvvvwbd = [];
protocol_vvvvwbd.push(temp_vvvvwbd);
}
else if (!isSet(authentication_vvvvwbc))
else if (!isSet(protocol_vvvvwbd))
{
var authentication_vvvvwbc = [];
var protocol_vvvvwbd = [];
}
var authentication = authentication_vvvvwbc.some(authentication_vvvvwbc_SomeFunc);
var protocol = protocol_vvvvwbd.some(protocol_vvvvwbd_SomeFunc);
if (isSet(authentication_vvvvwbd) && authentication_vvvvwbd.constructor !== Array)
{
var temp_vvvvwbd = authentication_vvvvwbd;
var authentication_vvvvwbd = [];
authentication_vvvvwbd.push(temp_vvvvwbd);
}
else if (!isSet(authentication_vvvvwbd))
{
var authentication_vvvvwbd = [];
}
var authentication = authentication_vvvvwbd.some(authentication_vvvvwbd_SomeFunc);
// set this function logic
if (protocol && authentication)
{
jQuery('#jform_private').closest('.control-group').show();
if (jform_vvvvwbcwan_required)
if (jform_vvvvwbdwan_required)
{
updateFieldRequired('private',0);
jQuery('#jform_private').prop('required','required');
jQuery('#jform_private').attr('aria-required',true);
jQuery('#jform_private').addClass('required');
jform_vvvvwbcwan_required = false;
jform_vvvvwbdwan_required = false;
}
}
else
{
jQuery('#jform_private').closest('.control-group').hide();
if (!jform_vvvvwbcwan_required)
if (!jform_vvvvwbdwan_required)
{
updateFieldRequired('private',1);
jQuery('#jform_private').removeAttr('required');
jQuery('#jform_private').removeAttr('aria-required');
jQuery('#jform_private').removeClass('required');
jform_vvvvwbcwan_required = true;
jform_vvvvwbdwan_required = true;
}
}
}
// the vvvvwbc Some function
function protocol_vvvvwbc_SomeFunc(protocol_vvvvwbc)
// the vvvvwbd Some function
function protocol_vvvvwbd_SomeFunc(protocol_vvvvwbd)
{
// set the function logic
if (protocol_vvvvwbc == 2)
if (protocol_vvvvwbd == 2)
{
return true;
}
return false;
}
// the vvvvwbc Some function
function authentication_vvvvwbc_SomeFunc(authentication_vvvvwbc)
// the vvvvwbd Some function
function authentication_vvvvwbd_SomeFunc(authentication_vvvvwbd)
{
// set the function logic
if (authentication_vvvvwbc == 2 || authentication_vvvvwbc == 3)
if (authentication_vvvvwbd == 2 || authentication_vvvvwbd == 3)
{
return true;
}
return false;
}
// the vvvvwbe function
function vvvvwbe(protocol_vvvvwbe,authentication_vvvvwbe)
// the vvvvwbf function
function vvvvwbf(protocol_vvvvwbf,authentication_vvvvwbf)
{
if (isSet(protocol_vvvvwbe) && protocol_vvvvwbe.constructor !== Array)
if (isSet(protocol_vvvvwbf) && protocol_vvvvwbf.constructor !== Array)
{
var temp_vvvvwbe = protocol_vvvvwbe;
var protocol_vvvvwbe = [];
protocol_vvvvwbe.push(temp_vvvvwbe);
var temp_vvvvwbf = protocol_vvvvwbf;
var protocol_vvvvwbf = [];
protocol_vvvvwbf.push(temp_vvvvwbf);
}
else if (!isSet(protocol_vvvvwbe))
else if (!isSet(protocol_vvvvwbf))
{
var protocol_vvvvwbe = [];
var protocol_vvvvwbf = [];
}
var protocol = protocol_vvvvwbe.some(protocol_vvvvwbe_SomeFunc);
var protocol = protocol_vvvvwbf.some(protocol_vvvvwbf_SomeFunc);
if (isSet(authentication_vvvvwbe) && authentication_vvvvwbe.constructor !== Array)
if (isSet(authentication_vvvvwbf) && authentication_vvvvwbf.constructor !== Array)
{
var temp_vvvvwbe = authentication_vvvvwbe;
var authentication_vvvvwbe = [];
authentication_vvvvwbe.push(temp_vvvvwbe);
var temp_vvvvwbf = authentication_vvvvwbf;
var authentication_vvvvwbf = [];
authentication_vvvvwbf.push(temp_vvvvwbf);
}
else if (!isSet(authentication_vvvvwbe))
else if (!isSet(authentication_vvvvwbf))
{
var authentication_vvvvwbe = [];
var authentication_vvvvwbf = [];
}
var authentication = authentication_vvvvwbe.some(authentication_vvvvwbe_SomeFunc);
var authentication = authentication_vvvvwbf.some(authentication_vvvvwbf_SomeFunc);
// set this function logic
if (protocol && authentication)
{
jQuery('#jform_private_key').closest('.control-group').show();
if (jform_vvvvwbewao_required)
if (jform_vvvvwbfwao_required)
{
updateFieldRequired('private_key',0);
jQuery('#jform_private_key').prop('required','required');
jQuery('#jform_private_key').attr('aria-required',true);
jQuery('#jform_private_key').addClass('required');
jform_vvvvwbewao_required = false;
jform_vvvvwbfwao_required = false;
}
}
else
{
jQuery('#jform_private_key').closest('.control-group').hide();
if (!jform_vvvvwbewao_required)
if (!jform_vvvvwbfwao_required)
{
updateFieldRequired('private_key',1);
jQuery('#jform_private_key').removeAttr('required');
jQuery('#jform_private_key').removeAttr('aria-required');
jQuery('#jform_private_key').removeClass('required');
jform_vvvvwbewao_required = true;
jform_vvvvwbfwao_required = true;
}
}
}
// the vvvvwbe Some function
function protocol_vvvvwbe_SomeFunc(protocol_vvvvwbe)
// the vvvvwbf Some function
function protocol_vvvvwbf_SomeFunc(protocol_vvvvwbf)
{
// set the function logic
if (protocol_vvvvwbe == 2)
if (protocol_vvvvwbf == 2)
{
return true;
}
return false;
}
// the vvvvwbe Some function
function authentication_vvvvwbe_SomeFunc(authentication_vvvvwbe)
// the vvvvwbf Some function
function authentication_vvvvwbf_SomeFunc(authentication_vvvvwbf)
{
// set the function logic
if (authentication_vvvvwbe == 4 || authentication_vvvvwbe == 5)
if (authentication_vvvvwbf == 4 || authentication_vvvvwbf == 5)
{
return true;
}
return false;
}
// the vvvvwbg function
function vvvvwbg(protocol_vvvvwbg,authentication_vvvvwbg)
// the vvvvwbh function
function vvvvwbh(protocol_vvvvwbh,authentication_vvvvwbh)
{
if (isSet(protocol_vvvvwbg) && protocol_vvvvwbg.constructor !== Array)
if (isSet(protocol_vvvvwbh) && protocol_vvvvwbh.constructor !== Array)
{
var temp_vvvvwbg = protocol_vvvvwbg;
var protocol_vvvvwbg = [];
protocol_vvvvwbg.push(temp_vvvvwbg);
var temp_vvvvwbh = protocol_vvvvwbh;
var protocol_vvvvwbh = [];
protocol_vvvvwbh.push(temp_vvvvwbh);
}
else if (!isSet(protocol_vvvvwbg))
else if (!isSet(protocol_vvvvwbh))
{
var protocol_vvvvwbg = [];
var protocol_vvvvwbh = [];
}
var protocol = protocol_vvvvwbg.some(protocol_vvvvwbg_SomeFunc);
var protocol = protocol_vvvvwbh.some(protocol_vvvvwbh_SomeFunc);
if (isSet(authentication_vvvvwbg) && authentication_vvvvwbg.constructor !== Array)
if (isSet(authentication_vvvvwbh) && authentication_vvvvwbh.constructor !== Array)
{
var temp_vvvvwbg = authentication_vvvvwbg;
var authentication_vvvvwbg = [];
authentication_vvvvwbg.push(temp_vvvvwbg);
var temp_vvvvwbh = authentication_vvvvwbh;
var authentication_vvvvwbh = [];
authentication_vvvvwbh.push(temp_vvvvwbh);
}
else if (!isSet(authentication_vvvvwbg))
else if (!isSet(authentication_vvvvwbh))
{
var authentication_vvvvwbg = [];
var authentication_vvvvwbh = [];
}
var authentication = authentication_vvvvwbg.some(authentication_vvvvwbg_SomeFunc);
var authentication = authentication_vvvvwbh.some(authentication_vvvvwbh_SomeFunc);
// set this function logic
@ -508,22 +508,22 @@ function vvvvwbg(protocol_vvvvwbg,authentication_vvvvwbg)
}
}
// the vvvvwbg Some function
function protocol_vvvvwbg_SomeFunc(protocol_vvvvwbg)
// the vvvvwbh Some function
function protocol_vvvvwbh_SomeFunc(protocol_vvvvwbh)
{
// set the function logic
if (protocol_vvvvwbg == 2)
if (protocol_vvvvwbh == 2)
{
return true;
}
return false;
}
// the vvvvwbg Some function
function authentication_vvvvwbg_SomeFunc(authentication_vvvvwbg)
// the vvvvwbh Some function
function authentication_vvvvwbh_SomeFunc(authentication_vvvvwbh)
{
// set the function logic
if (authentication_vvvvwbg == 2 || authentication_vvvvwbg == 3 || authentication_vvvvwbg == 4 || authentication_vvvvwbg == 5)
if (authentication_vvvvwbh == 2 || authentication_vvvvwbh == 3 || authentication_vvvvwbh == 4 || authentication_vvvvwbh == 5)
{
return true;
}

View File

@ -114,19 +114,6 @@
message="COM_COMPONENTBUILDER_SITE_VIEW_NAME_MESSAGE"
hint="COM_COMPONENTBUILDER_SITE_VIEW_NAME_HINT"
/>
<!-- Codename Field. Type: Text. (joomla) -->
<field
type="text"
name="codename"
label="COM_COMPONENTBUILDER_SITE_VIEW_CODENAME_LABEL"
size="80"
maxlength="150"
description="COM_COMPONENTBUILDER_SITE_VIEW_CODENAME_DESCRIPTION"
class="text_area"
filter="CMD"
message="COM_COMPONENTBUILDER_SITE_VIEW_CODENAME_MESSAGE"
hint="COM_COMPONENTBUILDER_SITE_VIEW_CODENAME_HINT"
/>
<!-- Description Field. Type: Text. (joomla) -->
<field
type="text"
@ -143,15 +130,14 @@
message="COM_COMPONENTBUILDER_SITE_VIEW_DESCRIPTION_MESSAGE"
hint="COM_COMPONENTBUILDER_SITE_VIEW_DESCRIPTION_HINT"
/>
<!-- Snippet Field. Type: Snippets. (custom) -->
<!-- Main_get Field. Type: Maingets. (custom) -->
<field
type="snippets"
name="snippet"
label="COM_COMPONENTBUILDER_SITE_VIEW_SNIPPET_LABEL"
description="COM_COMPONENTBUILDER_SITE_VIEW_SNIPPET_DESCRIPTION"
class="list_class"
type="maingets"
name="main_get"
label="COM_COMPONENTBUILDER_SITE_VIEW_MAIN_GET_LABEL"
description="COM_COMPONENTBUILDER_SITE_VIEW_MAIN_GET_DESCRIPTION"
multiple="false"
required="false"
required="true"
button="true"
/>
<!-- Php_document Field. Type: Editor. (joomla) -->
@ -171,6 +157,255 @@
required="true"
validate="code"
/>
<!-- Php_view Field. Type: Editor. (joomla) -->
<field
type="editor"
name="php_view"
label="COM_COMPONENTBUILDER_SITE_VIEW_PHP_VIEW_LABEL"
description="COM_COMPONENTBUILDER_SITE_VIEW_PHP_VIEW_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="php"
editor="codemirror|none"
filter="raw"
required="true"
validate="code"
/>
<!-- Add_css_document Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_css_document"
label="COM_COMPONENTBUILDER_SITE_VIEW_ADD_CSS_DOCUMENT_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_SITE_VIEW_YES</option>
<option value="0">
COM_COMPONENTBUILDER_SITE_VIEW_NO</option>
</field>
<!-- Note_add_language_string Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_add_language_string" label="COM_COMPONENTBUILDER_SITE_VIEW_NOTE_ADD_LANGUAGE_STRING_LABEL" description="COM_COMPONENTBUILDER_SITE_VIEW_NOTE_ADD_LANGUAGE_STRING_DESCRIPTION" heading="h4" class="note_add_language_string" />
<!-- Add_javascript_file Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_javascript_file"
label="COM_COMPONENTBUILDER_SITE_VIEW_ADD_JAVASCRIPT_FILE_LABEL"
description="COM_COMPONENTBUILDER_SITE_VIEW_ADD_JAVASCRIPT_FILE_DESCRIPTION"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_SITE_VIEW_YES</option>
<option value="0">
COM_COMPONENTBUILDER_SITE_VIEW_NO</option>
</field>
<!-- Add_js_document Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_js_document"
label="COM_COMPONENTBUILDER_SITE_VIEW_ADD_JS_DOCUMENT_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_SITE_VIEW_YES</option>
<option value="0">
COM_COMPONENTBUILDER_SITE_VIEW_NO</option>
</field>
<!-- Context Field. Type: Text. (joomla) -->
<field
type="text"
name="context"
label="COM_COMPONENTBUILDER_SITE_VIEW_CONTEXT_LABEL"
size="40"
maxlength="50"
description="COM_COMPONENTBUILDER_SITE_VIEW_CONTEXT_DESCRIPTION"
class="text_area"
filter="WORD"
message="COM_COMPONENTBUILDER_SITE_VIEW_CONTEXT_MESSAGE"
hint="COM_COMPONENTBUILDER_SITE_VIEW_CONTEXT_HINT"
/>
<!-- Codename Field. Type: Text. (joomla) -->
<field
type="text"
name="codename"
label="COM_COMPONENTBUILDER_SITE_VIEW_CODENAME_LABEL"
size="80"
maxlength="150"
description="COM_COMPONENTBUILDER_SITE_VIEW_CODENAME_DESCRIPTION"
class="text_area"
filter="CMD"
message="COM_COMPONENTBUILDER_SITE_VIEW_CODENAME_MESSAGE"
hint="COM_COMPONENTBUILDER_SITE_VIEW_CODENAME_HINT"
/>
<!-- Default Field. Type: Editor. (joomla) -->
<field
type="editor"
name="default"
label="COM_COMPONENTBUILDER_SITE_VIEW_DEFAULT_LABEL"
description="COM_COMPONENTBUILDER_SITE_VIEW_DEFAULT_DESCRIPTION"
width="100%"
height="500px"
cols="15"
rows="30"
buttons="no"
syntax="html"
editor="codemirror|none"
filter="raw"
required="true"
validate="code"
/>
<!-- Note_libraries_selection Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_libraries_selection" label="COM_COMPONENTBUILDER_SITE_VIEW_NOTE_LIBRARIES_SELECTION_LABEL" description="COM_COMPONENTBUILDER_SITE_VIEW_NOTE_LIBRARIES_SELECTION_DESCRIPTION" heading="h4" class="alert alert-info note_libraries_selection" />
<!-- Note_snippet_usage Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_snippet_usage" label="COM_COMPONENTBUILDER_SITE_VIEW_NOTE_SNIPPET_USAGE_LABEL" heading="h4" class="snippet-usage note_snippet_usage" />
<!-- Note_uikit_snippet Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_uikit_snippet" label="COM_COMPONENTBUILDER_SITE_VIEW_NOTE_UIKIT_SNIPPET_LABEL" heading="h4" class="snippet-code note_uikit_snippet" />
<!-- Snippet Field. Type: Snippets. (custom) -->
<field
type="snippets"
name="snippet"
label="COM_COMPONENTBUILDER_SITE_VIEW_SNIPPET_LABEL"
description="COM_COMPONENTBUILDER_SITE_VIEW_SNIPPET_DESCRIPTION"
class="list_class"
multiple="false"
required="false"
button="true"
/>
<!-- Php_jview_display Field. Type: Editor. (joomla) -->
<field
type="editor"
name="php_jview_display"
label="COM_COMPONENTBUILDER_SITE_VIEW_PHP_JVIEW_DISPLAY_LABEL"
description="COM_COMPONENTBUILDER_SITE_VIEW_PHP_JVIEW_DISPLAY_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="php"
editor="codemirror|none"
filter="raw"
required="true"
validate="code"
/>
<!-- Not_required Field. Type: Hidden. (joomla) -->
<field
type="hidden"
name="not_required"
default="[]"
/>
<!-- Php_jview Field. Type: Editor. (joomla) -->
<field
type="editor"
name="php_jview"
label="COM_COMPONENTBUILDER_SITE_VIEW_PHP_JVIEW_LABEL"
description="COM_COMPONENTBUILDER_SITE_VIEW_PHP_JVIEW_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="php"
editor="codemirror|none"
filter="raw"
required="true"
validate="code"
/>
<!-- Custom_get Field. Type: Customgets. (custom) -->
<field
type="customgets"
name="custom_get"
label="COM_COMPONENTBUILDER_SITE_VIEW_CUSTOM_GET_LABEL"
description="COM_COMPONENTBUILDER_SITE_VIEW_CUSTOM_GET_DESCRIPTION"
multiple="true"
/>
<!-- Php_model Field. Type: Editor. (joomla) -->
<field
type="editor"
name="php_model"
label="COM_COMPONENTBUILDER_SITE_VIEW_PHP_MODEL_LABEL"
description="COM_COMPONENTBUILDER_SITE_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"
/>
<!-- Add_css Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_css"
label="COM_COMPONENTBUILDER_SITE_VIEW_ADD_CSS_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_SITE_VIEW_YES</option>
<option value="0">
COM_COMPONENTBUILDER_SITE_VIEW_NO</option>
</field>
<!-- Javascript_file Field. Type: Editor. (joomla) -->
<field
type="editor"
name="javascript_file"
label="COM_COMPONENTBUILDER_SITE_VIEW_JAVASCRIPT_FILE_LABEL"
description="COM_COMPONENTBUILDER_SITE_VIEW_JAVASCRIPT_FILE_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="javascript"
editor="codemirror|none"
filter="raw"
required="true"
validate="code"
/>
<!-- Add_php_ajax Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_php_ajax"
label="COM_COMPONENTBUILDER_SITE_VIEW_ADD_PHP_AJAX_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_SITE_VIEW_YES</option>
<option value="0">
COM_COMPONENTBUILDER_SITE_VIEW_NO</option>
</field>
<!-- Js_document Field. Type: Editor. (joomla) -->
<field
type="editor"
name="js_document"
label="COM_COMPONENTBUILDER_SITE_VIEW_JS_DOCUMENT_LABEL"
description="COM_COMPONENTBUILDER_SITE_VIEW_JS_DOCUMENT_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="javascript"
editor="codemirror|none"
filter="raw"
required="true"
validate="code"
/>
<!-- Ajax_input Field. Type: Subform. (joomla) -->
<field
type="subform"
@ -302,48 +537,23 @@
/>
</form>
</field>
<!-- Add_php_ajax Field. Type: Radio. (joomla) -->
<!-- Css_document Field. Type: Editor. (joomla) -->
<field
type="radio"
name="add_php_ajax"
label="COM_COMPONENTBUILDER_SITE_VIEW_ADD_PHP_AJAX_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_SITE_VIEW_YES</option>
<option value="0">
COM_COMPONENTBUILDER_SITE_VIEW_NO</option>
</field>
<!-- Add_css Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_css"
label="COM_COMPONENTBUILDER_SITE_VIEW_ADD_CSS_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_SITE_VIEW_YES</option>
<option value="0">
COM_COMPONENTBUILDER_SITE_VIEW_NO</option>
</field>
<!-- Add_css_document Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_css_document"
label="COM_COMPONENTBUILDER_SITE_VIEW_ADD_CSS_DOCUMENT_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_SITE_VIEW_YES</option>
<option value="0">
COM_COMPONENTBUILDER_SITE_VIEW_NO</option>
</field>
type="editor"
name="css_document"
label="COM_COMPONENTBUILDER_SITE_VIEW_CSS_DOCUMENT_LABEL"
description="COM_COMPONENTBUILDER_SITE_VIEW_CSS_DOCUMENT_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="css"
editor="codemirror|none"
filter="raw"
required="true"
validate="code"
/>
<!-- Libraries Field. Type: Libraries. (custom) -->
<field
type="libraries"
@ -356,175 +566,12 @@
required="false"
button="true"
/>
<!-- Php_jview Field. Type: Editor. (joomla) -->
<!-- Css Field. Type: Editor. (joomla) -->
<field
type="editor"
name="php_jview"
label="COM_COMPONENTBUILDER_SITE_VIEW_PHP_JVIEW_LABEL"
description="COM_COMPONENTBUILDER_SITE_VIEW_PHP_JVIEW_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="php"
editor="codemirror|none"
filter="raw"
required="true"
validate="code"
/>
<!-- Default Field. Type: Editor. (joomla) -->
<field
type="editor"
name="default"
label="COM_COMPONENTBUILDER_SITE_VIEW_DEFAULT_LABEL"
description="COM_COMPONENTBUILDER_SITE_VIEW_DEFAULT_DESCRIPTION"
width="100%"
height="500px"
cols="15"
rows="30"
buttons="no"
syntax="html"
editor="codemirror|none"
filter="raw"
required="true"
validate="code"
/>
<!-- Note_snippet_usage Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_snippet_usage" label="COM_COMPONENTBUILDER_SITE_VIEW_NOTE_SNIPPET_USAGE_LABEL" heading="h4" class="snippet-usage note_snippet_usage" />
<!-- Note_uikit_snippet Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_uikit_snippet" label="COM_COMPONENTBUILDER_SITE_VIEW_NOTE_UIKIT_SNIPPET_LABEL" heading="h4" class="snippet-code note_uikit_snippet" />
<!-- Note_add_language_string Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_add_language_string" label="COM_COMPONENTBUILDER_SITE_VIEW_NOTE_ADD_LANGUAGE_STRING_LABEL" description="COM_COMPONENTBUILDER_SITE_VIEW_NOTE_ADD_LANGUAGE_STRING_DESCRIPTION" heading="h4" class="note_add_language_string" />
<!-- Php_view Field. Type: Editor. (joomla) -->
<field
type="editor"
name="php_view"
label="COM_COMPONENTBUILDER_SITE_VIEW_PHP_VIEW_LABEL"
description="COM_COMPONENTBUILDER_SITE_VIEW_PHP_VIEW_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="php"
editor="codemirror|none"
filter="raw"
required="true"
validate="code"
/>
<!-- Add_javascript_file Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_javascript_file"
label="COM_COMPONENTBUILDER_SITE_VIEW_ADD_JAVASCRIPT_FILE_LABEL"
description="COM_COMPONENTBUILDER_SITE_VIEW_ADD_JAVASCRIPT_FILE_DESCRIPTION"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_SITE_VIEW_YES</option>
<option value="0">
COM_COMPONENTBUILDER_SITE_VIEW_NO</option>
</field>
<!-- Php_jview_display Field. Type: Editor. (joomla) -->
<field
type="editor"
name="php_jview_display"
label="COM_COMPONENTBUILDER_SITE_VIEW_PHP_JVIEW_DISPLAY_LABEL"
description="COM_COMPONENTBUILDER_SITE_VIEW_PHP_JVIEW_DISPLAY_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="php"
editor="codemirror|none"
filter="raw"
required="true"
validate="code"
/>
<!-- Add_js_document Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_js_document"
label="COM_COMPONENTBUILDER_SITE_VIEW_ADD_JS_DOCUMENT_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_SITE_VIEW_YES</option>
<option value="0">
COM_COMPONENTBUILDER_SITE_VIEW_NO</option>
</field>
<!-- Not_required Field. Type: Hidden. (joomla) -->
<field
type="hidden"
name="not_required"
default="[]"
/>
<!-- Note_libraries_selection Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_libraries_selection" label="COM_COMPONENTBUILDER_SITE_VIEW_NOTE_LIBRARIES_SELECTION_LABEL" description="COM_COMPONENTBUILDER_SITE_VIEW_NOTE_LIBRARIES_SELECTION_DESCRIPTION" heading="h4" class="alert alert-info note_libraries_selection" />
<!-- Javascript_file Field. Type: Editor. (joomla) -->
<field
type="editor"
name="javascript_file"
label="COM_COMPONENTBUILDER_SITE_VIEW_JAVASCRIPT_FILE_LABEL"
description="COM_COMPONENTBUILDER_SITE_VIEW_JAVASCRIPT_FILE_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="javascript"
editor="codemirror|none"
filter="raw"
required="true"
validate="code"
/>
<!-- Custom_get Field. Type: Customgets. (custom) -->
<field
type="customgets"
name="custom_get"
label="COM_COMPONENTBUILDER_SITE_VIEW_CUSTOM_GET_LABEL"
description="COM_COMPONENTBUILDER_SITE_VIEW_CUSTOM_GET_DESCRIPTION"
multiple="true"
/>
<!-- Js_document Field. Type: Editor. (joomla) -->
<field
type="editor"
name="js_document"
label="COM_COMPONENTBUILDER_SITE_VIEW_JS_DOCUMENT_LABEL"
description="COM_COMPONENTBUILDER_SITE_VIEW_JS_DOCUMENT_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="javascript"
editor="codemirror|none"
filter="raw"
required="true"
validate="code"
/>
<!-- Main_get Field. Type: Maingets. (custom) -->
<field
type="maingets"
name="main_get"
label="COM_COMPONENTBUILDER_SITE_VIEW_MAIN_GET_LABEL"
description="COM_COMPONENTBUILDER_SITE_VIEW_MAIN_GET_DESCRIPTION"
multiple="false"
required="true"
button="true"
/>
<!-- Css_document Field. Type: Editor. (joomla) -->
<field
type="editor"
name="css_document"
label="COM_COMPONENTBUILDER_SITE_VIEW_CSS_DOCUMENT_LABEL"
description="COM_COMPONENTBUILDER_SITE_VIEW_CSS_DOCUMENT_DESCRIPTION"
name="css"
label="COM_COMPONENTBUILDER_SITE_VIEW_CSS_LABEL"
description="COM_COMPONENTBUILDER_SITE_VIEW_CSS_DESCRIPTION"
width="100%"
height="450px"
cols="15"
@ -545,25 +592,6 @@
multiple="false"
required="false"
/>
<!-- Css Field. Type: Editor. (joomla) -->
<field
type="editor"
name="css"
label="COM_COMPONENTBUILDER_SITE_VIEW_CSS_LABEL"
description="COM_COMPONENTBUILDER_SITE_VIEW_CSS_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="css"
editor="codemirror|none"
filter="raw"
required="true"
validate="code"
/>
<!-- Dynamic_values Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="dynamic_values" label="COM_COMPONENTBUILDER_SITE_VIEW_DYNAMIC_VALUES_LABEL" description="COM_COMPONENTBUILDER_SITE_VIEW_DYNAMIC_VALUES_DESCRIPTION" heading="h4" class="dynamic_values" />
<!-- Php_ajaxmethod Field. Type: Editor. (joomla) -->
<field
type="editor"
@ -581,6 +609,22 @@
required="true"
validate="code"
/>
<!-- Dynamic_values Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="dynamic_values" label="COM_COMPONENTBUILDER_SITE_VIEW_DYNAMIC_VALUES_LABEL" description="COM_COMPONENTBUILDER_SITE_VIEW_DYNAMIC_VALUES_DESCRIPTION" heading="h4" class="dynamic_values" />
<!-- Add_php_document Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_php_document"
label="COM_COMPONENTBUILDER_SITE_VIEW_ADD_PHP_DOCUMENT_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_SITE_VIEW_YES</option>
<option value="0">
COM_COMPONENTBUILDER_SITE_VIEW_NO</option>
</field>
<!-- Add_custom_button Field. Type: Radio. (joomla) -->
<field
type="radio"
@ -595,11 +639,11 @@
<option value="0">
COM_COMPONENTBUILDER_SITE_VIEW_NO</option>
</field>
<!-- Add_php_document Field. Type: Radio. (joomla) -->
<!-- Add_php_view Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_php_document"
label="COM_COMPONENTBUILDER_SITE_VIEW_ADD_PHP_DOCUMENT_LABEL"
name="add_php_view"
label="COM_COMPONENTBUILDER_SITE_VIEW_ADD_PHP_VIEW_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
@ -634,11 +678,11 @@
<option value="5">
COM_COMPONENTBUILDER_SITE_VIEW_CUSTOM</option>
</field>
<!-- Add_php_view Field. Type: Radio. (joomla) -->
<!-- Add_php_jview_display Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_php_view"
label="COM_COMPONENTBUILDER_SITE_VIEW_ADD_PHP_VIEW_LABEL"
name="add_php_jview_display"
label="COM_COMPONENTBUILDER_SITE_VIEW_ADD_PHP_JVIEW_DISPLAY_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
@ -650,11 +694,11 @@
</field>
<!-- Note_custom_toolbar_placeholder Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_custom_toolbar_placeholder" description="COM_COMPONENTBUILDER_SITE_VIEW_NOTE_CUSTOM_TOOLBAR_PLACEHOLDER_DESCRIPTION" heading="h4" class="note_custom_toolbar_placeholder" showon="button_position:5" />
<!-- Add_php_jview_display Field. Type: Radio. (joomla) -->
<!-- Add_php_jview Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_php_jview_display"
label="COM_COMPONENTBUILDER_SITE_VIEW_ADD_PHP_JVIEW_DISPLAY_LABEL"
name="add_php_jview"
label="COM_COMPONENTBUILDER_SITE_VIEW_ADD_PHP_JVIEW_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
@ -1173,20 +1217,8 @@
</field>
</form>
</field>
<!-- Add_php_jview Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_php_jview"
label="COM_COMPONENTBUILDER_SITE_VIEW_ADD_PHP_JVIEW_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_SITE_VIEW_YES</option>
<option value="0">
COM_COMPONENTBUILDER_SITE_VIEW_NO</option>
</field>
<!-- Note_linked_to_notice Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_linked_to_notice" label="COM_COMPONENTBUILDER_SITE_VIEW_NOTE_LINKED_TO_NOTICE_LABEL" description="COM_COMPONENTBUILDER_SITE_VIEW_NOTE_LINKED_TO_NOTICE_DESCRIPTION" heading="h4" class="note_linked_to_notice" />
<!-- Php_controller Field. Type: Editor. (joomla) -->
<field
type="editor"
@ -1204,25 +1236,6 @@
required="false"
validate="code"
/>
<!-- Note_linked_to_notice Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_linked_to_notice" label="COM_COMPONENTBUILDER_SITE_VIEW_NOTE_LINKED_TO_NOTICE_LABEL" description="COM_COMPONENTBUILDER_SITE_VIEW_NOTE_LINKED_TO_NOTICE_DESCRIPTION" heading="h4" class="note_linked_to_notice" />
<!-- Php_model Field. Type: Editor. (joomla) -->
<field
type="editor"
name="php_model"
label="COM_COMPONENTBUILDER_SITE_VIEW_PHP_MODEL_LABEL"
description="COM_COMPONENTBUILDER_SITE_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"
/>
</fieldset>
<!-- Access Control Fields. -->

View File

@ -101,19 +101,6 @@
message="COM_COMPONENTBUILDER_TEMPLATE_NAME_MESSAGE"
hint="COM_COMPONENTBUILDER_TEMPLATE_NAME_HINT"
/>
<!-- Alias Field. Type: Text. (joomla) -->
<field
type="text"
name="alias"
label="COM_COMPONENTBUILDER_TEMPLATE_ALIAS_LABEL"
size="40"
maxlength="50"
description="COM_COMPONENTBUILDER_TEMPLATE_ALIAS_DESCRIPTION"
class="text_area"
filter="CMD"
message="COM_COMPONENTBUILDER_TEMPLATE_ALIAS_MESSAGE"
hint="COM_COMPONENTBUILDER_TEMPLATE_ALIAS_HINT"
/>
<!-- Description Field. Type: Text. (joomla) -->
<field
type="text"
@ -130,13 +117,12 @@
message="COM_COMPONENTBUILDER_TEMPLATE_DESCRIPTION_MESSAGE"
hint="COM_COMPONENTBUILDER_TEMPLATE_DESCRIPTION_HINT"
/>
<!-- Snippet Field. Type: Snippets. (custom) -->
<!-- Dynamic_get Field. Type: Dynamicget. (custom) -->
<field
type="snippets"
name="snippet"
label="COM_COMPONENTBUILDER_TEMPLATE_SNIPPET_LABEL"
description="COM_COMPONENTBUILDER_TEMPLATE_SNIPPET_DESCRIPTION"
class="list_class"
type="dynamicget"
name="dynamic_get"
label="COM_COMPONENTBUILDER_TEMPLATE_DYNAMIC_GET_LABEL"
description="COM_COMPONENTBUILDER_TEMPLATE_DYNAMIC_GET_DESCRIPTION"
multiple="false"
required="false"
button="true"
@ -174,16 +160,6 @@
</field>
<!-- Dynamic_values Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="dynamic_values" label="COM_COMPONENTBUILDER_TEMPLATE_DYNAMIC_VALUES_LABEL" description="COM_COMPONENTBUILDER_TEMPLATE_DYNAMIC_VALUES_DESCRIPTION" heading="h4" class="dynamic_values" />
<!-- Dynamic_get Field. Type: Dynamicget. (custom) -->
<field
type="dynamicget"
name="dynamic_get"
label="COM_COMPONENTBUILDER_TEMPLATE_DYNAMIC_GET_LABEL"
description="COM_COMPONENTBUILDER_TEMPLATE_DYNAMIC_GET_DESCRIPTION"
multiple="false"
required="false"
button="true"
/>
<!-- Not_required Field. Type: Hidden. (joomla) -->
<field
type="hidden"
@ -209,6 +185,17 @@
/>
<!-- Note_snippet_usage Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_snippet_usage" label="COM_COMPONENTBUILDER_TEMPLATE_NOTE_SNIPPET_USAGE_LABEL" heading="h4" class="snippet-usage note_snippet_usage" />
<!-- Snippet Field. Type: Snippets. (custom) -->
<field
type="snippets"
name="snippet"
label="COM_COMPONENTBUILDER_TEMPLATE_SNIPPET_LABEL"
description="COM_COMPONENTBUILDER_TEMPLATE_SNIPPET_DESCRIPTION"
class="list_class"
multiple="false"
required="false"
button="true"
/>
<!-- Note_uikit_snippet Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_uikit_snippet" label="COM_COMPONENTBUILDER_TEMPLATE_NOTE_UIKIT_SNIPPET_LABEL" heading="h4" class="snippet-code note_uikit_snippet" />
<!-- Note_add_language_string Field. Type: Note. A None Database Field. (joomla) -->
@ -227,6 +214,19 @@
/>
<!-- Note_libraries_selection Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_libraries_selection" label="COM_COMPONENTBUILDER_TEMPLATE_NOTE_LIBRARIES_SELECTION_LABEL" description="COM_COMPONENTBUILDER_TEMPLATE_NOTE_LIBRARIES_SELECTION_DESCRIPTION" heading="h4" class="alert alert-info note_libraries_selection" />
<!-- Alias Field. Type: Text. (joomla) -->
<field
type="text"
name="alias"
label="COM_COMPONENTBUILDER_TEMPLATE_ALIAS_LABEL"
size="40"
maxlength="50"
description="COM_COMPONENTBUILDER_TEMPLATE_ALIAS_DESCRIPTION"
class="text_area"
filter="CMD"
message="COM_COMPONENTBUILDER_TEMPLATE_ALIAS_MESSAGE"
hint="COM_COMPONENTBUILDER_TEMPLATE_ALIAS_HINT"
/>
</fieldset>
<!-- Access Control Fields. -->

View File

@ -102,15 +102,18 @@ class ComponentbuilderModelHelp_document extends JModelAdmin
*
* @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)
{
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.help_document', 'help_document', array('control' => 'jform', 'load_data' => $loadData));
$form = $this->loadForm('com_componentbuilder.help_document', 'help_document', $options);
if (empty($form))
{

View File

@ -221,21 +221,6 @@ class ComponentbuilderModelHelp_documents extends JModelList
{
$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 . ')');
}
// Filter by search.
$search = $this->getState('filter.search');
if (!empty($search))
@ -307,12 +292,6 @@ class ComponentbuilderModelHelp_documents extends JModelList
// From the componentbuilder_help_document table
$query->from($db->quoteName('#__componentbuilder_help_document', 'a'));
$query->where('a.id IN (' . implode(',',$pks) . ')');
// Implement View Level Access
if (!$user->authorise('core.options', 'com_componentbuilder'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// Order the results by ordering
$query->order('a.ordering ASC');

View File

@ -765,7 +765,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
{
$oldID = (int) $item->id;
// first check if exist
if ($canmerge && $local = $this->getLocalItem($item, $table, 1))
if ($canmerge && ($local = $this->getLocalItem($item, $table, 1)) !== false)
{
// display more import info
if ($this->moreInfo)
@ -786,10 +786,10 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
// make sure we have the correct ID set
$item->id = $local->id;
// yes it is newer, lets update (or is being forced)
if ($canEdit && $id = $this->updateLocalItem($item, $table, $canState))
if ($canEdit && ($id = $this->updateLocalItem($item, $table, $canState)) !== false)
{
// we had success in
$this->newID[$table][$oldID] = (int) $id;
$this->newID[$table][$oldID] = (int) $local->id;
// display more import info
if ($this->moreInfo)
{
@ -812,7 +812,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
$this->newID[$table][$oldID] = (int) $local->id;
}
}
elseif ($canCreate && $id = $this->addLocalItem($item, $table))
elseif ($canCreate && ($id = $this->addLocalItem($item, $table)) !== false)
{
// not found in local db so add
$this->newID[$table][$oldID] = (int) $id;
@ -1025,9 +1025,9 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
if (isset($this->updateAfter['field']) && ComponentbuilderHelper::checkArray($this->updateAfter['field']))
{
// update repeatable
foreach ($this->updateAfter['field'] as $field)
foreach ($this->updateAfter['field'] as $field => $action)
{
if (isset($this->newID['field'][$field]))
if ('add' === $action && isset($this->newID['field'][$field]))
{
$field = $this->newID['field'][$field];
}
@ -1087,9 +1087,9 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
if (isset($this->updateAfter['adminview']) && ComponentbuilderHelper::checkArray($this->updateAfter['adminview']))
{
// update the addlinked_views
foreach ($this->updateAfter['adminview'] as $adminview)
foreach ($this->updateAfter['adminview'] as $adminview => $action)
{
if (isset($this->newID['admin_view'][(int) $adminview]))
if ('add' === $action && isset($this->newID['admin_view'][(int) $adminview]))
{
$adminview = $this->newID['admin_view'][(int) $adminview];
}
@ -1124,9 +1124,9 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
if (isset($this->updateAfter['joomla_component']) && ComponentbuilderHelper::checkArray($this->updateAfter['joomla_component']))
{
// update dashboard of the components
foreach ($this->updateAfter['joomla_component'] as $component)
foreach ($this->updateAfter['joomla_component'] as $component => $action)
{
if (isset($this->newID['joomla_component'][(int) $component]))
if ('add' === $action && isset($this->newID['joomla_component'][(int) $component]))
{
$component = $this->newID['joomla_component'][(int) $component];
}
@ -1173,11 +1173,11 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
if (isset($this->updateAfter['relations']) && ComponentbuilderHelper::checkArray($this->updateAfter['relations']))
{
// update repeatable
foreach ($this->updateAfter['relations'] as $relation)
foreach ($this->updateAfter['relations'] as $relation => $action)
{
// check if we must update this relation
$update = false;
if (isset($this->newID['admin_fields_relations'][$relation]))
if ('add' === $action && isset($this->newID['admin_fields_relations'][$relation]))
{
$relation = $this->newID['admin_fields_relations'][$relation];
}
@ -1577,7 +1577,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
// update multi field values
if ($this->checkMultiFields($item->fieldtype))
{
$this->updateAfter['field'][$item->id] = $item->id; // multi field
$this->updateAfter['field'][(int) $item->id] = $action; // multi field
}
}
elseif (!is_numeric($item->fieldtype) || $item->fieldtype == 0)
@ -1685,7 +1685,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
// update the addlinked_views
if (isset($item->addlinked_views) && ComponentbuilderHelper::checkJson($item->addlinked_views))
{
$this->updateAfter['adminview'][$item->id] = $item->id; // addlinked_views
$this->updateAfter['adminview'][(int) $item->id] = $action; // addlinked_views
}
elseif (isset($item->addlinked_views))
{
@ -1722,7 +1722,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
if (isset($item->dashboard_type) && 2 == $item->dashboard_type)
{
// update the custom dash ID
$this->updateAfter['joomla_component'][$item->id] = $item->id; // dashboard
$this->updateAfter['joomla_component'][(int) $item->id] = $action; // dashboard
}
// set the anchors getters
$getter = array('joomla_component' => $item->id);
@ -2208,7 +2208,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
'addrelations' => array('listfield' => 'field', 'joinfields' => 'field')
);
// special fix for custom code
$this->updateAfter['relations'][$item->id] = $item->id; // addrelations->set
$this->updateAfter['relations'][(int) $item->id] = $action; // addrelations->set
}
// update the repeatable fields
@ -2447,7 +2447,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
// update the item
if ($result = $this->_db->updateObject('#__componentbuilder_' . $type, $update, 'id'))
{
// return current ID
// return success
return $update->id;
}
}
@ -2716,7 +2716,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
}
}
// add hash target search
if (isset($item->hashtarget) && ComponentbuilderHelper::checkString($item->hashtarget))
elseif (isset($item->hashtarget) && ComponentbuilderHelper::checkString($item->hashtarget))
{
$getter[] = 'hashtarget';
// remove function name

View File

@ -285,15 +285,18 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
*
* @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)
{
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.joomla_component', 'joomla_component', array('control' => 'jform', 'load_data' => $loadData));
$form = $this->loadForm('com_componentbuilder.joomla_component', 'joomla_component', $options);
if (empty($form))
{

View File

@ -96,15 +96,18 @@ class ComponentbuilderModelLanguage extends JModelAdmin
*
* @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)
{
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.language', 'language', array('control' => 'jform', 'load_data' => $loadData));
$form = $this->loadForm('com_componentbuilder.language', 'language', $options);
if (empty($form))
{

View File

@ -141,15 +141,18 @@ class ComponentbuilderModelLanguage_translation extends JModelAdmin
*
* @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)
{
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.language_translation', 'language_translation', array('control' => 'jform', 'load_data' => $loadData));
$form = $this->loadForm('com_componentbuilder.language_translation', 'language_translation', $options);
if (empty($form))
{

View File

@ -147,15 +147,18 @@ class ComponentbuilderModelLayout extends JModelAdmin
*
* @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)
{
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.layout', 'layout', array('control' => 'jform', 'load_data' => $loadData));
$form = $this->loadForm('com_componentbuilder.layout', 'layout', $options);
if (empty($form))
{

View File

@ -28,9 +28,9 @@ class ComponentbuilderModelLayouts extends JModelList
'a.created_by','created_by',
'a.modified_by','modified_by',
'a.name','name',
'a.alias','alias',
'a.description','description',
'a.dynamic_get','dynamic_get'
'a.dynamic_get','dynamic_get',
'a.add_php_view','add_php_view'
);
}
@ -54,14 +54,14 @@ class ComponentbuilderModelLayouts extends JModelList
$name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name');
$this->setState('filter.name', $name);
$alias = $this->getUserStateFromRequest($this->context . '.filter.alias', 'filter_alias');
$this->setState('filter.alias', $alias);
$description = $this->getUserStateFromRequest($this->context . '.filter.description', 'filter_description');
$this->setState('filter.description', $description);
$dynamic_get = $this->getUserStateFromRequest($this->context . '.filter.dynamic_get', 'filter_dynamic_get');
$this->setState('filter.dynamic_get', $dynamic_get);
$this->setState('filter.dynamic_get', $dynamic_get);
$add_php_view = $this->getUserStateFromRequest($this->context . '.filter.add_php_view', 'filter_add_php_view');
$this->setState('filter.add_php_view', $add_php_view);
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
$this->setState('filter.sorting', $sorting);
@ -111,10 +111,44 @@ class ComponentbuilderModelLayouts extends JModelList
}
}
}
}
// set selection value to a translatable value
if (ComponentbuilderHelper::checkArray($items))
{
foreach ($items as $nr => &$item)
{
// convert add_php_view
$item->add_php_view = $this->selectionTranslation($item->add_php_view, 'add_php_view');
}
}
// return items
return $items;
}
/**
* Method to convert selection values to translatable string.
*
* @return translatable string
*/
public function selectionTranslation($value,$name)
{
// Array of add_php_view language strings
if ($name === 'add_php_view')
{
$add_php_viewArray = array(
1 => 'COM_COMPONENTBUILDER_LAYOUT_YES',
0 => 'COM_COMPONENTBUILDER_LAYOUT_NO'
);
// Now check if value is found in this array
if (isset($add_php_viewArray[$value]) && ComponentbuilderHelper::checkString($add_php_viewArray[$value]))
{
return $add_php_viewArray[$value];
}
}
return $value;
}
/**
@ -176,7 +210,7 @@ class ComponentbuilderModelLayouts extends JModelList
else
{
$search = $db->quote('%' . $db->escape($search) . '%');
$query->where('(a.name LIKE '.$search.' OR a.alias LIKE '.$search.' OR a.description LIKE '.$search.' OR a.dynamic_get LIKE '.$search.' OR g.name LIKE '.$search.')');
$query->where('(a.name LIKE '.$search.' OR a.description LIKE '.$search.' OR a.dynamic_get LIKE '.$search.' OR g.name LIKE '.$search.' OR a.alias LIKE '.$search.')');
}
}
@ -185,6 +219,11 @@ class ComponentbuilderModelLayouts extends JModelList
{
$query->where('a.dynamic_get = ' . $db->quote($db->escape($dynamic_get)));
}
// Filter by Add_php_view.
if ($add_php_view = $this->getState('filter.add_php_view'))
{
$query->where('a.add_php_view = ' . $db->quote($db->escape($add_php_view)));
}
// Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
@ -315,9 +354,9 @@ class ComponentbuilderModelLayouts extends JModelList
$id .= ':' . $this->getState('filter.created_by');
$id .= ':' . $this->getState('filter.modified_by');
$id .= ':' . $this->getState('filter.name');
$id .= ':' . $this->getState('filter.alias');
$id .= ':' . $this->getState('filter.description');
$id .= ':' . $this->getState('filter.dynamic_get');
$id .= ':' . $this->getState('filter.dynamic_get');
$id .= ':' . $this->getState('filter.add_php_view');
return parent::getStoreId($id);
}

View File

@ -149,15 +149,18 @@ class ComponentbuilderModelLibrary extends JModelAdmin
*
* @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)
{
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.library', 'library', array('control' => 'jform', 'load_data' => $loadData));
$form = $this->loadForm('com_componentbuilder.library', 'library', $options);
if (empty($form))
{

View File

@ -104,15 +104,18 @@ class ComponentbuilderModelLibrary_config extends JModelAdmin
*
* @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)
{
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.library_config', 'library_config', array('control' => 'jform', 'load_data' => $loadData));
$form = $this->loadForm('com_componentbuilder.library_config', 'library_config', $options);
if (empty($form))
{

View File

@ -136,15 +136,18 @@ class ComponentbuilderModelLibrary_files_folders_urls extends JModelAdmin
*
* @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)
{
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.library_files_folders_urls', 'library_files_folders_urls', array('control' => 'jform', 'load_data' => $loadData));
$form = $this->loadForm('com_componentbuilder.library_files_folders_urls', 'library_files_folders_urls', $options);
if (empty($form))
{

View File

@ -235,15 +235,18 @@ class ComponentbuilderModelServer extends JModelAdmin
*
* @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)
{
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.server', 'server', array('control' => 'jform', 'load_data' => $loadData));
$form = $this->loadForm('com_componentbuilder.server', 'server', $options);
if (empty($form))
{

View File

@ -92,10 +92,10 @@ class ComponentbuilderModelSite_view extends JModelAdmin
$item->php_document = base64_decode($item->php_document);
}
if (!empty($item->php_jview))
if (!empty($item->php_view))
{
// base64 Decode php_jview.
$item->php_jview = base64_decode($item->php_jview);
// base64 Decode php_view.
$item->php_view = base64_decode($item->php_view);
}
if (!empty($item->default))
@ -104,18 +104,24 @@ class ComponentbuilderModelSite_view extends JModelAdmin
$item->default = base64_decode($item->default);
}
if (!empty($item->php_view))
{
// base64 Decode php_view.
$item->php_view = base64_decode($item->php_view);
}
if (!empty($item->php_jview_display))
{
// base64 Decode php_jview_display.
$item->php_jview_display = base64_decode($item->php_jview_display);
}
if (!empty($item->php_jview))
{
// base64 Decode php_jview.
$item->php_jview = base64_decode($item->php_jview);
}
if (!empty($item->php_model))
{
// base64 Decode php_model.
$item->php_model = base64_decode($item->php_model);
}
if (!empty($item->javascript_file))
{
// base64 Decode javascript_file.
@ -152,10 +158,12 @@ class ComponentbuilderModelSite_view extends JModelAdmin
$item->php_controller = base64_decode($item->php_controller);
}
if (!empty($item->php_model))
if (!empty($item->custom_get))
{
// base64 Decode php_model.
$item->php_model = base64_decode($item->php_model);
// Convert the custom_get field to an array.
$custom_get = new Registry;
$custom_get->loadString($item->custom_get);
$item->custom_get = $custom_get->toArray();
}
if (!empty($item->ajax_input))
@ -174,14 +182,6 @@ class ComponentbuilderModelSite_view extends JModelAdmin
$item->libraries = $libraries->toArray();
}
if (!empty($item->custom_get))
{
// Convert the custom_get field to an array.
$custom_get = new Registry;
$custom_get->loadString($item->custom_get);
$item->custom_get = $custom_get->toArray();
}
if (!empty($item->custom_button))
{
// Convert the custom_button field to an array.
@ -270,15 +270,18 @@ class ComponentbuilderModelSite_view extends JModelAdmin
*
* @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)
{
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.site_view', 'site_view', array('control' => 'jform', 'load_data' => $loadData));
$form = $this->loadForm('com_componentbuilder.site_view', 'site_view', $options);
if (empty($form))
{
@ -994,6 +997,29 @@ class ComponentbuilderModelSite_view extends JModelAdmin
if (empty($data['system_name']) || !ComponentbuilderHelper::checkString($data['system_name']))
{
$data['system_name'] = $data['name'];
}
// if codename is empty create from name
if (empty($data['codename']) || !ComponentbuilderHelper::checkString($data['codename']))
{
$data['codename'] = ComponentbuilderHelper::safeString($data['name']);
}
// if context is empty create from codename
if (empty($data['context']) || !ComponentbuilderHelper::checkString($data['context']))
{
$data['context'] = $data['codename'];
}
// Set the custom_get items to data.
if (isset($data['custom_get']) && is_array($data['custom_get']))
{
$custom_get = new JRegistry;
$custom_get->loadArray($data['custom_get']);
$data['custom_get'] = (string) $custom_get;
}
elseif (!isset($data['custom_get']))
{
// Set the empty custom_get to data
$data['custom_get'] = '';
}
// Set the ajax_input items to data.
@ -1022,19 +1048,6 @@ class ComponentbuilderModelSite_view extends JModelAdmin
$data['libraries'] = '';
}
// Set the custom_get items to data.
if (isset($data['custom_get']) && is_array($data['custom_get']))
{
$custom_get = new JRegistry;
$custom_get->loadArray($data['custom_get']);
$data['custom_get'] = (string) $custom_get;
}
elseif (!isset($data['custom_get']))
{
// Set the empty custom_get to data
$data['custom_get'] = '';
}
// Set the custom_button items to data.
if (isset($data['custom_button']) && is_array($data['custom_button']))
{
@ -1054,10 +1067,10 @@ class ComponentbuilderModelSite_view extends JModelAdmin
$data['php_document'] = base64_encode($data['php_document']);
}
// Set the php_jview string to base64 string.
if (isset($data['php_jview']))
// Set the php_view string to base64 string.
if (isset($data['php_view']))
{
$data['php_jview'] = base64_encode($data['php_jview']);
$data['php_view'] = base64_encode($data['php_view']);
}
// Set the default string to base64 string.
@ -1066,18 +1079,24 @@ class ComponentbuilderModelSite_view extends JModelAdmin
$data['default'] = base64_encode($data['default']);
}
// Set the php_view string to base64 string.
if (isset($data['php_view']))
{
$data['php_view'] = base64_encode($data['php_view']);
}
// Set the php_jview_display string to base64 string.
if (isset($data['php_jview_display']))
{
$data['php_jview_display'] = base64_encode($data['php_jview_display']);
}
// Set the php_jview string to base64 string.
if (isset($data['php_jview']))
{
$data['php_jview'] = base64_encode($data['php_jview']);
}
// Set the php_model string to base64 string.
if (isset($data['php_model']))
{
$data['php_model'] = base64_encode($data['php_model']);
}
// Set the javascript_file string to base64 string.
if (isset($data['javascript_file']))
{
@ -1112,12 +1131,6 @@ class ComponentbuilderModelSite_view extends JModelAdmin
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 Params Items to data

View File

@ -29,8 +29,11 @@ class ComponentbuilderModelSite_views extends JModelList
'a.modified_by','modified_by',
'a.system_name','system_name',
'a.name','name',
'a.codename','codename',
'a.description','description'
'a.description','description',
'a.main_get','main_get',
'a.context','context',
'a.add_php_ajax','add_php_ajax',
'a.add_custom_button','add_custom_button'
);
}
@ -57,11 +60,20 @@ class ComponentbuilderModelSite_views extends JModelList
$name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name');
$this->setState('filter.name', $name);
$codename = $this->getUserStateFromRequest($this->context . '.filter.codename', 'filter_codename');
$this->setState('filter.codename', $codename);
$description = $this->getUserStateFromRequest($this->context . '.filter.description', 'filter_description');
$this->setState('filter.description', $description);
$this->setState('filter.description', $description);
$main_get = $this->getUserStateFromRequest($this->context . '.filter.main_get', 'filter_main_get');
$this->setState('filter.main_get', $main_get);
$context = $this->getUserStateFromRequest($this->context . '.filter.context', 'filter_context');
$this->setState('filter.context', $context);
$add_php_ajax = $this->getUserStateFromRequest($this->context . '.filter.add_php_ajax', 'filter_add_php_ajax');
$this->setState('filter.add_php_ajax', $add_php_ajax);
$add_custom_button = $this->getUserStateFromRequest($this->context . '.filter.add_custom_button', 'filter_add_custom_button');
$this->setState('filter.add_custom_button', $add_custom_button);
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
$this->setState('filter.sorting', $sorting);
@ -111,10 +123,59 @@ class ComponentbuilderModelSite_views extends JModelList
}
}
}
}
// set selection value to a translatable value
if (ComponentbuilderHelper::checkArray($items))
{
foreach ($items as $nr => &$item)
{
// convert add_php_ajax
$item->add_php_ajax = $this->selectionTranslation($item->add_php_ajax, 'add_php_ajax');
// convert add_custom_button
$item->add_custom_button = $this->selectionTranslation($item->add_custom_button, 'add_custom_button');
}
}
// return items
return $items;
}
/**
* Method to convert selection values to translatable string.
*
* @return translatable string
*/
public function selectionTranslation($value,$name)
{
// Array of add_php_ajax language strings
if ($name === 'add_php_ajax')
{
$add_php_ajaxArray = array(
1 => 'COM_COMPONENTBUILDER_SITE_VIEW_YES',
0 => 'COM_COMPONENTBUILDER_SITE_VIEW_NO'
);
// Now check if value is found in this array
if (isset($add_php_ajaxArray[$value]) && ComponentbuilderHelper::checkString($add_php_ajaxArray[$value]))
{
return $add_php_ajaxArray[$value];
}
}
// Array of add_custom_button language strings
if ($name === 'add_custom_button')
{
$add_custom_buttonArray = array(
1 => 'COM_COMPONENTBUILDER_SITE_VIEW_YES',
0 => 'COM_COMPONENTBUILDER_SITE_VIEW_NO'
);
// Now check if value is found in this array
if (isset($add_custom_buttonArray[$value]) && ComponentbuilderHelper::checkString($add_custom_buttonArray[$value]))
{
return $add_custom_buttonArray[$value];
}
}
return $value;
}
/**
@ -136,9 +197,9 @@ class ComponentbuilderModelSite_views extends JModelList
// From the componentbuilder_item table
$query->from($db->quoteName('#__componentbuilder_site_view', 'a'));
// From the componentbuilder_snippet table.
$query->select($db->quoteName('g.name','snippet_name'));
$query->join('LEFT', $db->quoteName('#__componentbuilder_snippet', 'g') . ' ON (' . $db->quoteName('a.snippet') . ' = ' . $db->quoteName('g.id') . ')');
// From the componentbuilder_dynamic_get table.
$query->select($db->quoteName('g.name','main_get_name'));
$query->join('LEFT', $db->quoteName('#__componentbuilder_dynamic_get', 'g') . ' ON (' . $db->quoteName('a.main_get') . ' = ' . $db->quoteName('g.id') . ')');
// Filter by published state
$published = $this->getState('filter.published');
@ -176,10 +237,25 @@ class ComponentbuilderModelSite_views extends JModelList
else
{
$search = $db->quote('%' . $db->escape($search) . '%');
$query->where('(a.system_name LIKE '.$search.' OR a.name LIKE '.$search.' OR a.codename LIKE '.$search.' OR a.description LIKE '.$search.')');
$query->where('(a.system_name LIKE '.$search.' OR a.name LIKE '.$search.' OR a.description LIKE '.$search.' OR a.main_get LIKE '.$search.' OR g.name LIKE '.$search.' OR a.context LIKE '.$search.' OR a.codename LIKE '.$search.')');
}
}
// Filter by main_get.
if ($main_get = $this->getState('filter.main_get'))
{
$query->where('a.main_get = ' . $db->quote($db->escape($main_get)));
}
// Filter by Add_php_ajax.
if ($add_php_ajax = $this->getState('filter.add_php_ajax'))
{
$query->where('a.add_php_ajax = ' . $db->quote($db->escape($add_php_ajax)));
}
// Filter by Add_custom_button.
if ($add_custom_button = $this->getState('filter.add_custom_button'))
{
$query->where('a.add_custom_button = ' . $db->quote($db->escape($add_custom_button)));
}
// Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
@ -247,14 +323,16 @@ class ComponentbuilderModelSite_views extends JModelList
// decode php_document
$item->php_document = base64_decode($item->php_document);
// decode php_jview
$item->php_jview = base64_decode($item->php_jview);
// decode default
$item->default = base64_decode($item->default);
// decode php_view
$item->php_view = base64_decode($item->php_view);
// decode default
$item->default = base64_decode($item->default);
// decode php_jview_display
$item->php_jview_display = base64_decode($item->php_jview_display);
// decode php_jview
$item->php_jview = base64_decode($item->php_jview);
// decode php_model
$item->php_model = base64_decode($item->php_model);
// decode javascript_file
$item->javascript_file = base64_decode($item->javascript_file);
// decode js_document
@ -267,8 +345,6 @@ class ComponentbuilderModelSite_views extends JModelList
$item->php_ajaxmethod = base64_decode($item->php_ajaxmethod);
// decode php_controller
$item->php_controller = base64_decode($item->php_controller);
// decode php_model
$item->php_model = base64_decode($item->php_model);
// unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);
@ -331,8 +407,11 @@ class ComponentbuilderModelSite_views extends JModelList
$id .= ':' . $this->getState('filter.modified_by');
$id .= ':' . $this->getState('filter.system_name');
$id .= ':' . $this->getState('filter.name');
$id .= ':' . $this->getState('filter.codename');
$id .= ':' . $this->getState('filter.description');
$id .= ':' . $this->getState('filter.description');
$id .= ':' . $this->getState('filter.main_get');
$id .= ':' . $this->getState('filter.context');
$id .= ':' . $this->getState('filter.add_php_ajax');
$id .= ':' . $this->getState('filter.add_custom_button');
return parent::getStoreId($id);
}

View File

@ -102,15 +102,18 @@ class ComponentbuilderModelSnippet extends JModelAdmin
*
* @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)
{
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.snippet', 'snippet', array('control' => 'jform', 'load_data' => $loadData));
$form = $this->loadForm('com_componentbuilder.snippet', 'snippet', $options);
if (empty($form))
{

View File

@ -96,15 +96,18 @@ class ComponentbuilderModelSnippet_type extends JModelAdmin
*
* @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)
{
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.snippet_type', 'snippet_type', array('control' => 'jform', 'load_data' => $loadData));
$form = $this->loadForm('com_componentbuilder.snippet_type', 'snippet_type', $options);
if (empty($form))
{

View File

@ -147,15 +147,18 @@ class ComponentbuilderModelTemplate extends JModelAdmin
*
* @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)
{
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.template', 'template', array('control' => 'jform', 'load_data' => $loadData));
$form = $this->loadForm('com_componentbuilder.template', 'template', $options);
if (empty($form))
{

View File

@ -28,8 +28,9 @@ class ComponentbuilderModelTemplates extends JModelList
'a.created_by','created_by',
'a.modified_by','modified_by',
'a.name','name',
'a.alias','alias',
'a.description','description'
'a.description','description',
'a.dynamic_get','dynamic_get',
'a.add_php_view','add_php_view'
);
}
@ -53,11 +54,14 @@ class ComponentbuilderModelTemplates extends JModelList
$name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name');
$this->setState('filter.name', $name);
$alias = $this->getUserStateFromRequest($this->context . '.filter.alias', 'filter_alias');
$this->setState('filter.alias', $alias);
$description = $this->getUserStateFromRequest($this->context . '.filter.description', 'filter_description');
$this->setState('filter.description', $description);
$this->setState('filter.description', $description);
$dynamic_get = $this->getUserStateFromRequest($this->context . '.filter.dynamic_get', 'filter_dynamic_get');
$this->setState('filter.dynamic_get', $dynamic_get);
$add_php_view = $this->getUserStateFromRequest($this->context . '.filter.add_php_view', 'filter_add_php_view');
$this->setState('filter.add_php_view', $add_php_view);
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
$this->setState('filter.sorting', $sorting);
@ -107,10 +111,44 @@ class ComponentbuilderModelTemplates extends JModelList
}
}
}
}
// set selection value to a translatable value
if (ComponentbuilderHelper::checkArray($items))
{
foreach ($items as $nr => &$item)
{
// convert add_php_view
$item->add_php_view = $this->selectionTranslation($item->add_php_view, 'add_php_view');
}
}
// return items
return $items;
}
/**
* Method to convert selection values to translatable string.
*
* @return translatable string
*/
public function selectionTranslation($value,$name)
{
// Array of add_php_view language strings
if ($name === 'add_php_view')
{
$add_php_viewArray = array(
1 => 'COM_COMPONENTBUILDER_TEMPLATE_YES',
0 => 'COM_COMPONENTBUILDER_TEMPLATE_NO'
);
// Now check if value is found in this array
if (isset($add_php_viewArray[$value]) && ComponentbuilderHelper::checkString($add_php_viewArray[$value]))
{
return $add_php_viewArray[$value];
}
}
return $value;
}
/**
@ -132,9 +170,9 @@ class ComponentbuilderModelTemplates extends JModelList
// From the componentbuilder_item table
$query->from($db->quoteName('#__componentbuilder_template', 'a'));
// From the componentbuilder_snippet table.
$query->select($db->quoteName('g.name','snippet_name'));
$query->join('LEFT', $db->quoteName('#__componentbuilder_snippet', 'g') . ' ON (' . $db->quoteName('a.snippet') . ' = ' . $db->quoteName('g.id') . ')');
// From the componentbuilder_dynamic_get table.
$query->select($db->quoteName('g.name','dynamic_get_name'));
$query->join('LEFT', $db->quoteName('#__componentbuilder_dynamic_get', 'g') . ' ON (' . $db->quoteName('a.dynamic_get') . ' = ' . $db->quoteName('g.id') . ')');
// Filter by published state
$published = $this->getState('filter.published');
@ -172,10 +210,20 @@ class ComponentbuilderModelTemplates extends JModelList
else
{
$search = $db->quote('%' . $db->escape($search) . '%');
$query->where('(a.name LIKE '.$search.' OR a.alias LIKE '.$search.' OR a.description LIKE '.$search.')');
$query->where('(a.name LIKE '.$search.' OR a.description LIKE '.$search.' OR a.dynamic_get LIKE '.$search.' OR g.name LIKE '.$search.' OR a.alias LIKE '.$search.')');
}
}
// Filter by dynamic_get.
if ($dynamic_get = $this->getState('filter.dynamic_get'))
{
$query->where('a.dynamic_get = ' . $db->quote($db->escape($dynamic_get)));
}
// Filter by Add_php_view.
if ($add_php_view = $this->getState('filter.add_php_view'))
{
$query->where('a.add_php_view = ' . $db->quote($db->escape($add_php_view)));
}
// Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
@ -306,8 +354,9 @@ class ComponentbuilderModelTemplates extends JModelList
$id .= ':' . $this->getState('filter.created_by');
$id .= ':' . $this->getState('filter.modified_by');
$id .= ':' . $this->getState('filter.name');
$id .= ':' . $this->getState('filter.alias');
$id .= ':' . $this->getState('filter.description');
$id .= ':' . $this->getState('filter.description');
$id .= ':' . $this->getState('filter.dynamic_get');
$id .= ':' . $this->getState('filter.add_php_view');
return parent::getStoreId($id);
}

View File

@ -133,15 +133,18 @@ class ComponentbuilderModelValidation_rule extends JModelAdmin
*
* @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)
{
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.validation_rule', 'validation_rule', array('control' => 'jform', 'load_data' => $loadData));
$form = $this->loadForm('com_componentbuilder.validation_rule', 'validation_rule', $options);
if (empty($form))
{