forked from joomla/Component-Builder
Improved the field builder around JCB, moved some xml function into the JCB helper class core
This commit is contained in:
parent
6a77d71095
commit
10fdac5d60
@ -126,11 +126,11 @@ Component Builder is mapped as a component in itself on my local development env
|
|||||||
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||||
+ *Name*: [Component Builder](http://joomlacomponentbuilder.com)
|
+ *Name*: [Component Builder](http://joomlacomponentbuilder.com)
|
||||||
+ *First Build*: 30th April, 2015
|
+ *First Build*: 30th April, 2015
|
||||||
+ *Last Build*: 3rd April, 2018
|
+ *Last Build*: 8th April, 2018
|
||||||
+ *Version*: 2.7.1
|
+ *Version*: 2.7.1
|
||||||
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
|
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
|
||||||
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
+ *Line count*: **188547**
|
+ *Line count*: **188942**
|
||||||
+ *Field count*: **1011**
|
+ *Field count*: **1011**
|
||||||
+ *File count*: **1197**
|
+ *File count*: **1197**
|
||||||
+ *Folder count*: **193**
|
+ *Folder count*: **193**
|
||||||
|
@ -126,11 +126,11 @@ Component Builder is mapped as a component in itself on my local development env
|
|||||||
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||||
+ *Name*: [Component Builder](http://joomlacomponentbuilder.com)
|
+ *Name*: [Component Builder](http://joomlacomponentbuilder.com)
|
||||||
+ *First Build*: 30th April, 2015
|
+ *First Build*: 30th April, 2015
|
||||||
+ *Last Build*: 3rd April, 2018
|
+ *Last Build*: 8th April, 2018
|
||||||
+ *Version*: 2.7.1
|
+ *Version*: 2.7.1
|
||||||
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
|
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
|
||||||
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
+ *Line count*: **188547**
|
+ *Line count*: **188942**
|
||||||
+ *Field count*: **1011**
|
+ *Field count*: **1011**
|
||||||
+ *File count*: **1197**
|
+ *File count*: **1197**
|
||||||
+ *Folder count*: **193**
|
+ *Folder count*: **193**
|
||||||
|
@ -110,6 +110,19 @@ abstract class ###Component###Helper
|
|||||||
###SUBMENU###
|
###SUBMENU###
|
||||||
}###HELPER_CREATEUSER### ###HELPER_UIKIT### ###HELPER_EXEL###
|
}###HELPER_CREATEUSER### ###HELPER_UIKIT### ###HELPER_EXEL###
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a Variable
|
||||||
|
*
|
||||||
|
* @param string $table The table from which to get the variable
|
||||||
|
* @param string $where The value where
|
||||||
|
* @param string $whereString The target/field string where/name
|
||||||
|
* @param string $what The return field
|
||||||
|
* @param string $operator The operator between $whereString/field and $where/value
|
||||||
|
* @param string $main The component in which the table is found
|
||||||
|
*
|
||||||
|
* @return mix string/int/float
|
||||||
|
*
|
||||||
|
*/
|
||||||
public static function getVar($table, $where = null, $whereString = 'user', $what = 'id', $operator = '=', $main = '###component###')
|
public static function getVar($table, $where = null, $whereString = 'user', $what = 'id', $operator = '=', $main = '###component###')
|
||||||
{
|
{
|
||||||
if(!$where)
|
if(!$where)
|
||||||
@ -150,6 +163,20 @@ abstract class ###Component###Helper
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get array of variables
|
||||||
|
*
|
||||||
|
* @param string $table The table from which to get the variables
|
||||||
|
* @param string $where The value where
|
||||||
|
* @param string $whereString The target/field string where/name
|
||||||
|
* @param string $what The return field
|
||||||
|
* @param string $operator The operator between $whereString/field and $where/value
|
||||||
|
* @param string $main The component in which the table is found
|
||||||
|
* @param bool $unique The switch to return a unique array
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*
|
||||||
|
*/
|
||||||
public static function getVars($table, $where = null, $whereString = 'user', $what = 'id', $operator = 'IN', $main = '###component###', $unique = true)
|
public static function getVars($table, $where = null, $whereString = 'user', $what = 'id', $operator = 'IN', $main = '###component###', $unique = true)
|
||||||
{
|
{
|
||||||
if(!$where)
|
if(!$where)
|
||||||
@ -618,28 +645,141 @@ abstract class ###Component###Helper
|
|||||||
return JAccess::getAssetRules(0);
|
return JAccess::getAssetRules(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* xmlAppend
|
||||||
|
*
|
||||||
|
* @param SimpleXMLElement $xml The XML element reference in which to inject a comment
|
||||||
|
* @param mixed $node A SimpleXMLElement node to append to the XML element reference, or a stdClass object containing a comment attribute to be injected before the XML node and a fieldXML attribute containing a SimpleXMLElement
|
||||||
|
*
|
||||||
|
* @return null
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function xmlAppend(&$xml, $node)
|
||||||
|
{
|
||||||
|
if (!$node)
|
||||||
|
{
|
||||||
|
// element was not returned
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
switch (get_class($node))
|
||||||
|
{
|
||||||
|
case 'stdClass':
|
||||||
|
if (property_exists($node, 'comment'))
|
||||||
|
{
|
||||||
|
self::xmlComment($xml, $node->comment);
|
||||||
|
}
|
||||||
|
if (property_exists($node, 'fieldXML'))
|
||||||
|
{
|
||||||
|
self::xmlAppend($xml, $node->fieldXML);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'SimpleXMLElement':
|
||||||
|
$domXML = dom_import_simplexml($xml);
|
||||||
|
$domNode = dom_import_simplexml($node);
|
||||||
|
$domXML->appendChild($domXML->ownerDocument->importNode($domNode, true));
|
||||||
|
$xml = simplexml_import_dom($domXML);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* xmlComment
|
||||||
|
*
|
||||||
|
* @param SimpleXMLElement $xml The XML element reference in which to inject a comment
|
||||||
|
* @param string $comment The comment to inject
|
||||||
|
*
|
||||||
|
* @return null
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function xmlComment(&$xml, $comment)
|
||||||
|
{
|
||||||
|
$domXML = dom_import_simplexml($xml);
|
||||||
|
$domComment = new DOMComment($comment);
|
||||||
|
$nodeTarget = $domXML->ownerDocument->importNode($domComment, true);
|
||||||
|
$domXML->appendChild($nodeTarget);
|
||||||
|
$xml = simplexml_import_dom($domXML);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* xmlAddAttributes
|
||||||
|
*
|
||||||
|
* @param SimpleXMLElement $xml The XML element reference in which to inject a comment
|
||||||
|
* @param array $attributes The attributes to apply to the XML element
|
||||||
|
*
|
||||||
|
* @return null
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function xmlAddAttributes(&$xml, $attributes = array())
|
||||||
|
{
|
||||||
|
foreach ($attributes as $key => $value)
|
||||||
|
{
|
||||||
|
$xml->addAttribute($key, $value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* xmlAddOptions
|
||||||
|
*
|
||||||
|
* @param SimpleXMLElement $xml The XML element reference in which to inject a comment
|
||||||
|
* @param array $options The options to apply to the XML element
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function xmlAddOptions(&$xml, $options = array())
|
||||||
|
{
|
||||||
|
foreach ($options as $key => $value)
|
||||||
|
{
|
||||||
|
$addOption = $xml->addChild('option');
|
||||||
|
$addOption->addAttribute('value', $key);
|
||||||
|
$addOption[] = $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render Bool Button
|
||||||
|
*
|
||||||
|
* @param array $args All the args for the button
|
||||||
|
* 0) name
|
||||||
|
* 1) additional (options class) // not used at this time
|
||||||
|
* 2) default
|
||||||
|
* 3) yes (name)
|
||||||
|
* 4) no (name)
|
||||||
|
*
|
||||||
|
* @return string The input html of the button
|
||||||
|
*
|
||||||
|
*/
|
||||||
public static function renderBoolButton()
|
public static function renderBoolButton()
|
||||||
{
|
{
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
|
// check if there is additional button class
|
||||||
|
$additional = isset($args[1]) ? (string) $args[1] : ''; // not used at this time
|
||||||
|
// start the xml
|
||||||
|
$buttonXML = new SimpleXMLElement('<field/>');
|
||||||
|
// button attributes
|
||||||
|
$buttonAttributes = array(
|
||||||
|
'type' => 'radio',
|
||||||
|
'name' => isset($args[0]) ? self::htmlEscape($args[0]) : 'bool_button',
|
||||||
|
'label' => isset($args[0]) ? self::safeString(self::htmlEscape($args[0]), 'Ww') : 'Bool Button', // not seen anyway
|
||||||
|
'class' => 'btn-group',
|
||||||
|
'filter' => 'INT',
|
||||||
|
'default' => isset($args[2]) ? (int) $args[2] : 0);
|
||||||
|
// load the haskey attributes
|
||||||
|
self::xmlAddAttributes($buttonXML, $buttonAttributes);
|
||||||
|
// set the button options
|
||||||
|
$buttonOptions = array(
|
||||||
|
'1' => isset($args[3]) ? self::htmlEscape($args[3]) : 'JYES',
|
||||||
|
'0' => isset($args[4]) ? self::htmlEscape($args[4]) : 'JNO');
|
||||||
|
// load the button options
|
||||||
|
self::xmlAddOptions($buttonXML, $buttonOptions);
|
||||||
|
|
||||||
// get the radio element
|
// get the radio element
|
||||||
$button = JFormHelper::loadFieldType('radio');
|
$button = JFormHelper::loadFieldType('radio');
|
||||||
|
|
||||||
// setup the properties
|
|
||||||
$name = self::htmlEscape($args[0]);
|
|
||||||
$additional = isset($args[1]) ? (string) $args[1] : '';
|
|
||||||
$value = $args[2];
|
|
||||||
$yes = isset($args[3]) ? self::htmlEscape($args[3]) : 'JYES';
|
|
||||||
$no = isset($args[4]) ? self::htmlEscape($args[4]) : 'JNO';
|
|
||||||
|
|
||||||
// prepare the xml
|
|
||||||
$element = new SimpleXMLElement('<field name="'.$name.'" type="radio" class="btn-group"><option '.$additional.' value="0">'.$no.'</option><option '.$additional.' value="1">'.$yes.'</option></field>');
|
|
||||||
|
|
||||||
// run
|
// run
|
||||||
$button->setup($element, $value);
|
$button->setup($buttonXML, $buttonAttributes['default']);
|
||||||
|
|
||||||
return $button->input;
|
return $button->input;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -291,30 +291,156 @@ abstract class ###Component###Helper
|
|||||||
return JAccess::getAssetRules(0);
|
return JAccess::getAssetRules(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* xmlAppend
|
||||||
|
*
|
||||||
|
* @param SimpleXMLElement $xml The XML element reference in which to inject a comment
|
||||||
|
* @param mixed $node A SimpleXMLElement node to append to the XML element reference, or a stdClass object containing a comment attribute to be injected before the XML node and a fieldXML attribute containing a SimpleXMLElement
|
||||||
|
*
|
||||||
|
* @return null
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function xmlAppend(&$xml, $node)
|
||||||
|
{
|
||||||
|
if (!$node)
|
||||||
|
{
|
||||||
|
// element was not returned
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
switch (get_class($node))
|
||||||
|
{
|
||||||
|
case 'stdClass':
|
||||||
|
if (property_exists($node, 'comment'))
|
||||||
|
{
|
||||||
|
self::xmlComment($xml, $node->comment);
|
||||||
|
}
|
||||||
|
if (property_exists($node, 'fieldXML'))
|
||||||
|
{
|
||||||
|
self::xmlAppend($xml, $node->fieldXML);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'SimpleXMLElement':
|
||||||
|
$domXML = dom_import_simplexml($xml);
|
||||||
|
$domNode = dom_import_simplexml($node);
|
||||||
|
$domXML->appendChild($domXML->ownerDocument->importNode($domNode, true));
|
||||||
|
$xml = simplexml_import_dom($domXML);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* xmlComment
|
||||||
|
*
|
||||||
|
* @param SimpleXMLElement $xml The XML element reference in which to inject a comment
|
||||||
|
* @param string $comment The comment to inject
|
||||||
|
*
|
||||||
|
* @return null
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function xmlComment(&$xml, $comment)
|
||||||
|
{
|
||||||
|
$domXML = dom_import_simplexml($xml);
|
||||||
|
$domComment = new DOMComment($comment);
|
||||||
|
$nodeTarget = $domXML->ownerDocument->importNode($domComment, true);
|
||||||
|
$domXML->appendChild($nodeTarget);
|
||||||
|
$xml = simplexml_import_dom($domXML);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* xmlAddAttributes
|
||||||
|
*
|
||||||
|
* @param SimpleXMLElement $xml The XML element reference in which to inject a comment
|
||||||
|
* @param array $attributes The attributes to apply to the XML element
|
||||||
|
*
|
||||||
|
* @return null
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function xmlAddAttributes(&$xml, $attributes = array())
|
||||||
|
{
|
||||||
|
foreach ($attributes as $key => $value)
|
||||||
|
{
|
||||||
|
$xml->addAttribute($key, $value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* xmlAddOptions
|
||||||
|
*
|
||||||
|
* @param SimpleXMLElement $xml The XML element reference in which to inject a comment
|
||||||
|
* @param array $options The options to apply to the XML element
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function xmlAddOptions(&$xml, $options = array())
|
||||||
|
{
|
||||||
|
foreach ($options as $key => $value)
|
||||||
|
{
|
||||||
|
$addOption = $xml->addChild('option');
|
||||||
|
$addOption->addAttribute('value', $key);
|
||||||
|
$addOption[] = $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render Bool Button
|
||||||
|
*
|
||||||
|
* @param array $args All the args for the button
|
||||||
|
* 0) name
|
||||||
|
* 1) additional (options class) // not used at this time
|
||||||
|
* 2) default
|
||||||
|
* 3) yes (name)
|
||||||
|
* 4) no (name)
|
||||||
|
*
|
||||||
|
* @return string The input html of the button
|
||||||
|
*
|
||||||
|
*/
|
||||||
public static function renderBoolButton()
|
public static function renderBoolButton()
|
||||||
{
|
{
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
|
// check if there is additional button class
|
||||||
|
$additional = isset($args[1]) ? (string) $args[1] : ''; // not used at this time
|
||||||
|
// start the xml
|
||||||
|
$buttonXML = new SimpleXMLElement('<field/>');
|
||||||
|
// button attributes
|
||||||
|
$buttonAttributes = array(
|
||||||
|
'type' => 'radio',
|
||||||
|
'name' => isset($args[0]) ? self::htmlEscape($args[0]) : 'bool_button',
|
||||||
|
'label' => isset($args[0]) ? self::safeString(self::htmlEscape($args[0]), 'Ww') : 'Bool Button', // not seen anyway
|
||||||
|
'class' => 'btn-group',
|
||||||
|
'filter' => 'INT',
|
||||||
|
'default' => isset($args[2]) ? (int) $args[2] : 0);
|
||||||
|
// load the haskey attributes
|
||||||
|
self::xmlAddAttributes($buttonXML, $buttonAttributes);
|
||||||
|
// set the button options
|
||||||
|
$buttonOptions = array(
|
||||||
|
'1' => isset($args[3]) ? self::htmlEscape($args[3]) : 'JYES',
|
||||||
|
'0' => isset($args[4]) ? self::htmlEscape($args[4]) : 'JNO');
|
||||||
|
// load the button options
|
||||||
|
self::xmlAddOptions($buttonXML, $buttonOptions);
|
||||||
|
|
||||||
// get the radio element
|
// get the radio element
|
||||||
$button = JFormHelper::loadFieldType('radio');
|
$button = JFormHelper::loadFieldType('radio');
|
||||||
|
|
||||||
// setup the properties
|
|
||||||
$name = self::htmlEscape($args[0]);
|
|
||||||
$additional = isset($args[1]) ? (string) $args[1] : '';
|
|
||||||
$value = $args[2];
|
|
||||||
$yes = isset($args[3]) ? self::htmlEscape($args[3]) : 'JYES';
|
|
||||||
$no = isset($args[4]) ? self::htmlEscape($args[4]) : 'JNO';
|
|
||||||
|
|
||||||
// prepare the xml
|
|
||||||
$element = new SimpleXMLElement('<field name="'.$name.'" type="radio" class="btn-group"><option '.$additional.' value="0">'.$no.'</option><option '.$additional.' value="1">'.$yes.'</option></field>');
|
|
||||||
|
|
||||||
// run
|
// run
|
||||||
$button->setup($element, $value);
|
$button->setup($buttonXML, $buttonAttributes['default']);
|
||||||
|
|
||||||
return $button->input;
|
return $button->input;
|
||||||
|
|
||||||
}###HELPER_UIKIT### ###HELPER_CREATEUSER###
|
}###HELPER_UIKIT### ###HELPER_CREATEUSER###
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a variable
|
||||||
|
*
|
||||||
|
* @param string $table The table from which to get the variable
|
||||||
|
* @param string $where The value where
|
||||||
|
* @param string $whereString The target/field string where/name
|
||||||
|
* @param string $what The return field
|
||||||
|
* @param string $operator The operator between $whereString/field and $where/value
|
||||||
|
* @param string $main The component in which the table is found
|
||||||
|
*
|
||||||
|
* @return mix string/int/float
|
||||||
|
*
|
||||||
|
*/
|
||||||
public static function getVar($table, $where = null, $whereString = 'user', $what = 'id', $operator = '=', $main = '###component###')
|
public static function getVar($table, $where = null, $whereString = 'user', $what = 'id', $operator = '=', $main = '###component###')
|
||||||
{
|
{
|
||||||
if(!$where)
|
if(!$where)
|
||||||
@ -355,6 +481,20 @@ abstract class ###Component###Helper
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get array of variables
|
||||||
|
*
|
||||||
|
* @param string $table The table from which to get the variables
|
||||||
|
* @param string $where The value where
|
||||||
|
* @param string $whereString The target/field string where/name
|
||||||
|
* @param string $what The return field
|
||||||
|
* @param string $operator The operator between $whereString/field and $where/value
|
||||||
|
* @param string $main The component in which the table is found
|
||||||
|
* @param bool $unique The switch to return a unique array
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*
|
||||||
|
*/
|
||||||
public static function getVars($table, $where = null, $whereString = 'user', $what = 'id', $operator = 'IN', $main = '###component###', $unique = true)
|
public static function getVars($table, $where = null, $whereString = 'user', $what = 'id', $operator = 'IN', $main = '###component###', $unique = true)
|
||||||
{
|
{
|
||||||
if(!$where)
|
if(!$where)
|
||||||
|
@ -250,7 +250,8 @@ class Get
|
|||||||
'Joomla' . '.JText._(',
|
'Joomla' . '.JText._(',
|
||||||
'JText:' . ':script(',
|
'JText:' . ':script(',
|
||||||
'JText:' . ':_(',
|
'JText:' . ':_(',
|
||||||
'JText:' . ':sprintf('
|
'JText:' . ':sprintf(',
|
||||||
|
'JustTEXT:' . ':_('
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -3591,11 +3592,17 @@ class Get
|
|||||||
{
|
{
|
||||||
// insure string is not broken
|
// insure string is not broken
|
||||||
$content = str_replace('COM_###COMPONENT###', $this->langPrefix, $content);
|
$content = str_replace('COM_###COMPONENT###', $this->langPrefix, $content);
|
||||||
// first get the Joomla.JText._()
|
// reset some buckets
|
||||||
|
$langHolders = array();
|
||||||
|
$langCheck = array();
|
||||||
|
$langOnly = array();
|
||||||
|
$jsTEXT = array();
|
||||||
|
$scTEXT = array();
|
||||||
|
// first get the Joomla .JText._()
|
||||||
if (in_array('Joomla' . '.JText._(', $langStringTargets))
|
if (in_array('Joomla' . '.JText._(', $langStringTargets))
|
||||||
{
|
{
|
||||||
$jsTEXT[] = ComponentbuilderHelper::getAllBetween($content, "Joomla" . ".JText._('", "'");
|
$jsTEXT[] = ComponentbuilderHelper::getAllBetween($content, "Joomla" . ".JText._('", "'");
|
||||||
$jsTEXT[] = ComponentbuilderHelper::getAllBetween($content, 'Joomla.' . 'JText._("', '"');
|
$jsTEXT[] = ComponentbuilderHelper::getAllBetween($content, 'Joomla' . '.JText._("', '"');
|
||||||
// combine into one array
|
// combine into one array
|
||||||
$jsTEXT = ComponentbuilderHelper::mergeArrays($jsTEXT);
|
$jsTEXT = ComponentbuilderHelper::mergeArrays($jsTEXT);
|
||||||
// we need to add a check to insure these JavaScript lang matchup
|
// we need to add a check to insure these JavaScript lang matchup
|
||||||
@ -3621,50 +3628,89 @@ class Get
|
|||||||
$this->langMatch = ComponentbuilderHelper::mergeArrays(array($scTEXT, $this->langMatch));
|
$this->langMatch = ComponentbuilderHelper::mergeArrays(array($scTEXT, $this->langMatch));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// now do the little trick for JustTEXT: :_('Just uppercase text');
|
||||||
|
if (in_array('JustTEXT:' . ':_(', $langStringTargets))
|
||||||
|
{
|
||||||
|
$langOnly[] = ComponentbuilderHelper::getAllBetween($content, "JustTEXT:" . ":_('", "')");
|
||||||
|
$langOnly[] = ComponentbuilderHelper::getAllBetween($content, 'JustTEXT:' . ':_("', '")');
|
||||||
|
}
|
||||||
// set language data
|
// set language data
|
||||||
foreach ($langStringTargets as $langStringTarget)
|
foreach ($langStringTargets as $langStringTarget)
|
||||||
{
|
{
|
||||||
// need some special treatment here
|
// need some special treatment here
|
||||||
if ($langStringTarget === 'Joomla' . '.JText._(' || $langStringTarget === 'JText:' . ':script(')
|
if ($langStringTarget === 'Joomla' . '.JText._(' ||
|
||||||
|
$langStringTarget === 'JText:' . ':script(' ||
|
||||||
|
$langStringTarget === 'JustTEXT:' . ':_(')
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$langCheck[] = ComponentbuilderHelper::getAllBetween($content, $langStringTarget . "'", "'");
|
$langCheck[] = ComponentbuilderHelper::getAllBetween($content, $langStringTarget . "'", "'");
|
||||||
$langCheck[] = ComponentbuilderHelper::getAllBetween($content, $langStringTarget . '"', '"');
|
$langCheck[] = ComponentbuilderHelper::getAllBetween($content, $langStringTarget . '"', '"');
|
||||||
}
|
}
|
||||||
$langArray = ComponentbuilderHelper::mergeArrays($langCheck);
|
// the normal loading of the language strings
|
||||||
if (ComponentbuilderHelper::checkArray($langArray)) //<-- not really needed hmmm
|
$langCheck = ComponentbuilderHelper::mergeArrays($langCheck);
|
||||||
|
if (ComponentbuilderHelper::checkArray($langCheck)) //<-- not really needed hmmm
|
||||||
{
|
{
|
||||||
foreach ($langArray as $string)
|
foreach ($langCheck as $string)
|
||||||
{
|
{
|
||||||
// this is there to insure we dont break already added Language strings
|
if ($keyLang = $this->setLang($string))
|
||||||
if (ComponentbuilderHelper::safeString($string, 'U') === $string)
|
|
||||||
{
|
{
|
||||||
continue;
|
// load the language targets
|
||||||
}
|
foreach ($langStringTargets as $langStringTarget)
|
||||||
// only load if string is not already set
|
{
|
||||||
$keyLang = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($string, 'U');
|
$langHolders[$langStringTarget . "'" . $string . "'"] = $langStringTarget . "'" . $keyLang . "'";
|
||||||
if (!isset($this->langContent[$this->lang][$keyLang]))
|
$langHolders[$langStringTarget . '"' . $string . '"'] = $langStringTarget . '"' . $keyLang . '"';
|
||||||
{
|
}
|
||||||
$this->langContent[$this->lang][$keyLang] = trim($string);
|
|
||||||
}
|
|
||||||
// load the language targets
|
|
||||||
foreach ($langStringTargets as $langStringTarget)
|
|
||||||
{
|
|
||||||
$langHolders[$langStringTarget . "'" . $string . "'"] = $langStringTarget . "'" . $keyLang . "'";
|
|
||||||
$langHolders[$langStringTarget . '"' . $string . '"'] = $langStringTarget . '"' . $keyLang . '"';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// only continue if we have value to replace
|
}
|
||||||
if (isset($langHolders) && ComponentbuilderHelper::checkArray($langHolders))
|
// the uppercase loading only (for arrays and other tricks)
|
||||||
|
if (ComponentbuilderHelper::checkArray($langOnly))
|
||||||
|
{
|
||||||
|
$langOnly = ComponentbuilderHelper::mergeArrays($langOnly);
|
||||||
|
foreach ($langOnly as $string)
|
||||||
{
|
{
|
||||||
$content = $this->setPlaceholders($content, $langHolders);
|
if ($keyLang = $this->setLang($string))
|
||||||
|
{
|
||||||
|
// load the language targets
|
||||||
|
$langHolders["JustTEXT:" . ":_('" . $string . "')"] = "'" . $keyLang . "'";
|
||||||
|
$langHolders['JustTEXT:' . ':_("' . $string . '")'] = '"' . $keyLang . '"';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// only continue if we have value to replace
|
||||||
|
if (ComponentbuilderHelper::checkArray($langHolders))
|
||||||
|
{
|
||||||
|
$content = $this->setPlaceholders($content, $langHolders);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return $content;
|
return $content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the language String
|
||||||
|
*
|
||||||
|
* @param string $string The plan text string (English)
|
||||||
|
*
|
||||||
|
* @return string The key language string (all uppercase)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function setLang($string)
|
||||||
|
{
|
||||||
|
// this is there to insure we dont break already added Language strings
|
||||||
|
if (ComponentbuilderHelper::safeString($string, 'U') === $string)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// only load if string is not already set
|
||||||
|
$keyLang = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($string, 'U');
|
||||||
|
if (!isset($this->langContent[$this->lang][$keyLang]))
|
||||||
|
{
|
||||||
|
$this->langContent[$this->lang][$keyLang] = trim($string);
|
||||||
|
}
|
||||||
|
return $keyLang;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set Data Selection of the dynamic get
|
* Set Data Selection of the dynamic get
|
||||||
*
|
*
|
||||||
|
@ -1369,6 +1369,8 @@ class Structure extends Get
|
|||||||
// set new file to object
|
// set new file to object
|
||||||
$versionData->move->static->$key_pointer = new stdClass();
|
$versionData->move->static->$key_pointer = new stdClass();
|
||||||
$versionData->move->static->$key_pointer->naam = $custom['file'];
|
$versionData->move->static->$key_pointer->naam = $custom['file'];
|
||||||
|
// update the dynamic component name placholders in file names
|
||||||
|
$custom['path'] = $this->setPlaceholders($custom['path'], $this->placeholders);
|
||||||
// get the path info
|
// get the path info
|
||||||
$pathInfo = pathinfo($custom['path']);
|
$pathInfo = pathinfo($custom['path']);
|
||||||
if (isset($pathInfo['extension']) && $pathInfo['extension'])
|
if (isset($pathInfo['extension']) && $pathInfo['extension'])
|
||||||
|
@ -755,8 +755,8 @@ class Fields extends Structure
|
|||||||
$XML = new simpleXMLElement('<a/>');
|
$XML = new simpleXMLElement('<a/>');
|
||||||
$fieldSetXML = $XML->addChild('fieldset');
|
$fieldSetXML = $XML->addChild('fieldset');
|
||||||
$fieldSetXML->addAttribute('name', 'details');
|
$fieldSetXML->addAttribute('name', 'details');
|
||||||
$this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Default Fields.");
|
ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Default Fields.");
|
||||||
$this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Id Field. Type: Text (joomla)");
|
ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Id Field. Type: Text (joomla)");
|
||||||
// if id is not set
|
// if id is not set
|
||||||
if (!isset($this->fieldsNames[$view_name_single]['id']))
|
if (!isset($this->fieldsNames[$view_name_single]['id']))
|
||||||
{
|
{
|
||||||
@ -770,7 +770,7 @@ class Fields extends Structure
|
|||||||
'default' => 0
|
'default' => 0
|
||||||
);
|
);
|
||||||
$fieldXML = $fieldSetXML->addChild('field');
|
$fieldXML = $fieldSetXML->addChild('field');
|
||||||
$this->xmlAddAttributes($fieldXML, $attributes);
|
ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes);
|
||||||
// count the static field created
|
// count the static field created
|
||||||
$this->fieldCount++;
|
$this->fieldCount++;
|
||||||
}
|
}
|
||||||
@ -787,9 +787,9 @@ class Fields extends Structure
|
|||||||
'filter' => 'user_utc'
|
'filter' => 'user_utc'
|
||||||
);
|
);
|
||||||
$attributes = array_merge($attributes, $readOnlyXML);
|
$attributes = array_merge($attributes, $readOnlyXML);
|
||||||
$this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Date Created Field. Type: Calendar (joomla)");
|
ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Date Created Field. Type: Calendar (joomla)");
|
||||||
$fieldXML = $fieldSetXML->addChild('field');
|
$fieldXML = $fieldSetXML->addChild('field');
|
||||||
$this->xmlAddAttributes($fieldXML, $attributes);
|
ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes);
|
||||||
// count the static field created
|
// count the static field created
|
||||||
$this->fieldCount++;
|
$this->fieldCount++;
|
||||||
}
|
}
|
||||||
@ -803,9 +803,9 @@ class Fields extends Structure
|
|||||||
'description' => $langView . '_CREATED_BY_DESC',
|
'description' => $langView . '_CREATED_BY_DESC',
|
||||||
);
|
);
|
||||||
$attributes = array_merge($attributes, $readOnlyXML);
|
$attributes = array_merge($attributes, $readOnlyXML);
|
||||||
$this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " User Created Field. Type: User (joomla)");
|
ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " User Created Field. Type: User (joomla)");
|
||||||
$fieldXML = $fieldSetXML->addChild('field');
|
$fieldXML = $fieldSetXML->addChild('field');
|
||||||
$this->xmlAddAttributes($fieldXML, $attributes);
|
ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes);
|
||||||
// count the static field created
|
// count the static field created
|
||||||
$this->fieldCount++;
|
$this->fieldCount++;
|
||||||
}
|
}
|
||||||
@ -818,9 +818,9 @@ class Fields extends Structure
|
|||||||
'label' => 'JSTATUS'
|
'label' => 'JSTATUS'
|
||||||
);
|
);
|
||||||
$attributes = array_merge($attributes, $readOnlyXML);
|
$attributes = array_merge($attributes, $readOnlyXML);
|
||||||
$this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Published Field. Type: List (joomla)");
|
ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Published Field. Type: List (joomla)");
|
||||||
$fieldXML = $fieldSetXML->addChild('field');
|
$fieldXML = $fieldSetXML->addChild('field');
|
||||||
$this->xmlAddAttributes($fieldXML, $attributes);
|
ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes);
|
||||||
// count the static field created
|
// count the static field created
|
||||||
$this->fieldCount++;
|
$this->fieldCount++;
|
||||||
foreach (array('JPUBLISHED' => 1, 'JUNPUBLISHED' => 0, 'JARCHIVED' => 2, 'JTRASHED' => -2) as $text => $value)
|
foreach (array('JPUBLISHED' => 1, 'JUNPUBLISHED' => 0, 'JARCHIVED' => 2, 'JTRASHED' => -2) as $text => $value)
|
||||||
@ -844,9 +844,9 @@ class Fields extends Structure
|
|||||||
'format' => '%Y-%m-%d %H:%M:%S',
|
'format' => '%Y-%m-%d %H:%M:%S',
|
||||||
'filter' => 'user_utc'
|
'filter' => 'user_utc'
|
||||||
);
|
);
|
||||||
$this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Date Modified Field. Type: Calendar (joomla)");
|
ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Date Modified Field. Type: Calendar (joomla)");
|
||||||
$fieldXML = $fieldSetXML->addChild('field');
|
$fieldXML = $fieldSetXML->addChild('field');
|
||||||
$this->xmlAddAttributes($fieldXML, $attributes);
|
ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes);
|
||||||
// count the static field created
|
// count the static field created
|
||||||
$this->fieldCount++;
|
$this->fieldCount++;
|
||||||
}
|
}
|
||||||
@ -862,9 +862,9 @@ class Fields extends Structure
|
|||||||
'readonly' => 'true',
|
'readonly' => 'true',
|
||||||
'filter' => 'unset'
|
'filter' => 'unset'
|
||||||
);
|
);
|
||||||
$this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " User Modified Field. Type: User (joomla)");
|
ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " User Modified Field. Type: User (joomla)");
|
||||||
$fieldXML = $fieldSetXML->addChild('field');
|
$fieldXML = $fieldSetXML->addChild('field');
|
||||||
$this->xmlAddAttributes($fieldXML, $attributes);
|
ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes);
|
||||||
// count the static field created
|
// count the static field created
|
||||||
$this->fieldCount++;
|
$this->fieldCount++;
|
||||||
}
|
}
|
||||||
@ -880,9 +880,9 @@ class Fields extends Structure
|
|||||||
'required' => "false"
|
'required' => "false"
|
||||||
);
|
);
|
||||||
$attributes = array_merge($attributes, $readOnlyXML);
|
$attributes = array_merge($attributes, $readOnlyXML);
|
||||||
$this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Access Field. Type: Accesslevel (joomla)");
|
ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Access Field. Type: Accesslevel (joomla)");
|
||||||
$fieldXML = $fieldSetXML->addChild('field');
|
$fieldXML = $fieldSetXML->addChild('field');
|
||||||
$this->xmlAddAttributes($fieldXML, $attributes);
|
ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes);
|
||||||
// count the static field created
|
// count the static field created
|
||||||
$this->fieldCount++;
|
$this->fieldCount++;
|
||||||
}
|
}
|
||||||
@ -900,9 +900,9 @@ class Fields extends Structure
|
|||||||
'required' => "false"
|
'required' => "false"
|
||||||
);
|
);
|
||||||
$attributes = array_merge($attributes, $readOnlyXML);
|
$attributes = array_merge($attributes, $readOnlyXML);
|
||||||
$this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Ordering Field. Type: Numbers (joomla)");
|
ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Ordering Field. Type: Numbers (joomla)");
|
||||||
$fieldXML = $fieldSetXML->addChild('field');
|
$fieldXML = $fieldSetXML->addChild('field');
|
||||||
$this->xmlAddAttributes($fieldXML, $attributes);
|
ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes);
|
||||||
// count the static field created
|
// count the static field created
|
||||||
$this->fieldCount++;
|
$this->fieldCount++;
|
||||||
}
|
}
|
||||||
@ -919,9 +919,9 @@ class Fields extends Structure
|
|||||||
'readonly' => "true",
|
'readonly' => "true",
|
||||||
'filter' => 'unset'
|
'filter' => 'unset'
|
||||||
);
|
);
|
||||||
$this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Version Field. Type: Text (joomla)");
|
ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Version Field. Type: Text (joomla)");
|
||||||
$fieldXML = $fieldSetXML->addChild('field');
|
$fieldXML = $fieldSetXML->addChild('field');
|
||||||
$this->xmlAddAttributes($fieldXML, $attributes);
|
ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes);
|
||||||
// count the static field created
|
// count the static field created
|
||||||
$this->fieldCount++;
|
$this->fieldCount++;
|
||||||
}
|
}
|
||||||
@ -937,34 +937,34 @@ class Fields extends Structure
|
|||||||
'rows' => 3,
|
'rows' => 3,
|
||||||
'cols' => 30
|
'cols' => 30
|
||||||
);
|
);
|
||||||
$this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Metakey Field. Type: Textarea (joomla)");
|
ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Metakey Field. Type: Textarea (joomla)");
|
||||||
$fieldXML = $fieldSetXML->addChild('field');
|
$fieldXML = $fieldSetXML->addChild('field');
|
||||||
$this->xmlAddAttributes($fieldXML, $attributes);
|
ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes);
|
||||||
// count the static field created
|
// count the static field created
|
||||||
$this->fieldCount++;
|
$this->fieldCount++;
|
||||||
// metadesc
|
// metadesc
|
||||||
$attributes['name'] = 'metadesc';
|
$attributes['name'] = 'metadesc';
|
||||||
$attributes['label'] = 'JFIELD_META_DESCRIPTION_LABEL';
|
$attributes['label'] = 'JFIELD_META_DESCRIPTION_LABEL';
|
||||||
$attributes['description'] = 'JFIELD_META_DESCRIPTION_DESC';
|
$attributes['description'] = 'JFIELD_META_DESCRIPTION_DESC';
|
||||||
$this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Metadesc Field. Type: Textarea (joomla)");
|
ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Metadesc Field. Type: Textarea (joomla)");
|
||||||
$fieldXML = $fieldSetXML->addChild('field');
|
$fieldXML = $fieldSetXML->addChild('field');
|
||||||
$this->xmlAddAttributes($fieldXML, $attributes);
|
ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes);
|
||||||
// count the static field created
|
// count the static field created
|
||||||
$this->fieldCount++;
|
$this->fieldCount++;
|
||||||
}
|
}
|
||||||
// load the dynamic fields now
|
// load the dynamic fields now
|
||||||
if (count($dynamicFieldsXML))
|
if (count($dynamicFieldsXML))
|
||||||
{
|
{
|
||||||
$this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Dynamic Fields.");
|
ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Dynamic Fields.");
|
||||||
foreach ($dynamicFieldsXML as $dynamicfield)
|
foreach ($dynamicFieldsXML as $dynamicfield)
|
||||||
{
|
{
|
||||||
$this->xmlAppend($fieldSetXML, $dynamicfield);
|
ComponentbuilderHelper::xmlAppend($fieldSetXML, $dynamicfield);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// check if metadata is added to this view
|
// check if metadata is added to this view
|
||||||
if (isset($this->metadataBuilder[$view_name_single]) && ComponentbuilderHelper::checkString($this->metadataBuilder[$view_name_single]))
|
if (isset($this->metadataBuilder[$view_name_single]) && ComponentbuilderHelper::checkString($this->metadataBuilder[$view_name_single]))
|
||||||
{
|
{
|
||||||
$this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Metadata Fields");
|
ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Metadata Fields");
|
||||||
$fieldsXML = $fieldSetXML->addChild('fields');
|
$fieldsXML = $fieldSetXML->addChild('fields');
|
||||||
$fieldsXML->addAttribute('name', 'metadata');
|
$fieldsXML->addAttribute('name', 'metadata');
|
||||||
$fieldsXML->addAttribute('label', 'JGLOBAL_FIELDSET_METADATA_OPTIONS');
|
$fieldsXML->addAttribute('label', 'JGLOBAL_FIELDSET_METADATA_OPTIONS');
|
||||||
@ -972,7 +972,7 @@ class Fields extends Structure
|
|||||||
$fieldsFieldSetXML->addAttribute('name', 'vdmmetadata');
|
$fieldsFieldSetXML->addAttribute('name', 'vdmmetadata');
|
||||||
$fieldsFieldSetXML->addAttribute('label', 'JGLOBAL_FIELDSET_METADATA_OPTIONS');
|
$fieldsFieldSetXML->addAttribute('label', 'JGLOBAL_FIELDSET_METADATA_OPTIONS');
|
||||||
// robots
|
// robots
|
||||||
$this->xmlComment($fieldsFieldSetXML, $this->setLine(__LINE__) . " Robots Field. Type: List (joomla)");
|
ComponentbuilderHelper::xmlComment($fieldsFieldSetXML, $this->setLine(__LINE__) . " Robots Field. Type: List (joomla)");
|
||||||
$robots = $fieldsFieldSetXML->addChild('field');
|
$robots = $fieldsFieldSetXML->addChild('field');
|
||||||
$attributes = array(
|
$attributes = array(
|
||||||
'name' => 'robots',
|
'name' => 'robots',
|
||||||
@ -980,7 +980,7 @@ class Fields extends Structure
|
|||||||
'label' => 'JFIELD_METADATA_ROBOTS_LABEL',
|
'label' => 'JFIELD_METADATA_ROBOTS_LABEL',
|
||||||
'description' => 'JFIELD_METADATA_ROBOTS_DESC'
|
'description' => 'JFIELD_METADATA_ROBOTS_DESC'
|
||||||
);
|
);
|
||||||
$this->xmlAddAttributes($robots, $attributes);
|
ComponentbuilderHelper::xmlAddAttributes($robots, $attributes);
|
||||||
// count the static field created
|
// count the static field created
|
||||||
$this->fieldCount++;
|
$this->fieldCount++;
|
||||||
$options = array(
|
$options = array(
|
||||||
@ -997,7 +997,7 @@ class Fields extends Structure
|
|||||||
$option[] = $text;
|
$option[] = $text;
|
||||||
}
|
}
|
||||||
// author
|
// author
|
||||||
$this->xmlComment($fieldsFieldSetXML, $this->setLine(__LINE__) . " Author Field. Type: Text (joomla)");
|
ComponentbuilderHelper::xmlComment($fieldsFieldSetXML, $this->setLine(__LINE__) . " Author Field. Type: Text (joomla)");
|
||||||
$author = $fieldsFieldSetXML->addChild('field');
|
$author = $fieldsFieldSetXML->addChild('field');
|
||||||
$attributes = array(
|
$attributes = array(
|
||||||
'name' => 'author',
|
'name' => 'author',
|
||||||
@ -1006,11 +1006,11 @@ class Fields extends Structure
|
|||||||
'description' => 'JFIELD_METADATA_AUTHOR_DESC',
|
'description' => 'JFIELD_METADATA_AUTHOR_DESC',
|
||||||
'size' => 20
|
'size' => 20
|
||||||
);
|
);
|
||||||
$this->xmlAddAttributes($author, $attributes);
|
ComponentbuilderHelper::xmlAddAttributes($author, $attributes);
|
||||||
// count the static field created
|
// count the static field created
|
||||||
$this->fieldCount++;
|
$this->fieldCount++;
|
||||||
// rights
|
// rights
|
||||||
$this->xmlComment($fieldsFieldSetXML, $this->setLine(__LINE__) . " Rights Field. Type: Textarea (joomla)");
|
ComponentbuilderHelper::xmlComment($fieldsFieldSetXML, $this->setLine(__LINE__) . " Rights Field. Type: Textarea (joomla)");
|
||||||
$rights = $fieldsFieldSetXML->addChild('field');
|
$rights = $fieldsFieldSetXML->addChild('field');
|
||||||
$attributes = array(
|
$attributes = array(
|
||||||
'name' => 'rights',
|
'name' => 'rights',
|
||||||
@ -1022,7 +1022,7 @@ class Fields extends Structure
|
|||||||
'cols' => 30,
|
'cols' => 30,
|
||||||
'rows' => 2
|
'rows' => 2
|
||||||
);
|
);
|
||||||
$this->xmlAddAttributes($rights, $attributes);
|
ComponentbuilderHelper::xmlAddAttributes($rights, $attributes);
|
||||||
// count the static field created
|
// count the static field created
|
||||||
$this->fieldCount++;
|
$this->fieldCount++;
|
||||||
}
|
}
|
||||||
@ -1581,7 +1581,7 @@ class Fields extends Structure
|
|||||||
}
|
}
|
||||||
elseif ($property === 'option')
|
elseif ($property === 'option')
|
||||||
{
|
{
|
||||||
$this->xmlComment($field->fieldXML, $this->setLine(__LINE__) . " Option Set.");
|
ComponentbuilderHelper::xmlComment($field->fieldXML, $this->setLine(__LINE__) . " Option Set.");
|
||||||
if (strpos($value, ',') !== false)
|
if (strpos($value, ',') !== false)
|
||||||
{
|
{
|
||||||
// mulitpal options
|
// mulitpal options
|
||||||
@ -1644,7 +1644,7 @@ class Fields extends Structure
|
|||||||
}
|
}
|
||||||
if (!$field->fieldXML->count())
|
if (!$field->fieldXML->count())
|
||||||
{
|
{
|
||||||
$this->xmlComment($field->fieldXML, $this->setLine(__LINE__) . " No Manual Options Were Added In Field Settings.");
|
ComponentbuilderHelper::xmlComment($field->fieldXML, $this->setLine(__LINE__) . " No Manual Options Were Added In Field Settings.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif ($setType === 'plain')
|
elseif ($setType === 'plain')
|
||||||
@ -1733,12 +1733,12 @@ class Fields extends Structure
|
|||||||
if ($this->defaultField($r_typeName, 'option'))
|
if ($this->defaultField($r_typeName, 'option'))
|
||||||
{
|
{
|
||||||
// now add to the field set
|
// now add to the field set
|
||||||
$this->xmlAppend($fieldSetXML, $this->setField('option', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
|
ComponentbuilderHelper::xmlAppend($fieldSetXML, $this->setField('option', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
|
||||||
}
|
}
|
||||||
elseif ($this->defaultField($r_typeName, 'plain'))
|
elseif ($this->defaultField($r_typeName, 'plain'))
|
||||||
{
|
{
|
||||||
// now add to the field set
|
// now add to the field set
|
||||||
$this->xmlAppend($fieldSetXML, $this->setField('plain', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
|
ComponentbuilderHelper::xmlAppend($fieldSetXML, $this->setField('plain', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
|
||||||
}
|
}
|
||||||
elseif (ComponentbuilderHelper::checkArray($r_fieldValues['custom']))
|
elseif (ComponentbuilderHelper::checkArray($r_fieldValues['custom']))
|
||||||
{
|
{
|
||||||
@ -1746,7 +1746,7 @@ class Fields extends Structure
|
|||||||
$custom = $r_fieldValues['custom'];
|
$custom = $r_fieldValues['custom'];
|
||||||
unset($r_fieldValues['custom']);
|
unset($r_fieldValues['custom']);
|
||||||
// now add to the field set
|
// now add to the field set
|
||||||
$this->xmlAppend($fieldSetXML, $this->setField('custom', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
|
ComponentbuilderHelper::xmlAppend($fieldSetXML, $this->setField('custom', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
|
||||||
// set lang (just incase)
|
// set lang (just incase)
|
||||||
$r_listLangName = $langView . '_' . ComponentbuilderHelper::safeString($r_name, 'U');
|
$r_listLangName = $langView . '_' . ComponentbuilderHelper::safeString($r_name, 'U');
|
||||||
// add to lang array
|
// add to lang array
|
||||||
@ -1794,7 +1794,7 @@ class Fields extends Structure
|
|||||||
'name' => 'list_' . $fieldAttributes['name'] . '_modal',
|
'name' => 'list_' . $fieldAttributes['name'] . '_modal',
|
||||||
'repeat' => 'true'
|
'repeat' => 'true'
|
||||||
);
|
);
|
||||||
$this->xmlAddAttributes($form, $attributes);
|
ComponentbuilderHelper::xmlAddAttributes($form, $attributes);
|
||||||
|
|
||||||
if (strpos($fieldAttributes['fields'], ',') !== false)
|
if (strpos($fieldAttributes['fields'], ',') !== false)
|
||||||
{
|
{
|
||||||
@ -1830,12 +1830,12 @@ class Fields extends Structure
|
|||||||
if ($this->defaultField($r_typeName, 'option'))
|
if ($this->defaultField($r_typeName, 'option'))
|
||||||
{
|
{
|
||||||
// now add to the field set
|
// now add to the field set
|
||||||
$this->xmlAppend($form, $this->setField('option', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
|
ComponentbuilderHelper::xmlAppend($form, $this->setField('option', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
|
||||||
}
|
}
|
||||||
elseif ($this->defaultField($r_typeName, 'plain'))
|
elseif ($this->defaultField($r_typeName, 'plain'))
|
||||||
{
|
{
|
||||||
// now add to the field set
|
// now add to the field set
|
||||||
$this->xmlAppend($form, $this->setField('plain', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
|
ComponentbuilderHelper::xmlAppend($form, $this->setField('plain', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
|
||||||
}
|
}
|
||||||
elseif (ComponentbuilderHelper::checkArray($r_fieldValues['custom']))
|
elseif (ComponentbuilderHelper::checkArray($r_fieldValues['custom']))
|
||||||
{
|
{
|
||||||
@ -1843,7 +1843,7 @@ class Fields extends Structure
|
|||||||
$custom = $r_fieldValues['custom'];
|
$custom = $r_fieldValues['custom'];
|
||||||
unset($r_fieldValues['custom']);
|
unset($r_fieldValues['custom']);
|
||||||
// now add to the field set
|
// now add to the field set
|
||||||
$this->xmlAppend($form, $this->setField('custom', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
|
ComponentbuilderHelper::xmlAppend($form, $this->setField('custom', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
|
||||||
// set lang (just incase)
|
// set lang (just incase)
|
||||||
$r_listLangName = $langView . '_' . ComponentbuilderHelper::safeString($r_name, 'U');
|
$r_listLangName = $langView . '_' . ComponentbuilderHelper::safeString($r_name, 'U');
|
||||||
// add to lang array
|
// add to lang array
|
||||||
@ -3030,78 +3030,6 @@ class Fields extends Structure
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* xmlComment
|
|
||||||
*
|
|
||||||
* @param SimpleXMLElement $xml The XML element reference in which to inject a comment
|
|
||||||
* @param string $comment The comment to inject
|
|
||||||
*
|
|
||||||
* @return null
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public function xmlComment(&$xml, $comment)
|
|
||||||
{
|
|
||||||
$domXML = dom_import_simplexml($xml);
|
|
||||||
$domComment = new DOMComment($comment);
|
|
||||||
$nodeTarget = $domXML->ownerDocument->importNode($domComment, true);
|
|
||||||
$domXML->appendChild($nodeTarget);
|
|
||||||
$xml = simplexml_import_dom($domXML);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* xmlAddAttributes
|
|
||||||
*
|
|
||||||
* @param SimpleXMLElement $xml The XML element reference in which to inject a comment
|
|
||||||
* @param array $attributes The attributes to apply to the XML element
|
|
||||||
*
|
|
||||||
* @return null
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public function xmlAddAttributes(&$xml, $attributes = array())
|
|
||||||
{
|
|
||||||
foreach ($attributes as $key => $value)
|
|
||||||
{
|
|
||||||
$xml->addAttribute($key, $value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* xmlAppend
|
|
||||||
*
|
|
||||||
* @param SimpleXMLElement $xml The XML element reference in which to inject a comment
|
|
||||||
* @param mixed $node A SimpleXMLElement node to append to the XML element reference, or a stdClass object containing a comment attribute to be injected before the XML node and a fieldXML attribute containing a SimpleXMLElement
|
|
||||||
*
|
|
||||||
* @return null
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public function xmlAppend(&$xml, $node)
|
|
||||||
{
|
|
||||||
if (!$node)
|
|
||||||
{
|
|
||||||
// element was not returned
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
switch (get_class($node))
|
|
||||||
{
|
|
||||||
case 'stdClass':
|
|
||||||
if (property_exists($node, 'comment'))
|
|
||||||
{
|
|
||||||
$this->xmlComment($xml, $node->comment);
|
|
||||||
}
|
|
||||||
if (property_exists($node, 'fieldXML'))
|
|
||||||
{
|
|
||||||
$this->xmlAppend($xml, $node->fieldXML);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'SimpleXMLElement':
|
|
||||||
$domXML = dom_import_simplexml($xml);
|
|
||||||
$domNode = dom_import_simplexml($node);
|
|
||||||
$domXML->appendChild($domXML->ownerDocument->importNode($domNode, true));
|
|
||||||
$xml = simplexml_import_dom($domXML);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlPrettyPrint
|
* xmlPrettyPrint
|
||||||
*
|
*
|
||||||
|
@ -1187,12 +1187,12 @@ abstract class ComponentbuilderHelper
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the snippet contributor details
|
* Get the snippet contributor details
|
||||||
*
|
*
|
||||||
* @param string $filename The file name
|
* @param string $filename The file name
|
||||||
* @param string $type The type of file
|
* @param string $type The type of file
|
||||||
*
|
*
|
||||||
* @return array On success the contributor details
|
* @return array On success the contributor details
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static function getContributorDetails($filename, $type = 'snippet')
|
public static function getContributorDetails($filename, $type = 'snippet')
|
||||||
@ -1245,11 +1245,11 @@ abstract class ComponentbuilderHelper
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the library files
|
* Get the library files
|
||||||
*
|
*
|
||||||
* @param int $id The library id to target
|
* @param int $id The library id to target
|
||||||
*
|
*
|
||||||
* @return array On success the array of files that belong to this library
|
* @return array On success the array of files that belong to this library
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static function getLibraryFiles($id)
|
public static function getLibraryFiles($id)
|
||||||
@ -1579,12 +1579,12 @@ abstract class ComponentbuilderHelper
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The zipper method
|
* The zipper method
|
||||||
*
|
*
|
||||||
* @param string $workingDIR The directory where the items must be zipped
|
* @param string $workingDIR The directory where the items must be zipped
|
||||||
* @param string $filepath The path to where the zip file must be placed
|
* @param string $filepath The path to where the zip file must be placed
|
||||||
*
|
*
|
||||||
* @return bool true On success
|
* @return bool true On success
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static function zip($workingDIR, &$filepath)
|
public static function zip($workingDIR, &$filepath)
|
||||||
@ -1630,12 +1630,12 @@ abstract class ComponentbuilderHelper
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write a file to the server
|
* Write a file to the server
|
||||||
*
|
*
|
||||||
* @param string $path The path and file name where to safe the data
|
* @param string $path The path and file name where to safe the data
|
||||||
* @param string $data The data to safe
|
* @param string $data The data to safe
|
||||||
*
|
*
|
||||||
* @return bool true On success
|
* @return bool true On success
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static function writeFile($path, $data)
|
public static function writeFile($path, $data)
|
||||||
@ -1792,13 +1792,13 @@ abstract class ComponentbuilderHelper
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get between
|
* get between
|
||||||
*
|
*
|
||||||
* @param string $content The content to search
|
* @param string $content The content to search
|
||||||
* @param string $start The starting value
|
* @param string $start The starting value
|
||||||
* @param string $end The ending value
|
* @param string $end The ending value
|
||||||
*
|
*
|
||||||
* @return string On success / empty string on failure
|
* @return string On success / empty string on failure
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static function getBetween($content, $start, $end)
|
public static function getBetween($content, $start, $end)
|
||||||
@ -1813,13 +1813,13 @@ abstract class ComponentbuilderHelper
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get all between
|
* get all between
|
||||||
*
|
*
|
||||||
* @param string $content The content to search
|
* @param string $content The content to search
|
||||||
* @param string $start The starting value
|
* @param string $start The starting value
|
||||||
* @param string $end The ending value
|
* @param string $end The ending value
|
||||||
*
|
*
|
||||||
* @return array On success
|
* @return array On success
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static function getAllBetween($content, $start, $end)
|
public static function getAllBetween($content, $start, $end)
|
||||||
@ -2037,16 +2037,16 @@ abstract class ComponentbuilderHelper
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the file path or url
|
* Get the file path or url
|
||||||
*
|
*
|
||||||
* @param string $type The (url/path) type to return
|
* @param string $type The (url/path) type to return
|
||||||
* @param string $target The Params Target name (if set)
|
* @param string $target The Params Target name (if set)
|
||||||
* @param string $fileType The kind of filename to generate (if not set no file name is generated)
|
* @param string $fileType The kind of filename to generate (if not set no file name is generated)
|
||||||
* @param string $key The key to adjust the filename (if not set ignored)
|
* @param string $key The key to adjust the filename (if not set ignored)
|
||||||
* @param string $default The default path if not set in Params (fallback path)
|
* @param string $default The default path if not set in Params (fallback path)
|
||||||
* @param bool $createIfNotSet The switch to create the folder if not found
|
* @param bool $createIfNotSet The switch to create the folder if not found
|
||||||
*
|
*
|
||||||
* @return string On success the path or url is returned based on the type requested
|
* @return string On success the path or url is returned based on the type requested
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static function getFilePath($type = 'path', $target = 'filepath', $fileType = null, $key = '', $default = JPATH_SITE . '/images/', $createIfNotSet = true)
|
public static function getFilePath($type = 'path', $target = 'filepath', $fileType = null, $key = '', $default = JPATH_SITE . '/images/', $createIfNotSet = true)
|
||||||
@ -2149,12 +2149,12 @@ abstract class ComponentbuilderHelper
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get the content of a file
|
* get the content of a file
|
||||||
*
|
*
|
||||||
* @param string $path The path to the file
|
* @param string $path The path to the file
|
||||||
* @param string/bool $none The return value if no content was found
|
* @param string/bool $none The return value if no content was found
|
||||||
*
|
*
|
||||||
* @return string On success
|
* @return string On success
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static function getFileContents($path, $none = '')
|
public static function getFileContents($path, $none = '')
|
||||||
@ -3183,6 +3183,19 @@ abstract class ComponentbuilderHelper
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a Variable
|
||||||
|
*
|
||||||
|
* @param string $table The table from which to get the variable
|
||||||
|
* @param string $where The value where
|
||||||
|
* @param string $whereString The target/field string where/name
|
||||||
|
* @param string $what The return field
|
||||||
|
* @param string $operator The operator between $whereString/field and $where/value
|
||||||
|
* @param string $main The component in which the table is found
|
||||||
|
*
|
||||||
|
* @return mix string/int/float
|
||||||
|
*
|
||||||
|
*/
|
||||||
public static function getVar($table, $where = null, $whereString = 'user', $what = 'id', $operator = '=', $main = 'componentbuilder')
|
public static function getVar($table, $where = null, $whereString = 'user', $what = 'id', $operator = '=', $main = 'componentbuilder')
|
||||||
{
|
{
|
||||||
if(!$where)
|
if(!$where)
|
||||||
@ -3223,6 +3236,20 @@ abstract class ComponentbuilderHelper
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get array of variables
|
||||||
|
*
|
||||||
|
* @param string $table The table from which to get the variables
|
||||||
|
* @param string $where The value where
|
||||||
|
* @param string $whereString The target/field string where/name
|
||||||
|
* @param string $what The return field
|
||||||
|
* @param string $operator The operator between $whereString/field and $where/value
|
||||||
|
* @param string $main The component in which the table is found
|
||||||
|
* @param bool $unique The switch to return a unique array
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*
|
||||||
|
*/
|
||||||
public static function getVars($table, $where = null, $whereString = 'user', $what = 'id', $operator = 'IN', $main = 'componentbuilder', $unique = true)
|
public static function getVars($table, $where = null, $whereString = 'user', $what = 'id', $operator = 'IN', $main = 'componentbuilder', $unique = true)
|
||||||
{
|
{
|
||||||
if(!$where)
|
if(!$where)
|
||||||
@ -3691,28 +3718,141 @@ abstract class ComponentbuilderHelper
|
|||||||
return JAccess::getAssetRules(0);
|
return JAccess::getAssetRules(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* xmlAppend
|
||||||
|
*
|
||||||
|
* @param SimpleXMLElement $xml The XML element reference in which to inject a comment
|
||||||
|
* @param mixed $node A SimpleXMLElement node to append to the XML element reference, or a stdClass object containing a comment attribute to be injected before the XML node and a fieldXML attribute containing a SimpleXMLElement
|
||||||
|
*
|
||||||
|
* @return null
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function xmlAppend(&$xml, $node)
|
||||||
|
{
|
||||||
|
if (!$node)
|
||||||
|
{
|
||||||
|
// element was not returned
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
switch (get_class($node))
|
||||||
|
{
|
||||||
|
case 'stdClass':
|
||||||
|
if (property_exists($node, 'comment'))
|
||||||
|
{
|
||||||
|
self::xmlComment($xml, $node->comment);
|
||||||
|
}
|
||||||
|
if (property_exists($node, 'fieldXML'))
|
||||||
|
{
|
||||||
|
self::xmlAppend($xml, $node->fieldXML);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'SimpleXMLElement':
|
||||||
|
$domXML = dom_import_simplexml($xml);
|
||||||
|
$domNode = dom_import_simplexml($node);
|
||||||
|
$domXML->appendChild($domXML->ownerDocument->importNode($domNode, true));
|
||||||
|
$xml = simplexml_import_dom($domXML);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* xmlComment
|
||||||
|
*
|
||||||
|
* @param SimpleXMLElement $xml The XML element reference in which to inject a comment
|
||||||
|
* @param string $comment The comment to inject
|
||||||
|
*
|
||||||
|
* @return null
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function xmlComment(&$xml, $comment)
|
||||||
|
{
|
||||||
|
$domXML = dom_import_simplexml($xml);
|
||||||
|
$domComment = new DOMComment($comment);
|
||||||
|
$nodeTarget = $domXML->ownerDocument->importNode($domComment, true);
|
||||||
|
$domXML->appendChild($nodeTarget);
|
||||||
|
$xml = simplexml_import_dom($domXML);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* xmlAddAttributes
|
||||||
|
*
|
||||||
|
* @param SimpleXMLElement $xml The XML element reference in which to inject a comment
|
||||||
|
* @param array $attributes The attributes to apply to the XML element
|
||||||
|
*
|
||||||
|
* @return null
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function xmlAddAttributes(&$xml, $attributes = array())
|
||||||
|
{
|
||||||
|
foreach ($attributes as $key => $value)
|
||||||
|
{
|
||||||
|
$xml->addAttribute($key, $value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* xmlAddOptions
|
||||||
|
*
|
||||||
|
* @param SimpleXMLElement $xml The XML element reference in which to inject a comment
|
||||||
|
* @param array $options The options to apply to the XML element
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function xmlAddOptions(&$xml, $options = array())
|
||||||
|
{
|
||||||
|
foreach ($options as $key => $value)
|
||||||
|
{
|
||||||
|
$addOption = $xml->addChild('option');
|
||||||
|
$addOption->addAttribute('value', $key);
|
||||||
|
$addOption[] = $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render Bool Button
|
||||||
|
*
|
||||||
|
* @param array $args All the args for the button
|
||||||
|
* 0) name
|
||||||
|
* 1) additional (options class) // not used at this time
|
||||||
|
* 2) default
|
||||||
|
* 3) yes (name)
|
||||||
|
* 4) no (name)
|
||||||
|
*
|
||||||
|
* @return string The input html of the button
|
||||||
|
*
|
||||||
|
*/
|
||||||
public static function renderBoolButton()
|
public static function renderBoolButton()
|
||||||
{
|
{
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
|
// check if there is additional button class
|
||||||
|
$additional = isset($args[1]) ? (string) $args[1] : ''; // not used at this time
|
||||||
|
// start the xml
|
||||||
|
$buttonXML = new SimpleXMLElement('<field/>');
|
||||||
|
// button attributes
|
||||||
|
$buttonAttributes = array(
|
||||||
|
'type' => 'radio',
|
||||||
|
'name' => isset($args[0]) ? self::htmlEscape($args[0]) : 'bool_button',
|
||||||
|
'label' => isset($args[0]) ? self::safeString(self::htmlEscape($args[0]), 'Ww') : 'Bool Button', // not seen anyway
|
||||||
|
'class' => 'btn-group',
|
||||||
|
'filter' => 'INT',
|
||||||
|
'default' => isset($args[2]) ? (int) $args[2] : 0);
|
||||||
|
// load the haskey attributes
|
||||||
|
self::xmlAddAttributes($buttonXML, $buttonAttributes);
|
||||||
|
// set the button options
|
||||||
|
$buttonOptions = array(
|
||||||
|
'1' => isset($args[3]) ? self::htmlEscape($args[3]) : 'JYES',
|
||||||
|
'0' => isset($args[4]) ? self::htmlEscape($args[4]) : 'JNO');
|
||||||
|
// load the button options
|
||||||
|
self::xmlAddOptions($buttonXML, $buttonOptions);
|
||||||
|
|
||||||
// get the radio element
|
// get the radio element
|
||||||
$button = JFormHelper::loadFieldType('radio');
|
$button = JFormHelper::loadFieldType('radio');
|
||||||
|
|
||||||
// setup the properties
|
|
||||||
$name = self::htmlEscape($args[0]);
|
|
||||||
$additional = isset($args[1]) ? (string) $args[1] : '';
|
|
||||||
$value = $args[2];
|
|
||||||
$yes = isset($args[3]) ? self::htmlEscape($args[3]) : 'JYES';
|
|
||||||
$no = isset($args[4]) ? self::htmlEscape($args[4]) : 'JNO';
|
|
||||||
|
|
||||||
// prepare the xml
|
|
||||||
$element = new SimpleXMLElement('<field name="'.$name.'" type="radio" class="btn-group"><option '.$additional.' value="0">'.$no.'</option><option '.$additional.' value="1">'.$yes.'</option></field>');
|
|
||||||
|
|
||||||
// run
|
// run
|
||||||
$button->setup($element, $value);
|
$button->setup($buttonXML, $buttonAttributes['default']);
|
||||||
|
|
||||||
return $button->input;
|
return $button->input;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -9,8 +9,9 @@ COM_COMPONENTBUILDER_ACTIVE_ONLY_FOUR_TEXT_FIELD="Active (only 4 text_field)"
|
|||||||
COM_COMPONENTBUILDER_ADD_ACCESS="Add Access"
|
COM_COMPONENTBUILDER_ADD_ACCESS="Add Access"
|
||||||
COM_COMPONENTBUILDER_ADD_CORRESPONDING_LINE_NUMBERS_TO_THE_DYNAMIC_COMMENTS_SO_TO_SEE_WHERE_IN_THE_COMPILER_THE_LINES_OF_CODE_WAS_BUILD_THIS_WILL_HELP_IF_YOU_NEED_TO_GET_MORE_TECHNICAL_WITH_AN_ISSUE_ON_GITHUB_OR_EVEN_FOR_YOUR_OWN_DEBUGGING="Add corresponding line numbers to the dynamic comments, so to see where in the compiler the lines of code was build. This will help if you need to get more technical with an issue on github, or even for your own debugging."
|
COM_COMPONENTBUILDER_ADD_CORRESPONDING_LINE_NUMBERS_TO_THE_DYNAMIC_COMMENTS_SO_TO_SEE_WHERE_IN_THE_COMPILER_THE_LINES_OF_CODE_WAS_BUILD_THIS_WILL_HELP_IF_YOU_NEED_TO_GET_MORE_TECHNICAL_WITH_AN_ISSUE_ON_GITHUB_OR_EVEN_FOR_YOUR_OWN_DEBUGGING="Add corresponding line numbers to the dynamic comments, so to see where in the compiler the lines of code was build. This will help if you need to get more technical with an issue on github, or even for your own debugging."
|
||||||
COM_COMPONENTBUILDER_ADD_CUSTOM_CODE_PLACEHOLDERS="Add Custom Code Placeholders"
|
COM_COMPONENTBUILDER_ADD_CUSTOM_CODE_PLACEHOLDERS="Add Custom Code Placeholders"
|
||||||
|
COM_COMPONENTBUILDER_ADD_KEY_HERE="add key here"
|
||||||
COM_COMPONENTBUILDER_ADD_MENU="Add Menu"
|
COM_COMPONENTBUILDER_ADD_MENU="Add Menu"
|
||||||
COM_COMPONENTBUILDER_ADD_TO_BACKUP_FOLDER_AMP_SALES_SERVER_LTSMALLGTIF_SETLTSMALLGT="Add to Backup Folder & Sales Server <small>(if set)</small>"
|
COM_COMPONENTBUILDER_ADD_TO_BACKUP_FOLDER_AMP_SALES_SERVER_SMALLIF_SETSMALL="Add to Backup Folder & Sales Server <small>(if set)</small>"
|
||||||
COM_COMPONENTBUILDER_ADD_TO_REPOSITORY_FOLDER="Add to Repository Folder"
|
COM_COMPONENTBUILDER_ADD_TO_REPOSITORY_FOLDER="Add to Repository Folder"
|
||||||
COM_COMPONENTBUILDER_ADMINS_FIELDS="Admins Fields"
|
COM_COMPONENTBUILDER_ADMINS_FIELDS="Admins Fields"
|
||||||
COM_COMPONENTBUILDER_ADMINS_FIELDS_ACCESS="Admins Fields Access"
|
COM_COMPONENTBUILDER_ADMINS_FIELDS_ACCESS="Admins Fields Access"
|
||||||
@ -3229,7 +3230,7 @@ COM_COMPONENTBUILDER_DESCRIPTION="Description"
|
|||||||
COM_COMPONENTBUILDER_DETAILS="Details"
|
COM_COMPONENTBUILDER_DETAILS="Details"
|
||||||
COM_COMPONENTBUILDER_DIVERGED="Diverged"
|
COM_COMPONENTBUILDER_DIVERGED="Diverged"
|
||||||
COM_COMPONENTBUILDER_DIVERGED_MEANS_YOUR_BLOCAL_SNIPPETB_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE_HAS_A_BDIVERGEDB_FROM_THE_COMMUNITY_SNIPPET_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE_IN_THAT_IT_DOES_NOT_HAVE_THE_SAME_BCREATIONB_OR_BMODIFIED_DATEB="Diverged means your <b>local snippet</b> (with the same name, library and type) has a <b>diverged</b> from the community snippet (with the same name, library and type) in that it does not have the same <b>creation</b> or <b>modified date</b>."
|
COM_COMPONENTBUILDER_DIVERGED_MEANS_YOUR_BLOCAL_SNIPPETB_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE_HAS_A_BDIVERGEDB_FROM_THE_COMMUNITY_SNIPPET_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE_IN_THAT_IT_DOES_NOT_HAVE_THE_SAME_BCREATIONB_OR_BMODIFIED_DATEB="Diverged means your <b>local snippet</b> (with the same name, library and type) has a <b>diverged</b> from the community snippet (with the same name, library and type) in that it does not have the same <b>creation</b> or <b>modified date</b>."
|
||||||
COM_COMPONENTBUILDER_DOES_THIS_PACKAGE_REQUIRE_A_KEY_TO_INSTALL="Does this package require a key to install"
|
COM_COMPONENTBUILDER_DOES_THIS_PACKAGE_REQUIRE_A_KEY_TO_INSTALL="Does this package require a key to install."
|
||||||
COM_COMPONENTBUILDER_DOWNLOAD="download"
|
COM_COMPONENTBUILDER_DOWNLOAD="download"
|
||||||
COM_COMPONENTBUILDER_DO_NOT_ADD="Do not add"
|
COM_COMPONENTBUILDER_DO_NOT_ADD="Do not add"
|
||||||
COM_COMPONENTBUILDER_DYNAMIC_GET="Dynamic Get"
|
COM_COMPONENTBUILDER_DYNAMIC_GET="Dynamic Get"
|
||||||
@ -5350,6 +5351,7 @@ COM_COMPONENTBUILDER_ORDER_IN_LIST_VIEWS="Order in list views"
|
|||||||
COM_COMPONENTBUILDER_OUT_OF_DATE="Out of Date"
|
COM_COMPONENTBUILDER_OUT_OF_DATE="Out of Date"
|
||||||
COM_COMPONENTBUILDER_OWNER_DETAILS_WAS_SET="Owner details was set"
|
COM_COMPONENTBUILDER_OWNER_DETAILS_WAS_SET="Owner details was set"
|
||||||
COM_COMPONENTBUILDER_OWNER_S="Owner: %s"
|
COM_COMPONENTBUILDER_OWNER_S="Owner: %s"
|
||||||
|
COM_COMPONENTBUILDER_PACKAGE="Package"
|
||||||
COM_COMPONENTBUILDER_PACKAGES_FROM_VAST_DEVELOPMENT_METHOD="Packages from Vast Development Method"
|
COM_COMPONENTBUILDER_PACKAGES_FROM_VAST_DEVELOPMENT_METHOD="Packages from Vast Development Method"
|
||||||
COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS="Package Owner Details"
|
COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS="Package Owner Details"
|
||||||
COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS_NOT_FOUND="Package owner details not found!"
|
COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS_NOT_FOUND="Package owner details not found!"
|
||||||
@ -5370,7 +5372,6 @@ COM_COMPONENTBUILDER_PROPERTY="Property"
|
|||||||
COM_COMPONENTBUILDER_PUBLIC_ACCESS="Public Access"
|
COM_COMPONENTBUILDER_PUBLIC_ACCESS="Public Access"
|
||||||
COM_COMPONENTBUILDER_PUBLISHED="Published"
|
COM_COMPONENTBUILDER_PUBLISHED="Published"
|
||||||
COM_COMPONENTBUILDER_PUBLISHING="Publishing"
|
COM_COMPONENTBUILDER_PUBLISHING="Publishing"
|
||||||
COM_COMPONENTBUILDER_QUIET="Quiet"
|
|
||||||
COM_COMPONENTBUILDER_READY_TO_COMPILE_A_COMPONENT="Ready to compile a component"
|
COM_COMPONENTBUILDER_READY_TO_COMPILE_A_COMPONENT="Ready to compile a component"
|
||||||
COM_COMPONENTBUILDER_RELEASED_THIS="released this"
|
COM_COMPONENTBUILDER_RELEASED_THIS="released this"
|
||||||
COM_COMPONENTBUILDER_RENAME="Rename"
|
COM_COMPONENTBUILDER_RENAME="Rename"
|
||||||
@ -5387,9 +5388,9 @@ COM_COMPONENTBUILDER_SAVE_SUCCESS="Great! Item successfully saved."
|
|||||||
COM_COMPONENTBUILDER_SAVE_WARNING="The value already existed so please select another."
|
COM_COMPONENTBUILDER_SAVE_WARNING="The value already existed so please select another."
|
||||||
COM_COMPONENTBUILDER_SBR_YOU_CAN_ADD_AN_BACCESS_TOKENB_TO_GETBIBLE_GLOBAL_OPTIONS_TO_MAKE_AUTHENTICATED_REQUESTS_AN_ACCESS_TOKEN_WITH_ONLY_PUBLIC_ACCESS_WILL_DO="%s<br />You can add an <b>access token<b/> to getBible global options to make authenticated requests. An access token with only public access will do."
|
COM_COMPONENTBUILDER_SBR_YOU_CAN_ADD_AN_BACCESS_TOKENB_TO_GETBIBLE_GLOBAL_OPTIONS_TO_MAKE_AUTHENTICATED_REQUESTS_AN_ACCESS_TOKEN_WITH_ONLY_PUBLIC_ACCESS_WILL_DO="%s<br />You can add an <b>access token<b/> to getBible global options to make authenticated requests. An access token with only public access will do."
|
||||||
COM_COMPONENTBUILDER_SEARCHABLE="Searchable"
|
COM_COMPONENTBUILDER_SEARCHABLE="Searchable"
|
||||||
|
COM_COMPONENTBUILDER_SEE_ALL_IMPORT_INFO="See All Import Info"
|
||||||
COM_COMPONENTBUILDER_SELECT_AN_OPTION="Select an option"
|
COM_COMPONENTBUILDER_SELECT_AN_OPTION="Select an option"
|
||||||
COM_COMPONENTBUILDER_SELECT_A_SNIPPET="select a snippet"
|
COM_COMPONENTBUILDER_SELECT_A_SNIPPET="select a snippet"
|
||||||
COM_COMPONENTBUILDER_SELECT_IF_THE_IMPORT_SHOULD_BE_SHOWING_MORE_ELABORATE_OR_LESS_QUIET_INFORMATION_DURING_IMPORT="Select if the import should be showing more (elaborate) or less (quiet) information during import."
|
|
||||||
COM_COMPONENTBUILDER_SELECT_THE_COMPONENT_TO_COMPILE="Select the component to compile"
|
COM_COMPONENTBUILDER_SELECT_THE_COMPONENT_TO_COMPILE="Select the component to compile"
|
||||||
COM_COMPONENTBUILDER_SELECT_THE_COMPONENT_YOUR_WOULD_LIKE_TO_IMPORT="Select the component your would like to import."
|
COM_COMPONENTBUILDER_SELECT_THE_COMPONENT_YOUR_WOULD_LIKE_TO_IMPORT="Select the component your would like to import."
|
||||||
COM_COMPONENTBUILDER_SELECT_THE_PACKAGE_TO_IMPORT="Select the package to import"
|
COM_COMPONENTBUILDER_SELECT_THE_PACKAGE_TO_IMPORT="Select the package to import"
|
||||||
@ -5544,6 +5545,7 @@ COM_COMPONENTBUILDER_SHARE_SNIPPETS="Share Snippets"
|
|||||||
COM_COMPONENTBUILDER_SHOULD_JCB_INSERT_THE_CUSTOM_CODE_PLACEHOLDERS_THIS_IS_ONLY_APPLICABLE_IF_THIS_COMPONENT_HAS_CUSTOM_CODE="Should JCB insert the custom code placeholders? This is only applicable if this component has custom code."
|
COM_COMPONENTBUILDER_SHOULD_JCB_INSERT_THE_CUSTOM_CODE_PLACEHOLDERS_THIS_IS_ONLY_APPLICABLE_IF_THIS_COMPONENT_HAS_CUSTOM_CODE="Should JCB insert the custom code placeholders? This is only applicable if this component has custom code."
|
||||||
COM_COMPONENTBUILDER_SHOULD_THE_COMPONENT_BE_MOVED_TO_YOUR_LOCAL_REPOSITORY_FOLDER="Should the component be moved to your local repository folder?"
|
COM_COMPONENTBUILDER_SHOULD_THE_COMPONENT_BE_MOVED_TO_YOUR_LOCAL_REPOSITORY_FOLDER="Should the component be moved to your local repository folder?"
|
||||||
COM_COMPONENTBUILDER_SHOULD_THE_ZIPPED_PACKAGE_OF_THE_COMPONENT_BE_MOVED_TO_THE_LOCAL_BACKUP_AND_REMOTE_SALES_SERVER_THIS_IS_ONLY_APPLICABLE_IF_THIS_COMPONENT_HAS_THOSE_VALUES_SET="Should the zipped package of the component be moved to the local backup and remote sales server? This is only applicable if this component has those values set."
|
COM_COMPONENTBUILDER_SHOULD_THE_ZIPPED_PACKAGE_OF_THE_COMPONENT_BE_MOVED_TO_THE_LOCAL_BACKUP_AND_REMOTE_SALES_SERVER_THIS_IS_ONLY_APPLICABLE_IF_THIS_COMPONENT_HAS_THOSE_VALUES_SET="Should the zipped package of the component be moved to the local backup and remote sales server? This is only applicable if this component has those values set."
|
||||||
|
COM_COMPONENTBUILDER_SHOULD_WE_BE_SHOWING_MORE_ELABORATE_INFORMATION_DURING_IMPORT="Should we be showing more elaborate information during import."
|
||||||
COM_COMPONENTBUILDER_SHOULD_WE_FORCE_THE_UPDATE_OF_ALL_LOCAL_DATA_EVEN_IF_IT_IS_NEWER_THEN_THE_DATA_BEING_IMPORTED="Should we force the update of all local data, even if it is newer then the data being imported."
|
COM_COMPONENTBUILDER_SHOULD_WE_FORCE_THE_UPDATE_OF_ALL_LOCAL_DATA_EVEN_IF_IT_IS_NEWER_THEN_THE_DATA_BEING_IMPORTED="Should we force the update of all local data, even if it is newer then the data being imported."
|
||||||
COM_COMPONENTBUILDER_SHOW="Show"
|
COM_COMPONENTBUILDER_SHOW="Show"
|
||||||
COM_COMPONENTBUILDER_SINCE_THE_OWNER_DETAILS_ARE_DISPLAYED_DURING_BIMPORT_PROCESSB_BEFORE_ADDING_THE_KEY_THIS_WAY_IF_THE_USERDEV_BDOES_NOTB_HAVE_THE_KEY_THEY_CAN_SEE_BWHERE_TO_GET_ITB="Since the owner details are displayed during <b>import process</b> before adding the key, this way if the user/dev <b>does not</b> have the key they can see <b>where to get it</b>."
|
COM_COMPONENTBUILDER_SINCE_THE_OWNER_DETAILS_ARE_DISPLAYED_DURING_BIMPORT_PROCESSB_BEFORE_ADDING_THE_KEY_THIS_WAY_IF_THE_USERDEV_BDOES_NOTB_HAVE_THE_KEY_THEY_CAN_SEE_BWHERE_TO_GET_ITB="Since the owner details are displayed during <b>import process</b> before adding the key, this way if the user/dev <b>does not</b> have the key they can see <b>where to get it</b>."
|
||||||
|
@ -105,8 +105,7 @@
|
|||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
description="COM_COMPONENTBUILDER_ADMIN_FIELDS_ADDFIELDS_DESCRIPTION"
|
description="COM_COMPONENTBUILDER_ADMIN_FIELDS_ADDFIELDS_DESCRIPTION"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="800">
|
|
||||||
<form hidden="true" name="list_addfields_modal" repeat="true">
|
<form hidden="true" name="list_addfields_modal" repeat="true">
|
||||||
<!-- Field Field. Type: Fields. (custom) -->
|
<!-- Field Field. Type: Fields. (custom) -->
|
||||||
<field
|
<field
|
||||||
|
@ -105,8 +105,7 @@
|
|||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
description="COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_ADDCONDITIONS_DESCRIPTION"
|
description="COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_ADDCONDITIONS_DESCRIPTION"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="500">
|
|
||||||
<form hidden="true" name="list_addconditions_modal" repeat="true">
|
<form hidden="true" name="list_addconditions_modal" repeat="true">
|
||||||
<!-- Target_field Field. Type: Targetfields. (custom) -->
|
<!-- Target_field Field. Type: Targetfields. (custom) -->
|
||||||
<field
|
<field
|
||||||
|
@ -332,8 +332,7 @@
|
|||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_ADDPERMISSIONS_DESCRIPTION"
|
description="COM_COMPONENTBUILDER_ADMIN_VIEW_ADDPERMISSIONS_DESCRIPTION"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="20">
|
|
||||||
<form hidden="true" name="list_addpermissions_modal" repeat="true">
|
<form hidden="true" name="list_addpermissions_modal" repeat="true">
|
||||||
<!-- Action Field. Type: List. (joomla) -->
|
<!-- Action Field. Type: List. (joomla) -->
|
||||||
<field
|
<field
|
||||||
@ -435,8 +434,7 @@
|
|||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_ADDTABS_DESCRIPTION"
|
description="COM_COMPONENTBUILDER_ADMIN_VIEW_ADDTABS_DESCRIPTION"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="14">
|
|
||||||
<form hidden="true" name="list_addtabs_modal" repeat="true">
|
<form hidden="true" name="list_addtabs_modal" repeat="true">
|
||||||
<!-- Name Field. Type: Text. (joomla) -->
|
<!-- Name Field. Type: Text. (joomla) -->
|
||||||
<field
|
<field
|
||||||
@ -494,8 +492,7 @@
|
|||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_ADDLINKED_VIEWS_DESCRIPTION"
|
description="COM_COMPONENTBUILDER_ADMIN_VIEW_ADDLINKED_VIEWS_DESCRIPTION"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="500">
|
|
||||||
<form hidden="true" name="list_addlinked_views_modal" repeat="true">
|
<form hidden="true" name="list_addlinked_views_modal" repeat="true">
|
||||||
<!-- Adminview Field. Type: Adminviews. (custom) -->
|
<!-- Adminview Field. Type: Adminviews. (custom) -->
|
||||||
<field
|
<field
|
||||||
@ -659,8 +656,7 @@
|
|||||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADDTABLES_LABEL"
|
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADDTABLES_LABEL"
|
||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="50">
|
|
||||||
<form hidden="true" name="list_addtables_modal" repeat="true">
|
<form hidden="true" name="list_addtables_modal" repeat="true">
|
||||||
<!-- Table Field. Type: Dbtables. (custom) -->
|
<!-- Table Field. Type: Dbtables. (custom) -->
|
||||||
<field
|
<field
|
||||||
@ -1144,8 +1140,7 @@
|
|||||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_CUSTOM_BUTTON_LABEL"
|
label="COM_COMPONENTBUILDER_ADMIN_VIEW_CUSTOM_BUTTON_LABEL"
|
||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="7">
|
|
||||||
<form hidden="true" name="list_custom_button_modal" repeat="true">
|
<form hidden="true" name="list_custom_button_modal" repeat="true">
|
||||||
<!-- Icomoon Field. Type: List. (joomla) -->
|
<!-- Icomoon Field. Type: List. (joomla) -->
|
||||||
<field
|
<field
|
||||||
@ -1812,8 +1807,7 @@
|
|||||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_AJAX_INPUT_LABEL"
|
label="COM_COMPONENTBUILDER_ADMIN_VIEW_AJAX_INPUT_LABEL"
|
||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="150">
|
|
||||||
<form hidden="true" name="list_ajax_input_modal" repeat="true">
|
<form hidden="true" name="list_ajax_input_modal" repeat="true">
|
||||||
<!-- Value_name Field. Type: Text. (joomla) -->
|
<!-- Value_name Field. Type: Text. (joomla) -->
|
||||||
<field
|
<field
|
||||||
|
@ -105,8 +105,7 @@
|
|||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
description="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ADDADMIN_VIEWS_DESCRIPTION"
|
description="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ADDADMIN_VIEWS_DESCRIPTION"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="50">
|
|
||||||
<form hidden="true" name="list_addadmin_views_modal" repeat="true">
|
<form hidden="true" name="list_addadmin_views_modal" repeat="true">
|
||||||
<!-- Adminview Field. Type: Adminviews. (custom) -->
|
<!-- Adminview Field. Type: Adminviews. (custom) -->
|
||||||
<field
|
<field
|
||||||
|
@ -105,8 +105,7 @@
|
|||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
description="COM_COMPONENTBUILDER_COMPONENT_CONFIG_ADDCONFIG_DESCRIPTION"
|
description="COM_COMPONENTBUILDER_COMPONENT_CONFIG_ADDCONFIG_DESCRIPTION"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="500">
|
|
||||||
<form hidden="true" name="list_addconfig_modal" repeat="true">
|
<form hidden="true" name="list_addconfig_modal" repeat="true">
|
||||||
<!-- Field Field. Type: Fields. (custom) -->
|
<!-- Field Field. Type: Fields. (custom) -->
|
||||||
<field
|
<field
|
||||||
|
@ -104,8 +104,7 @@
|
|||||||
label="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_ADDCUSTOMMENUS_LABEL"
|
label="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_ADDCUSTOMMENUS_LABEL"
|
||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="50">
|
|
||||||
<form hidden="true" name="list_addcustommenus_modal" repeat="true">
|
<form hidden="true" name="list_addcustommenus_modal" repeat="true">
|
||||||
<!-- Name Field. Type: Text. (joomla) -->
|
<!-- Name Field. Type: Text. (joomla) -->
|
||||||
<field
|
<field
|
||||||
|
@ -104,8 +104,7 @@
|
|||||||
label="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ADDCUSTOM_ADMIN_VIEWS_LABEL"
|
label="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ADDCUSTOM_ADMIN_VIEWS_LABEL"
|
||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="50">
|
|
||||||
<form hidden="true" name="list_addcustom_admin_views_modal" repeat="true">
|
<form hidden="true" name="list_addcustom_admin_views_modal" repeat="true">
|
||||||
<!-- Customadminview Field. Type: Customadminviews. (custom) -->
|
<!-- Customadminview Field. Type: Customadminviews. (custom) -->
|
||||||
<field
|
<field
|
||||||
|
@ -105,7 +105,6 @@
|
|||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
icon="list"
|
icon="list"
|
||||||
maximum="10"
|
|
||||||
filter="raw">
|
filter="raw">
|
||||||
<form hidden="true" name="list_dashboard_tab_modal" repeat="true">
|
<form hidden="true" name="list_dashboard_tab_modal" repeat="true">
|
||||||
<!-- Name Field. Type: Text. (joomla) -->
|
<!-- Name Field. Type: Text. (joomla) -->
|
||||||
|
@ -107,8 +107,7 @@
|
|||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
description="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_ADDFOLDERSFULLPATH_DESCRIPTION"
|
description="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_ADDFOLDERSFULLPATH_DESCRIPTION"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="500">
|
|
||||||
<form hidden="true" name="list_addfoldersfullpath_modal" repeat="true">
|
<form hidden="true" name="list_addfoldersfullpath_modal" repeat="true">
|
||||||
<!-- Folderpath Field. Type: Text. (joomla) -->
|
<!-- Folderpath Field. Type: Text. (joomla) -->
|
||||||
<field
|
<field
|
||||||
@ -161,8 +160,7 @@
|
|||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
description="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_ADDFILESFULLPATH_DESCRIPTION"
|
description="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_ADDFILESFULLPATH_DESCRIPTION"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="500">
|
|
||||||
<form hidden="true" name="list_addfilesfullpath_modal" repeat="true">
|
<form hidden="true" name="list_addfilesfullpath_modal" repeat="true">
|
||||||
<!-- Filepath Field. Type: Text. (joomla) -->
|
<!-- Filepath Field. Type: Text. (joomla) -->
|
||||||
<field
|
<field
|
||||||
@ -216,8 +214,7 @@
|
|||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
description="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_ADDFOLDERS_DESCRIPTION"
|
description="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_ADDFOLDERS_DESCRIPTION"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="500">
|
|
||||||
<form hidden="true" name="list_addfolders_modal" repeat="true">
|
<form hidden="true" name="list_addfolders_modal" repeat="true">
|
||||||
<!-- Folder Field. Type: Customfolderlist. (custom) -->
|
<!-- Folder Field. Type: Customfolderlist. (custom) -->
|
||||||
<field
|
<field
|
||||||
@ -268,8 +265,7 @@
|
|||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
description="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_ADDFILES_DESCRIPTION"
|
description="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_ADDFILES_DESCRIPTION"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="500">
|
|
||||||
<form hidden="true" name="list_addfiles_modal" repeat="true">
|
<form hidden="true" name="list_addfiles_modal" repeat="true">
|
||||||
<!-- File Field. Type: Customfilelist. (custom) -->
|
<!-- File Field. Type: Customfilelist. (custom) -->
|
||||||
<field
|
<field
|
||||||
|
@ -105,8 +105,7 @@
|
|||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
description="COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_SQL_TWEAK_DESCRIPTION"
|
description="COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_SQL_TWEAK_DESCRIPTION"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="50">
|
|
||||||
<form hidden="true" name="list_sql_tweak_modal" repeat="true">
|
<form hidden="true" name="list_sql_tweak_modal" repeat="true">
|
||||||
<!-- Adminview Field. Type: Componentadminviews. (custom) -->
|
<!-- Adminview Field. Type: Componentadminviews. (custom) -->
|
||||||
<field
|
<field
|
||||||
|
@ -105,8 +105,7 @@
|
|||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
description="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_ADDSITE_VIEWS_DESCRIPTION"
|
description="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_ADDSITE_VIEWS_DESCRIPTION"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="500">
|
|
||||||
<form hidden="true" name="list_addsite_views_modal" repeat="true">
|
<form hidden="true" name="list_addsite_views_modal" repeat="true">
|
||||||
<!-- Siteview Field. Type: Siteviews. (custom) -->
|
<!-- Siteview Field. Type: Siteviews. (custom) -->
|
||||||
<field
|
<field
|
||||||
|
@ -105,8 +105,7 @@
|
|||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
description="COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_UPDATE_DESCRIPTION"
|
description="COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_UPDATE_DESCRIPTION"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="300">
|
|
||||||
<form hidden="true" name="list_version_update_modal" repeat="true">
|
<form hidden="true" name="list_version_update_modal" repeat="true">
|
||||||
<!-- Version Field. Type: Text. (joomla) -->
|
<!-- Version Field. Type: Text. (joomla) -->
|
||||||
<field
|
<field
|
||||||
|
@ -200,8 +200,7 @@
|
|||||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_AJAX_INPUT_LABEL"
|
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_AJAX_INPUT_LABEL"
|
||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="150">
|
|
||||||
<form hidden="true" name="list_ajax_input_modal" repeat="true">
|
<form hidden="true" name="list_ajax_input_modal" repeat="true">
|
||||||
<!-- Value_name Field. Type: Text. (joomla) -->
|
<!-- Value_name Field. Type: Text. (joomla) -->
|
||||||
<field
|
<field
|
||||||
@ -612,8 +611,7 @@
|
|||||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_CUSTOM_BUTTON_LABEL"
|
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_CUSTOM_BUTTON_LABEL"
|
||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="7">
|
|
||||||
<form hidden="true" name="list_custom_button_modal" repeat="true">
|
<form hidden="true" name="list_custom_button_modal" repeat="true">
|
||||||
<!-- Icomoon Field. Type: List. (joomla) -->
|
<!-- Icomoon Field. Type: List. (joomla) -->
|
||||||
<field
|
<field
|
||||||
|
@ -389,8 +389,7 @@
|
|||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
description="COM_COMPONENTBUILDER_DYNAMIC_GET_FILTER_DESCRIPTION"
|
description="COM_COMPONENTBUILDER_DYNAMIC_GET_FILTER_DESCRIPTION"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="50">
|
|
||||||
<form hidden="true" name="list_filter_modal" repeat="true">
|
<form hidden="true" name="list_filter_modal" repeat="true">
|
||||||
<!-- Filter_type Field. Type: List. (joomla) -->
|
<!-- Filter_type Field. Type: List. (joomla) -->
|
||||||
<field
|
<field
|
||||||
@ -517,8 +516,7 @@
|
|||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
description="COM_COMPONENTBUILDER_DYNAMIC_GET_WHERE_DESCRIPTION"
|
description="COM_COMPONENTBUILDER_DYNAMIC_GET_WHERE_DESCRIPTION"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="50">
|
|
||||||
<form hidden="true" name="list_where_modal" repeat="true">
|
<form hidden="true" name="list_where_modal" repeat="true">
|
||||||
<!-- Table_key Field. Type: Text. (joomla) -->
|
<!-- Table_key Field. Type: Text. (joomla) -->
|
||||||
<field
|
<field
|
||||||
@ -610,8 +608,7 @@
|
|||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
description="COM_COMPONENTBUILDER_DYNAMIC_GET_ORDER_DESCRIPTION"
|
description="COM_COMPONENTBUILDER_DYNAMIC_GET_ORDER_DESCRIPTION"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="50">
|
|
||||||
<form hidden="true" name="list_order_modal" repeat="true">
|
<form hidden="true" name="list_order_modal" repeat="true">
|
||||||
<!-- Table_key Field. Type: Text. (joomla) -->
|
<!-- Table_key Field. Type: Text. (joomla) -->
|
||||||
<field
|
<field
|
||||||
@ -667,8 +664,7 @@
|
|||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
description="COM_COMPONENTBUILDER_DYNAMIC_GET_GLOBAL_DESCRIPTION"
|
description="COM_COMPONENTBUILDER_DYNAMIC_GET_GLOBAL_DESCRIPTION"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="200">
|
|
||||||
<form hidden="true" name="list_global_modal" repeat="true">
|
<form hidden="true" name="list_global_modal" repeat="true">
|
||||||
<!-- Name Field. Type: Text. (joomla) -->
|
<!-- Name Field. Type: Text. (joomla) -->
|
||||||
<field
|
<field
|
||||||
@ -843,8 +839,7 @@
|
|||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
description="COM_COMPONENTBUILDER_DYNAMIC_GET_JOIN_VIEW_TABLE_DESCRIPTION"
|
description="COM_COMPONENTBUILDER_DYNAMIC_GET_JOIN_VIEW_TABLE_DESCRIPTION"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="50">
|
|
||||||
<form hidden="true" name="list_join_view_table_modal" repeat="true">
|
<form hidden="true" name="list_join_view_table_modal" repeat="true">
|
||||||
<!-- View_table Field. Type: Adminviews. (custom) -->
|
<!-- View_table Field. Type: Adminviews. (custom) -->
|
||||||
<field
|
<field
|
||||||
@ -1112,8 +1107,7 @@
|
|||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
description="COM_COMPONENTBUILDER_DYNAMIC_GET_JOIN_DB_TABLE_DESCRIPTION"
|
description="COM_COMPONENTBUILDER_DYNAMIC_GET_JOIN_DB_TABLE_DESCRIPTION"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="50">
|
|
||||||
<form hidden="true" name="list_join_db_table_modal" repeat="true">
|
<form hidden="true" name="list_join_db_table_modal" repeat="true">
|
||||||
<!-- Db_table Field. Type: Dbtables. (custom) -->
|
<!-- Db_table Field. Type: Dbtables. (custom) -->
|
||||||
<field
|
<field
|
||||||
|
@ -109,8 +109,7 @@
|
|||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
description="COM_COMPONENTBUILDER_FIELDTYPE_PROPERTIES_DESCRIPTION"
|
description="COM_COMPONENTBUILDER_FIELDTYPE_PROPERTIES_DESCRIPTION"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="500">
|
|
||||||
<form hidden="true" name="list_properties_modal" repeat="true">
|
<form hidden="true" name="list_properties_modal" repeat="true">
|
||||||
<!-- Name Field. Type: Text. (joomla) -->
|
<!-- Name Field. Type: Text. (joomla) -->
|
||||||
<field
|
<field
|
||||||
|
@ -204,6 +204,7 @@
|
|||||||
required="true"
|
required="true"
|
||||||
filter="url"
|
filter="url"
|
||||||
validated="url"
|
validated="url"
|
||||||
|
scheme="http,https"
|
||||||
message="COM_COMPONENTBUILDER_HELP_DOCUMENT_URL_MESSAGE"
|
message="COM_COMPONENTBUILDER_HELP_DOCUMENT_URL_MESSAGE"
|
||||||
hint="COM_COMPONENTBUILDER_HELP_DOCUMENT_URL_HINT"
|
hint="COM_COMPONENTBUILDER_HELP_DOCUMENT_URL_HINT"
|
||||||
/>
|
/>
|
||||||
|
@ -1041,8 +1041,7 @@
|
|||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDCONTRIBUTORS_DESCRIPTION"
|
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDCONTRIBUTORS_DESCRIPTION"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="50">
|
|
||||||
<form hidden="true" name="list_addcontributors_modal" repeat="true">
|
<form hidden="true" name="list_addcontributors_modal" repeat="true">
|
||||||
<!-- Name Field. Type: Text. (joomla) -->
|
<!-- Name Field. Type: Text. (joomla) -->
|
||||||
<field
|
<field
|
||||||
|
@ -119,8 +119,7 @@
|
|||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
description="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION_DESCRIPTION"
|
description="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION_DESCRIPTION"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="200">
|
|
||||||
<form hidden="true" name="list_translation_modal" repeat="true">
|
<form hidden="true" name="list_translation_modal" repeat="true">
|
||||||
<!-- Translation Field. Type: Textarea. (joomla) -->
|
<!-- Translation Field. Type: Textarea. (joomla) -->
|
||||||
<field
|
<field
|
||||||
|
@ -199,8 +199,7 @@
|
|||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
description="COM_COMPONENTBUILDER_LIBRARY_ADDCONDITIONS_DESCRIPTION"
|
description="COM_COMPONENTBUILDER_LIBRARY_ADDCONDITIONS_DESCRIPTION"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="500">
|
|
||||||
<form hidden="true" name="list_addconditions_modal" repeat="true">
|
<form hidden="true" name="list_addconditions_modal" repeat="true">
|
||||||
<!-- File Field. Type: Libraryfiles. (custom) -->
|
<!-- File Field. Type: Libraryfiles. (custom) -->
|
||||||
<field
|
<field
|
||||||
|
@ -105,8 +105,7 @@
|
|||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
description="COM_COMPONENTBUILDER_LIBRARY_CONFIG_ADDCONFIG_DESCRIPTION"
|
description="COM_COMPONENTBUILDER_LIBRARY_CONFIG_ADDCONFIG_DESCRIPTION"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="500">
|
|
||||||
<form hidden="true" name="list_addconfig_modal" repeat="true">
|
<form hidden="true" name="list_addconfig_modal" repeat="true">
|
||||||
<!-- Field Field. Type: Fields. (custom) -->
|
<!-- Field Field. Type: Fields. (custom) -->
|
||||||
<field
|
<field
|
||||||
|
@ -107,8 +107,7 @@
|
|||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
description="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ADDFOLDERSFULLPATH_DESCRIPTION"
|
description="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ADDFOLDERSFULLPATH_DESCRIPTION"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="500">
|
|
||||||
<form hidden="true" name="list_addfoldersfullpath_modal" repeat="true">
|
<form hidden="true" name="list_addfoldersfullpath_modal" repeat="true">
|
||||||
<!-- Folderpath Field. Type: Text. (joomla) -->
|
<!-- Folderpath Field. Type: Text. (joomla) -->
|
||||||
<field
|
<field
|
||||||
@ -161,8 +160,7 @@
|
|||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
description="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ADDFILESFULLPATH_DESCRIPTION"
|
description="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ADDFILESFULLPATH_DESCRIPTION"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="500">
|
|
||||||
<form hidden="true" name="list_addfilesfullpath_modal" repeat="true">
|
<form hidden="true" name="list_addfilesfullpath_modal" repeat="true">
|
||||||
<!-- Filepath Field. Type: Text. (joomla) -->
|
<!-- Filepath Field. Type: Text. (joomla) -->
|
||||||
<field
|
<field
|
||||||
@ -216,8 +214,7 @@
|
|||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
description="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ADDFOLDERS_DESCRIPTION"
|
description="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ADDFOLDERS_DESCRIPTION"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="500">
|
|
||||||
<form hidden="true" name="list_addfolders_modal" repeat="true">
|
<form hidden="true" name="list_addfolders_modal" repeat="true">
|
||||||
<!-- Folder Field. Type: Customfolderlist. (custom) -->
|
<!-- Folder Field. Type: Customfolderlist. (custom) -->
|
||||||
<field
|
<field
|
||||||
@ -268,8 +265,7 @@
|
|||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
description="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ADDFILES_DESCRIPTION"
|
description="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ADDFILES_DESCRIPTION"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="500">
|
|
||||||
<form hidden="true" name="list_addfiles_modal" repeat="true">
|
<form hidden="true" name="list_addfiles_modal" repeat="true">
|
||||||
<!-- File Field. Type: Customfilelist. (custom) -->
|
<!-- File Field. Type: Customfilelist. (custom) -->
|
||||||
<field
|
<field
|
||||||
@ -321,8 +317,7 @@
|
|||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
description="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ADDURLS_DESCRIPTION"
|
description="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ADDURLS_DESCRIPTION"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="500">
|
|
||||||
<form hidden="true" name="list_addurls_modal" repeat="true">
|
<form hidden="true" name="list_addurls_modal" repeat="true">
|
||||||
<!-- Url Field. Type: Url. (joomla) -->
|
<!-- Url Field. Type: Url. (joomla) -->
|
||||||
<field
|
<field
|
||||||
|
@ -174,8 +174,7 @@
|
|||||||
label="COM_COMPONENTBUILDER_SITE_VIEW_AJAX_INPUT_LABEL"
|
label="COM_COMPONENTBUILDER_SITE_VIEW_AJAX_INPUT_LABEL"
|
||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="150">
|
|
||||||
<form hidden="true" name="list_ajax_input_modal" repeat="true">
|
<form hidden="true" name="list_ajax_input_modal" repeat="true">
|
||||||
<!-- Value_name Field. Type: Text. (joomla) -->
|
<!-- Value_name Field. Type: Text. (joomla) -->
|
||||||
<field
|
<field
|
||||||
@ -631,8 +630,7 @@
|
|||||||
label="COM_COMPONENTBUILDER_SITE_VIEW_CUSTOM_BUTTON_LABEL"
|
label="COM_COMPONENTBUILDER_SITE_VIEW_CUSTOM_BUTTON_LABEL"
|
||||||
layout="joomla.form.field.subform.repeatable-table"
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
icon="list"
|
icon="list">
|
||||||
maximum="7">
|
|
||||||
<form hidden="true" name="list_custom_button_modal" repeat="true">
|
<form hidden="true" name="list_custom_button_modal" repeat="true">
|
||||||
<!-- Icomoon Field. Type: List. (joomla) -->
|
<!-- Icomoon Field. Type: List. (joomla) -->
|
||||||
<field
|
<field
|
||||||
|
@ -113,6 +113,7 @@
|
|||||||
required="true"
|
required="true"
|
||||||
filter="url"
|
filter="url"
|
||||||
validated="url"
|
validated="url"
|
||||||
|
scheme="http,https"
|
||||||
message="COM_COMPONENTBUILDER_SNIPPET_URL_MESSAGE"
|
message="COM_COMPONENTBUILDER_SNIPPET_URL_MESSAGE"
|
||||||
hint="COM_COMPONENTBUILDER_SNIPPET_URL_HINT"
|
hint="COM_COMPONENTBUILDER_SNIPPET_URL_HINT"
|
||||||
/>
|
/>
|
||||||
|
@ -1527,7 +1527,7 @@ INSERT INTO `#__componentbuilder_fieldtype` (`id`, `catid`, `description`, `name
|
|||||||
(32, '', 'Note: When using the file input type you should always add the attribute enctype=\"multipart/form-data\" to your form tag. Otherwise, the uploaded files will not be attached correctly.\r\n\r\nNote 2: You can put a soft limit file size by adding a hidden field with name=\"MAX_FILE_SIZE\" and value the maximum allowed bytes which is handled by php, but you must also handle it in your code with or without it.', 'File', '{\"properties0\":{\"name\":\"type\",\"example\":\"file\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be file.\"},\"properties1\":{\"name\":\"name\",\"example\":\"myfilevalue\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Enter some text\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"Choose an image from your computer with maximum 100KB\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value, but doesn\'t mean much for a file.\"},\"properties5\":{\"name\":\"size\",\"example\":\"10\",\"adjustable\":\"1\",\"description\":\"(optional) is the width of the file box in characters.\"},\"properties6\":{\"name\":\"accept\",\"example\":\"image\\/*\",\"adjustable\":\"1\",\"description\":\"(optional) Tells the browser what <a href=\\\"http:\\/\\/www.w3schools.com\\/tags\\/att_input_accept.asp\\\" target=\\\"_blank\\\">MIME types<\\/a> your form will allow to be uploaded.\"},\"properties7\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field.\"},\"properties8\":{\"name\":\"labelclass\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) adds a CSS class for form field\'s label; for Joomla 2.5.4+\"},\"properties9\":{\"name\":\"disabled\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute\"},\"properties10\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"},\"properties11\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) For Joomla form validating it to be filled in\"},\"properties12\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Whether to Joomla validate the field according to rules\"},\"properties13\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Allows you to hide the field based on the value(s) of another field; for Joomla 3.2.4+\"}}', 'Provides an input field for files', '', 1, 7, '', 3),
|
(32, '', 'Note: When using the file input type you should always add the attribute enctype=\"multipart/form-data\" to your form tag. Otherwise, the uploaded files will not be attached correctly.\r\n\r\nNote 2: You can put a soft limit file size by adding a hidden field with name=\"MAX_FILE_SIZE\" and value the maximum allowed bytes which is handled by php, but you must also handle it in your code with or without it.', 'File', '{\"properties0\":{\"name\":\"type\",\"example\":\"file\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be file.\"},\"properties1\":{\"name\":\"name\",\"example\":\"myfilevalue\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Enter some text\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"Choose an image from your computer with maximum 100KB\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value, but doesn\'t mean much for a file.\"},\"properties5\":{\"name\":\"size\",\"example\":\"10\",\"adjustable\":\"1\",\"description\":\"(optional) is the width of the file box in characters.\"},\"properties6\":{\"name\":\"accept\",\"example\":\"image\\/*\",\"adjustable\":\"1\",\"description\":\"(optional) Tells the browser what <a href=\\\"http:\\/\\/www.w3schools.com\\/tags\\/att_input_accept.asp\\\" target=\\\"_blank\\\">MIME types<\\/a> your form will allow to be uploaded.\"},\"properties7\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field.\"},\"properties8\":{\"name\":\"labelclass\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) adds a CSS class for form field\'s label; for Joomla 2.5.4+\"},\"properties9\":{\"name\":\"disabled\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute\"},\"properties10\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"},\"properties11\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) For Joomla form validating it to be filled in\"},\"properties12\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Whether to Joomla validate the field according to rules\"},\"properties13\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Allows you to hide the field based on the value(s) of another field; for Joomla 3.2.4+\"}}', 'Provides an input field for files', '', 1, 7, '', 3),
|
||||||
(33, '', 'The menuitem form field type provides a drop down grouped list of the available menu items from your Joomla site.', 'menuitem', '{\"properties0\":{\"name\":\"type\",\"example\":\"menuitem\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) must be menuitem.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mymenuitem\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select a menu item\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is the default menu item. Note that this is the ItemID number of the menu item.\"},\"properties4\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties5\":{\"name\":\"published\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) determines whether all menu items are listed or only published menu items. If state is \'0\' then all menu items will be listed. If state is \'1\' then only published menu items will be listed.\"},\"properties6\":{\"name\":\"filter\",\"example\":\"int\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties7\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) Allows you to hide the field based on the value(s) of another field; for Joomla 3.2.4+\"}}', 'provides a drop down list of the available menu items from your Joomla site.', '', 1, 2, '', 4),
|
(33, '', 'The menuitem form field type provides a drop down grouped list of the available menu items from your Joomla site.', 'menuitem', '{\"properties0\":{\"name\":\"type\",\"example\":\"menuitem\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) must be menuitem.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mymenuitem\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select a menu item\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is the default menu item. Note that this is the ItemID number of the menu item.\"},\"properties4\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties5\":{\"name\":\"published\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) determines whether all menu items are listed or only published menu items. If state is \'0\' then all menu items will be listed. If state is \'1\' then only published menu items will be listed.\"},\"properties6\":{\"name\":\"filter\",\"example\":\"int\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties7\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) Allows you to hide the field based on the value(s) of another field; for Joomla 3.2.4+\"}}', 'provides a drop down list of the available menu items from your Joomla site.', '', 1, 2, '', 4),
|
||||||
(34, '', 'Remember all views already have [accesslevel] added by default, only add this if you need more custom access selection! Provides a dropdown list of accesslevel options with the current option selected.', 'Accesslevel', '{\"properties0\":{\"name\":\"type\",\"example\":\"accesslevel\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) must be accesslevel\"},\"properties1\":{\"name\":\"name\",\"example\":\"accesstwo\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the field. This must match the name of the query results column that contains the values that will be shown to the user in the drop-down list, unless a different name is specified in the value_field attribute. \"},\"properties2\":{\"name\":\"label\",\"example\":\"Access Two\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"Select a access level to this concept.\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is a CSS class name for the HTML form field.\"},\"properties5\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is the field required true if yes.\"},\"properties6\":{\"name\":\"multiple\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) If set to multiple then allows more than one usergroup to be selected.\"},\"properties7\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'List of accesslevels', '', 1, 1, '', 5),
|
(34, '', 'Remember all views already have [accesslevel] added by default, only add this if you need more custom access selection! Provides a dropdown list of accesslevel options with the current option selected.', 'Accesslevel', '{\"properties0\":{\"name\":\"type\",\"example\":\"accesslevel\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) must be accesslevel\"},\"properties1\":{\"name\":\"name\",\"example\":\"accesstwo\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the field. This must match the name of the query results column that contains the values that will be shown to the user in the drop-down list, unless a different name is specified in the value_field attribute. \"},\"properties2\":{\"name\":\"label\",\"example\":\"Access Two\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"Select a access level to this concept.\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is a CSS class name for the HTML form field.\"},\"properties5\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is the field required true if yes.\"},\"properties6\":{\"name\":\"multiple\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) If set to multiple then allows more than one usergroup to be selected.\"},\"properties7\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'List of accesslevels', '', 1, 1, '', 5),
|
||||||
(35, '', 'Provides a form with rows of fields that you specify. As many options can be added as desired. Note this form field has a jQuery based javascript file as a dependency.', 'Subform', '{\"properties0\":{\"name\":\"type\",\"example\":\"subform\",\"description\":\"(mandatory) must be subform.\"},\"properties1\":{\"name\":\"name\",\"example\":\"options\",\"adjustable\":\"1\",\"description\":\"(mandatory) is the unique name of the parameter\"},\"properties2\":{\"name\":\"label\",\"example\":\"The Option List\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"layout\",\"example\":\"joomla.form.field.subform.repeatable-table\",\"adjustable\":\"1\",\"description\":\"(mandatory) The layout for the repeatable table.\"},\"properties4\":{\"name\":\"multiple\",\"example\":\"true\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The rows to be multiple.\"},\"properties5\":{\"name\":\"fields\",\"example\":\"1,2,3\",\"adjustable\":\"1\",\"description\":\"(mandatory) The fields to add to the modal. All fields must first be created in component builder as a field before you can add them here, since you must use the id of the field. Separate the field ids with commas. Do not add custom fields that are not also used in this component.\"},\"properties6\":{\"name\":\"formsource\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) you can add a path to a xml file containing the fields.\"},\"properties7\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) description text for the form field. Displays at the top of the modal with the name as well as in the usual position in the form\"},\"properties8\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The default value for the form field if the field is left empty. Note this has to be a json string compatible with the contents of the form field.\"},\"properties9\":{\"name\":\"icon\",\"example\":\"list\",\"adjustable\":\"1\",\"description\":\"(optional) The icon to show on the select button (is prefixed with \\\"icon-\\\").\"},\"properties10\":{\"name\":\"maximum\",\"example\":\"50\",\"adjustable\":\"1\",\"description\":\"(optional) The maximum number of rows of fields allowed (by default 999 to be effectively infinite)\"},\"properties11\":{\"name\":\"filter\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Use only if you would like to save raw data, since the default is best.\"},\"properties12\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'Allows form fields which can have as many options as the user desires.', '', 1, 9, '', 6);
|
(35, '', 'Provides a form with rows of fields that you specify. As many options can be added as desired. Note this form field has a jQuery based javascript file as a dependency.', 'Subform', '{\"properties0\":{\"name\":\"type\",\"example\":\"subform\",\"description\":\"(mandatory) must be subform.\"},\"properties1\":{\"name\":\"name\",\"example\":\"options\",\"adjustable\":\"1\",\"description\":\"(mandatory) is the unique name of the parameter\"},\"properties2\":{\"name\":\"label\",\"example\":\"The Option List\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"layout\",\"example\":\"joomla.form.field.subform.repeatable-table\",\"adjustable\":\"1\",\"description\":\"(mandatory) The layout for the repeatable table.\"},\"properties4\":{\"name\":\"component\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) To change the component where it should search for layout\"},\"properties5\":{\"name\":\"client\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Function to initialise the application client<br \\/>Frontend: <code>site<\\/code> or <code>0<\\/code><br \\/>Backend: <code>admin<\\/code> or <code>1<\\/code>\"},\"properties6\":{\"name\":\"multiple\",\"example\":\"true\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The rows to be multiple.\"},\"properties7\":{\"name\":\"buttons\",\"example\":\"add,remove,move\",\"adjustable\":\"1\",\"description\":\"(optional) Which buttons to show if multiple mode is true.<br \\/>Options: <code>add,remove,move<\\/code>\"},\"properties8\":{\"name\":\"fields\",\"example\":\"1,2,3\",\"adjustable\":\"1\",\"description\":\"(mandatory) The fields to add to the modal. All fields must first be created in component builder as a field before you can add them here, since you must use the id of the field. Separate the field ids with commas. Do not add custom fields that are not also used in this component.\"},\"properties9\":{\"name\":\"formsource\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) you can add a path to a xml file containing the fields.\"},\"properties10\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) description text for the form field. Displays at the top of the modal with the name as well as in the usual position in the form\"},\"properties11\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The default value for the form field if the field is left empty. Note this has to be a json string compatible with the contents of the form field.\"},\"properties12\":{\"name\":\"icon\",\"example\":\"list\",\"adjustable\":\"1\",\"description\":\"(optional) The icon to show on the select button (is prefixed with \\\"icon-\\\").\"},\"properties13\":{\"name\":\"max\",\"example\":\"50\",\"adjustable\":\"1\",\"description\":\"(optional) The maximum number of rows of fields allowed (by default 999 to be effectively infinite)\"},\"properties14\":{\"name\":\"min\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The minimum number of rows of fields required\"},\"properties15\":{\"name\":\"filter\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Use only if you would like to save raw data, since the default is best.\"},\"properties16\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'Allows form fields which can have as many options as the user desires.', '', 1, 12, '', 6);
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Dumping data for table `#__componentbuilder_help_document`
|
-- Dumping data for table `#__componentbuilder_help_document`
|
||||||
|
@ -106,7 +106,7 @@ jQuery(document).ready(function($) {
|
|||||||
<div id="j-main-container">
|
<div id="j-main-container">
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<div id="form">
|
<div id="form">
|
||||||
<div class="span6">
|
<div class="span4">
|
||||||
<h3><?php echo JText::_('COM_COMPONENTBUILDER_READY_TO_COMPILE_A_COMPONENT'); ?></h3>
|
<h3><?php echo JText::_('COM_COMPONENTBUILDER_READY_TO_COMPILE_A_COMPONENT'); ?></h3>
|
||||||
<form action="index.php?option=com_componentbuilder&view=compiler" method="post" name="compilerForm" id="compilerForm" class="form-validate" enctype="multipart/form-data">
|
<form action="index.php?option=com_componentbuilder&view=compiler" method="post" name="compilerForm" id="compilerForm" class="form-validate" enctype="multipart/form-data">
|
||||||
<div>
|
<div>
|
||||||
@ -130,7 +130,7 @@ jQuery(document).ready(function($) {
|
|||||||
<?php echo JHtml::_('form.token'); ?>
|
<?php echo JHtml::_('form.token'); ?>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="span6">
|
<div class="span7">
|
||||||
<div id="component-details"><?php echo $selectNotice; ?></div>
|
<div id="component-details"><?php echo $selectNotice; ?></div>
|
||||||
<div id="noticeboard" class="well well-small">
|
<div id="noticeboard" class="well well-small">
|
||||||
<h2 class="module-title nav-header"><?php echo JText::_('COM_COMPONENTBUILDER_VDM_NOTICE_BOARD'); ?><span id="vdm-new-notice" style="display:none; color:red;"> (<?php echo JText::_('COM_COMPONENTBUILDER_NEW_NOTICE'); ?>)</span></h2>
|
<h2 class="module-title nav-header"><?php echo JText::_('COM_COMPONENTBUILDER_VDM_NOTICE_BOARD'); ?><span id="vdm-new-notice" style="display:none; color:red;"> (<?php echo JText::_('COM_COMPONENTBUILDER_NEW_NOTICE'); ?>)</span></h2>
|
||||||
|
@ -81,60 +81,142 @@ class ComponentbuilderViewCompiler extends JViewLegacy
|
|||||||
if(ComponentbuilderHelper::checkArray($this->Components)){
|
if(ComponentbuilderHelper::checkArray($this->Components)){
|
||||||
jimport('joomla.form.form');
|
jimport('joomla.form.form');
|
||||||
|
|
||||||
$radio1 = JFormHelper::loadFieldType('radio',true);
|
// start the form
|
||||||
// start building add to sales folder xml field
|
$form = array();
|
||||||
$xml = '<field label="'.JText::_('COM_COMPONENTBUILDER_ADD_TO_BACKUP_FOLDER_AMP_SALES_SERVER_LTSMALLGTIF_SETLTSMALLGT').'" description="'.JText::_('COM_COMPONENTBUILDER_SHOULD_THE_ZIPPED_PACKAGE_OF_THE_COMPONENT_BE_MOVED_TO_THE_LOCAL_BACKUP_AND_REMOTE_SALES_SERVER_THIS_IS_ONLY_APPLICABLE_IF_THIS_COMPONENT_HAS_THOSE_VALUES_SET').'" name="backup" type="radio" class="btn-group btn-group-yesno" default="0">';
|
|
||||||
$xml .= '<option value="1">'.JText::_('COM_COMPONENTBUILDER_YES').'</option> <option value="0">'.JText::_('COM_COMPONENTBUILDER_NO').'</option>';
|
|
||||||
$xml .= "</field>";
|
|
||||||
// prepare the xml
|
|
||||||
$sales = new SimpleXMLElement($xml);
|
|
||||||
// set components to form
|
|
||||||
$radio1->setup($sales,0);
|
|
||||||
|
|
||||||
$radio2 = JFormHelper::loadFieldType('radio',true);
|
// get the sales radio field
|
||||||
// start building add to repository folder xml field
|
$sales = JFormHelper::loadFieldType('radio',true);
|
||||||
$xml = '<field label="'.JText::_('COM_COMPONENTBUILDER_ADD_TO_REPOSITORY_FOLDER').'" description="'.JText::_('COM_COMPONENTBUILDER_SHOULD_THE_COMPONENT_BE_MOVED_TO_YOUR_LOCAL_REPOSITORY_FOLDER').'" name="repository" type="radio" class="btn-group btn-group-yesno" default="1">';
|
// start sales xml
|
||||||
$xml .= '<option value="1">'.JText::_('COM_COMPONENTBUILDER_YES').'</option> <option value="0">'.JText::_('COM_COMPONENTBUILDER_NO').'</option>';
|
$salesXML = new SimpleXMLElement('<field/>');
|
||||||
$xml .= "</field>";
|
// sales attributes
|
||||||
// prepare the xml
|
$salesAttributes = array(
|
||||||
$repository = new SimpleXMLElement($xml);
|
'type' => 'radio',
|
||||||
// set components to form
|
'name' => 'backup',
|
||||||
$radio2->setup($repository,1);
|
'label' => 'COM_COMPONENTBUILDER_ADD_TO_BACKUP_FOLDER_AMP_SALES_SERVER_SMALLIF_SETSMALL',
|
||||||
|
'class' => 'btn-group btn-group-yesno',
|
||||||
|
'description' => 'COM_COMPONENTBUILDER_SHOULD_THE_ZIPPED_PACKAGE_OF_THE_COMPONENT_BE_MOVED_TO_THE_LOCAL_BACKUP_AND_REMOTE_SALES_SERVER_THIS_IS_ONLY_APPLICABLE_IF_THIS_COMPONENT_HAS_THOSE_VALUES_SET',
|
||||||
|
'default' => '0');
|
||||||
|
// load the sales attributes
|
||||||
|
ComponentbuilderHelper::xmlAddAttributes($salesXML, $salesAttributes);
|
||||||
|
// set the sales options
|
||||||
|
$salesOptions = array(
|
||||||
|
'1' => 'COM_COMPONENTBUILDER_YES',
|
||||||
|
'0' => 'COM_COMPONENTBUILDER_NO');
|
||||||
|
// load the sales options
|
||||||
|
ComponentbuilderHelper::xmlAddOptions($salesXML, $salesOptions);
|
||||||
|
// setup the sales radio field
|
||||||
|
$sales->setup($salesXML,0);
|
||||||
|
// add to form
|
||||||
|
$form[] = $sales;
|
||||||
|
|
||||||
$radio3 = JFormHelper::loadFieldType('radio',true);
|
// get the repository radio field
|
||||||
// start building custom code placeholders
|
$repository = JFormHelper::loadFieldType('radio',true);
|
||||||
$xml = '<field label="'.JText::_('COM_COMPONENTBUILDER_ADD_CUSTOM_CODE_PLACEHOLDERS').'" description="'.JText::_('COM_COMPONENTBUILDER_SHOULD_JCB_INSERT_THE_CUSTOM_CODE_PLACEHOLDERS_THIS_IS_ONLY_APPLICABLE_IF_THIS_COMPONENT_HAS_CUSTOM_CODE').'" name="placeholders" type="radio" class="btn-group btn-group-yesno" default="2">';
|
// start repository xml
|
||||||
$xml .= '<option value="2">'.JText::_('COM_COMPONENTBUILDER_GLOBAL').'</option> <option value="1">'.JText::_('COM_COMPONENTBUILDER_YES').'</option> <option value="0">'.JText::_('COM_COMPONENTBUILDER_NO').'</option>';
|
$repositoryXML = new SimpleXMLElement('<field/>');
|
||||||
$xml .= "</field>";
|
// repository attributes
|
||||||
// prepare the xml
|
$repositoryAttributes = array(
|
||||||
$placeholder = new SimpleXMLElement($xml);
|
'type' => 'radio',
|
||||||
// set components to form
|
'name' => 'repository',
|
||||||
$radio3->setup($placeholder,2);
|
'label' => 'COM_COMPONENTBUILDER_ADD_TO_REPOSITORY_FOLDER',
|
||||||
|
'class' => 'btn-group btn-group-yesno',
|
||||||
|
'description' => 'COM_COMPONENTBUILDER_SHOULD_THE_COMPONENT_BE_MOVED_TO_YOUR_LOCAL_REPOSITORY_FOLDER',
|
||||||
|
'default' => '1');
|
||||||
|
// load the repository attributes
|
||||||
|
ComponentbuilderHelper::xmlAddAttributes($repositoryXML, $repositoryAttributes);
|
||||||
|
// start the repository options
|
||||||
|
$repositoryOptions = array(
|
||||||
|
'1' => 'COM_COMPONENTBUILDER_YES',
|
||||||
|
'0' => 'COM_COMPONENTBUILDER_NO');
|
||||||
|
// load the repository options
|
||||||
|
ComponentbuilderHelper::xmlAddOptions($repositoryXML, $repositoryOptions);
|
||||||
|
// setup the repository radio field
|
||||||
|
$repository->setup($repositoryXML,1);
|
||||||
|
// add to form
|
||||||
|
$form[] = $repository;
|
||||||
|
|
||||||
$radio4 = JFormHelper::loadFieldType('radio',true);
|
// get the placeholders radio field
|
||||||
// add debug line numbers
|
$placeholders = JFormHelper::loadFieldType('radio',true);
|
||||||
$xml = '<field label="'.JText::_('COM_COMPONENTBUILDER_DEBUG_LINE_NUMBERS').'" description="'.JText::_('COM_COMPONENTBUILDER_ADD_CORRESPONDING_LINE_NUMBERS_TO_THE_DYNAMIC_COMMENTS_SO_TO_SEE_WHERE_IN_THE_COMPILER_THE_LINES_OF_CODE_WAS_BUILD_THIS_WILL_HELP_IF_YOU_NEED_TO_GET_MORE_TECHNICAL_WITH_AN_ISSUE_ON_GITHUB_OR_EVEN_FOR_YOUR_OWN_DEBUGGING').'" name="debuglinenr" type="radio" class="btn-group btn-group-yesno" default="2">';
|
// start placeholders xml
|
||||||
$xml .= '<option value="2">'.JText::_('COM_COMPONENTBUILDER_GLOBAL').'</option> <option value="1">'.JText::_('COM_COMPONENTBUILDER_YES').'</option> <option value="0">'.JText::_('COM_COMPONENTBUILDER_NO').'</option>';
|
$placeholdersXML = new SimpleXMLElement('<field/>');
|
||||||
$xml .= "</field>";
|
// placeholders attributes
|
||||||
// prepare the xml
|
$placeholdersAttributes = array(
|
||||||
$debug_linenr = new SimpleXMLElement($xml);
|
'type' => 'radio',
|
||||||
// set components to form
|
'name' => 'placeholders',
|
||||||
$radio4->setup($debug_linenr,2);
|
'label' => 'COM_COMPONENTBUILDER_ADD_CUSTOM_CODE_PLACEHOLDERS',
|
||||||
|
'class' => 'btn-group btn-group-yesno',
|
||||||
|
'description' => 'COM_COMPONENTBUILDER_SHOULD_JCB_INSERT_THE_CUSTOM_CODE_PLACEHOLDERS_THIS_IS_ONLY_APPLICABLE_IF_THIS_COMPONENT_HAS_CUSTOM_CODE',
|
||||||
|
'default' => '2');
|
||||||
|
// load the placeholders attributes
|
||||||
|
ComponentbuilderHelper::xmlAddAttributes($placeholdersXML, $placeholdersAttributes);
|
||||||
|
// start the placeholders options
|
||||||
|
$placeholdersOptions = array(
|
||||||
|
'2' => 'COM_COMPONENTBUILDER_GLOBAL',
|
||||||
|
'1' => 'COM_COMPONENTBUILDER_YES',
|
||||||
|
'0' => 'COM_COMPONENTBUILDER_NO');
|
||||||
|
// load the placeholders options
|
||||||
|
ComponentbuilderHelper::xmlAddOptions($placeholdersXML, $placeholdersOptions);
|
||||||
|
// setup the placeholders radio field
|
||||||
|
$placeholders->setup($placeholdersXML,2);
|
||||||
|
// add to form
|
||||||
|
$form[] = $placeholders;
|
||||||
|
|
||||||
$list = JFormHelper::loadFieldType('list',true);
|
// get the debuglinenr radio field
|
||||||
// start building componet xml field
|
$debuglinenr = JFormHelper::loadFieldType('radio',true);
|
||||||
$xml = '<field label="'.JText::_('COM_COMPONENTBUILDER_COMPONENTS').'" description="'.JText::_('COM_COMPONENTBUILDER_SELECT_THE_COMPONENT_TO_COMPILE').'" name="component" type="list" class="btn-group" required="true">';
|
// start debuglinenr xml
|
||||||
$xml .= '<option value="">'.JText::_('COM_COMPONENTBUILDER__SELECT_COMPONENT_').'</option>';
|
$debuglinenrXML = new SimpleXMLElement('<field/>');
|
||||||
foreach($this->Components as $componet){
|
// debuglinenr attributes
|
||||||
$xml .= '<option value="'.$componet->id.'">'.$this->escape($componet->name).'</option>';
|
$debuglinenrAttributes = array(
|
||||||
|
'type' => 'radio',
|
||||||
|
'name' => 'debuglinenr',
|
||||||
|
'label' => 'COM_COMPONENTBUILDER_DEBUG_LINE_NUMBERS',
|
||||||
|
'class' => 'btn-group btn-group-yesno',
|
||||||
|
'description' => 'COM_COMPONENTBUILDER_ADD_CORRESPONDING_LINE_NUMBERS_TO_THE_DYNAMIC_COMMENTS_SO_TO_SEE_WHERE_IN_THE_COMPILER_THE_LINES_OF_CODE_WAS_BUILD_THIS_WILL_HELP_IF_YOU_NEED_TO_GET_MORE_TECHNICAL_WITH_AN_ISSUE_ON_GITHUB_OR_EVEN_FOR_YOUR_OWN_DEBUGGING',
|
||||||
|
'default' => '2');
|
||||||
|
// load the debuglinenr attributes
|
||||||
|
ComponentbuilderHelper::xmlAddAttributes($debuglinenrXML, $debuglinenrAttributes);
|
||||||
|
// start the debuglinenr options
|
||||||
|
$debuglinenrOptions = array(
|
||||||
|
'2' => 'COM_COMPONENTBUILDER_GLOBAL',
|
||||||
|
'1' => 'COM_COMPONENTBUILDER_YES',
|
||||||
|
'0' => 'COM_COMPONENTBUILDER_NO');
|
||||||
|
// load the debuglinenr options
|
||||||
|
ComponentbuilderHelper::xmlAddOptions($debuglinenrXML, $debuglinenrOptions);
|
||||||
|
// setup the debuglinenr radio field
|
||||||
|
$debuglinenr->setup($debuglinenrXML,2);
|
||||||
|
// add to form
|
||||||
|
$form[] = $debuglinenr;
|
||||||
|
|
||||||
|
// get the component list field
|
||||||
|
$component = JFormHelper::loadFieldType('list',true);
|
||||||
|
// start component xml
|
||||||
|
$componentXML = new SimpleXMLElement('<field/>');
|
||||||
|
// component attributes
|
||||||
|
$componentAttributes = array(
|
||||||
|
'type' => 'list',
|
||||||
|
'name' => 'component',
|
||||||
|
'label' => 'COM_COMPONENTBUILDER_COMPONENTS',
|
||||||
|
'class' => 'list_class',
|
||||||
|
'description' => 'COM_COMPONENTBUILDER_SELECT_THE_COMPONENT_TO_COMPILE',
|
||||||
|
'required' => 'true');
|
||||||
|
// load the component attributes
|
||||||
|
ComponentbuilderHelper::xmlAddAttributes($componentXML, $componentAttributes);
|
||||||
|
// start the component options
|
||||||
|
$componentOptions = array();
|
||||||
|
$componentOptions[''] = 'COM_COMPONENTBUILDER__SELECT_COMPONENT_';
|
||||||
|
// load component options from array
|
||||||
|
foreach($this->Components as $componet)
|
||||||
|
{
|
||||||
|
$componentOptions[(int) $componet->id] = $this->escape($componet->name);
|
||||||
}
|
}
|
||||||
$xml .= "</field>";
|
// load the component options
|
||||||
// prepare the xml
|
ComponentbuilderHelper::xmlAddOptions($componentXML, $componentOptions);
|
||||||
$componets = new SimpleXMLElement($xml);
|
// setup the component radio field
|
||||||
// set components to form
|
$component->setup($componentXML,'');
|
||||||
$list->setup($componets,0);
|
// add to form
|
||||||
|
$form[] = $component;
|
||||||
|
|
||||||
return array($radio1,$radio2,$radio3,$radio4,$list);
|
// return the form array
|
||||||
|
return $form;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -104,91 +104,160 @@ class ComponentbuilderViewImport_joomla_components extends JViewLegacy
|
|||||||
$form = array();
|
$form = array();
|
||||||
if ('smart_package' === $type)
|
if ('smart_package' === $type)
|
||||||
{
|
{
|
||||||
$radio1 = JFormHelper::loadFieldType('radio',true);
|
// get the force_update radio field
|
||||||
// Switch to force local update
|
$force_update = JFormHelper::loadFieldType('radio',true);
|
||||||
$xml = '<field label="'.JText::_('COM_COMPONENTBUILDER_FORCE_LOCAL_UPDATE').'" description="'.JText::_('COM_COMPONENTBUILDER_SHOULD_WE_FORCE_THE_UPDATE_OF_ALL_LOCAL_DATA_EVEN_IF_IT_IS_NEWER_THEN_THE_DATA_BEING_IMPORTED').'" name="force_update" type="radio" class="btn-group btn-group-yesno" default="0" filter="INT">';
|
// start force_update xml
|
||||||
$xml .= '<option value="1">'.JText::_('COM_COMPONENTBUILDER_YES').'</option> <option value="0">'.JText::_('COM_COMPONENTBUILDER_NO').'</option>';
|
$force_updateXML = new SimpleXMLElement('<field/>');
|
||||||
$xml .= "</field>";
|
// force_update attributes
|
||||||
// prepare the xml
|
$force_updateAttributes = array(
|
||||||
$force = new SimpleXMLElement($xml);
|
'type' => 'radio',
|
||||||
// set components to form
|
'name' => 'backup',
|
||||||
$radio1->setup($force,0);
|
'label' => 'COM_COMPONENTBUILDER_FORCE_LOCAL_UPDATE',
|
||||||
|
'class' => 'btn-group btn-group-yesno',
|
||||||
|
'description' => 'COM_COMPONENTBUILDER_SHOULD_WE_FORCE_THE_UPDATE_OF_ALL_LOCAL_DATA_EVEN_IF_IT_IS_NEWER_THEN_THE_DATA_BEING_IMPORTED',
|
||||||
|
'default' => '0');
|
||||||
|
// load the force_update attributes
|
||||||
|
ComponentbuilderHelper::xmlAddAttributes($force_updateXML, $force_updateAttributes);
|
||||||
|
// set the force_update options
|
||||||
|
$force_updateOptions = array(
|
||||||
|
'1' => 'COM_COMPONENTBUILDER_YES',
|
||||||
|
'0' => 'COM_COMPONENTBUILDER_NO');
|
||||||
|
// load the force_update options
|
||||||
|
ComponentbuilderHelper::xmlAddOptions($force_updateXML, $force_updateOptions);
|
||||||
|
// setup the force_update radio field
|
||||||
|
$force_update->setup($force_updateXML,0);
|
||||||
// add to form
|
// add to form
|
||||||
$form[] = $radio1;
|
$form[] = $force_update;
|
||||||
|
|
||||||
$radio2 = JFormHelper::loadFieldType('radio',true);
|
// get the more_info radio field
|
||||||
// Switch to show more information about the import
|
$more_info = JFormHelper::loadFieldType('radio',true);
|
||||||
$xml = '<field label="'.JText::_('COM_COMPONENTBUILDER_QUIET').'" description="'.JText::_('COM_COMPONENTBUILDER_SELECT_IF_THE_IMPORT_SHOULD_BE_SHOWING_MORE_ELABORATE_OR_LESS_QUIET_INFORMATION_DURING_IMPORT').'" name="more_info" type="radio" class="btn-group btn-group-yesno" default="0" filter="INT">';
|
// start more_info xml
|
||||||
$xml .= '<option value="0">'.JText::_('COM_COMPONENTBUILDER_YES').'</option> <option value="1">'.JText::_('COM_COMPONENTBUILDER_NO').'</option>';
|
$more_infoXML = new SimpleXMLElement('<field/>');
|
||||||
$xml .= "</field>";
|
// more_info attributes
|
||||||
// prepare the xml
|
$more_infoAttributes = array(
|
||||||
$information = new SimpleXMLElement($xml);
|
'type' => 'radio',
|
||||||
// set information to form
|
'name' => 'backup',
|
||||||
$radio2->setup($information,0);
|
'label' => 'COM_COMPONENTBUILDER_SEE_ALL_IMPORT_INFO',
|
||||||
|
'class' => 'btn-group btn-group-yesno',
|
||||||
|
'description' => 'COM_COMPONENTBUILDER_SHOULD_WE_BE_SHOWING_MORE_ELABORATE_INFORMATION_DURING_IMPORT',
|
||||||
|
'default' => '0');
|
||||||
|
// load the more_info attributes
|
||||||
|
ComponentbuilderHelper::xmlAddAttributes($more_infoXML, $more_infoAttributes);
|
||||||
|
// set the more_info options
|
||||||
|
$more_infoOptions = array(
|
||||||
|
'1' => 'COM_COMPONENTBUILDER_YES',
|
||||||
|
'0' => 'COM_COMPONENTBUILDER_NO');
|
||||||
|
// load the more_info options
|
||||||
|
ComponentbuilderHelper::xmlAddOptions($more_infoXML, $more_infoOptions);
|
||||||
|
// setup the more_info radio field
|
||||||
|
$more_info->setup($more_infoXML,0);
|
||||||
// add to form
|
// add to form
|
||||||
$form[] = $radio2;
|
$form[] = $more_info;
|
||||||
|
|
||||||
if (!$this->packageInfo || (isset($this->packageInfo['getKeyFrom']) && ComponentbuilderHelper::checkArray($this->packageInfo['getKeyFrom'])))
|
if (!$this->packageInfo || (isset($this->packageInfo['getKeyFrom']) && ComponentbuilderHelper::checkArray($this->packageInfo['getKeyFrom'])))
|
||||||
{
|
{
|
||||||
// set required field
|
// set required field
|
||||||
$required = 'required="true"';
|
$required = true;
|
||||||
|
// does the packages has info
|
||||||
if (!$this->packageInfo)
|
if (!$this->packageInfo)
|
||||||
{
|
{
|
||||||
$radio2 = JFormHelper::loadFieldType('radio',true);
|
// get the haskey radio field
|
||||||
// has key
|
$haskey = JFormHelper::loadFieldType('radio',true);
|
||||||
$xml = '<field label="'.JText::_('COM_COMPONENTBUILDER_USE_KEY').'" description="'.JText::_('COM_COMPONENTBUILDER_DOES_THIS_PACKAGE_REQUIRE_A_KEY_TO_INSTALL').'" name="haskey" type="radio" class="btn-group btn-group-yesno" default="1" filter="INT">';
|
// start haskey xml
|
||||||
$xml .= '<option value="1">'.JText::_('COM_COMPONENTBUILDER_YES').'</option> <option value="0">'.JText::_('COM_COMPONENTBUILDER_NO').'</option>';
|
$haskeyXML = new SimpleXMLElement('<field/>');
|
||||||
$xml .= "</field>";
|
// haskey attributes
|
||||||
// prepare the xml
|
$haskeyAttributes = array(
|
||||||
$license = new SimpleXMLElement($xml);
|
'type' => 'radio',
|
||||||
// set components to form
|
'name' => 'backup',
|
||||||
$radio2->setup($license,1);
|
'label' => 'COM_COMPONENTBUILDER_USE_KEY',
|
||||||
$required = ''; // change required field
|
'class' => 'btn-group btn-group-yesno',
|
||||||
|
'description' => 'COM_COMPONENTBUILDER_DOES_THIS_PACKAGE_REQUIRE_A_KEY_TO_INSTALL',
|
||||||
|
'default' => '1',
|
||||||
|
'filter' => 'INT');
|
||||||
|
// load the haskey attributes
|
||||||
|
ComponentbuilderHelper::xmlAddAttributes($haskeyXML, $haskeyAttributes);
|
||||||
|
// set the haskey options
|
||||||
|
$haskeyOptions = array(
|
||||||
|
'1' => 'COM_COMPONENTBUILDER_YES',
|
||||||
|
'0' => 'COM_COMPONENTBUILDER_NO');
|
||||||
|
// load the haskey options
|
||||||
|
ComponentbuilderHelper::xmlAddOptions($haskeyXML, $haskeyOptions);
|
||||||
|
// setup the haskey radio field
|
||||||
|
$haskey->setup($haskeyXML,1);
|
||||||
// add to form
|
// add to form
|
||||||
$form[] = $radio2;
|
$form[] = $haskey;
|
||||||
|
|
||||||
|
// now make required false
|
||||||
|
$required = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$text1 = JFormHelper::loadFieldType('text',true);
|
// get the sleutle password field
|
||||||
// add the key
|
$sleutle = JFormHelper::loadFieldType('password',true);
|
||||||
$xml = '<field type="password" label="'.JText::_('COM_COMPONENTBUILDER_KEY').'" description="'.JText::_('COM_COMPONENTBUILDER_THE_KEY_OF_THIS_PACKAGE').'" name="sleutle" autocomplete="false" class="text_area" filter="STRING" hint="add key here" '.$required.' />';
|
// start sleutle xml
|
||||||
// prepare the xml
|
$sleutleXML = new SimpleXMLElement('<field/>');
|
||||||
$sleutle = new SimpleXMLElement($xml);
|
// sleutle attributes
|
||||||
// set components to form
|
$sleutleAttributes = array(
|
||||||
$text1->setup($sleutle,'');
|
'type' => 'password',
|
||||||
|
'name' => 'backup',
|
||||||
|
'label' => 'COM_COMPONENTBUILDER_KEY',
|
||||||
|
'class' => 'text_area',
|
||||||
|
'description' => 'COM_COMPONENTBUILDER_THE_KEY_OF_THIS_PACKAGE',
|
||||||
|
'autocomplete' => 'false',
|
||||||
|
'filter' => 'STRING',
|
||||||
|
'hint' => 'COM_COMPONENTBUILDER_ADD_KEY_HERE');
|
||||||
|
// should this be required
|
||||||
|
if ($required)
|
||||||
|
{
|
||||||
|
$sleutleAttributes['required'] = 'true';
|
||||||
|
}
|
||||||
|
// load the sleutle attributes
|
||||||
|
ComponentbuilderHelper::xmlAddAttributes($sleutleXML, $sleutleAttributes);
|
||||||
|
// setup the sleutle password field
|
||||||
|
$sleutle->setup($sleutleXML,'');
|
||||||
// add to form
|
// add to form
|
||||||
$form[] = $text1;
|
$form[] = $sleutle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif ('vdm_package' === $type && $listObjects = ComponentbuilderHelper::getGithubRepoFileList('jcbGithubPackages', ComponentbuilderHelper::$jcbGithubPackagesUrl.ComponentbuilderHelper::$accessToken))
|
elseif ('vdm_package' === $type && $listObjects = ComponentbuilderHelper::getGithubRepoFileList('jcbGithubPackages', ComponentbuilderHelper::$jcbGithubPackagesUrl.ComponentbuilderHelper::$accessToken))
|
||||||
{
|
{
|
||||||
if (ComponentbuilderHelper::checkArray($listObjects))
|
if (ComponentbuilderHelper::checkArray($listObjects))
|
||||||
{
|
{
|
||||||
// load the vdm packages if available
|
// get the vdm_package list field
|
||||||
$list = JFormHelper::loadFieldType('list',true);
|
$vdm_package = JFormHelper::loadFieldType('list',true);
|
||||||
|
// start vdm_package xml
|
||||||
|
$vdm_packageXML = new SimpleXMLElement('<field/>');
|
||||||
|
// vdm_package attributes
|
||||||
|
$vdm_packageAttributes = array(
|
||||||
|
'type' => 'list',
|
||||||
|
'name' => 'vdm_package',
|
||||||
|
'label' => 'COM_COMPONENTBUILDER_PACKAGE',
|
||||||
|
'class' => 'list_class',
|
||||||
|
'description' => 'COM_COMPONENTBUILDER_SELECT_THE_PACKAGE_TO_IMPORT');
|
||||||
// load the list
|
// load the list
|
||||||
$load = false;
|
$load = false;
|
||||||
// start building componet xml field
|
// load the vdm_package attributes
|
||||||
$xml = '<field label="Package" description="'.JText::_('COM_COMPONENTBUILDER_SELECT_THE_PACKAGE_TO_IMPORT').'" name="vdm_package" type="list" class="list_class">';
|
ComponentbuilderHelper::xmlAddAttributes($vdm_packageXML, $vdm_packageAttributes);
|
||||||
$xml .= '<option value="">'.JText::_('COM_COMPONENTBUILDER__SELECT_PACKAGE_').'</option>';
|
// start the vdm_package options
|
||||||
|
$vdm_packageOptions = array();
|
||||||
|
$vdm_packageOptions[''] = 'COM_COMPONENTBUILDER__SELECT_PACKAGE_';
|
||||||
|
// load vdm_package options from array
|
||||||
foreach($listObjects as $listObject)
|
foreach($listObjects as $listObject)
|
||||||
{
|
{
|
||||||
if (strpos($listObject->path, '.zip') !== false)
|
if (strpos($listObject->path, '.zip') !== false)
|
||||||
{
|
{
|
||||||
$xml .= '<option value="'.ComponentbuilderHelper::$jcbGithubPackageUrl.$listObject->path.'">'.$this->setPackageName($listObject->path).'</option>';
|
$vdm_packageOptions[ComponentbuilderHelper::$jcbGithubPackageUrl.$listObject->path] = $this->setPackageName($listObject->path);
|
||||||
$load = true;
|
$load = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$xml .= "</field>";
|
|
||||||
// only load if at least one item was found
|
// only load if at least one item was found
|
||||||
if ($load)
|
if ($load)
|
||||||
{
|
{
|
||||||
// prepare the xml
|
// load the vdm_package options
|
||||||
$packages = new SimpleXMLElement($xml);
|
ComponentbuilderHelper::xmlAddOptions($vdm_packageXML, $vdm_packageOptions);
|
||||||
// set components to form
|
// setup the vdm_package radio field
|
||||||
$list->setup($packages, '');
|
$vdm_package->setup($vdm_packageXML,'');
|
||||||
|
// add to form
|
||||||
// set to form
|
$form[] = $vdm_package;
|
||||||
$form[] = $list;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<extension type="component" version="3.2" method="upgrade">
|
<extension type="component" version="3.2" method="upgrade">
|
||||||
<name>COM_COMPONENTBUILDER</name>
|
<name>COM_COMPONENTBUILDER</name>
|
||||||
<creationDate>3rd April, 2018</creationDate>
|
<creationDate>8th April, 2018</creationDate>
|
||||||
<author>Llewellyn van der Merwe</author>
|
<author>Llewellyn van der Merwe</author>
|
||||||
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
|
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
|
||||||
<authorUrl>http://joomlacomponentbuilder.com</authorUrl>
|
<authorUrl>http://joomlacomponentbuilder.com</authorUrl>
|
||||||
|
@ -199,12 +199,12 @@ abstract class ComponentbuilderHelper
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the snippet contributor details
|
* Get the snippet contributor details
|
||||||
*
|
*
|
||||||
* @param string $filename The file name
|
* @param string $filename The file name
|
||||||
* @param string $type The type of file
|
* @param string $type The type of file
|
||||||
*
|
*
|
||||||
* @return array On success the contributor details
|
* @return array On success the contributor details
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static function getContributorDetails($filename, $type = 'snippet')
|
public static function getContributorDetails($filename, $type = 'snippet')
|
||||||
@ -257,11 +257,11 @@ abstract class ComponentbuilderHelper
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the library files
|
* Get the library files
|
||||||
*
|
*
|
||||||
* @param int $id The library id to target
|
* @param int $id The library id to target
|
||||||
*
|
*
|
||||||
* @return array On success the array of files that belong to this library
|
* @return array On success the array of files that belong to this library
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static function getLibraryFiles($id)
|
public static function getLibraryFiles($id)
|
||||||
@ -591,12 +591,12 @@ abstract class ComponentbuilderHelper
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The zipper method
|
* The zipper method
|
||||||
*
|
*
|
||||||
* @param string $workingDIR The directory where the items must be zipped
|
* @param string $workingDIR The directory where the items must be zipped
|
||||||
* @param string $filepath The path to where the zip file must be placed
|
* @param string $filepath The path to where the zip file must be placed
|
||||||
*
|
*
|
||||||
* @return bool true On success
|
* @return bool true On success
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static function zip($workingDIR, &$filepath)
|
public static function zip($workingDIR, &$filepath)
|
||||||
@ -642,12 +642,12 @@ abstract class ComponentbuilderHelper
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write a file to the server
|
* Write a file to the server
|
||||||
*
|
*
|
||||||
* @param string $path The path and file name where to safe the data
|
* @param string $path The path and file name where to safe the data
|
||||||
* @param string $data The data to safe
|
* @param string $data The data to safe
|
||||||
*
|
*
|
||||||
* @return bool true On success
|
* @return bool true On success
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static function writeFile($path, $data)
|
public static function writeFile($path, $data)
|
||||||
@ -804,13 +804,13 @@ abstract class ComponentbuilderHelper
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get between
|
* get between
|
||||||
*
|
*
|
||||||
* @param string $content The content to search
|
* @param string $content The content to search
|
||||||
* @param string $start The starting value
|
* @param string $start The starting value
|
||||||
* @param string $end The ending value
|
* @param string $end The ending value
|
||||||
*
|
*
|
||||||
* @return string On success / empty string on failure
|
* @return string On success / empty string on failure
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static function getBetween($content, $start, $end)
|
public static function getBetween($content, $start, $end)
|
||||||
@ -825,13 +825,13 @@ abstract class ComponentbuilderHelper
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get all between
|
* get all between
|
||||||
*
|
*
|
||||||
* @param string $content The content to search
|
* @param string $content The content to search
|
||||||
* @param string $start The starting value
|
* @param string $start The starting value
|
||||||
* @param string $end The ending value
|
* @param string $end The ending value
|
||||||
*
|
*
|
||||||
* @return array On success
|
* @return array On success
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static function getAllBetween($content, $start, $end)
|
public static function getAllBetween($content, $start, $end)
|
||||||
@ -1049,16 +1049,16 @@ abstract class ComponentbuilderHelper
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the file path or url
|
* Get the file path or url
|
||||||
*
|
*
|
||||||
* @param string $type The (url/path) type to return
|
* @param string $type The (url/path) type to return
|
||||||
* @param string $target The Params Target name (if set)
|
* @param string $target The Params Target name (if set)
|
||||||
* @param string $fileType The kind of filename to generate (if not set no file name is generated)
|
* @param string $fileType The kind of filename to generate (if not set no file name is generated)
|
||||||
* @param string $key The key to adjust the filename (if not set ignored)
|
* @param string $key The key to adjust the filename (if not set ignored)
|
||||||
* @param string $default The default path if not set in Params (fallback path)
|
* @param string $default The default path if not set in Params (fallback path)
|
||||||
* @param bool $createIfNotSet The switch to create the folder if not found
|
* @param bool $createIfNotSet The switch to create the folder if not found
|
||||||
*
|
*
|
||||||
* @return string On success the path or url is returned based on the type requested
|
* @return string On success the path or url is returned based on the type requested
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static function getFilePath($type = 'path', $target = 'filepath', $fileType = null, $key = '', $default = JPATH_SITE . '/images/', $createIfNotSet = true)
|
public static function getFilePath($type = 'path', $target = 'filepath', $fileType = null, $key = '', $default = JPATH_SITE . '/images/', $createIfNotSet = true)
|
||||||
@ -1161,12 +1161,12 @@ abstract class ComponentbuilderHelper
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get the content of a file
|
* get the content of a file
|
||||||
*
|
*
|
||||||
* @param string $path The path to the file
|
* @param string $path The path to the file
|
||||||
* @param string/bool $none The return value if no content was found
|
* @param string/bool $none The return value if no content was found
|
||||||
*
|
*
|
||||||
* @return string On success
|
* @return string On success
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static function getFileContents($path, $none = '')
|
public static function getFileContents($path, $none = '')
|
||||||
@ -2016,28 +2016,141 @@ abstract class ComponentbuilderHelper
|
|||||||
return JAccess::getAssetRules(0);
|
return JAccess::getAssetRules(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* xmlAppend
|
||||||
|
*
|
||||||
|
* @param SimpleXMLElement $xml The XML element reference in which to inject a comment
|
||||||
|
* @param mixed $node A SimpleXMLElement node to append to the XML element reference, or a stdClass object containing a comment attribute to be injected before the XML node and a fieldXML attribute containing a SimpleXMLElement
|
||||||
|
*
|
||||||
|
* @return null
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function xmlAppend(&$xml, $node)
|
||||||
|
{
|
||||||
|
if (!$node)
|
||||||
|
{
|
||||||
|
// element was not returned
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
switch (get_class($node))
|
||||||
|
{
|
||||||
|
case 'stdClass':
|
||||||
|
if (property_exists($node, 'comment'))
|
||||||
|
{
|
||||||
|
self::xmlComment($xml, $node->comment);
|
||||||
|
}
|
||||||
|
if (property_exists($node, 'fieldXML'))
|
||||||
|
{
|
||||||
|
self::xmlAppend($xml, $node->fieldXML);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'SimpleXMLElement':
|
||||||
|
$domXML = dom_import_simplexml($xml);
|
||||||
|
$domNode = dom_import_simplexml($node);
|
||||||
|
$domXML->appendChild($domXML->ownerDocument->importNode($domNode, true));
|
||||||
|
$xml = simplexml_import_dom($domXML);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* xmlComment
|
||||||
|
*
|
||||||
|
* @param SimpleXMLElement $xml The XML element reference in which to inject a comment
|
||||||
|
* @param string $comment The comment to inject
|
||||||
|
*
|
||||||
|
* @return null
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function xmlComment(&$xml, $comment)
|
||||||
|
{
|
||||||
|
$domXML = dom_import_simplexml($xml);
|
||||||
|
$domComment = new DOMComment($comment);
|
||||||
|
$nodeTarget = $domXML->ownerDocument->importNode($domComment, true);
|
||||||
|
$domXML->appendChild($nodeTarget);
|
||||||
|
$xml = simplexml_import_dom($domXML);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* xmlAddAttributes
|
||||||
|
*
|
||||||
|
* @param SimpleXMLElement $xml The XML element reference in which to inject a comment
|
||||||
|
* @param array $attributes The attributes to apply to the XML element
|
||||||
|
*
|
||||||
|
* @return null
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function xmlAddAttributes(&$xml, $attributes = array())
|
||||||
|
{
|
||||||
|
foreach ($attributes as $key => $value)
|
||||||
|
{
|
||||||
|
$xml->addAttribute($key, $value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* xmlAddOptions
|
||||||
|
*
|
||||||
|
* @param SimpleXMLElement $xml The XML element reference in which to inject a comment
|
||||||
|
* @param array $options The options to apply to the XML element
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function xmlAddOptions(&$xml, $options = array())
|
||||||
|
{
|
||||||
|
foreach ($options as $key => $value)
|
||||||
|
{
|
||||||
|
$addOption = $xml->addChild('option');
|
||||||
|
$addOption->addAttribute('value', $key);
|
||||||
|
$addOption[] = $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render Bool Button
|
||||||
|
*
|
||||||
|
* @param array $args All the args for the button
|
||||||
|
* 0) name
|
||||||
|
* 1) additional (options class) // not used at this time
|
||||||
|
* 2) default
|
||||||
|
* 3) yes (name)
|
||||||
|
* 4) no (name)
|
||||||
|
*
|
||||||
|
* @return string The input html of the button
|
||||||
|
*
|
||||||
|
*/
|
||||||
public static function renderBoolButton()
|
public static function renderBoolButton()
|
||||||
{
|
{
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
|
// check if there is additional button class
|
||||||
|
$additional = isset($args[1]) ? (string) $args[1] : ''; // not used at this time
|
||||||
|
// start the xml
|
||||||
|
$buttonXML = new SimpleXMLElement('<field/>');
|
||||||
|
// button attributes
|
||||||
|
$buttonAttributes = array(
|
||||||
|
'type' => 'radio',
|
||||||
|
'name' => isset($args[0]) ? self::htmlEscape($args[0]) : 'bool_button',
|
||||||
|
'label' => isset($args[0]) ? self::safeString(self::htmlEscape($args[0]), 'Ww') : 'Bool Button', // not seen anyway
|
||||||
|
'class' => 'btn-group',
|
||||||
|
'filter' => 'INT',
|
||||||
|
'default' => isset($args[2]) ? (int) $args[2] : 0);
|
||||||
|
// load the haskey attributes
|
||||||
|
self::xmlAddAttributes($buttonXML, $buttonAttributes);
|
||||||
|
// set the button options
|
||||||
|
$buttonOptions = array(
|
||||||
|
'1' => isset($args[3]) ? self::htmlEscape($args[3]) : 'JYES',
|
||||||
|
'0' => isset($args[4]) ? self::htmlEscape($args[4]) : 'JNO');
|
||||||
|
// load the button options
|
||||||
|
self::xmlAddOptions($buttonXML, $buttonOptions);
|
||||||
|
|
||||||
// get the radio element
|
// get the radio element
|
||||||
$button = JFormHelper::loadFieldType('radio');
|
$button = JFormHelper::loadFieldType('radio');
|
||||||
|
|
||||||
// setup the properties
|
|
||||||
$name = self::htmlEscape($args[0]);
|
|
||||||
$additional = isset($args[1]) ? (string) $args[1] : '';
|
|
||||||
$value = $args[2];
|
|
||||||
$yes = isset($args[3]) ? self::htmlEscape($args[3]) : 'JYES';
|
|
||||||
$no = isset($args[4]) ? self::htmlEscape($args[4]) : 'JNO';
|
|
||||||
|
|
||||||
// prepare the xml
|
|
||||||
$element = new SimpleXMLElement('<field name="'.$name.'" type="radio" class="btn-group"><option '.$additional.' value="0">'.$no.'</option><option '.$additional.' value="1">'.$yes.'</option></field>');
|
|
||||||
|
|
||||||
// run
|
// run
|
||||||
$button->setup($element, $value);
|
$button->setup($buttonXML, $buttonAttributes['default']);
|
||||||
|
|
||||||
return $button->input;
|
return $button->input;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2142,6 +2255,19 @@ abstract class ComponentbuilderHelper
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a variable
|
||||||
|
*
|
||||||
|
* @param string $table The table from which to get the variable
|
||||||
|
* @param string $where The value where
|
||||||
|
* @param string $whereString The target/field string where/name
|
||||||
|
* @param string $what The return field
|
||||||
|
* @param string $operator The operator between $whereString/field and $where/value
|
||||||
|
* @param string $main The component in which the table is found
|
||||||
|
*
|
||||||
|
* @return mix string/int/float
|
||||||
|
*
|
||||||
|
*/
|
||||||
public static function getVar($table, $where = null, $whereString = 'user', $what = 'id', $operator = '=', $main = 'componentbuilder')
|
public static function getVar($table, $where = null, $whereString = 'user', $what = 'id', $operator = '=', $main = 'componentbuilder')
|
||||||
{
|
{
|
||||||
if(!$where)
|
if(!$where)
|
||||||
@ -2182,6 +2308,20 @@ abstract class ComponentbuilderHelper
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get array of variables
|
||||||
|
*
|
||||||
|
* @param string $table The table from which to get the variables
|
||||||
|
* @param string $where The value where
|
||||||
|
* @param string $whereString The target/field string where/name
|
||||||
|
* @param string $what The return field
|
||||||
|
* @param string $operator The operator between $whereString/field and $where/value
|
||||||
|
* @param string $main The component in which the table is found
|
||||||
|
* @param bool $unique The switch to return a unique array
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*
|
||||||
|
*/
|
||||||
public static function getVars($table, $where = null, $whereString = 'user', $what = 'id', $operator = 'IN', $main = 'componentbuilder', $unique = true)
|
public static function getVars($table, $where = null, $whereString = 'user', $what = 'id', $operator = 'IN', $main = 'componentbuilder', $unique = true)
|
||||||
{
|
{
|
||||||
if(!$where)
|
if(!$where)
|
||||||
|
Loading…
Reference in New Issue
Block a user