Compare commits

...

6 Commits

119 changed files with 6457 additions and 1306 deletions

View File

@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.7.0) with **ALL** its features and **ALL** concepts totally open-source and free!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.7.1) with **ALL** its features and **ALL** concepts totally open-source and free!
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
@ -126,14 +126,14 @@ Component Builder is mapped as a component in itself on my local development env
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](http://joomlacomponentbuilder.com)
+ *First Build*: 30th April, 2015
+ *Last Build*: 21st March, 2018
+ *Version*: 2.7.0
+ *Last Build*: 30th March, 2018
+ *Version*: 2.7.1
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
+ *Line count*: **186509**
+ *Field count*: **994**
+ *File count*: **1171**
+ *Folder count*: **189**
+ *Line count*: **191428**
+ *Field count*: **1011**
+ *File count*: **1197**
+ *Folder count*: **193**
> This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)

View File

@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.7.0) with **ALL** its features and **ALL** concepts totally open-source and free!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.7.1) with **ALL** its features and **ALL** concepts totally open-source and free!
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
@ -126,14 +126,14 @@ Component Builder is mapped as a component in itself on my local development env
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](http://joomlacomponentbuilder.com)
+ *First Build*: 30th April, 2015
+ *Last Build*: 21st March, 2018
+ *Version*: 2.7.0
+ *Last Build*: 30th March, 2018
+ *Version*: 2.7.1
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
+ *Line count*: **186509**
+ *Field count*: **994**
+ *File count*: **1171**
+ *Folder count*: **189**
+ *Line count*: **191428**
+ *Field count*: **1011**
+ *File count*: **1197**
+ *Folder count*: **193**
> This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)

View File

@ -212,15 +212,16 @@
<action name="fieldtype.submenu" title="COM_COMPONENTBUILDER_FIELDTYPES_SUBMENU" description="COM_COMPONENTBUILDER_FIELDTYPES_SUBMENU_DESC" />
<action name="get_snippets.access" title="COM_COMPONENTBUILDER_GET_SNIPPETS_ACCESS" description="COM_COMPONENTBUILDER_GET_SNIPPETS_ACCESS_DESC" />
<action name="get_snippets.custom_admin_views" title="COM_COMPONENTBUILDER_GET_SNIPPETS_CUSTOM_ADMIN_VIEWS_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_GET_SNIPPETS_CUSTOM_ADMIN_VIEWS_BUTTON_ACCESS_DESC" />
<action name="get_snippets.dashboard_list" title="COM_COMPONENTBUILDER_GET_SNIPPETS_DASHBOARD_LIST" description="COM_COMPONENTBUILDER_GET_SNIPPETS_DASHBOARD_LIST_DESC" />
<action name="get_snippets.layouts" title="COM_COMPONENTBUILDER_GET_SNIPPETS_LAYOUTS_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_GET_SNIPPETS_LAYOUTS_BUTTON_ACCESS_DESC" />
<action name="get_snippets.libraries" title="COM_COMPONENTBUILDER_GET_SNIPPETS_LIBRARIES_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_GET_SNIPPETS_LIBRARIES_BUTTON_ACCESS_DESC" />
<action name="get_snippets.site_views" title="COM_COMPONENTBUILDER_GET_SNIPPETS_SITE_VIEWS_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_GET_SNIPPETS_SITE_VIEWS_BUTTON_ACCESS_DESC" />
<action name="get_snippets.snippets" title="COM_COMPONENTBUILDER_GET_SNIPPETS_SNIPPETS_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_GET_SNIPPETS_SNIPPETS_BUTTON_ACCESS_DESC" />
<action name="get_snippets.submenu" title="COM_COMPONENTBUILDER_GET_SNIPPETS_SUBMENU" description="COM_COMPONENTBUILDER_GET_SNIPPETS_SUBMENU_DESC" />
<action name="get_snippets.templates" title="COM_COMPONENTBUILDER_GET_SNIPPETS_TEMPLATES_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_GET_SNIPPETS_TEMPLATES_BUTTON_ACCESS_DESC" />
<action name="help_document.access" title="COM_COMPONENTBUILDER_HELP_DOCUMENTS_ACCESS" description="COM_COMPONENTBUILDER_HELP_DOCUMENTS_ACCESS_DESC" />
<action name="help_document.batch" title="COM_COMPONENTBUILDER_HELP_DOCUMENTS_BATCH_USE" description="COM_COMPONENTBUILDER_HELP_DOCUMENTS_BATCH_USE_DESC" />
<action name="help_document.create" title="COM_COMPONENTBUILDER_HELP_DOCUMENTS_CREATE" description="COM_COMPONENTBUILDER_HELP_DOCUMENTS_CREATE_DESC" />
<action name="help_document.dashboard_add" title="COM_COMPONENTBUILDER_HELP_DOCUMENTS_DASHBOARD_ADD" description="COM_COMPONENTBUILDER_HELP_DOCUMENTS_DASHBOARD_ADD_DESC" />
<action name="help_document.dashboard_list" title="COM_COMPONENTBUILDER_HELP_DOCUMENTS_DASHBOARD_LIST" description="COM_COMPONENTBUILDER_HELP_DOCUMENTS_DASHBOARD_LIST_DESC" />
<action name="help_document.delete" title="COM_COMPONENTBUILDER_HELP_DOCUMENTS_DELETE" description="COM_COMPONENTBUILDER_HELP_DOCUMENTS_DELETE_DESC" />
<action name="help_document.edit" title="COM_COMPONENTBUILDER_HELP_DOCUMENTS_EDIT" description="COM_COMPONENTBUILDER_HELP_DOCUMENTS_EDIT_DESC" />
@ -344,7 +345,6 @@
<action name="snippet_type.version" title="COM_COMPONENTBUILDER_SNIPPET_TYPES_EDIT_VERSION" description="COM_COMPONENTBUILDER_SNIPPET_TYPES_EDIT_VERSION_DESC" />
<action name="snippet.access" title="COM_COMPONENTBUILDER_SNIPPETS_ACCESS" description="COM_COMPONENTBUILDER_SNIPPETS_ACCESS_DESC" />
<action name="snippet.batch" title="COM_COMPONENTBUILDER_SNIPPETS_BATCH_USE" description="COM_COMPONENTBUILDER_SNIPPETS_BATCH_USE_DESC" />
<action name="snippet.dashboard_add" title="COM_COMPONENTBUILDER_SNIPPETS_DASHBOARD_ADD" description="COM_COMPONENTBUILDER_SNIPPETS_DASHBOARD_ADD_DESC" />
<action name="snippet.dashboard_list" title="COM_COMPONENTBUILDER_SNIPPETS_DASHBOARD_LIST" description="COM_COMPONENTBUILDER_SNIPPETS_DASHBOARD_LIST_DESC" />
<action name="snippet.version" title="COM_COMPONENTBUILDER_SNIPPETS_EDIT_VERSION" description="COM_COMPONENTBUILDER_SNIPPETS_EDIT_VERSION_DESC" />
<action name="snippet.export" title="COM_COMPONENTBUILDER_SNIPPETS_EXPORT" description="COM_COMPONENTBUILDER_SNIPPETS_EXPORT_DESC" />
@ -359,6 +359,18 @@
<action name="template.export" title="COM_COMPONENTBUILDER_TEMPLATES_EXPORT" description="COM_COMPONENTBUILDER_TEMPLATES_EXPORT_DESC" />
<action name="template.import" title="COM_COMPONENTBUILDER_TEMPLATES_IMPORT" description="COM_COMPONENTBUILDER_TEMPLATES_IMPORT_DESC" />
<action name="template.submenu" title="COM_COMPONENTBUILDER_TEMPLATES_SUBMENU" description="COM_COMPONENTBUILDER_TEMPLATES_SUBMENU_DESC" />
<action name="validation_rule.access" title="COM_COMPONENTBUILDER_VALIDATION_RULES_ACCESS" description="COM_COMPONENTBUILDER_VALIDATION_RULES_ACCESS_DESC" />
<action name="validation_rule.batch" title="COM_COMPONENTBUILDER_VALIDATION_RULES_BATCH_USE" description="COM_COMPONENTBUILDER_VALIDATION_RULES_BATCH_USE_DESC" />
<action name="validation_rule.create" title="COM_COMPONENTBUILDER_VALIDATION_RULES_CREATE" description="COM_COMPONENTBUILDER_VALIDATION_RULES_CREATE_DESC" />
<action name="validation_rule.dashboard_list" title="COM_COMPONENTBUILDER_VALIDATION_RULES_DASHBOARD_LIST" description="COM_COMPONENTBUILDER_VALIDATION_RULES_DASHBOARD_LIST_DESC" />
<action name="validation_rule.delete" title="COM_COMPONENTBUILDER_VALIDATION_RULES_DELETE" description="COM_COMPONENTBUILDER_VALIDATION_RULES_DELETE_DESC" />
<action name="validation_rule.edit" title="COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT" description="COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_DESC" />
<action name="validation_rule.edit.own" title="COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_OWN" description="COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_OWN_DESC" />
<action name="validation_rule.edit.state" title="COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_STATE" description="COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_STATE_DESC" />
<action name="validation_rule.version" title="COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_VERSION" description="COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_VERSION_DESC" />
<action name="validation_rule.export" title="COM_COMPONENTBUILDER_VALIDATION_RULES_EXPORT" description="COM_COMPONENTBUILDER_VALIDATION_RULES_EXPORT_DESC" />
<action name="validation_rule.import" title="COM_COMPONENTBUILDER_VALIDATION_RULES_IMPORT" description="COM_COMPONENTBUILDER_VALIDATION_RULES_IMPORT_DESC" />
<action name="validation_rule.submenu" title="COM_COMPONENTBUILDER_VALIDATION_RULES_SUBMENU" description="COM_COMPONENTBUILDER_VALIDATION_RULES_SUBMENU_DESC" />
</section>
<section name="joomla_component">
<action name="joomla_component.edit" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_DESC" />
@ -456,6 +468,15 @@
<action name="snippet.access" title="COM_COMPONENTBUILDER_SNIPPETS_ACCESS" description="COM_COMPONENTBUILDER_SNIPPETS_ACCESS_DESC" />
<action name="snippet.version" title="COM_COMPONENTBUILDER_SNIPPETS_EDIT_VERSION" description="COM_COMPONENTBUILDER_SNIPPETS_EDIT_VERSION_DESC" />
</section>
<section name="validation_rule">
<action name="validation_rule.edit" title="COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT" description="COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_DESC" />
<action name="validation_rule.edit.state" title="COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_STATE" description="COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_STATE_DESC" />
<action name="validation_rule.edit.own" title="COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_OWN" description="COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_OWN_DESC" />
<action name="validation_rule.create" title="COM_COMPONENTBUILDER_VALIDATION_RULES_CREATE" description="COM_COMPONENTBUILDER_VALIDATION_RULES_CREATE_DESC" />
<action name="validation_rule.delete" title="COM_COMPONENTBUILDER_VALIDATION_RULES_DELETE" description="COM_COMPONENTBUILDER_VALIDATION_RULES_DELETE_DESC" />
<action name="validation_rule.access" title="COM_COMPONENTBUILDER_VALIDATION_RULES_ACCESS" description="COM_COMPONENTBUILDER_VALIDATION_RULES_ACCESS_DESC" />
<action name="validation_rule.version" title="COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_VERSION" description="COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_VERSION_DESC" />
</section>
<section name="field">
<action name="field.edit" title="COM_COMPONENTBUILDER_FIELDS_EDIT" description="COM_COMPONENTBUILDER_FIELDS_EDIT_DESC" />
<action name="field.edit.state" title="COM_COMPONENTBUILDER_FIELDS_EDIT_STATE" description="COM_COMPONENTBUILDER_FIELDS_EDIT_STATE_DESC" />

View File

@ -27,5 +27,6 @@
pointer-events: none;
}
.fieldMedium { width: 130px; }
.fieldFull { width: 100%; }
.fieldSmall { width: 60px; }
code { display: inline-block; margin: 3px;}

View File

@ -24,4 +24,7 @@
/* CSS Document */
.uk-scrollable-box {
height: 380px !important;
}

View File

@ -0,0 +1,27 @@
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage validation_rule.css
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
/* CSS Document */

View File

@ -0,0 +1,27 @@
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage validation_rules.css
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
/* CSS Document */

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

23
admin/compiler/JCB.txt Normal file
View File

@ -0,0 +1,23 @@
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version ###VERSION###
@created ###CREATIONDATE###
@package ###Component_name###
@subpackage ###FILENAME###
@author ###AUTHOR### <###AUTHORWEBSITE###>###CONTRIBUTORS###
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright ###COPYRIGHT###
@license ###LICENSE###
###SHORT_DESCRIPTION###
/-----------------------------------------------------------------------------------------------------------------------------*/

22
admin/compiler/SD.txt Normal file
View File

@ -0,0 +1,22 @@
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/
@version ###VERSION###
@created ###CREATIONDATE###
@package ###Component_name###
@subpackage ###FILENAME###
@author ###AUTHOR### <###AUTHORWEBSITE###>###CONTRIBUTORS###
@copyright ###COPYRIGHT###
@license ###LICENSE###
###SHORT_DESCRIPTION###
/----------------------------------------------------------------------------------------------------------------------------------*/

View File

@ -26,22 +26,17 @@ defined('_JEXEC') or die('Restricted access');
?>
###BOM###
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
namespace Joomla\CMS\Form\Rule;
defined('JPATH_PLATFORM') or die;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Form\FormRule;
use Joomla\Registry\Registry;
// import Joomla formrule library
jimport('joomla.form.formrule');
/**
* Form Rule class for the Joomla Framework.
* Form Rule (###Name###) class for the Joomla Platform.
*/
class JFormRule###Name### extends JFormRule
{
/**
* The regular expression.
*
* @access protected
* @var string
* @since 2.5
*/
protected $regex = '^[^_]+$';
class JFormRule###Name### extends FormRule
{###VALIDATION_RULE_METHODS###
}

View File

@ -117,6 +117,7 @@ class ComponentbuilderController extends JControllerLegacy
'custom_code' => 'custom_codes',
'library' => 'libraries',
'snippet' => 'snippets',
'validation_rule' => 'validation_rules',
'field' => 'fields',
'fieldtype' => 'fieldtypes',
'language_translation' => 'language_translations',

View File

@ -53,6 +53,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
$this->registerTask('getButtonID', 'ajax');
$this->registerTask('getAjaxDisplay', 'ajax');
$this->registerTask('getLinked', 'ajax');
$this->registerTask('checkAliasField', 'ajax');
$this->registerTask('templateDetails', 'ajax');
$this->registerTask('getLayoutDetails', 'ajax');
$this->registerTask('dbTableColumns', 'ajax');
@ -60,6 +61,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
$this->registerTask('getDynamicValues', 'ajax');
$this->registerTask('checkFunctionName', 'ajax');
$this->registerTask('usedin', 'ajax');
$this->registerTask('getExistingValidationRuleCode', 'ajax');
$this->registerTask('getValidationRulesTable', 'ajax');
$this->registerTask('checkRuleName', 'ajax');
$this->registerTask('fieldOptions', 'ajax');
$this->registerTask('snippetDetails', 'ajax');
$this->registerTask('setSnippetGithub', 'ajax');
@ -349,9 +353,10 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$typeValue = $jinput->get('type', NULL, 'WORD');
if($typeValue && $user->id != 0)
$sizeValue = $jinput->get('size', NULL, 'INT');
if($typeValue && $sizeValue && $user->id != 0)
{
$result = $this->getModel('ajax')->getButton($typeValue);
$result = $this->getModel('ajax')->getButton($typeValue, $sizeValue);
}
else
{
@ -497,6 +502,44 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
}
}
break;
case 'checkAliasField':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$typeValue = $jinput->get('type', NULL, 'INT');
if($typeValue && $user->id != 0)
{
$result = $this->getModel('ajax')->checkAliasField($typeValue);
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback."(".json_encode($e).");";
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'templateDetails':
try
{
@ -771,6 +814,121 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
}
}
break;
case 'getExistingValidationRuleCode':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$nameValue = $jinput->get('name', NULL, 'WORD');
if($nameValue && $user->id != 0)
{
$result = $this->getModel('ajax')->getExistingValidationRuleCode($nameValue);
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback."(".json_encode($e).");";
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'getValidationRulesTable':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$idValue = $jinput->get('id', NULL, 'INT');
if($idValue && $user->id != 0)
{
$result = $this->getModel('ajax')->getValidationRulesTable($idValue);
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback."(".json_encode($e).");";
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'checkRuleName':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$nameValue = $jinput->get('name', NULL, 'STRING');
$idValue = $jinput->get('id', NULL, 'INT');
if($nameValue && $idValue && $user->id != 0)
{
$result = $this->getModel('ajax')->checkRuleName($nameValue, $idValue);
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback."(".json_encode($e).");";
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'fieldOptions':
try
{

View File

@ -0,0 +1,326 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage validation_rule.php
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import Joomla controllerform library
jimport('joomla.application.component.controllerform');
/**
* Validation_rule Controller
*/
class ComponentbuilderControllerValidation_rule extends JControllerForm
{
/**
* Current or most recently performed task.
*
* @var string
* @since 12.2
* @note Replaces _task.
*/
protected $task;
public function __construct($config = array())
{
$this->view_list = 'Validation_rules'; // safeguard for setting the return view listing to the main view.
parent::__construct($config);
}
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
*
* @return boolean
*
* @since 1.6
*/
protected function allowAdd($data = array())
{
// Access check.
$access = JFactory::getUser()->authorise('validation_rule.access', 'com_componentbuilder');
if (!$access)
{
return false;
}
// In the absense of better information, revert to the component permissions.
return JFactory::getUser()->authorise('validation_rule.create', $this->option);
}
/**
* Method override to check if you can edit an existing record.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
*
* @since 1.6
*/
protected function allowEdit($data = array(), $key = 'id')
{
// get user object.
$user = JFactory::getUser();
// get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// Access check.
$access = ($user->authorise('validation_rule.access', 'com_componentbuilder.validation_rule.' . (int) $recordId) && $user->authorise('validation_rule.access', 'com_componentbuilder'));
if (!$access)
{
return false;
}
if ($recordId)
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('validation_rule.edit', 'com_componentbuilder.validation_rule.' . (int) $recordId);
if (!$permission)
{
if ($user->authorise('validation_rule.edit.own', 'com_componentbuilder.validation_rule.' . $recordId))
{
// Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
{
return false;
}
$ownerId = $record->created_by;
}
// If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('validation_rule.edit.own', 'com_componentbuilder'))
{
return true;
}
}
}
return false;
}
}
// Since there is no permission, revert to the component permissions.
return $user->authorise('validation_rule.edit', $this->option);
}
/**
* Gets the URL arguments to append to an item redirect.
*
* @param integer $recordId The primary key id for the item.
* @param string $urlVar The name of the URL variable for the id.
*
* @return string The arguments to append to the redirect URL.
*
* @since 12.2
*/
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
{
$tmpl = $this->input->get('tmpl');
$layout = $this->input->get('layout', 'edit', 'string');
$ref = $this->input->get('ref', 0, 'string');
$refid = $this->input->get('refid', 0, 'int');
// Setup redirect info.
$append = '';
if ($refid)
{
$append .= '&ref='.(string)$ref.'&refid='.(int)$refid;
}
elseif ($ref)
{
$append .= '&ref='.(string)$ref;
}
if ($tmpl)
{
$append .= '&tmpl=' . $tmpl;
}
if ($layout)
{
$append .= '&layout=' . $layout;
}
if ($recordId)
{
$append .= '&' . $urlVar . '=' . $recordId;
}
return $append;
}
/**
* Method to run batch operations.
*
* @param object $model The model.
*
* @return boolean True if successful, false otherwise and internal error is set.
*
* @since 2.5
*/
public function batch($model = null)
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('Validation_rule', '', array());
// Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=validation_rules' . $this->getRedirectToListAppend(), false));
return parent::batch($model);
}
/**
* Method to cancel an edit.
*
* @param string $key The name of the primary key of the URL variable.
*
* @return boolean True if access level checks pass, false otherwise.
*
* @since 12.2
*/
public function cancel($key = null)
{
// get the referal details
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
$cancel = parent::cancel($key);
if ($cancel)
{
if ($this->refid)
{
$redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view='.(string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
}
else
{
// Redirect to the items screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . '&view=' . $this->view_list, false
)
);
}
return $cancel;
}
/**
* Method to save a record.
*
* @param string $key The name of the primary key of the URL variable.
* @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
*
* @return boolean True if successful, false otherwise.
*
* @since 12.2
*/
public function save($key = null, $urlVar = null)
{
// get the referal details
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
if ($this->ref || $this->refid)
{
// to make sure the item is checkedin on redirect
$this->task = 'save';
}
$saved = parent::save($key, $urlVar);
if ($this->refid && $saved)
{
$redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref && $saved)
{
$redirect = '&view='.(string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
return $saved;
}
/**
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param JModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 11.1
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
{
return;
}
}

View File

@ -0,0 +1,111 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage validation_rules.php
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import Joomla controlleradmin library
jimport('joomla.application.component.controlleradmin');
/**
* Validation_rules Controller
*/
class ComponentbuilderControllerValidation_rules extends JControllerAdmin
{
protected $text_prefix = 'COM_COMPONENTBUILDER_VALIDATION_RULES';
/**
* Proxy for getModel.
* @since 2.5
*/
public function getModel($name = 'Validation_rule', $prefix = 'ComponentbuilderModel', $config = array())
{
$model = parent::getModel($name, $prefix, array('ignore_request' => true));
return $model;
}
public function exportData()
{
// Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// check if export is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('validation_rule.export', 'com_componentbuilder') && $user->authorise('core.export', 'com_componentbuilder'))
{
// Get the input
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
JArrayHelper::toInteger($pks);
// Get the model
$model = $this->getModel('Validation_rules');
// get the data to export
$data = $model->getExportData($pks);
if (ComponentbuilderHelper::checkArray($data))
{
// now set the data to the spreadsheet
$date = JFactory::getDate();
ComponentbuilderHelper::xls($data,'Validation_rules_'.$date->format('jS_F_Y'),'Validation rules exported ('.$date->format('jS F, Y').')','validation rules');
}
}
// Redirect to the list screen with error.
$message = JText::_('COM_COMPONENTBUILDER_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=validation_rules', false), $message, 'error');
return;
}
public function importData()
{
// Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// check if import is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('validation_rule.import', 'com_componentbuilder') && $user->authorise('core.import', 'com_componentbuilder'))
{
// Get the import model
$model = $this->getModel('Validation_rules');
// get the headers to import
$headers = $model->getExImPortHeaders();
if (ComponentbuilderHelper::checkObject($headers))
{
// Load headers to session.
$session = JFactory::getSession();
$headers = json_encode($headers);
$session->set('validation_rule_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'validation_rules');
$session->set('dataType_VDM_IMPORTINTO', 'validation_rule');
// Redirect to import view.
$message = JText::_('COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_VALIDATION_RULES');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=import', false), $message);
return;
}
}
// Redirect to the list screen with error.
$message = JText::_('COM_COMPONENTBUILDER_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=validation_rules', false), $message, 'error');
return;
}
}

View File

@ -414,6 +414,13 @@ class Get
*/
public $sqlTweak = array();
/**
* The validation rules that should be added
*
* @var array
*/
public $validationRules = array();
/**
* The admin views data array
*
@ -428,6 +435,13 @@ class Get
*/
private $_fieldData = array();
/**
* The custom alias builder
*
* @var array
*/
public $customAliasBuilder = array();
/**
* The field builder type
*
@ -912,17 +926,19 @@ class Get
// build the admin_views settings
$component->admin_views = array_map(function($array)
{
$array = array_map(function($value)
{
$array = array_map(function($value) {
if (!ComponentbuilderHelper::checkArray($value) && !ComponentbuilderHelper::checkObject($value) && strval($value) === strval(intval($value)))
{
return (int) $value;
}
return $value;
}, $array);
// has become a lacacy issue, can't remove this
$array['view'] = $array['adminview'];
$array['settings'] = $this->getAdminViewData($array['view']);
// check if we must add to site
if (isset($array['edit_create_site_view']) && $array['edit_create_site_view'])
{
$this->siteEditView[$array['adminview']] = true;
$this->lang = 'both';
}
if (isset($array['port']) && $array['port'] && !$this->addEximport)
{
$this->addEximport = true;
@ -931,14 +947,13 @@ class Get
{
$this->setTagHistory = true;
}
if (isset($array['edit_create_site_view']) && $array['edit_create_site_view'])
{
$this->siteEditView[$array['adminview']] = true;
}
// has become a lacacy issue, can't remove this
$array['view'] = $array['adminview'];
// get the admin settings/data
$array['settings'] = $this->getAdminViewData($array['view']);
return $array;
}, array_values($component->addadmin_views));
}
// set the site_view data
$component->addsite_views = (isset($component->addsite_views) && ComponentbuilderHelper::checkJson($component->addsite_views)) ? json_decode($component->addsite_views, true) : null;
if (ComponentbuilderHelper::checkArray($component->addsite_views))
@ -1603,6 +1618,10 @@ class Get
unset($view->addlinked_views);
// set the lang target
$this->lang = 'admin';
if (isset($this->siteEditView[$id]))
{
$this->lang = 'both';
}
// add_javascript
$addArrayJ = array('javascript_view_file', 'javascript_view_footer', 'javascript_views_file', 'javascript_views_footer');
foreach ($addArrayJ as $scripter)
@ -1741,6 +1760,33 @@ class Get
$this->addAjax = true;
}
}
// activate alias builder
if (!isset($this->customAliasBuilder[$name_single]) && isset($view->alias_builder_type) && 2 == $view->alias_builder_type
&& isset($view->alias_builder) && ComponentbuilderHelper::checkJson($view->alias_builder))
{
// get the aliasFields
$alias_fields = (array) json_decode($view->alias_builder, true);
// get the active fields
$alias_fields = (array) array_filter($view->fields, function($field) use($alias_fields) {
// check if field is in view fields
if (in_array($field['field'], $alias_fields))
{
return true;
}
return false;
});
// check if all is well
if (ComponentbuilderHelper::checkArray($alias_fields))
{
// load the field names
$this->customAliasBuilder[$name_single] = (array) array_map(function ($field) use($name_list) {
return $this->getFieldName($field, $name_list);
},$alias_fields
);
}
}
// unset
unset($view->alias_builder);
// add_sql
if ($view->add_sql == 1)
{
@ -2083,6 +2129,36 @@ class Get
// load the values form params
$field->xml = $this->setDynamicValues(json_decode($field->xml));
// check if we have validate (validation rule set)
$validationRule = ComponentbuilderHelper::getBetween($field->xml, 'validate="', '"');
if (ComponentbuilderHelper::checkString($validationRule))
{
// make sure it is lowercase
$validationRule = ComponentbuilderHelper::safeString($validationRule);
// make sure it is not already set
if (!isset($this->validationRules[$validationRule]))
{
// get joomla core validation names
if ($coreValidationRules = ComponentbuilderHelper::getExistingValidationRuleNames(true))
{
// make sure this rule is not a core validation rule
if (!in_array($validationRule, (array) $coreValidationRules))
{
// get the class methods for this rule if it exists
if ($this->validationRules[$validationRule] = ComponentbuilderHelper::getVar('validation_rule', $validationRule, 'name','php'))
{
// open and set the validation rule
$this->validationRules[$validationRule] = $this->setDynamicValues(base64_decode($this->validationRules[$validationRule]));
}
else
{
// set the notice that this validation rule is custom and was not found (TODO)
}
}
}
}
}
// load the type values form type params
$field->properties = (isset($field->properties) && ComponentbuilderHelper::checkJson($field->properties)) ? json_decode($field->properties, true) : null;
if (ComponentbuilderHelper::checkArray($field->properties))
@ -4983,6 +5059,7 @@ class Get
{
$path = $file;
}
// now we go line by line
foreach (new SplFileObject($file) as $lineNumber => $lineContent)
{
// we musk keep last few lines to dynamic find target entry later

View File

@ -2083,6 +2083,15 @@ class Fields extends Structure
// get the actual field name
$xmlValue = $this->setPlaceholders($name, $placeholders);
}
elseif ($property['name'] === 'validate')
{
// check if we have validate (validation rule set)
$xmlValue = ComponentbuilderHelper::getBetween($field['settings']->xml, 'validate="', '"');
if (ComponentbuilderHelper::checkString($xmlValue))
{
$xmlValue = ComponentbuilderHelper::safeString($xmlValue);
}
}
elseif ($property['name'] === 'extension' || $property['name'] === 'directory' || $property['name'] === 'formsource')
{
$xmlValue = ComponentbuilderHelper::getBetween($field['settings']->xml, $property['name'] . '="', '"');
@ -2290,6 +2299,16 @@ class Fields extends Structure
{
$fieldAttributes['display'] = $display;
}
// make sure validation is set if found (even it not part of field properties)
if (!isset($fieldAttributes['validate']))
{
// check if we have validate (validation rule set)
$validationRule = ComponentbuilderHelper::getBetween($field['settings']->xml, 'validate="', '"');
if (ComponentbuilderHelper::checkString($validationRule))
{
$fieldAttributes['validate'] = ComponentbuilderHelper::safeString($validationRule);
}
}
}
}
return $fieldAttributes;
@ -2374,12 +2393,12 @@ class Fields extends Structure
$this->historyBuilder[$view_name_single] = $view_name_single;
}
// set Alias (only one title per view)
if (isset($field['alias']) && $field['alias'])
if (isset($field['alias']) && $field['alias'] && !isset($this->aliasBuilder[$view_name_single]))
{
$this->aliasBuilder[$view_name_single] = $name;
}
// set Titles (only one title per view)
if (isset($field['title']) && $field['title'])
if (isset($field['title']) && $field['title'] && !isset($this->titleBuilder[$view_name_single]))
{
$this->titleBuilder[$view_name_single] = $name;
}

View File

@ -5064,8 +5064,6 @@ class Interpretation extends Fields
public function setBatchMove($viewName_single)
{
// set needed defaults
$title = false;
$alias = false;
$category = false;
$batchmove = array();
$VIEW = ComponentbuilderHelper::safeString($viewName_single, 'U');
@ -5083,16 +5081,6 @@ class Interpretation extends Fields
{
$category = $this->catCodeBuilder[$viewName_single]['code'];
}
// only load alias if set in this view
if (array_key_exists($viewName_single, $this->aliasBuilder))
{
$alias = $this->aliasBuilder[$viewName_single];
}
// only load title if set in this view
if (array_key_exists($viewName_single, $this->titleBuilder))
{
$title = $this->titleBuilder[$viewName_single];
}
// prepare custom script
$customScript = $this->getCustomScriptBuilder('php_batchmove', $viewName_single, PHP_EOL . PHP_EOL, null, true);
@ -5252,6 +5240,7 @@ class Interpretation extends Fields
{
// set needed defaults
$title = false;
$titles = array();
$alias = false;
$category = false;
$batchcopy = array();
@ -5277,9 +5266,26 @@ class Interpretation extends Fields
$alias = $this->aliasBuilder[$viewName_single];
}
// only load title if set in this view
if (array_key_exists($viewName_single, $this->titleBuilder))
if (isset($this->customAliasBuilder[$viewName_single]))
{
$title = $this->titleBuilder[$viewName_single];
$titles = array_values($this->customAliasBuilder[$viewName_single]);
$title = true;
}
elseif (array_key_exists($viewName_single, $this->titleBuilder))
{
$titles = array($this->titleBuilder[$viewName_single]);
$title = true;
}
// se the dynamic title
if ($title)
{
// reset the bucket
$titleData = array();
// load the dynamic title builder
foreach ($titles as $_title)
{
$titleData[] = "\$this->table->" . $_title;
}
}
// prepare custom script
$customScript = $this->getCustomScriptBuilder('php_batchcopy', $viewName_single, PHP_EOL . PHP_EOL, null, true);
@ -5400,7 +5406,7 @@ class Interpretation extends Fields
$batchcopy[] = "\t\t\t\t\tcontinue;";
$batchcopy[] = "\t\t\t\t}";
$batchcopy[] = "\t\t\t}";
if ($category && $alias === 'alias' && $title === 'title')
if ($category && $alias === 'alias' && ($title && count($titles) == 1 && in_array('title', $titles)))
{
$batchcopy[] = PHP_EOL . "\t\t\tif (isset(\$values['" . $category . "']))";
$batchcopy[] = "\t\t\t{";
@ -5411,27 +5417,31 @@ class Interpretation extends Fields
$batchcopy[] = "\t\t\t\tstatic::generateTitle((int) \$this->table->" . $category . ", \$this->table);";
$batchcopy[] = "\t\t\t}";
}
elseif ($category && $alias && $title)
elseif ($category && $alias && ($title && count($titles) == 1))
{
$batchcopy[] = PHP_EOL . "\t\t\tif (isset(\$values['" . $category . "']))";
$batchcopy[] = "\t\t\t{";
$batchcopy[] = "\t\t\t\tlist(\$this->table->" . $title . ", \$this->table->" . $alias . ") = \$this->generateNewTitle(\$values['" . $category . "'], \$this->table->" . $alias . ", \$this->table->" . $title . ");";
$batchcopy[] = "\t\t\t\tlist(\$this->table->" . implode('', $titles) . ", \$this->table->" . $alias . ") = \$this->generateNewTitle(\$values['" . $category . "'], \$this->table->" . $alias . ", \$this->table->" . implode('', $titles) . ");";
$batchcopy[] = "\t\t\t}";
$batchcopy[] = "\t\t\telse";
$batchcopy[] = "\t\t\t{";
$batchcopy[] = "\t\t\t\tlist(\$this->table->" . $title . ", \$this->table->" . $alias . ") = \$this->generateNewTitle(\$this->table->" . $category . ", \$this->table->" . $alias . ", \$this->table->" . $title . ");";
$batchcopy[] = "\t\t\t\tlist(\$this->table->" . implode('', $titles) . ", \$this->table->" . $alias . ") = \$this->generateNewTitle(\$this->table->" . $category . ", \$this->table->" . $alias . ", \$this->table->" . implode('', $titles) . ");";
$batchcopy[] = "\t\t\t}";
}
elseif (!$category && $alias && ($title && count($titles) == 1))
{
$batchcopy[] = "\t\t\tlist(\$this->table->" . implode('', $titles) . ", \$this->table->" . $alias . ") = \$this->_generateNewTitle(\$this->table->" . $alias . ", \$this->table->" . implode('', $titles) . ");";
}
elseif (!$category && $alias && $title)
{
$batchcopy[] = "\t\t\tlist(\$this->table->" . $title . ", \$this->table->" . $alias . ") = \$this->_generateNewTitle(\$this->table->" . $alias . ", \$this->table->" . $title . ");";
$batchcopy[] = "\t\t\tlist(" . implode(', ', $titleData) . ", \$this->table->" . $alias . ") = \$this->_generateNewTitle(\$this->table->" . $alias . ", array(" . implode(', ', $titleData) . "));";
}
elseif (!$category && !$alias && $title && $title != 'user' && $title != 'jobnumber') // TODO [jobnumber] just for one project (not ideal)
elseif (!$category && !$alias && ($title && count($titles) == 1 && !in_array('user', $titles) && !in_array('jobnumber', $titles))) // TODO [jobnumber] just for one project (not ideal)
{
$batchcopy[] = PHP_EOL . "\t\t\t//" . $this->setLine(__LINE__) . " Only for strings";
$batchcopy[] = "\t\t\tif (" . $Helper . "::checkString(\$this->table->" . $title . ") && !is_numeric(\$this->table->" . $title . "))";
$batchcopy[] = "\t\t\tif (" . $Helper . "::checkString(\$this->table->" . implode('', $titles). ") && !is_numeric(\$this->table->" . implode('', $titles) . "))";
$batchcopy[] = "\t\t\t{";
$batchcopy[] = "\t\t\t\t\$this->table->" . $title . " = \$this->generateUniqe('" . $title . "',\$this->table->" . $title . ");";
$batchcopy[] = "\t\t\t\t\$this->table->" . implode('', $titles) . " = \$this->generateUniqe('" . implode('', $titles) . "',\$this->table->" . implode('', $titles) . ");";
$batchcopy[] = "\t\t\t}";
}
@ -5503,35 +5513,65 @@ class Interpretation extends Fields
{
$fixUniqe = array();
// only load this if these two items are set
if (array_key_exists($viewName_single, $this->aliasBuilder) && array_key_exists($viewName_single, $this->titleBuilder))
if (array_key_exists($viewName_single, $this->aliasBuilder) &&
(array_key_exists($viewName_single, $this->titleBuilder) || isset($this->customAliasBuilder[$viewName_single])))
{
// set needed defaults
$setCategory = false;
$alias = $this->aliasBuilder[$viewName_single];
$title = $this->titleBuilder[$viewName_single];
$VIEW = ComponentbuilderHelper::safeString($viewName_single, 'U');
if (array_key_exists($viewName_single, $this->catCodeBuilder))
{
$category = $this->catCodeBuilder[$viewName_single]['code'];
$setCategory = true;
}
// set the title stuff
if (isset($this->customAliasBuilder[$viewName_single]))
{
$titles = array_values($this->customAliasBuilder[$viewName_single]);
if (isset($this->titleBuilder[$viewName_single]))
{
// $titles[] = $this->titleBuilder[$viewName_single]; // TODO this may be unexpected
}
}
else
{
$titles = array($this->titleBuilder[$viewName_single]);
}
// start building the fix
$fixUniqe[] = PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Alter the " . $title . " for save as copy";
$fixUniqe[] = PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Alter the " . implode(', ',$titles) . " for save as copy";
$fixUniqe[] = "\t\tif (\$input->get('task') === 'save2copy')";
$fixUniqe[] = "\t\t{";
$fixUniqe[] = "\t\t\t\$origTable = clone \$this->getTable();";
$fixUniqe[] = "\t\t\t\$origTable->load(\$input->getInt('id'));";
$fixUniqe[] = PHP_EOL . "\t\t\tif (\$data['" . $title . "'] == \$origTable->" . $title . ")";
$fixUniqe[] = "\t\t\t{";
if ($setCategory)
// reset the buckets
$ifStatment = array();
$titleVars = array();
$titleData = array();
$titleUpdate = array();
// load the dynamic title builder
foreach ($titles as $title)
{
$fixUniqe[] = "\t\t\t\tlist(\$" . $title . ", \$" . $alias . ") = \$this->generateNewTitle(\$data['" . $category . "'], \$data['" . $alias . "'], \$data['" . $title . "']);";
$ifStatment[] = "\$data['" . $title . "'] == \$origTable->" . $title;
$titleVars[] = "\$" . $title;
$titleData[] = "\$data['" . $title . "']";
$titleUpdate[] = "\t\t\t\t\$data['" . $title . "'] = \$" . $title . ";";
}
$fixUniqe[] = PHP_EOL . "\t\t\tif (" . implode(' || ', $ifStatment) . ")";
$fixUniqe[] = "\t\t\t{";
if ($setCategory && count($titles) == 1)
{
$fixUniqe[] = "\t\t\t\tlist(" . implode('',$titleVars) . ", \$" . $alias . ") = \$this->generateNewTitle(\$data['" . $category . "'], \$data['" . $alias . "'], " . implode('',$titleData) . ");";
}
elseif (count($titles) == 1)
{
$fixUniqe[] = "\t\t\t\tlist(" . implode(', ',$titleVars) . ", \$" . $alias . ") = \$this->_generateNewTitle(\$data['" . $alias . "'], " . implode('',$titleData) . ");";
}
else
{
$fixUniqe[] = "\t\t\t\tlist(\$" . $title . ", \$" . $alias . ") = \$this->_generateNewTitle(\$data['" . $alias . "'], \$data['" . $title . "']);";
$fixUniqe[] = "\t\t\t\tlist(" . implode(', ',$titleVars) . ", \$" . $alias . ") = \$this->_generateNewTitle(\$data['" . $alias . "'], array(" . implode(', ',$titleData) . "));";
}
$fixUniqe[] = "\t\t\t\t\$data['" . $title . "'] = \$" . $title . ";";
$fixUniqe[] = implode("\n", $titleUpdate);
$fixUniqe[] = "\t\t\t\t\$data['" . $alias . "'] = \$" . $alias . ";";
$fixUniqe[] = "\t\t\t}";
$fixUniqe[] = "\t\t\telse";
@ -5546,24 +5586,25 @@ class Interpretation extends Fields
$fixUniqe[] = PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Automatic handling of " . $alias . " for empty fields";
$fixUniqe[] = "\t\tif (in_array(\$input->get('task'), array('apply', 'save', 'save2new')) && (int) \$input->get('id') == 0)";
$fixUniqe[] = "\t\t{";
$fixUniqe[] = "\t\t\tif (\$data['" . $alias . "'] == null)";
$fixUniqe[] = "\t\t\tif (\$data['" . $alias . "'] == null || empty(\$data['" . $alias . "']))";
$fixUniqe[] = "\t\t\t{";
$fixUniqe[] = "\t\t\t\tif (JFactory::getConfig()->get('unicodeslugs') == 1)";
$fixUniqe[] = "\t\t\t\t{";
$fixUniqe[] = "\t\t\t\t\t\$data['" . $alias . "'] = JFilterOutput::stringURLUnicodeSlug(\$data['" . $title . "']);";
$fixUniqe[] = "\t\t\t\t\t\$data['" . $alias . "'] = JFilterOutput::stringURLUnicodeSlug(" . implode(' . " " . ', $titleData) . ");";
$fixUniqe[] = "\t\t\t\t}";
$fixUniqe[] = "\t\t\t\telse";
$fixUniqe[] = "\t\t\t\t{";
$fixUniqe[] = "\t\t\t\t\t\$data['" . $alias . "'] = JFilterOutput::stringURLSafe(\$data['" . $title . "']);";
$fixUniqe[] = "\t\t\t\t\t\$data['" . $alias . "'] = JFilterOutput::stringURLSafe(". implode(' . " " . ', $titleData) .");";
$fixUniqe[] = "\t\t\t\t}";
$fixUniqe[] = PHP_EOL . "\t\t\t\t\$table = JTable::getInstance('" . $viewName_single . "', '" . $this->fileContentStatic['###component###'] . "Table');";
if ($setCategory)
if ($setCategory && count($titles) == 1)
{
$fixUniqe[] = PHP_EOL . "\t\t\t\tif (\$table->load(array('" . $alias . "' => \$data['" . $alias . "'], '" . $category . "' => \$data['" . $category . "'])) && (\$table->id != \$data['id'] || \$data['id'] == 0))";
$fixUniqe[] = "\t\t\t\t{";
$fixUniqe[] = "\t\t\t\t\t\$msg = JText:" . ":_('COM_" . $this->fileContentStatic['###COMPONENT###'] . "_" . $VIEW . "_SAVE_WARNING');";
$fixUniqe[] = "\t\t\t\t}";
$fixUniqe[] = PHP_EOL . "\t\t\t\tlist(\$" . $title . ", \$" . $alias . ") = \$this->generateNewTitle(\$data['" . $category . "'], \$data['" . $alias . "'], \$data['" . $title . "']);";
$fixUniqe[] = PHP_EOL . "\t\t\t\tlist(" . implode('',$titleVars) . ", \$" . $alias . ") = \$this->generateNewTitle(\$data['" . $category . "'], \$data['" . $alias . "'], " . implode('',$titleData) . ");";
$fixUniqe[] = "\t\t\t\t\$data['" . $alias . "'] = \$" . $alias . ";";
}
else
{
@ -5571,9 +5612,8 @@ class Interpretation extends Fields
$fixUniqe[] = "\t\t\t\t{";
$fixUniqe[] = "\t\t\t\t\t\$msg = JText:" . ":_('COM_" . $this->fileContentStatic['###COMPONENT###'] . "_" . $VIEW . "_SAVE_WARNING');";
$fixUniqe[] = "\t\t\t\t}";
$fixUniqe[] = PHP_EOL . "\t\t\t\tlist(\$" . $title . ", \$" . $alias . ") = \$this->_generateNewTitle(\$data['" . $alias . "'], \$data['" . $title . "']);";
$fixUniqe[] = PHP_EOL . "\t\t\t\t\$data['" . $alias . "'] = \$this->_generateNewTitle(\$data['" . $alias . "']);";
}
$fixUniqe[] = "\t\t\t\t\$data['" . $alias . "'] = \$" . $alias . ";";
$fixUniqe[] = PHP_EOL . "\t\t\t\tif (isset(\$msg))";
$fixUniqe[] = "\t\t\t\t{";
$fixUniqe[] = "\t\t\t\t\tJFactory::getApplication()->enqueueMessage(\$msg, 'warning');";
@ -5602,28 +5642,56 @@ class Interpretation extends Fields
public function setGenerateNewTitle($viewName_single)
{
// if category is added to this view then do nothing
if (array_key_exists($viewName_single, $this->aliasBuilder) && array_key_exists($viewName_single, $this->titleBuilder))
if (array_key_exists($viewName_single, $this->aliasBuilder) &&
(array_key_exists($viewName_single, $this->titleBuilder) || isset($this->customAliasBuilder[$viewName_single])))
{
// get component name
$Component = $this->fileContentStatic['###Component###'];
// rest the new function
$newFunction = array();
$newFunction[] = PHP_EOL . PHP_EOL . "\t/**";
$newFunction[] = "\t* Method to change the title & alias.";
$newFunction[] = "\t* Method to change the title/s & alias.";
$newFunction[] = "\t*";
$newFunction[] = "\t* @param string \$alias The alias.";
$newFunction[] = "\t* @param string \$title The title.";
$newFunction[] = "\t* @param string \$alias The alias.";
$newFunction[] = "\t* @param string/array \$title The title.";
$newFunction[] = "\t*";
$newFunction[] = "\t* @return array Contains the modified title and alias.";
$newFunction[] = "\t* @return array/string Contains the modified title/s and/or alias.";
$newFunction[] = "\t*";
$newFunction[] = "\t*/";
$newFunction[] = "\tprotected function _generateNewTitle(\$alias, \$title)";
$newFunction[] = "\tprotected function _generateNewTitle(\$alias, \$title = null)";
$newFunction[] = "\t{";
$newFunction[] = PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Alter the title & alias";
$newFunction[] = PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Alter the title/s & alias";
$newFunction[] = "\t\t\$table = \$this->getTable();";
$newFunction[] = PHP_EOL . "\t\twhile (\$table->load(array('alias' => \$alias)))";
$newFunction[] = "\t\t{";
$newFunction[] = "\t\t\t\$title = JString::increment(\$title);";
$newFunction[] = "\t\t\t//" . $this->setLine(__LINE__) . " Check if this is an array of titles";
$newFunction[] = "\t\t\tif (".$Component."Helper::checkArray(\$title))";
$newFunction[] = "\t\t\t{";
$newFunction[] = "\t\t\t\tforeach(\$title as \$nr => &\$_title)";
$newFunction[] = "\t\t\t\t{";
$newFunction[] = "\t\t\t\t\t\$_title = JString::increment(\$_title);";
$newFunction[] = "\t\t\t\t}";
$newFunction[] = "\t\t\t}";
$newFunction[] = "\t\t\t//" . $this->setLine(__LINE__) . " Make sure we have a title";
$newFunction[] = "\t\t\telseif (\$title)";
$newFunction[] = "\t\t\t{";
$newFunction[] = "\t\t\t\t\$title = JString::increment(\$title);";
$newFunction[] = "\t\t\t}";
$newFunction[] = "\t\t\t\$alias = JString::increment(\$alias, 'dash');";
$newFunction[] = "\t\t}";
$newFunction[] = PHP_EOL . "\t\treturn array(\$title, \$alias);";
$newFunction[] = "\t\t//" . $this->setLine(__LINE__) . " Check if this is an array of titles";
$newFunction[] = "\t\tif (".$Component."Helper::checkArray(\$title))";
$newFunction[] = "\t\t{";
$newFunction[] = "\t\t\t\$title[] = \$alias;";
$newFunction[] = "\t\t\treturn \$title;";
$newFunction[] = "\t\t}";
$newFunction[] = "\t\t//" . $this->setLine(__LINE__) . " Make sure we have a title";
$newFunction[] = "\t\telseif (\$title)";
$newFunction[] = "\t\t{";
$newFunction[] = "\t\t\treturn array(\$title, \$alias);";
$newFunction[] = "\t\t}";
$newFunction[] = "\t\t//" . $this->setLine(__LINE__) . " We only had an alias";
$newFunction[] = "\t\treturn \$alias;";
$newFunction[] = "\t}";
return implode(PHP_EOL, $newFunction);
}
@ -5631,9 +5699,9 @@ class Interpretation extends Fields
{
$newFunction = array();
$newFunction[] = PHP_EOL . PHP_EOL . "\t/**";
$newFunction[] = "\t* Method to change the title & alias.";
$newFunction[] = "\t* Method to change the title";
$newFunction[] = "\t*";
$newFunction[] = "\t* @param string \$title The title.";
$newFunction[] = "\t* @param string \$title The title.";
$newFunction[] = "\t*";
$newFunction[] = "\t* @return array Contains the modified title and alias.";
$newFunction[] = "\t*";

View File

@ -815,6 +815,21 @@ class Infusion extends Interpretation
// set the module
$this->fileContentDynamic['ajax']['###AJAX_SITE_MODEL_METHODS###'] = $this->setAjaxModelMethods('site');
}
// build the validation rules
if (isset($this->validationRules) && ComponentbuilderHelper::checkArray($this->validationRules))
{
foreach ($this->validationRules as $rule => $_php)
{
// setup rule file
$target = array('admin' => 'a_rule_zi');
$this->buildDynamique($target, 'rule', $rule);
// set the JFormRule Name
$this->fileContentDynamic['a_rule_zi_'.$rule]['###Name###'] = ucfirst($rule);
// set the JFormRule PHP
$this->fileContentDynamic['a_rule_zi_'.$rule]['###VALIDATION_RULE_METHODS###'] = PHP_EOL . $_php;
}
}
// run the second run if needed
if (isset($this->secondRunAdmin) && ComponentbuilderHelper::checkArray($this->secondRunAdmin))

View File

@ -157,6 +157,60 @@ abstract class ComponentbuilderHelper
}
return $object;
}
/*
* Get the Array of Existing Validation Rule Names
*
* @return array
*/
public static function getExistingValidationRuleNames($lowercase = false)
{
if (!$items = self::get('_existing_validation_rules_VDM', null))
{
// load the file class
jimport('joomla.filesystem.file');
jimport('joomla.filesystem.folder');
// set the path to the form validation rules
$path = JPATH_LIBRARIES . '/src/Form/Rule';
// check if the path exist
if (!JFolder::exists($path))
{
return false;
}
// we must first store the current working directory
$joomla = getcwd();
// go to that folder
chdir($path);
// load all the files in this path
$items = JFolder::files('.', '\.php', true, true);
// change back to Joomla working directory
chdir($joomla);
// make sure we have an array
if (!self::checkArray($items))
{
return false;
}
// remove the Rule.php from the name
$items = array_map( function ($name) {
return str_replace(array('./','Rule.php'), '', $name);
}, $items);
// store the names for next run
self::set('_existing_validation_rules_VDM', json_encode($items));
}
// make sure it is no longer json
if (self::checkJson($items))
{
$items = json_decode($items, true);
}
// check if the names should be all lowercase
if ($lowercase)
{
$items = array_map( function($item) {
return strtolower($item);
}, $items);
}
return $items;
}
public static function getDynamicScripts($type, $fieldName = false)
{
@ -1626,10 +1680,13 @@ abstract class ComponentbuilderHelper
{
$result = $db->loadObject();
$properties = json_decode($result->properties,true);
$field = array('values' => "<field ", 'values_description' => '<ul>', 'short_description' => $result->short_description, 'description' => $result->description);
$field = array('values' => "<field ", 'values_description' => '<table class="uk-table uk-table-hover uk-table-striped uk-table-condensed">', 'short_description' => $result->short_description, 'description' => $result->description);
// set the headers
$field['values_description'] .= '<thead><tr><th class="uk-text-right">'.JText::_('COM_COMPONENTBUILDER_PROPERTY').'</th><th>'.JText::_('COM_COMPONENTBUILDER_EXAMPLE').'</th><th>'.JText::_('COM_COMPONENTBUILDER_DESCRIPTION').'</th></thead><tbody>';
foreach ($properties as $property)
{
$field['values_description'] .= '<li><b>'.$property['name'].'</b> '.$property['description'].'</li>';
$example = (isset($property['example']) && self::checkString($property['example'])) ? self::shorten($property['example'], 30) : '';
$field['values_description'] .= '<tr><td class="uk-text-right"><code>'.$property['name'].'</code></td><td>'.$example.'</td><td>'.$property['description'].'</td></tr>';
if(isset($settings[$property['name']]))
{
$field['values'] .= "\n\t".$property['name'].'="'.$settings[$property['name']].'" ';
@ -1640,7 +1697,7 @@ abstract class ComponentbuilderHelper
}
}
$field['values'] .= "\n/>";
$field['values_description'] .= '</ul>';
$field['values_description'] .= '</tbody></table>';
// return found field options
return $field;
}
@ -2814,6 +2871,10 @@ abstract class ComponentbuilderHelper
{
JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_GET_SNIPPETS'), 'index.php?option=com_componentbuilder&view=get_snippets', $submenu === 'get_snippets');
}
if ($user->authorise('validation_rule.access', 'com_componentbuilder') && $user->authorise('validation_rule.submenu', 'com_componentbuilder'))
{
JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_VALIDATION_RULES'), 'index.php?option=com_componentbuilder&view=validation_rules', $submenu === 'validation_rules');
}
if ($user->authorise('field.access', 'com_componentbuilder') && $user->authorise('field.submenu', 'com_componentbuilder'))
{
JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_FIELDS'), 'index.php?option=com_componentbuilder&view=fields', $submenu === 'fields');

View File

@ -1,5 +1,8 @@
COM_COMPONENTBUILDER="Component Builder"
COM_COMPONENTBUILDER_ABOVE_TABS="Above Tabs"
COM_COMPONENTBUILDER_ACCEPTS_AN_EMAIL_ADDRESS_SATISFIES_A_BASIC_SYNTAX_CHECK_IN_THE_PATTERN_OF_QUOTXYZZQUOT_WITH_NO_INVALID_CHARACTERS="Accepts an email address satisfies a basic syntax check in the pattern of &quot;x@y.zz&quot;, with no invalid characters."
COM_COMPONENTBUILDER_ACCEPTS_ONLY_EMPTY_VALUES_CONVERTED_TO_ZERO_AND_STRINGS_IN_THE_FORM_RGB_OR_RRGGBB_WHERE_R_G_AND_B_ARE_HEX_VALUES="Accepts only empty values (converted to '#000000') and strings in the form '#RGB' or '#RRGGBB' where R, G, and B are hex values."
COM_COMPONENTBUILDER_ACCEPTS_ONLY_THE_VALUES_ZERO_ONE_TRUE_OR_FALSE_CASEINSENSITIVE="Accepts only the values '0', '1', 'true' or 'false' (case-insensitive)."
COM_COMPONENTBUILDER_ACCESS_BULK_TOOLS="Access Bulk Tools"
COM_COMPONENTBUILDER_ACCESS_DENIED="Access denied!"
COM_COMPONENTBUILDER_ACTIVE_ONLY_FOUR_TEXT_FIELD="Active (only 4 text_field)"
@ -345,6 +348,12 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_ADMINVIEW_DESCRIPTION="Select an admin view"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADMINVIEW_LABEL="View"
COM_COMPONENTBUILDER_ADMIN_VIEW_AJAX_INPUT="Ajax Input"
COM_COMPONENTBUILDER_ADMIN_VIEW_AJAX_INPUT_LABEL="Ajax Input"
COM_COMPONENTBUILDER_ADMIN_VIEW_ALIAS_BUILDER="Alias Builder"
COM_COMPONENTBUILDER_ADMIN_VIEW_ALIAS_BUILDER_DESCRIPTION="Select the field/s you would like to use to build the alias."
COM_COMPONENTBUILDER_ADMIN_VIEW_ALIAS_BUILDER_LABEL="Alias Builder"
COM_COMPONENTBUILDER_ADMIN_VIEW_ALIAS_BUILDER_TYPE="Alias Builder Type"
COM_COMPONENTBUILDER_ADMIN_VIEW_ALIAS_BUILDER_TYPE_DESCRIPTION="How should the alias be build for this view"
COM_COMPONENTBUILDER_ADMIN_VIEW_ALIAS_BUILDER_TYPE_LABEL="Alias Builder Type"
COM_COMPONENTBUILDER_ADMIN_VIEW_ALNUM="ALNUM"
COM_COMPONENTBUILDER_ADMIN_VIEW_ARCHIVE="Archive"
COM_COMPONENTBUILDER_ADMIN_VIEW_ARRAY="ARRAY"
@ -428,6 +437,7 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_CSS_VIEW_DESCRIPTION="Add your CSS here! [Do not
COM_COMPONENTBUILDER_ADMIN_VIEW_CSS_VIEW_HINT="// CSS for the edit view"
COM_COMPONENTBUILDER_ADMIN_VIEW_CSS_VIEW_LABEL="CSS"
COM_COMPONENTBUILDER_ADMIN_VIEW_CUBE="Cube"
COM_COMPONENTBUILDER_ADMIN_VIEW_CUSTOM="Custom"
COM_COMPONENTBUILDER_ADMIN_VIEW_CUSTOM_BUTTON="Custom Button"
COM_COMPONENTBUILDER_ADMIN_VIEW_CUSTOM_BUTTONS="Custom Buttons"
COM_COMPONENTBUILDER_ADMIN_VIEW_CUSTOM_BUTTON_LABEL="Custom Buttons"
@ -593,11 +603,15 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_NO="No"
COM_COMPONENTBUILDER_ADMIN_VIEW_NONE="None"
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ADVANCED_IMPORT_DESCRIPTION="<p>The scripts that are automatic added to the input fields below is identical to the default import scripts used. Adapt them to your own custom needs.</p>"
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ADVANCED_IMPORT_LABEL="Advanced notice."
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ALIAS_BUILDER_CUSTOM_DESCRIPTION="The custom behaviour allows you to select what field/s must be used to build the alias."
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ALIAS_BUILDER_CUSTOM_LABEL="Custom Alias Behaviour"
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ALIAS_BUILDER_DEFAULT_DESCRIPTION="The default behaviour uses the title field to build that alias, and if no title field is found uses the date."
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ALIAS_BUILDER_DEFAULT_LABEL="Default Alias Behaviour"
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_BEGINNER_IMPORT_DESCRIPTION="<p>Please do not change this area unless you would like to add special import to this view that goes beyond the default import concept that Component Builder already does automatic if this view is set to have import & export in the component area where this view is linked to the component.</p>"
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_BEGINNER_IMPORT_LABEL="Beginners notice."
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_BUTTONS_DESCRIPTION="Some Shortcut Buttons<hr /><div id='jform_create_edit_buttons'></div>"
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_DISPLAY_DESCRIPTION="<hr /><h4>Linked Fields <span id='header_admin_fields_buttons'></span></h4><div id='display_admin_fields'>Display of the fields will load here!</div><hr /><h4>Field Conditions <span id='header_admin_fields_conditions_buttons'></span></h4><div id='display_admin_fields_conditions'>Display of the fields conditions will load here!</div>"
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_NOTICE_DESCRIPTION="<h5>Welcome to the new improved fields and conditions layout.</h5><p>We had to remove the repeatable fields layouts since Joomla has depreciated it. With this new improved layout we trust your experience will be better then ever before.</p><p>You can still <a href='https://youtu.be/CdSKSCTzmRA?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=32m28s' target='_blank'>watch the tutorials</a>, and though it was made during the time repeatable fields were still being used, the various concepts and layouts still look mostly the same.</p>"
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_NOTICE_DESCRIPTION="<h5>Welcome to the new improved fields and conditions layout.</h5><div class='note_create_edit_notice_p'><p>We had to remove the repeatable fields layouts since Joomla has depreciated it. With this new improved layout we trust your experience will be better then ever before.</p><p>You can still <a href='https://youtu.be/CdSKSCTzmRA?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=32m28s' target='_blank'>watch the tutorials</a>, and though it was made during the time repeatable fields were still being used, the various concepts and layouts still look mostly the same.</p></div>"
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_NOTICE_LABEL="Fields &amp; Conditions"
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_LINKED_TO_NOTICE_DESCRIPTION="<div id='display_linked_to'>Searching the database.<span class='loading-dots'></span></div>"
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_LINKED_TO_NOTICE_LABEL="Linked To"
@ -902,8 +916,9 @@ COM_COMPONENTBUILDER_BACKUP_FAILED_PLEASE_TRY_AGAIN_IF_THE_ERROR_CONTINUE_PLEASE
COM_COMPONENTBUILDER_BACKUP_LOCAL_DATA_FIRST="Backup Local Data First"
COM_COMPONENTBUILDER_BACKUP_WAS_DONE_SUCCESSFULLY="Backup was done successfully"
COM_COMPONENTBUILDER_BACK_TO_LIBRARIES="Back to Libraries"
COM_COMPONENTBUILDER_BASIC_METHOD="Basic Method"
COM_COMPONENTBUILDER_BASIC_TUTORIAL_ON_GIT_BSB="Basic Tutorial on git: <b>%s</b>"
COM_COMPONENTBUILDER_BBEST_TO_NOT_CONTINUEBBR_THIS_PACKAGE_BFAILEDB_CHECKSUM_VALIDATION_THIS_COULD_BE_A_SERIOUS_SECURITY_BREACH_DO_NOT_CONTINUE="<b>Best to not continue!</b><br />This package <b>FAILED</b> checksum validation, this could be a serious security breach! DO NOT CONTINUE!!!"
COM_COMPONENTBUILDER_BBEST_TO_NOT_CONTINUEBBR_WE_COULD_NOT_LOAD_THE_CHECKSUM_FOR_THIS_PACKAGE_AND_SO_NO_VALIDATION_WAS_POSSIBLE_THIS_MAY_BE_DUE_TO_YOUR_NETWORK_OR_A_CHANGE_TO_THAT_PACKAGE_NAME="<b>Best to not continue!</b><br />We could not load the checksum for this package, and so no validation was possible. This may be due to your network, or a change to that package name."
COM_COMPONENTBUILDER_BCUSTOM_FILESB_NOT_MOVE_TO_CORRECT_LOCATION="<b>Custom files</b> not move to correct location!"
COM_COMPONENTBUILDER_BEHIND="Behind"
COM_COMPONENTBUILDER_BEHIND_MEANS_YOUR_BLOCAL_SNIPPETB_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE_HAS_A_BOLDER_MODIFIED_DATEB_THEN_THE_COMMUNITY_SNIPPET_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE="Behind means your <b>local snippet</b> (with the same name, library and type) has a <b>older modified date</b> then the community snippet (with the same name, library and type)."
@ -929,6 +944,7 @@ COM_COMPONENTBUILDER_BULK_UPDATE_ALL_AVAILABLE_SNIPPETS="Bulk Update All Availab
COM_COMPONENTBUILDER_BULK_UPDATE_ALL_DIVERGED_SNIPPETS="Bulk Update All Diverged Snippets"
COM_COMPONENTBUILDER_BULK_UPDATE_ALL_OUT_DATED_SNIPPETS="Bulk Update All Out Dated Snippets"
COM_COMPONENTBUILDER_BUTTON_TO_CREATE_S_WILL_SHOW_ONCE_S_IS_SAVED_FOR_THE_FIRST_TIME="Button to create %s will show once %s is saved for the first time."
COM_COMPONENTBUILDER_CANCEL="Cancel"
COM_COMPONENTBUILDER_CHAIN="Chain"
COM_COMPONENTBUILDER_CHECK_YOUR_OWNER_DETAILS_IT_HAS_NOT_BEEN_SET_OPEN_THE_JCB_GLOBAL_OPTIONS_GO_TO_THE_COMPANY_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE="Check your owner details, it has not been set. Open the JCB Global Options, go to the Company tab and add the correct company details there."
COM_COMPONENTBUILDER_CLEAR_TMP="Clear tmp"
@ -3188,9 +3204,9 @@ COM_COMPONENTBUILDER_DASHBOARD_FIELDTYPES="Fieldtypes<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_FIELDTYPES_CATID="Category &nbsp;For<br />Fieldtypes"
COM_COMPONENTBUILDER_DASHBOARD_FIELDTYPE_ADD="Add&nbsp;Fieldtype<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_FIELD_ADD="Add&nbsp;Field<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_GETSNIPPETS="Get Snippets<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_GET_SNIPPETS="Get Snippets<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_HELP_DOCUMENTS="Help Documents<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_HELP_DOCUMENT_ADD="Add&nbsp;Help Document<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_IMPORTJCBPACKAGES="Import JCB Packages<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_JOOMLA_COMPONENTS="Joomla Components<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_JOOMLA_COMPONENT_ADD="Add&nbsp;Joomla Component<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_LANGUAGE_TRANSLATIONS="Language Translations<br /><br />"
@ -3202,9 +3218,9 @@ COM_COMPONENTBUILDER_DASHBOARD_SERVERS="Servers<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_SITE_VIEWS="Site Views<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_SITE_VIEW_ADD="Add&nbsp;Site View<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_SNIPPETS="Snippets<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_SNIPPET_ADD="Add&nbsp;Snippet<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_TEMPLATES="Templates<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_TEMPLATE_ADD="Add&nbsp;Template<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_VALIDATION_RULES="Validation Rules<br /><br />"
COM_COMPONENTBUILDER_DATE="Date"
COM_COMPONENTBUILDER_DEBUG_LINE_NUMBERS="Debug (line numbers)"
COM_COMPONENTBUILDER_DEFAULT_LINK="Default (link)"
@ -3557,6 +3573,7 @@ COM_COMPONENTBUILDER_ERROR_THE_SNIPPET_IS_FAULTY_AND_COULD_NOT_BE_SAVED="Error!
COM_COMPONENTBUILDER_ERROR_YOU_DO_NOT_HAVE_ACCESS_TO_THE_SNIPPETS="Error! You do not have access to the snippets."
COM_COMPONENTBUILDER_ERROR_YOU_DO_NOT_HAVE_PERMISSION_TO_CREATE_THE_SNIPPET="Error! You do not have permission to create the snippet."
COM_COMPONENTBUILDER_EXACT_LENGTH_ONLY_FOUR_TEXT_FIELD="Exact Length (only 4 text_field)"
COM_COMPONENTBUILDER_EXAMPLE="Example"
COM_COMPONENTBUILDER_EXPORTIMPORT_DATA="Export/Import Data"
COM_COMPONENTBUILDER_EXPORT_COMPLETED="Export Completed!"
COM_COMPONENTBUILDER_EXPORT_COMPONENTS="Export Components"
@ -3811,31 +3828,91 @@ COM_COMPONENTBUILDER_FIELD_NO="No"
COM_COMPONENTBUILDER_FIELD_NONE="None"
COM_COMPONENTBUILDER_FIELD_NONE_SET="None Set"
COM_COMPONENTBUILDER_FIELD_NOTE_FILTER_INFORMATION_DESCRIPTION="<div class='form-horizontal'>
<div class='span6'>
<h1>Filter Information</h1>
<b>The available values for the filter attribute are:</b><br />
<p>
<code>INT</code> - An integer,<br />
<code>UINT</code> - An unsigned integer,<br />
<code>FLOAT</code> - A floating point number,<br />
<code>BOOLEAN</code> - A boolean value,<br />
<code>WORD</code> - A string containing A-Z or underscores only (not case sensitive),<br />
<code>ALNUM</code> - A string containing A-Z or 0-9 only (not case sensitive),<br />
<code>CMD</code> - A string containing A-Z, 0-9, underscores, periods or hyphens (not case sensitive),<br />
<code>BASE64</code> - A string containing A-Z, 0-9, forward slashes, plus or equals (not case sensitive),<br />
<code>STRING</code> - A fully decoded and sanitized string (default),<br />
<code>HTML</code> - A sanitized string,<br />
<code>ARRAY</code> - An array,<br />
<code>PATH</code> - A sanitized file path,<br />
<code>USERNAME</code> - Do not use (use an application specific filter),<br />
<code>RAW</code> - The raw string is returned with no filtering,<br />
<code>unknown</code> - An unknown filter will act like STRING. If the input is an array it will return an array of fully decoded and sanitized strings.
</p>
</div>
<div class='span6'>
<h1>Linked To</h1>
<div id='display_linked_to'>Searching the database.<span class='loading-dots'></span></div>
</div>
<div class='span4'>
<h1>Filter Information</h1>
<!-- The available values for the filter attribute are: -->
<table class='uk-table uk-table-hover uk-table-striped uk-table-condensed'>
<caption>The available values for the filter attribute are:</caption>
<thead>
<tr>
<th class='uk-text-right'>Filter</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class='uk-text-right'><code>INT</code></td>
<td>An integer</td>
</tr>
<tr>
<td class='uk-text-right'><code>UINT</code></td>
<td>An unsigned integer</td>
</tr>
<tr>
<td class='uk-text-right'><code>FLOAT</code></td>
<td>A floating point number</td>
</tr>
<tr>
<td class='uk-text-right'><code>BOOLEAN</code></td>
<td>A boolean value</td>
</tr>
<tr>
<td class='uk-text-right'><code>WORD</code></td>
<td>A string containing A-Z or underscores only (not case sensitive)</td>
</tr>
<tr>
<td class='uk-text-right'><code>ALNUM</code></td>
<td>A string containing A-Z or 0-9 only (not case sensitive)</td>
</tr>
<tr>
<td class='uk-text-right'><code>CMD</code></td>
<td>A string containing A-Z, 0-9, underscores, periods or hyphens (not case sensitive)</td>
</tr>
<tr>
<td class='uk-text-right'><code>BASE64</code></td>
<td>A string containing A-Z, 0-9, forward slashes, plus or equals (not case sensitive)</td>
</tr>
<tr>
<td class='uk-text-right'><code>STRING</code></td>
<td>A fully decoded and sanitized string (default)</td>
</tr>
<tr>
<td class='uk-text-right'><code>HTML</code></td>
<td>A sanitized string</td>
</tr>
<tr>
<td class='uk-text-right'><code>ARRAY</code></td>
<td>An array</td>
</tr>
<tr>
<td class='uk-text-right'><code>PATH</code></td>
<td>A sanitized file path</td>
</tr>
<tr>
<td class='uk-text-right'><code>USERNAME</code></td>
<td>Do not use (use an application specific filter)</td>
</tr>
<tr>
<td class='uk-text-right'><code>RAW</code></td>
<td>The raw string is returned with no filtering</td>
</tr>
<tr>
<td class='uk-text-right'><code>unknown</code></td>
<td>An unknown filter will act like STRING. If the input is an array it will return an array of fully decoded and sanitized strings.</td>
</tr>
</tbody>
</table>
</div>
<div class='span5'>
<h1>Validation Rules <span id='validation_rules_header'></span></h1>
<!-- The available validation rules for the validate attribute are: -->
<div id='display_validation_rules'>Searching the system.<span class='loading-dots'></span></div>
</div>
<div class='span3'>
<h1>Linked To</h1>
<!-- Places across JCB where this field is linked. -->
<div id='display_linked_to'>Searching the database.<span class='loading-dots'></span></div>
</div>
</div>"
COM_COMPONENTBUILDER_FIELD_NOTE_WHMCS_ENCRYPTION_DESCRIPTION="<p>When using the WHMCS encryption you need to get a WHMCS key from:<br /><a href='https://www.vdm.io/support' target='_blank'>https://www.vdm.io</a>, or your own WHMCS install.</p><p>Please note that you will need to <b>enable the add-on</b> in the Joomla Component area (Add WHMCS)->Yes.</p><p>You can get more info about the WHMCS licensing add-on at the following links.</p><p><b>Helpful Links:</b><br />
<a href='https://www.whmcs.com/addons/licensing-addon/' target='_blank'>https://www.whmcs.com/addons/licensing-addon/</a><br />
@ -3879,12 +3956,17 @@ COM_COMPONENTBUILDER_FIELD_XML_LABEL="XML field definition (Please set the field
COM_COMPONENTBUILDER_FIELD_YES="Yes"
COM_COMPONENTBUILDER_FIELD_ZERO="0"
COM_COMPONENTBUILDER_FILE="File"
COM_COMPONENTBUILDER_FILE_BSB_WAS_NOT_MOVE_TO_S="File <b>%s</b> was not move to (%s)!"
COM_COMPONENTBUILDER_FILE_BSB_COULD_NOT_BE_UNLOCKED="File <b>%s</b> could not be unlocked!"
COM_COMPONENTBUILDER_FILE_BSB_WAS_MOVED_TO_BSB="File <b>%s</b> was moved to <b>%s</b>"
COM_COMPONENTBUILDER_FILE_BSB_WAS_NOT_MOVE_TO_BSB="File <b>%s</b> was not move to <b>%s</b>"
COM_COMPONENTBUILDER_FILE_BSB_WAS_SUCCESSFULLY_UNLOCKED="File <b>%s</b> was successfully unlocked!"
COM_COMPONENTBUILDER_FILTER="Filter"
COM_COMPONENTBUILDER_FOLDER="Folder"
COM_COMPONENTBUILDER_FOLDER_BSB_WAS_NOT_MOVE_TO_S="Folder <b>%s</b> was not move to (%s)!"
COM_COMPONENTBUILDER_FOLDER_BSB_WAS_MOVED_TO_BSB="Folder <b>%s</b> was moved to <b>%s</b>"
COM_COMPONENTBUILDER_FOLDER_BSB_WAS_NOT_MOVE_TO_BSB="Folder <b>%s</b> was not move to <b>%s</b>"
COM_COMPONENTBUILDER_FORCE_LOCAL_UPDATE="Force Local Update"
COM_COMPONENTBUILDER_FULL_WIDTH_IN_TAB="Full Width in Tab"
COM_COMPONENTBUILDER_FUNCTION_NAME_ALREADY_TAKEN_PLEASE_TRY_AGAIN="Function name already taken, please try again."
COM_COMPONENTBUILDER_GENERAL_OVERVIEW_OF_HOW_THINGS_WORK_BSB="General overview of how things work: <b>%s</b>"
COM_COMPONENTBUILDER_GETTING_AVAILABLE_LIBRARIES="Getting available libraries"
COM_COMPONENTBUILDER_GET_ALL_NEW_SNIPPETS="Get All New Snippets"
@ -3896,6 +3978,8 @@ COM_COMPONENTBUILDER_GET_SNIPPETS_ACCESS="Get Snippets Access"
COM_COMPONENTBUILDER_GET_SNIPPETS_ACCESS_DESC=" Allows the users in this group to access get snippets."
COM_COMPONENTBUILDER_GET_SNIPPETS_CUSTOM_ADMIN_VIEWS_BUTTON_ACCESS="Get Snippets Custom Admin Views Button Access"
COM_COMPONENTBUILDER_GET_SNIPPETS_CUSTOM_ADMIN_VIEWS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the custom admin views button."
COM_COMPONENTBUILDER_GET_SNIPPETS_DASHBOARD_LIST="Get Snippets Dashboard List"
COM_COMPONENTBUILDER_GET_SNIPPETS_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the Get Snippets"
COM_COMPONENTBUILDER_GET_SNIPPETS_DESC="The compiler"
COM_COMPONENTBUILDER_GET_SNIPPETS_LAYOUTS_BUTTON_ACCESS="Get Snippets Layouts Button Access"
COM_COMPONENTBUILDER_GET_SNIPPETS_LAYOUTS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the layouts button."
@ -3905,6 +3989,8 @@ COM_COMPONENTBUILDER_GET_SNIPPETS_SITE_VIEWS_BUTTON_ACCESS="Get Snippets Site Vi
COM_COMPONENTBUILDER_GET_SNIPPETS_SITE_VIEWS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the site views button."
COM_COMPONENTBUILDER_GET_SNIPPETS_SNIPPETS_BUTTON_ACCESS="Get Snippets Snippets Button Access"
COM_COMPONENTBUILDER_GET_SNIPPETS_SNIPPETS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the snippets button."
COM_COMPONENTBUILDER_GET_SNIPPETS_SUBMENU="Get Snippets Submenu"
COM_COMPONENTBUILDER_GET_SNIPPETS_SUBMENU_DESC="Allows the users in this group to update the submenu of the Get Snippets"
COM_COMPONENTBUILDER_GET_SNIPPETS_TEMPLATES_BUTTON_ACCESS="Get Snippets Templates Button Access"
COM_COMPONENTBUILDER_GET_SNIPPETS_TEMPLATES_BUTTON_ACCESS_DESC=" Allows the users in this group to access the templates button."
COM_COMPONENTBUILDER_GET_THE_KEY_FROM_BSB_FOR_A_CLASSBTN_BTNPRIMARY_HREFS_TARGET_BLANK_TITLEGET_A_KEY_FROM_SSA="Get the key from <b>%s</b> for <a class="btn btn-primary" href="%s" target="_blank" title="get a key from %s">%s</a>"
@ -3912,6 +3998,7 @@ COM_COMPONENTBUILDER_GET_THE_SNIPPET_FROM_GITHUB_AND_INSTALL_IT_LOCALLY="Get the
COM_COMPONENTBUILDER_GET_THE_SNIPPET_FROM_GITHUB_AND_UPDATE_THE_LOCAL_VERSION="Get the snippet from gitHub and update the local version"
COM_COMPONENTBUILDER_GLOBAL="Global"
COM_COMPONENTBUILDER_GREAT_THIS_FUNCTION_NAME_WILL_WORK="Great, this function name will work!"
COM_COMPONENTBUILDER_GREAT_THIS_VALIDATION_RULE_NAME_S_WILL_WORK="Great, this validation rule name (%s) will work!"
COM_COMPONENTBUILDER_HAS_METADATA="Has Metadata"
COM_COMPONENTBUILDER_HELP_DOCUMENT="Help Document"
COM_COMPONENTBUILDER_HELP_DOCUMENTS="Help Documents"
@ -3923,8 +4010,6 @@ COM_COMPONENTBUILDER_HELP_DOCUMENTS_BATCH_USE="Help Documents Batch Use"
COM_COMPONENTBUILDER_HELP_DOCUMENTS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch help documents"
COM_COMPONENTBUILDER_HELP_DOCUMENTS_CREATE="Help Documents Create"
COM_COMPONENTBUILDER_HELP_DOCUMENTS_CREATE_DESC="Allows the users in this group to create create help documents"
COM_COMPONENTBUILDER_HELP_DOCUMENTS_DASHBOARD_ADD="Help Documents Dashboard Add"
COM_COMPONENTBUILDER_HELP_DOCUMENTS_DASHBOARD_ADD_DESC="Allows the users in this group to update the dashboard add of the help document"
COM_COMPONENTBUILDER_HELP_DOCUMENTS_DASHBOARD_LIST="Help Documents Dashboard List"
COM_COMPONENTBUILDER_HELP_DOCUMENTS_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the help document"
COM_COMPONENTBUILDER_HELP_DOCUMENTS_DELETE="Help Documents Delete"
@ -4075,6 +4160,7 @@ COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_SERVERS="Select the file to import d
COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_SITE_VIEWS="Select the file to import data to site_views."
COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_SNIPPETS="Select the file to import data to snippets."
COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_TEMPLATES="Select the file to import data to templates."
COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_VALIDATION_RULES="Select the file to import data to validation_rules."
COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_URL="Enter file URL"
COM_COMPONENTBUILDER_IMPORT_SUCCESS="Great! Import successful."
COM_COMPONENTBUILDER_IMPORT_TABLE_COLUMNS="Table Columns"
@ -4766,6 +4852,7 @@ COM_COMPONENTBUILDER_LAYOUT_ALIAS_DESCRIPTION="Add Name in Code Here"
COM_COMPONENTBUILDER_LAYOUT_ALIAS_HINT="codename"
COM_COMPONENTBUILDER_LAYOUT_ALIAS_LABEL="Name in Code"
COM_COMPONENTBUILDER_LAYOUT_ALIAS_MESSAGE="Error! Please add name in code here."
COM_COMPONENTBUILDER_LAYOUT_CODE_SNIPPETS="Layout Code Snippets"
COM_COMPONENTBUILDER_LAYOUT_CREATED_BY_DESC="The user that created this Layout."
COM_COMPONENTBUILDER_LAYOUT_CREATED_BY_LABEL="Created By"
COM_COMPONENTBUILDER_LAYOUT_CREATED_DATE_DESC="The date this Layout was created."
@ -5225,6 +5312,7 @@ COM_COMPONENTBUILDER_MIN_LENGTH_ONLY_FOUR_TEXT_FIELD="Min Length (only 4 text_fi
COM_COMPONENTBUILDER_NAME="Name"
COM_COMPONENTBUILDER_NAME_ASC="Name (Asc)"
COM_COMPONENTBUILDER_NAME_DESC="Name (Desc)"
COM_COMPONENTBUILDER_NAME_OF_DYNAMICGET="Name of dynamicGet"
COM_COMPONENTBUILDER_NEED_HELP="Need help?"
COM_COMPONENTBUILDER_NEW="New"
COM_COMPONENTBUILDER_NEW_ISSUE="New Issue"
@ -5247,6 +5335,7 @@ COM_COMPONENTBUILDER_NO_SNIPPETS_WERE_SELECTED_PLEASE_MAKE_A_SELECTION_AND_TRY_A
COM_COMPONENTBUILDER_NO_S_FOUND="No %s Found"
COM_COMPONENTBUILDER_NO_S_HAVE_BEEN_LINKED_TO_THIS_VIEW_SOON_AS_THIS_IS_DONE_IT_WILL_BE_DISPLAYED_HERE="No %s have been linked to this view. Soon as this is done it will be displayed here."
COM_COMPONENTBUILDER_NO_TYPE="No Type"
COM_COMPONENTBUILDER_NO_VALIDATION_RULES_FOUND="No validation rules found."
COM_COMPONENTBUILDER_OFFICIAL_VDM_PACKAGES="Official VDM Packages"
COM_COMPONENTBUILDER_ON_GITHUB="on Github"
COM_COMPONENTBUILDER_OPEN="Open"
@ -5268,21 +5357,27 @@ COM_COMPONENTBUILDER_PACKAGE_OWNER_NOT_SET="Package Owner Not Set"
COM_COMPONENTBUILDER_PATH_CODESCODE="Path: <code>%s</code>"
COM_COMPONENTBUILDER_PATH_TO_THE_ZIPPED_PACKAGE_IS_CODESCODE_BR_S_S="Path to the zipped package is: <code>%s</code> <br />%s %s"
COM_COMPONENTBUILDER_PERMISSIONS="Permissions"
COM_COMPONENTBUILDER_PLACES_ACROSS_JCB_WHERE_THIS_S_IS_LINKED="Places across JCB where this %s is linked."
COM_COMPONENTBUILDER_PLEASE_ADD_FILES_TO_S="Please add files to (%s)"
COM_COMPONENTBUILDER_PLEASE_ADD_FOLDERS_TO_S="Please add folders to (%s)"
COM_COMPONENTBUILDER_PLEASE_CHECK_AGAIN_LATTER="Please check again latter."
COM_COMPONENTBUILDER_PLEASE_NOTE_THAT_THIS_PACKAGE_BHAS_NOB_CHECKSUM_VALIDATION="Please note that this package <b>has no</b> checksum validation!"
COM_COMPONENTBUILDER_PLEASE_SELECT_A_COMPONENT_THAT_YOU_WOULD_LIKE_TO_COMPILE="Please select a component that you would like to compile."
COM_COMPONENTBUILDER_PLEASE_TRY_AGAIN_LATER="Please try again later"
COM_COMPONENTBUILDER_PLEASE_WAIT_CLEARING_THE_TMP_FOLDER="Please wait! Clearing the tmp folder"
COM_COMPONENTBUILDER_PLEASE_WAIT_LOADING="Please wait, loading"
COM_COMPONENTBUILDER_PROPERTY="Property"
COM_COMPONENTBUILDER_PUBLIC_ACCESS="Public Access"
COM_COMPONENTBUILDER_PUBLISHED="Published"
COM_COMPONENTBUILDER_PUBLISHING="Publishing"
COM_COMPONENTBUILDER_QUITE="Quite"
COM_COMPONENTBUILDER_QUIET="Quiet"
COM_COMPONENTBUILDER_READY_TO_COMPILE_A_COMPONENT="Ready to compile a component"
COM_COMPONENTBUILDER_RELEASED_THIS="released this"
COM_COMPONENTBUILDER_RENAME="Rename"
COM_COMPONENTBUILDER_REPORT_AN_ISSUE_BSB="Report an issue: <b>%s</b>"
COM_COMPONENTBUILDER_REQUIRES_THE_VALUE_ENTERED_BE_ONE_OF_THE_OPTIONS_IN_AN_ELEMENT_OF_TYPEQUOTLISTQUOT_THAT_IS_THAT_THE_ELEMENT_IS_A_SELECT_LIST="Requires the value entered be one of the options in an element of type=&quot;list&quot;: that is, that the element is a select list."
COM_COMPONENTBUILDER_REQUIRES_THE_VALUE_TO_BE_A_TELEPHONE_NUMBER_COMPLYING_WITH_THE_STANDARDS_OF_NANPA_ITUT_TRECEONE_HUNDRED_AND_SIXTY_FOUR_OR_IETF_RFCFOUR_THOUSAND_NINE_HUNDRED_AND_THIRTY_THREE="Requires the value to be a Telephone number complying with the standards of nanpa, ITU-T T-REC-E.164 or ietf rfc4933."
COM_COMPONENTBUILDER_REQUIRES_THE_VALUE_TO_BE_THE_SAME_AS_THAT_HELD_IN_THE_FIELD_NAMED_QUOTFIELDQUOT_EGS="Requires the value to be the same as that held in the field named &quot;field&quot;, eg:%s"
COM_COMPONENTBUILDER_RESPOND_TO_THIS_ISSUE_ON_GITHUB="Respond to this issue on Github"
COM_COMPONENTBUILDER_REVERT_ALL_AHEAD_SNIPPETS="Revert All Ahead Snippets"
COM_COMPONENTBUILDER_REVIEW_THIS_ISSUE_ON_GITHUB="Review this issue on Github"
@ -5294,7 +5389,7 @@ COM_COMPONENTBUILDER_SBR_YOU_CAN_ADD_AN_BACCESS_TOKENB_TO_GETBIBLE_GLOBAL_OPTION
COM_COMPONENTBUILDER_SEARCHABLE="Searchable"
COM_COMPONENTBUILDER_SELECT_AN_OPTION="Select an option"
COM_COMPONENTBUILDER_SELECT_A_SNIPPET="select a snippet"
COM_COMPONENTBUILDER_SELECT_IF_THE_IMPORT_SHOULD_BE_SHOWING_MORE_OR_LESS_INFORMATION_DURING_IMPORT="Select if the import should be showing more or less information during import."
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_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"
@ -5927,8 +6022,6 @@ COM_COMPONENTBUILDER_SNIPPETS_BATCH_USE_DESC="Allows users in this group to use
COM_COMPONENTBUILDER_SNIPPETS_COULD_NOT_BE_UPDATEDSAVED="Snippets could not be updated/saved"
COM_COMPONENTBUILDER_SNIPPETS_CREATE="Snippets Create"
COM_COMPONENTBUILDER_SNIPPETS_CREATE_DESC="Allows the users in this group to create create snippets"
COM_COMPONENTBUILDER_SNIPPETS_DASHBOARD_ADD="Snippets Dashboard Add"
COM_COMPONENTBUILDER_SNIPPETS_DASHBOARD_ADD_DESC="Allows the users in this group to update the dashboard add of the snippet"
COM_COMPONENTBUILDER_SNIPPETS_DASHBOARD_LIST="Snippets Dashboard List"
COM_COMPONENTBUILDER_SNIPPETS_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the snippet"
COM_COMPONENTBUILDER_SNIPPETS_DELETE="Snippets Delete"
@ -6109,7 +6202,11 @@ COM_COMPONENTBUILDER_SNIPPET_USAGE_HINT="Add Usage Here"
COM_COMPONENTBUILDER_SNIPPET_USAGE_LABEL="Usage"
COM_COMPONENTBUILDER_SNIPPET_VERSION_DESC="A count of the number of times this Snippet has been revised."
COM_COMPONENTBUILDER_SNIPPET_VERSION_LABEL="Revision"
COM_COMPONENTBUILDER_SOME_BCUSTOM_FILESB_WERE_MOVED_TO_BSB="Some <b>Custom files</b> were moved to <b>%s</b>"
COM_COMPONENTBUILDER_SOME_BIMAGESB_WERE_MOVED_TO_BSB="Some <b>Images</b> were moved to <b>%s</b>"
COM_COMPONENTBUILDER_SORRY_THIS_FUNCTION_NAME_IS_ALREADY_IN_USE="Sorry this function name is already in use!"
COM_COMPONENTBUILDER_SORRY_THIS_VALIDATION_RULE_NAME_S_ALREADY_EXIST_AS_PART_OF_THE_JOOMLA_CORE_NO_NEED_TO_CREATE_IT_IF_YOU_ARE_ADAPTING_IT_GIVE_IT_YOUR_OWN_UNIQUE_NAME="Sorry this validation rule name (%s) already exist as part of the Joomla core! No need to create it, if you are adapting it give it your own unique name."
COM_COMPONENTBUILDER_SORRY_THIS_VALIDATION_RULE_NAME_S_ALREADY_EXIST_IN_YOUR_SYSTEM="Sorry this validation rule name (%s) already exist in your system!"
COM_COMPONENTBUILDER_SORTABLE="Sortable"
COM_COMPONENTBUILDER_SUBMENU="Submenu"
COM_COMPONENTBUILDER_SUBMENU_ADMIN_VIEWS="Admin Views"
@ -6131,6 +6228,7 @@ COM_COMPONENTBUILDER_SUBMENU_SERVERS="Servers"
COM_COMPONENTBUILDER_SUBMENU_SITE_VIEWS="Site Views"
COM_COMPONENTBUILDER_SUBMENU_SNIPPETS="Snippets"
COM_COMPONENTBUILDER_SUBMENU_TEMPLATES="Templates"
COM_COMPONENTBUILDER_SUBMENU_VALIDATION_RULES="Validation Rules"
COM_COMPONENTBUILDER_SUCCESS_THE_SNIPPET_WAS_SAVED="Success! The snippet was saved."
COM_COMPONENTBUILDER_SUCCESS_THE_SNIPPET_WAS_SAVED_BUT_THE_MODIFIED_DATE_COULD_NOT_BE_ADJUSTED_BR_BR_BTHIS_MEANS_THE_SNIPPETS_WILL_CONTINUE_TO_APPEAR_OUT_OF_DATEB="Success! The snippet was saved. But the modified date could not be adjusted. <br /><br /><b>This means the snippets will continue to appear out of date.</b>"
COM_COMPONENTBUILDER_S_BEING_IMPORTED="%s Being Imported"
@ -6195,6 +6293,7 @@ COM_COMPONENTBUILDER_TEMPLATE_ALIAS_DESCRIPTION="Add Name in Code Here"
COM_COMPONENTBUILDER_TEMPLATE_ALIAS_HINT="codename"
COM_COMPONENTBUILDER_TEMPLATE_ALIAS_LABEL="Name in Code"
COM_COMPONENTBUILDER_TEMPLATE_ALIAS_MESSAGE="Error! Please add name in code here."
COM_COMPONENTBUILDER_TEMPLATE_CODE_SNIPPETS="Template Code Snippets"
COM_COMPONENTBUILDER_TEMPLATE_CREATED_BY_DESC="The user that created this Template."
COM_COMPONENTBUILDER_TEMPLATE_CREATED_BY_LABEL="Created By"
COM_COMPONENTBUILDER_TEMPLATE_CREATED_DATE_DESC="The date this Template was created."
@ -6263,8 +6362,10 @@ COM_COMPONENTBUILDER_THERE_ARE_NO_NEW_SNIPPETS_AT_THIS_TIME="There are no new sn
COM_COMPONENTBUILDER_THERE_ARE_NO_OUT_OF_DATE_SNIPPETS_AT_THIS_TIME="There are no out of date snippets at this time"
COM_COMPONENTBUILDER_THERE_ARE_NO_SNIPPETS_TO_UPDATE_AT_THIS_TIME="There are no snippets to update at this time"
COM_COMPONENTBUILDER_THERE_HAS_BEEN_AN_ERROR_IF_THIS_CONTINUES_PLEASE_INFORM_YOUR_SYSTEM_ADMINISTRATOR_OF_A_TYPE_ERROR_IN_THE_FIELDS_DISPLAY_REQUEST="There has been an error, if this continues please inform your system administrator of a type error in the fields display request!"
COM_COMPONENTBUILDER_THERE_WAS_AN_ERROR_GETTING_THE_PACKAGE_INFO="There was an error getting the package info."
COM_COMPONENTBUILDER_THERE_WAS_A_PROBLEM_BNO_VIEW_OR_ID_FOUND_IN_SESSION_OR_VIEW_NOT_ALLOWED_TO_ACCESS_AREAB_WE_COULD_NOT_LOAD_ANY_LINKED_TO_VALUES_PLEASE_INFORM_YOUR_SYSTEM_ADMINISTRATOR="There was a problem, <b>no view or id found in session or view not allowed to access area</b>, we could not load any linked to values. Please inform your system administrator!"
COM_COMPONENTBUILDER_THESE_ARE_THE_SAME_PACKAGES_FOUND_ON_A_S_GITHUBA_AND_CAN_BE_IMPORTED_BY_SIMPLY_MAKING_A_SELECTION_AND_THEN_CLICKING_THE_GET_PACKAGE_BUTTONBR_SOME_OF_THESE_PACKAGES_WOULD_REQUIRE_A_KEY_SINCE_THEY_ARE_NOT_FREE_A_S_GET_A_KEY_TODAYA="These are the same packages found on <a %s >gitHub</a> and can be imported by simply making a selection and then clicking the [Get Package] button.<br />Some of these packages would require a key, since they are not free. <a %s >Get a key today!</a>."
COM_COMPONENTBUILDER_THE_AVAILABLE_VALIDATION_RULES_FOR_THE_VALIDATE_ATTRIBUTE_ARE="The available validation rules for the validate attribute are:"
COM_COMPONENTBUILDER_THE_BPHPSECLIBNETSFTPB_LIBRARYCLASS_IS_NOT_AVAILABLE_THIS_LIBRARYCLASS_SHOULD_HAVE_BEEN_ADDED_TO_YOUR_BLIBRARIESVDM_IOVENDORB_FOLDER_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_INFO="The <b>phpseclib\NET\SFTP</b> library\class is not available! This library\class should have been added to your <b>libraries/vdm_io/vendor</b> folder. Please contact your system administrator for more info"
COM_COMPONENTBUILDER_THE_BSB_FILE_COULD_NOT_BE_MOVED_TO_BSB_PATH_ON_BSB_SERVER="The <b>%s</b> file could not be moved to <b>%s</b> path on <b>%s</b> server."
COM_COMPONENTBUILDER_THE_BSB_FILE_COULD_NOT_BE_MOVED_TO_BSB_SERVER="The <b>%s</b> file could not be moved to <b>%s</b> server."
@ -6299,9 +6400,11 @@ COM_COMPONENTBUILDER_THE_SNIPPET_WAS_SUCCESSFULLY_EXPORTED="The Snippet Was Succ
COM_COMPONENTBUILDER_THE_URL_S_SET_TO_RETRIEVE_THE_PACKAGES_DOES_NOT_EXIST="The url (%s) set to retrieve the packages does not exist!"
COM_COMPONENTBUILDER_THE_WIKI_IS_LOADING="The wiki is loading"
COM_COMPONENTBUILDER_THIS_BSB_IS_NOT_LINKED_TO_ANY_OTHER_AREAS_OF_JCB_AT_THIS_TIME="This <b>%s</b> is not linked to any other areas of JCB at this time!"
COM_COMPONENTBUILDER_THIS_PACKAGE_BPASSEDB_CHECKSUM_VALIDATION_PLEASE_VALIDATE_THIS_CHECKSUM_BSB_TO_BE_THE_SAME_AS_THE_ONE_FOUND_A_S_SA="This package <b>PASSED</b> checksum validation! Please validate this checksum: <b>%s</b> to be the same as the one found @ <a %s %s</a>"
COM_COMPONENTBUILDER_THIS_PACKAGE_HAS_NO_KEY="This package has no key."
COM_COMPONENTBUILDER_TITLE="Title"
COM_COMPONENTBUILDER_TOTAL_DOWNLOADS="total downloads"
COM_COMPONENTBUILDER_TO_ADD_SIMPLY_COPY_AND_PAST_THE_SNIPPET_INTO_YOUR_CODE="To add simply copy and past the snippet into your code."
COM_COMPONENTBUILDER_TO_CHANGE_THE_PACKAGE_OWNER_DEFAULTS_OPEN_THE_BJCB_GLOBAL_OPTIONSB_GO_TO_THE_BCOMPANYB_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE="To change the package owner defaults. Open the <b>JCB Global Options</b>, go to the <b>Company</b> tab and add the correct company details there."
COM_COMPONENTBUILDER_TO_CHANGE_THE_PACKAGE_OWNER_DEFAULTS_OPEN_THE_JCB_GLOBAL_OPTIONS_GO_TO_THE_COMPANY_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE="To change the package owner defaults. Open the JCB Global Options, go to the Company tab and add the correct company details there."
COM_COMPONENTBUILDER_TO_SHARE_THESE_SNIPPETS_WITH_THE_REST_OF_THE_JCB_COMMUNITY="To share these snippets with the rest of the JCB community,"
@ -6313,6 +6416,7 @@ COM_COMPONENTBUILDER_TYPE="Type"
COM_COMPONENTBUILDER_TYPE_ASC="Type (Asc)"
COM_COMPONENTBUILDER_TYPE_DESC="Type (Desc)"
COM_COMPONENTBUILDER_TYPE_ERROR="Type Error"
COM_COMPONENTBUILDER_TYPE_NAME="Type - Name"
COM_COMPONENTBUILDER_UNACTIVE_ONLY_FOUR_TEXT_FIELD="Unactive (only 4 text_field)"
COM_COMPONENTBUILDER_UNDERNEATH_TABS="Underneath Tabs"
COM_COMPONENTBUILDER_UPDATE="Update"
@ -6324,6 +6428,90 @@ COM_COMPONENTBUILDER_USED_IN="used in"
COM_COMPONENTBUILDER_USE_BATCH="Use Batch"
COM_COMPONENTBUILDER_USE_BATCH_DESC=" Allows users in this group to use batch copy/update method."
COM_COMPONENTBUILDER_USE_KEY="Use Key"
COM_COMPONENTBUILDER_VALIDATE="Validate"
COM_COMPONENTBUILDER_VALIDATES_THAT_THE_VALUE_DOES_NOT_APPEAR_AS_A_USERNAME_ON_THE_SYSTEM_THAT_IS_THAT_IT_IS_A_VALID_NEW_USERNAME_DOES_NOT_SYNTAX_CHECK_IT_AS_A_VALID_NAME="Validates that the value does NOT appear as a username on the system; that is, that it is a valid new username. Does not syntax check it as a valid name."
COM_COMPONENTBUILDER_VALIDATES_THAT_THE_VALUE_IS_A_URL_WITH_A_VALID_SCHEME_WHICH_CAN_BE_RESTRICTED_BY_THE_OPTIONAL_COMMASEPARATED_FIELD_SCHEME_AND_PASSES_A_BASIC_SYNTAX_CHECK_EGS="Validates that the value is a URL with a valid scheme (which can be restricted by the optional comma-separated field 'scheme'), and passes a basic syntax check. eg:%s"
COM_COMPONENTBUILDER_VALIDATION_RULE="Validation Rule"
COM_COMPONENTBUILDER_VALIDATION_RULES="Validation Rules"
COM_COMPONENTBUILDER_VALIDATION_RULES_ACCESS="Validation Rules Access"
COM_COMPONENTBUILDER_VALIDATION_RULES_ACCESS_DESC="Allows the users in this group to access access validation rules"
COM_COMPONENTBUILDER_VALIDATION_RULES_BATCH_OPTIONS="Batch process the selected Validation Rules"
COM_COMPONENTBUILDER_VALIDATION_RULES_BATCH_TIP="All changes will be applied to all selected Validation Rules"
COM_COMPONENTBUILDER_VALIDATION_RULES_BATCH_USE="Validation Rules Batch Use"
COM_COMPONENTBUILDER_VALIDATION_RULES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch validation rules"
COM_COMPONENTBUILDER_VALIDATION_RULES_CREATE="Validation Rules Create"
COM_COMPONENTBUILDER_VALIDATION_RULES_CREATE_DESC="Allows the users in this group to create create validation rules"
COM_COMPONENTBUILDER_VALIDATION_RULES_DASHBOARD_LIST="Validation Rules Dashboard List"
COM_COMPONENTBUILDER_VALIDATION_RULES_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the validation rule"
COM_COMPONENTBUILDER_VALIDATION_RULES_DELETE="Validation Rules Delete"
COM_COMPONENTBUILDER_VALIDATION_RULES_DELETE_DESC="Allows the users in this group to delete delete validation rules"
COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT="Validation Rules Edit"
COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_DESC="Allows the users in this group to edit the validation rule"
COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_OWN="Validation Rules Edit Own"
COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_OWN_DESC="Allows the users in this group to edit edit own validation rules created by them"
COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_STATE="Validation Rules Edit State"
COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_STATE_DESC="Allows the users in this group to update the state of the validation rule"
COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_VERSION="Validation Rules Edit Version"
COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version validation rules"
COM_COMPONENTBUILDER_VALIDATION_RULES_EXPORT="Validation Rules Export"
COM_COMPONENTBUILDER_VALIDATION_RULES_EXPORT_DESC="Allows the users in this group to export export validation rules"
COM_COMPONENTBUILDER_VALIDATION_RULES_IMPORT="Validation Rules Import"
COM_COMPONENTBUILDER_VALIDATION_RULES_IMPORT_DESC="Allows the users in this group to import import validation rules"
COM_COMPONENTBUILDER_VALIDATION_RULES_N_ITEMS_ARCHIVED="%s Validation Rules archived."
COM_COMPONENTBUILDER_VALIDATION_RULES_N_ITEMS_ARCHIVED_1="%s Validation Rule archived."
COM_COMPONENTBUILDER_VALIDATION_RULES_N_ITEMS_CHECKED_IN_0="No Validation Rule successfully checked in."
COM_COMPONENTBUILDER_VALIDATION_RULES_N_ITEMS_CHECKED_IN_1="%d Validation Rule successfully checked in."
COM_COMPONENTBUILDER_VALIDATION_RULES_N_ITEMS_CHECKED_IN_MORE="%d Validation Rules successfully checked in."
COM_COMPONENTBUILDER_VALIDATION_RULES_N_ITEMS_DELETED="%s Validation Rules deleted."
COM_COMPONENTBUILDER_VALIDATION_RULES_N_ITEMS_DELETED_1="%s Validation Rule deleted."
COM_COMPONENTBUILDER_VALIDATION_RULES_N_ITEMS_FEATURED="%s Validation Rules featured."
COM_COMPONENTBUILDER_VALIDATION_RULES_N_ITEMS_FEATURED_1="%s Validation Rule featured."
COM_COMPONENTBUILDER_VALIDATION_RULES_N_ITEMS_PUBLISHED="%s Validation Rules published."
COM_COMPONENTBUILDER_VALIDATION_RULES_N_ITEMS_PUBLISHED_1="%s Validation Rule published."
COM_COMPONENTBUILDER_VALIDATION_RULES_N_ITEMS_TRASHED="%s Validation Rules trashed."
COM_COMPONENTBUILDER_VALIDATION_RULES_N_ITEMS_TRASHED_1="%s Validation Rule trashed."
COM_COMPONENTBUILDER_VALIDATION_RULES_N_ITEMS_UNFEATURED="%s Validation Rules unfeatured."
COM_COMPONENTBUILDER_VALIDATION_RULES_N_ITEMS_UNFEATURED_1="%s Validation Rule unfeatured."
COM_COMPONENTBUILDER_VALIDATION_RULES_N_ITEMS_UNPUBLISHED="%s Validation Rules unpublished."
COM_COMPONENTBUILDER_VALIDATION_RULES_N_ITEMS_UNPUBLISHED_1="%s Validation Rule unpublished."
COM_COMPONENTBUILDER_VALIDATION_RULES_SUBMENU="Validation Rules Submenu"
COM_COMPONENTBUILDER_VALIDATION_RULES_SUBMENU_DESC="Allows the users in this group to update the submenu of the validation rule"
COM_COMPONENTBUILDER_VALIDATION_RULE_CREATED_BY_DESC="The user that created this Validation Rule."
COM_COMPONENTBUILDER_VALIDATION_RULE_CREATED_BY_LABEL="Created By"
COM_COMPONENTBUILDER_VALIDATION_RULE_CREATED_DATE_DESC="The date this Validation Rule was created."
COM_COMPONENTBUILDER_VALIDATION_RULE_CREATED_DATE_LABEL="Created Date"
COM_COMPONENTBUILDER_VALIDATION_RULE_EDIT="Editing the Validation Rule"
COM_COMPONENTBUILDER_VALIDATION_RULE_ERROR_UNIQUE_ALIAS="Another Validation Rule has the same alias."
COM_COMPONENTBUILDER_VALIDATION_RULE_EXTENDS_FORMRULE="Extends FormRule"
COM_COMPONENTBUILDER_VALIDATION_RULE_ID="Id"
COM_COMPONENTBUILDER_VALIDATION_RULE_INHERIT="Inherit"
COM_COMPONENTBUILDER_VALIDATION_RULE_INHERIT_DESCRIPTION="Select an existing validation rule that you would like to adapt."
COM_COMPONENTBUILDER_VALIDATION_RULE_INHERIT_LABEL="Existing Validation Rules"
COM_COMPONENTBUILDER_VALIDATION_RULE_MODIFIED_BY_DESC="The last user that modified this Validation Rule."
COM_COMPONENTBUILDER_VALIDATION_RULE_MODIFIED_BY_LABEL="Modified By"
COM_COMPONENTBUILDER_VALIDATION_RULE_MODIFIED_DATE_DESC="The date this Validation Rule was modified."
COM_COMPONENTBUILDER_VALIDATION_RULE_MODIFIED_DATE_LABEL="Modified Date"
COM_COMPONENTBUILDER_VALIDATION_RULE_NAME="Name"
COM_COMPONENTBUILDER_VALIDATION_RULE_NAME_ALREADY_TAKEN_PLEASE_TRY_AGAIN="Validation rule name already taken, please try again."
COM_COMPONENTBUILDER_VALIDATION_RULE_NAME_DESCRIPTION="The name for this validation rule"
COM_COMPONENTBUILDER_VALIDATION_RULE_NAME_LABEL="Name"
COM_COMPONENTBUILDER_VALIDATION_RULE_NEW="A New Validation Rule"
COM_COMPONENTBUILDER_VALIDATION_RULE_ORDERING_LABEL="Ordering"
COM_COMPONENTBUILDER_VALIDATION_RULE_PERMISSION="Permissions"
COM_COMPONENTBUILDER_VALIDATION_RULE_PHP="Php"
COM_COMPONENTBUILDER_VALIDATION_RULE_PHP_DESCRIPTION="Add your PHP here! [Do not add the php tags]"
COM_COMPONENTBUILDER_VALIDATION_RULE_PHP_HINT="// PHP class methods and fields can be added here"
COM_COMPONENTBUILDER_VALIDATION_RULE_PHP_LABEL="PHP <small>(class methods)</small>"
COM_COMPONENTBUILDER_VALIDATION_RULE_PUBLISHING="Publishing"
COM_COMPONENTBUILDER_VALIDATION_RULE_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Validation Rule to customise the alias."
COM_COMPONENTBUILDER_VALIDATION_RULE_SHORT_DESCRIPTION="Short Description"
COM_COMPONENTBUILDER_VALIDATION_RULE_SHORT_DESCRIPTION_DESCRIPTION="Enter short description"
COM_COMPONENTBUILDER_VALIDATION_RULE_SHORT_DESCRIPTION_HINT="Your Short Description Here"
COM_COMPONENTBUILDER_VALIDATION_RULE_SHORT_DESCRIPTION_LABEL="Short Description"
COM_COMPONENTBUILDER_VALIDATION_RULE_SHORT_DESCRIPTION_MESSAGE="Error! Please add some short description here."
COM_COMPONENTBUILDER_VALIDATION_RULE_STATUS="Status"
COM_COMPONENTBUILDER_VALIDATION_RULE_VERSION_DESC="A count of the number of times this Validation Rule has been revised."
COM_COMPONENTBUILDER_VALIDATION_RULE_VERSION_LABEL="Revision"
COM_COMPONENTBUILDER_VDM_NOTICE_BOARD="VDM Notice Board"
COM_COMPONENTBUILDER_VDM_PACKAGES="VDM Packages"
COM_COMPONENTBUILDER_VERSION="Version"
@ -6342,6 +6530,7 @@ COM_COMPONENTBUILDER_WEBSITE="Website"
COM_COMPONENTBUILDER_WEBSITE_S="Website: %s"
COM_COMPONENTBUILDER_WE_DID_NOT_CHECK_THE_SNIPPET_IT_SELF_TO_SEE_IF_IT_CHANGED_WE_ONLY_WORK_ON_DATES="We did not check the snippet it self, to see if it changed. We only work on dates."
COM_COMPONENTBUILDER_WE_FAILED_TO_MOVE_BSB="We failed to move <b>%s</b>!"
COM_COMPONENTBUILDER_WE_SUCCESSFULLY_MOVED_BSB="We successfully moved <b>%s</b>!"
COM_COMPONENTBUILDER_YES="Yes"
COM_COMPONENTBUILDER_YOUR_DATA_IS_ENCRYPTED_WITH_A_AES_ONE_HUNDRED_AND_TWENTY_EIGHT_BIT_ENCRYPTION_USING_THE_ABOVE_THIRTY_TWO_CHARACTER_KEYBR_WITHOUT_THIS_KEY_IT_WILL_TAKE_THE_CURRENT_TECHNOLOGY_WITH_A_BRUTE_FORCE_ATTACK_METHOD_MORE_THEN_A_HREFHTTPRANDOMIZECOMHOWLONGTOHACKPASS_TARGET_BLANK_TITLEHOW_LONG_TO_HACK_PASSSEVEN_HUNDRED_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZEROA_YEARS_TO_CRACK_THEORETICALLY="Your data is encrypted with a AES 128 bit encryption using the above 32 character key.<br />Without this key it will take the current technology with a brute force attack method more then <a href="http://random-ize.com/how-long-to-hack-pass/" target="_blank" title="How long to hack pass">700 000 000 000 000 000 000 000 000 000 000</a> years to crack theoretically."
COM_COMPONENTBUILDER_YOUR_DATA_IS_ENCRYPTED_WITH_A_AES_ONE_HUNDRED_AND_TWENTY_EIGHT_BIT_ENCRYPTION_USING_THE_ABOVE_THIRTY_TWO_CHARACTER_KEY_WITHOUT_THIS_KEY_IT_WILL_TAKE_THE_CURRENT_TECHNOLOGY_WITH_A_BRUTE_FORCE_ATTACK_METHOD_MORE_THEN_A_HREFHTTPRANDOMIZECOMHOWLONGTOHACKPASS_TARGET_BLANK_TITLEHOW_LONG_TO_HACK_PASSSEVEN_HUNDRED_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZEROA_YEARS_TO_CRACK_THEORETICALLY_UNLESS_THEY_HAVE_THIS_KEY_ABOVE_SO_DO_KEEP_IT_SAFE="Your data is encrypted with a AES 128 bit encryption using the above 32 character key. Without this key it will take the current technology with a brute force attack method more then <a href="http://random-ize.com/how-long-to-hack-pass/" target="_blank" title="How long to hack pass">700 000 000 000 000 000 000 000 000 000 000</a> years to crack theoretically. Unless they have this key above, so do keep it safe."
@ -6351,6 +6540,8 @@ COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_IMPORT_A_COMPONENT_PLEASE_CON
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_SHARE_THE_SNIPPETS_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP="You do not have permission to share the snippets, please contact your system administrator for more help."
COM_COMPONENTBUILDER_YOU_HAVE_S_S_ADDING_MORE_THEN_FIFTY_S_IS_CONSIDERED_BAD_PRACTICE="You have %s %s. Adding more then 50 %s is considered bad practice."
COM_COMPONENTBUILDER_YOU_HAVE_S_S_ADDING_MORE_THEN_FIFTY_S_IS_CONSIDERED_BAD_PRACTICE_YOUR_S_PAGE_LOAD_IN_JCB_WILL_SLOWDOWN_YOU_SHOULD_CONSIDER_DECOUPLING_SOME_OF_THESE_S="You have %s %s. Adding more then 50 %s is considered bad practice. Your %s page load in JCB will slowdown. You should consider decoupling some of these %s."
COM_COMPONENTBUILDER_YOU_MUST_ADD_AN_UNIQUE_FUNCTION_NAME="You must add an unique function name."
COM_COMPONENTBUILDER_YOU_MUST_ADD_AN_UNIQUE_VALIDATION_RULE_NAME="You must add an unique validation rule name."
COM_COMPONENTBUILDER_YOU_MUST_FIRST_LINK_AN_ADMIN_OR_A_CUSTOM_ADMIN_VIEW_TO_THIS_COMPONENT_THEN_YOU_CAN_SELECT_IT_HERE="You must first link an admin or a custom admin view to this component, then you can select it here"
COM_COMPONENTBUILDER_YOU_MUST_SELECT_A_COMPONENT="You must select a component!"
COM_COMPONENTBUILDER_YOU_SHOULD_ADD_THE_CORRECT_OWNER_DETAILS="You should add the correct owner details."

View File

@ -412,6 +412,8 @@ COM_COMPONENTBUILDER_GET_SNIPPETS_ACCESS="Get Snippets Access"
COM_COMPONENTBUILDER_GET_SNIPPETS_ACCESS_DESC=" Allows the users in this group to access get snippets."
COM_COMPONENTBUILDER_GET_SNIPPETS_CUSTOM_ADMIN_VIEWS_BUTTON_ACCESS="Get Snippets Custom Admin Views Button Access"
COM_COMPONENTBUILDER_GET_SNIPPETS_CUSTOM_ADMIN_VIEWS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the custom admin views button."
COM_COMPONENTBUILDER_GET_SNIPPETS_DASHBOARD_LIST="Get Snippets Dashboard List"
COM_COMPONENTBUILDER_GET_SNIPPETS_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the Get Snippets"
COM_COMPONENTBUILDER_GET_SNIPPETS_LAYOUTS_BUTTON_ACCESS="Get Snippets Layouts Button Access"
COM_COMPONENTBUILDER_GET_SNIPPETS_LAYOUTS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the layouts button."
COM_COMPONENTBUILDER_GET_SNIPPETS_LIBRARIES_BUTTON_ACCESS="Get Snippets Libraries Button Access"
@ -420,6 +422,8 @@ COM_COMPONENTBUILDER_GET_SNIPPETS_SITE_VIEWS_BUTTON_ACCESS="Get Snippets Site Vi
COM_COMPONENTBUILDER_GET_SNIPPETS_SITE_VIEWS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the site views button."
COM_COMPONENTBUILDER_GET_SNIPPETS_SNIPPETS_BUTTON_ACCESS="Get Snippets Snippets Button Access"
COM_COMPONENTBUILDER_GET_SNIPPETS_SNIPPETS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the snippets button."
COM_COMPONENTBUILDER_GET_SNIPPETS_SUBMENU="Get Snippets Submenu"
COM_COMPONENTBUILDER_GET_SNIPPETS_SUBMENU_DESC="Allows the users in this group to update the submenu of the Get Snippets"
COM_COMPONENTBUILDER_GET_SNIPPETS_TEMPLATES_BUTTON_ACCESS="Get Snippets Templates Button Access"
COM_COMPONENTBUILDER_GET_SNIPPETS_TEMPLATES_BUTTON_ACCESS_DESC=" Allows the users in this group to access the templates button."
COM_COMPONENTBUILDER_HELP_DOCUMENTS_ACCESS="Help Documents Access"
@ -428,8 +432,6 @@ COM_COMPONENTBUILDER_HELP_DOCUMENTS_BATCH_USE="Help Documents Batch Use"
COM_COMPONENTBUILDER_HELP_DOCUMENTS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch help documents"
COM_COMPONENTBUILDER_HELP_DOCUMENTS_CREATE="Help Documents Create"
COM_COMPONENTBUILDER_HELP_DOCUMENTS_CREATE_DESC="Allows the users in this group to create create help documents"
COM_COMPONENTBUILDER_HELP_DOCUMENTS_DASHBOARD_ADD="Help Documents Dashboard Add"
COM_COMPONENTBUILDER_HELP_DOCUMENTS_DASHBOARD_ADD_DESC="Allows the users in this group to update the dashboard add of the help document"
COM_COMPONENTBUILDER_HELP_DOCUMENTS_DASHBOARD_LIST="Help Documents Dashboard List"
COM_COMPONENTBUILDER_HELP_DOCUMENTS_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the help document"
COM_COMPONENTBUILDER_HELP_DOCUMENTS_DELETE="Help Documents Delete"
@ -634,6 +636,7 @@ COM_COMPONENTBUILDER_MENU_LIBRARIES="Libraries"
COM_COMPONENTBUILDER_MENU_SITE_VIEWS="Site Views"
COM_COMPONENTBUILDER_MENU_SNIPPETS="Snippets"
COM_COMPONENTBUILDER_MENU_TEMPLATES="Templates"
COM_COMPONENTBUILDER_MENU_VALIDATION_RULES="Validation Rules"
COM_COMPONENTBUILDER_SERVERS_ACCESS="Servers Access"
COM_COMPONENTBUILDER_SERVERS_ACCESS_DESC="Allows the users in this group to access access servers"
COM_COMPONENTBUILDER_SERVERS_BATCH_USE="Servers Batch Use"
@ -696,8 +699,6 @@ COM_COMPONENTBUILDER_SNIPPETS_BATCH_USE="Snippets Batch Use"
COM_COMPONENTBUILDER_SNIPPETS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch snippets"
COM_COMPONENTBUILDER_SNIPPETS_CREATE="Snippets Create"
COM_COMPONENTBUILDER_SNIPPETS_CREATE_DESC="Allows the users in this group to create create snippets"
COM_COMPONENTBUILDER_SNIPPETS_DASHBOARD_ADD="Snippets Dashboard Add"
COM_COMPONENTBUILDER_SNIPPETS_DASHBOARD_ADD_DESC="Allows the users in this group to update the dashboard add of the snippet"
COM_COMPONENTBUILDER_SNIPPETS_DASHBOARD_LIST="Snippets Dashboard List"
COM_COMPONENTBUILDER_SNIPPETS_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the snippet"
COM_COMPONENTBUILDER_SNIPPETS_DELETE="Snippets Delete"
@ -766,3 +767,27 @@ COM_COMPONENTBUILDER_TEMPLATE_GET_SNIPPETS_BUTTON_ACCESS="Template Get Snippets
COM_COMPONENTBUILDER_TEMPLATE_GET_SNIPPETS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the get snippets button."
COM_COMPONENTBUILDER_USE_BATCH="Use Batch"
COM_COMPONENTBUILDER_USE_BATCH_DESC=" Allows users in this group to use batch copy/update method."
COM_COMPONENTBUILDER_VALIDATION_RULES_ACCESS="Validation Rules Access"
COM_COMPONENTBUILDER_VALIDATION_RULES_ACCESS_DESC="Allows the users in this group to access access validation rules"
COM_COMPONENTBUILDER_VALIDATION_RULES_BATCH_USE="Validation Rules Batch Use"
COM_COMPONENTBUILDER_VALIDATION_RULES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch validation rules"
COM_COMPONENTBUILDER_VALIDATION_RULES_CREATE="Validation Rules Create"
COM_COMPONENTBUILDER_VALIDATION_RULES_CREATE_DESC="Allows the users in this group to create create validation rules"
COM_COMPONENTBUILDER_VALIDATION_RULES_DASHBOARD_LIST="Validation Rules Dashboard List"
COM_COMPONENTBUILDER_VALIDATION_RULES_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the validation rule"
COM_COMPONENTBUILDER_VALIDATION_RULES_DELETE="Validation Rules Delete"
COM_COMPONENTBUILDER_VALIDATION_RULES_DELETE_DESC="Allows the users in this group to delete delete validation rules"
COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT="Validation Rules Edit"
COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_DESC="Allows the users in this group to edit the validation rule"
COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_OWN="Validation Rules Edit Own"
COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_OWN_DESC="Allows the users in this group to edit edit own validation rules created by them"
COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_STATE="Validation Rules Edit State"
COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_STATE_DESC="Allows the users in this group to update the state of the validation rule"
COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_VERSION="Validation Rules Edit Version"
COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version validation rules"
COM_COMPONENTBUILDER_VALIDATION_RULES_EXPORT="Validation Rules Export"
COM_COMPONENTBUILDER_VALIDATION_RULES_EXPORT_DESC="Allows the users in this group to export export validation rules"
COM_COMPONENTBUILDER_VALIDATION_RULES_IMPORT="Validation Rules Import"
COM_COMPONENTBUILDER_VALIDATION_RULES_IMPORT_DESC="Allows the users in this group to import import validation rules"
COM_COMPONENTBUILDER_VALIDATION_RULES_SUBMENU="Validation Rules Submenu"
COM_COMPONENTBUILDER_VALIDATION_RULES_SUBMENU_DESC="Allows the users in this group to update the submenu of the validation rule"

View File

@ -30,7 +30,11 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'note_create_edit_notice'
'note_create_edit_notice',
'alias_builder_type',
'note_alias_builder_custom',
'note_alias_builder_default',
'alias_builder'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();

View File

@ -0,0 +1,41 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage extends_formrule_above.php
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = array(
'inherit'
);
?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field){
echo $form->renderField($field);
} ?>
</div>

View File

@ -0,0 +1,48 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage extends_formrule_fullwidth.php
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'php'
);
?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<div class="control-group">
<div class="control-label">
<?php echo $form->getLabel($field); ?>
</div>
<div class="controls">
<?php echo $form->getInput($field); ?>
</div>
</div>
<?php endforeach; ?>
</div>

View File

@ -0,0 +1,54 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage extends_formrule_left.php
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'name'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}

View File

@ -0,0 +1,54 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage extends_formrule_right.php
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'short_description'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,58 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage publishing.php
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$app = JFactory::getApplication();
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'created',
'created_by',
'modified',
'modified_by'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}

View File

@ -0,0 +1,60 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage publlshing.php
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$app = JFactory::getApplication();
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'published',
'ordering',
'access',
'version',
'hits',
'id'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}

View File

@ -879,9 +879,9 @@ class ComponentbuilderModelAdmin_fields extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -869,9 +869,9 @@ class ComponentbuilderModelAdmin_fields_conditions extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -132,6 +132,14 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$item->addtables = $addtables->toArray();
}
if (!empty($item->alias_builder))
{
// Convert the alias_builder field to an array.
$alias_builder = new Registry;
$alias_builder->loadString($item->alias_builder);
$item->alias_builder = $alias_builder->toArray();
}
if (!empty($item->custom_button))
{
// Convert the custom_button field to an array.
@ -148,28 +156,28 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$item->ajax_input = $ajax_input->toArray();
}
if (!empty($item->php_import_save))
{
// base64 Decode php_import_save.
$item->php_import_save = base64_decode($item->php_import_save);
}
if (!empty($item->html_import_view))
{
// base64 Decode html_import_view.
$item->html_import_view = base64_decode($item->html_import_view);
}
if (!empty($item->php_import_save))
{
// base64 Decode php_import_save.
$item->php_import_save = base64_decode($item->php_import_save);
}
if (!empty($item->php_import_headers))
{
// base64 Decode php_import_headers.
$item->php_import_headers = base64_decode($item->php_import_headers);
}
if (!empty($item->css_view))
if (!empty($item->php_getitem))
{
// base64 Decode css_view.
$item->css_view = base64_decode($item->css_view);
// base64 Decode php_getitem.
$item->php_getitem = base64_decode($item->php_getitem);
}
if (!empty($item->php_getitems))
@ -184,10 +192,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$item->php_getitems_after_all = base64_decode($item->php_getitems_after_all);
}
if (!empty($item->css_views))
if (!empty($item->css_view))
{
// base64 Decode css_views.
$item->css_views = base64_decode($item->css_views);
// base64 Decode css_view.
$item->css_view = base64_decode($item->css_view);
}
if (!empty($item->php_getlistquery))
@ -202,10 +210,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$item->php_before_save = base64_decode($item->php_before_save);
}
if (!empty($item->javascript_view_file))
if (!empty($item->css_views))
{
// base64 Decode javascript_view_file.
$item->javascript_view_file = base64_decode($item->javascript_view_file);
// base64 Decode css_views.
$item->css_views = base64_decode($item->css_views);
}
if (!empty($item->php_save))
@ -220,10 +228,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$item->php_postsavehook = base64_decode($item->php_postsavehook);
}
if (!empty($item->javascript_view_footer))
if (!empty($item->javascript_view_file))
{
// base64 Decode javascript_view_footer.
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
// base64 Decode javascript_view_file.
$item->javascript_view_file = base64_decode($item->javascript_view_file);
}
if (!empty($item->php_allowedit))
@ -238,10 +246,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$item->php_batchcopy = base64_decode($item->php_batchcopy);
}
if (!empty($item->javascript_views_file))
if (!empty($item->javascript_view_footer))
{
// base64 Decode javascript_views_file.
$item->javascript_views_file = base64_decode($item->javascript_views_file);
// base64 Decode javascript_view_footer.
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
}
if (!empty($item->php_batchmove))
@ -256,10 +264,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$item->php_before_publish = base64_decode($item->php_before_publish);
}
if (!empty($item->javascript_views_footer))
if (!empty($item->javascript_views_file))
{
// base64 Decode javascript_views_footer.
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
// base64 Decode javascript_views_file.
$item->javascript_views_file = base64_decode($item->javascript_views_file);
}
if (!empty($item->php_after_publish))
@ -274,22 +282,34 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$item->php_before_delete = base64_decode($item->php_before_delete);
}
if (!empty($item->javascript_views_footer))
{
// base64 Decode javascript_views_footer.
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
}
if (!empty($item->php_after_delete))
{
// base64 Decode php_after_delete.
$item->php_after_delete = base64_decode($item->php_after_delete);
}
if (!empty($item->php_document))
{
// base64 Decode php_document.
$item->php_document = base64_decode($item->php_document);
}
if (!empty($item->php_controller))
{
// base64 Decode php_controller.
$item->php_controller = base64_decode($item->php_controller);
}
if (!empty($item->php_document))
if (!empty($item->sql))
{
// base64 Decode php_document.
$item->php_document = base64_decode($item->php_document);
// base64 Decode sql.
$item->sql = base64_decode($item->sql);
}
if (!empty($item->php_model))
@ -304,28 +324,16 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$item->php_controller_list = base64_decode($item->php_controller_list);
}
if (!empty($item->sql))
{
// base64 Decode sql.
$item->sql = base64_decode($item->sql);
}
if (!empty($item->php_model_list))
{
// base64 Decode php_model_list.
$item->php_model_list = base64_decode($item->php_model_list);
}
if (!empty($item->php_import_display))
{
// base64 Decode php_import_display.
$item->php_import_display = base64_decode($item->php_import_display);
}
if (!empty($item->php_ajaxmethod))
if (!empty($item->php_model_list))
{
// base64 Decode php_ajaxmethod.
$item->php_ajaxmethod = base64_decode($item->php_ajaxmethod);
// base64 Decode php_model_list.
$item->php_model_list = base64_decode($item->php_model_list);
}
if (!empty($item->php_import))
@ -340,18 +348,18 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$item->php_import_setdata = base64_decode($item->php_import_setdata);
}
if (!empty($item->php_ajaxmethod))
{
// base64 Decode php_ajaxmethod.
$item->php_ajaxmethod = base64_decode($item->php_ajaxmethod);
}
if (!empty($item->php_import_ext))
{
// base64 Decode php_import_ext.
$item->php_import_ext = base64_decode($item->php_import_ext);
}
if (!empty($item->php_getitem))
{
// base64 Decode php_getitem.
$item->php_getitem = base64_decode($item->php_getitem);
}
if (empty($item->id))
{
@ -1236,6 +1244,19 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$data['addtables'] = '';
}
// Set the alias_builder items to data.
if (isset($data['alias_builder']) && is_array($data['alias_builder']))
{
$alias_builder = new JRegistry;
$alias_builder->loadArray($data['alias_builder']);
$data['alias_builder'] = (string) $alias_builder;
}
elseif (!isset($data['alias_builder']))
{
// Set the empty alias_builder to data
$data['alias_builder'] = '';
}
// Set the custom_button items to data.
if (isset($data['custom_button']) && is_array($data['custom_button']))
{
@ -1262,28 +1283,28 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$data['ajax_input'] = '';
}
// Set the php_import_save string to base64 string.
if (isset($data['php_import_save']))
{
$data['php_import_save'] = base64_encode($data['php_import_save']);
}
// Set the html_import_view string to base64 string.
if (isset($data['html_import_view']))
{
$data['html_import_view'] = base64_encode($data['html_import_view']);
}
// Set the php_import_save string to base64 string.
if (isset($data['php_import_save']))
{
$data['php_import_save'] = base64_encode($data['php_import_save']);
}
// Set the php_import_headers string to base64 string.
if (isset($data['php_import_headers']))
{
$data['php_import_headers'] = base64_encode($data['php_import_headers']);
}
// Set the css_view string to base64 string.
if (isset($data['css_view']))
// Set the php_getitem string to base64 string.
if (isset($data['php_getitem']))
{
$data['css_view'] = base64_encode($data['css_view']);
$data['php_getitem'] = base64_encode($data['php_getitem']);
}
// Set the php_getitems string to base64 string.
@ -1298,10 +1319,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$data['php_getitems_after_all'] = base64_encode($data['php_getitems_after_all']);
}
// Set the css_views string to base64 string.
if (isset($data['css_views']))
// Set the css_view string to base64 string.
if (isset($data['css_view']))
{
$data['css_views'] = base64_encode($data['css_views']);
$data['css_view'] = base64_encode($data['css_view']);
}
// Set the php_getlistquery string to base64 string.
@ -1316,10 +1337,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$data['php_before_save'] = base64_encode($data['php_before_save']);
}
// Set the javascript_view_file string to base64 string.
if (isset($data['javascript_view_file']))
// Set the css_views string to base64 string.
if (isset($data['css_views']))
{
$data['javascript_view_file'] = base64_encode($data['javascript_view_file']);
$data['css_views'] = base64_encode($data['css_views']);
}
// Set the php_save string to base64 string.
@ -1334,10 +1355,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$data['php_postsavehook'] = base64_encode($data['php_postsavehook']);
}
// Set the javascript_view_footer string to base64 string.
if (isset($data['javascript_view_footer']))
// Set the javascript_view_file string to base64 string.
if (isset($data['javascript_view_file']))
{
$data['javascript_view_footer'] = base64_encode($data['javascript_view_footer']);
$data['javascript_view_file'] = base64_encode($data['javascript_view_file']);
}
// Set the php_allowedit string to base64 string.
@ -1352,10 +1373,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$data['php_batchcopy'] = base64_encode($data['php_batchcopy']);
}
// Set the javascript_views_file string to base64 string.
if (isset($data['javascript_views_file']))
// Set the javascript_view_footer string to base64 string.
if (isset($data['javascript_view_footer']))
{
$data['javascript_views_file'] = base64_encode($data['javascript_views_file']);
$data['javascript_view_footer'] = base64_encode($data['javascript_view_footer']);
}
// Set the php_batchmove string to base64 string.
@ -1370,10 +1391,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$data['php_before_publish'] = base64_encode($data['php_before_publish']);
}
// Set the javascript_views_footer string to base64 string.
if (isset($data['javascript_views_footer']))
// Set the javascript_views_file string to base64 string.
if (isset($data['javascript_views_file']))
{
$data['javascript_views_footer'] = base64_encode($data['javascript_views_footer']);
$data['javascript_views_file'] = base64_encode($data['javascript_views_file']);
}
// Set the php_after_publish string to base64 string.
@ -1388,22 +1409,34 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$data['php_before_delete'] = base64_encode($data['php_before_delete']);
}
// Set the javascript_views_footer string to base64 string.
if (isset($data['javascript_views_footer']))
{
$data['javascript_views_footer'] = base64_encode($data['javascript_views_footer']);
}
// Set the php_after_delete string to base64 string.
if (isset($data['php_after_delete']))
{
$data['php_after_delete'] = base64_encode($data['php_after_delete']);
}
// Set the php_document string to base64 string.
if (isset($data['php_document']))
{
$data['php_document'] = base64_encode($data['php_document']);
}
// Set the php_controller string to base64 string.
if (isset($data['php_controller']))
{
$data['php_controller'] = base64_encode($data['php_controller']);
}
// Set the php_document string to base64 string.
if (isset($data['php_document']))
// Set the sql string to base64 string.
if (isset($data['sql']))
{
$data['php_document'] = base64_encode($data['php_document']);
$data['sql'] = base64_encode($data['sql']);
}
// Set the php_model string to base64 string.
@ -1418,28 +1451,16 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$data['php_controller_list'] = base64_encode($data['php_controller_list']);
}
// Set the sql string to base64 string.
if (isset($data['sql']))
{
$data['sql'] = base64_encode($data['sql']);
}
// Set the php_model_list string to base64 string.
if (isset($data['php_model_list']))
{
$data['php_model_list'] = base64_encode($data['php_model_list']);
}
// Set the php_import_display string to base64 string.
if (isset($data['php_import_display']))
{
$data['php_import_display'] = base64_encode($data['php_import_display']);
}
// Set the php_ajaxmethod string to base64 string.
if (isset($data['php_ajaxmethod']))
// Set the php_model_list string to base64 string.
if (isset($data['php_model_list']))
{
$data['php_ajaxmethod'] = base64_encode($data['php_ajaxmethod']);
$data['php_model_list'] = base64_encode($data['php_model_list']);
}
// Set the php_import string to base64 string.
@ -1454,16 +1475,16 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$data['php_import_setdata'] = base64_encode($data['php_import_setdata']);
}
// Set the php_ajaxmethod string to base64 string.
if (isset($data['php_ajaxmethod']))
{
$data['php_ajaxmethod'] = base64_encode($data['php_ajaxmethod']);
}
// Set the php_import_ext string to base64 string.
if (isset($data['php_import_ext']))
{
$data['php_import_ext'] = base64_encode($data['php_import_ext']);
}
// Set the php_getitem string to base64 string.
if (isset($data['php_getitem']))
{
$data['php_getitem'] = base64_encode($data['php_getitem']);
}
// Set the Params Items to data

View File

@ -262,74 +262,74 @@ class ComponentbuilderModelAdmin_views extends JModelList
continue;
}
// decode php_import_save
$item->php_import_save = base64_decode($item->php_import_save);
// decode html_import_view
$item->html_import_view = base64_decode($item->html_import_view);
// decode php_import_save
$item->php_import_save = base64_decode($item->php_import_save);
// decode php_import_headers
$item->php_import_headers = base64_decode($item->php_import_headers);
// decode css_view
$item->css_view = base64_decode($item->css_view);
// decode php_getitem
$item->php_getitem = base64_decode($item->php_getitem);
// decode php_getitems
$item->php_getitems = base64_decode($item->php_getitems);
// decode php_getitems_after_all
$item->php_getitems_after_all = base64_decode($item->php_getitems_after_all);
// decode css_views
$item->css_views = base64_decode($item->css_views);
// decode css_view
$item->css_view = base64_decode($item->css_view);
// decode php_getlistquery
$item->php_getlistquery = base64_decode($item->php_getlistquery);
// decode php_before_save
$item->php_before_save = base64_decode($item->php_before_save);
// decode javascript_view_file
$item->javascript_view_file = base64_decode($item->javascript_view_file);
// decode css_views
$item->css_views = base64_decode($item->css_views);
// decode php_save
$item->php_save = base64_decode($item->php_save);
// decode php_postsavehook
$item->php_postsavehook = base64_decode($item->php_postsavehook);
// decode javascript_view_footer
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
// decode javascript_view_file
$item->javascript_view_file = base64_decode($item->javascript_view_file);
// decode php_allowedit
$item->php_allowedit = base64_decode($item->php_allowedit);
// decode php_batchcopy
$item->php_batchcopy = base64_decode($item->php_batchcopy);
// decode javascript_views_file
$item->javascript_views_file = base64_decode($item->javascript_views_file);
// decode javascript_view_footer
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
// decode php_batchmove
$item->php_batchmove = base64_decode($item->php_batchmove);
// decode php_before_publish
$item->php_before_publish = base64_decode($item->php_before_publish);
// decode javascript_views_footer
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
// decode javascript_views_file
$item->javascript_views_file = base64_decode($item->javascript_views_file);
// decode php_after_publish
$item->php_after_publish = base64_decode($item->php_after_publish);
// decode php_before_delete
$item->php_before_delete = base64_decode($item->php_before_delete);
// decode javascript_views_footer
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
// decode php_after_delete
$item->php_after_delete = base64_decode($item->php_after_delete);
// decode php_controller
$item->php_controller = base64_decode($item->php_controller);
// decode php_document
$item->php_document = base64_decode($item->php_document);
// decode php_controller
$item->php_controller = base64_decode($item->php_controller);
// decode sql
$item->sql = base64_decode($item->sql);
// decode php_model
$item->php_model = base64_decode($item->php_model);
// decode php_controller_list
$item->php_controller_list = base64_decode($item->php_controller_list);
// decode sql
$item->sql = base64_decode($item->sql);
// decode php_model_list
$item->php_model_list = base64_decode($item->php_model_list);
// decode php_import_display
$item->php_import_display = base64_decode($item->php_import_display);
// decode php_ajaxmethod
$item->php_ajaxmethod = base64_decode($item->php_ajaxmethod);
// decode php_model_list
$item->php_model_list = base64_decode($item->php_model_list);
// decode php_import
$item->php_import = base64_decode($item->php_import);
// decode php_import_setdata
$item->php_import_setdata = base64_decode($item->php_import_setdata);
// decode php_ajaxmethod
$item->php_ajaxmethod = base64_decode($item->php_ajaxmethod);
// decode php_import_ext
$item->php_import_ext = base64_decode($item->php_import_ext);
// decode php_getitem
$item->php_getitem = base64_decode($item->php_getitem);
// unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);

View File

@ -215,6 +215,7 @@ class ComponentbuilderModelAjax extends JModelList
'library_files_folders_urls' => 'libraries_files_folders_urls',
'admin_fields' => 'admins_fields',
'admin_fields_conditions' => 'admins_fields_conditions',
'validation_rule' => 'validation_rules',
'field' => 'fields',
'component_admin_views' => 'components_admin_views' ,
'component_site_views' => 'components_site_views',
@ -227,7 +228,7 @@ class ComponentbuilderModelAjax extends JModelList
'component_files_folders' => 'components_files_folders',
'language' => true);
public function getButton($type)
public function getButton($type, $size)
{
if (isset($this->buttonArray[$type]))
{
@ -244,18 +245,27 @@ class ComponentbuilderModelAjax extends JModelList
// only load referal if not new item.
$ref = '&amp;ref=' . $values['a_view'] . '&amp;refid=' . $values['a_id'];
}
// build the button
$button = '<div class="control-group">
<div class="control-label">
<label>' . ucwords($type) . '</label>
</div>
<div class="controls">
<a class="btn btn-success vdm-button-new" onclick="UIkit.modal.confirm(\''.JText::_('COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_ON_THIS_PAGE_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE').'\', function(){ window.location.href = \'index.php?option=com_componentbuilder&amp;view='.$type.'&amp;layout=edit'.$ref.'\' })" href="javascript:void(0)" >
<span class="icon-new icon-white"></span>
' . JText::_('COM_COMPONENTBUILDER_NEW') . '
</a>
</div>
</div>';
// build url (A tag)
$startAtag = '<a class="btn btn-success vdm-button-new" onclick="UIkit2.modal.confirm(\''.JText::_('COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_ON_THIS_PAGE_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE').'\', function(){ window.location.href = \'index.php?option=com_componentbuilder&amp;view='.$type.'&amp;layout=edit'.$ref.'\' })" href="javascript:void(0)" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', ComponentbuilderHelper::safeString($type, 'W')).'">';
// build the smaller button
if (2 == $size)
{
$button = $startAtag.'<span class="icon-new icon-white"></span> ' . JText::_('COM_COMPONENTBUILDER_CREATE') . '</a>';
}
else
// build the big button
{
$button = '<div class="control-group">
<div class="control-label">
<label>' . ucwords($type) . '</label>
</div>
<div class="controls"> '.$startAtag.'
<span class="icon-new icon-white"></span>
' . JText::_('COM_COMPONENTBUILDER_NEW') . '
</a>
</div>
</div>';
}
// return the button attached to input field
return $button;
}
@ -307,7 +317,7 @@ class ComponentbuilderModelAjax extends JModelList
$button[] = '</div>';
$button[] = '<div class="controls">';
}
$button[] = '<a class="btn btn-success vdm-button-new" onclick="UIkit.modal.confirm(\''.JText::_('COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_ON_THIS_PAGE_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE').'\', function(){ window.location.href = \''.$editThis.$ref.'\' })" href="javascript:void(0)" >';
$button[] = '<a class="btn btn-success vdm-button-new" onclick="UIkit2.modal.confirm(\''.JText::_('COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_ON_THIS_PAGE_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE').'\', function(){ window.location.href = \''.$editThis.$ref.'\' })" href="javascript:void(0)" title="'.$buttonText.'">';
if (1 == $size)
{
$button[] = '<span class="'.$icon.' icon-white"></span>';
@ -335,7 +345,36 @@ class ComponentbuilderModelAjax extends JModelList
return '';
}
public static function getDynamicScripts($type)
public function checkAliasField($type)
{
// get the view name & id
$values = $this->getViewID();
if (!is_null($values['a_id']) && $values['a_id'] > 0 && strlen($values['a_view']) && in_array($values['a_view'], $this->allowedViewsArray))
{
// get the fields
if ($fields = ComponentbuilderHelper::getVar('admin_fields', $values['a_id'], 'admin_view', 'addfields'))
{
// open the fields
if (ComponentbuilderHelper::checkJson($fields))
{
$fields = json_decode($fields, true);
if (ComponentbuilderHelper::checkArray($fields))
{
foreach($fields as $field)
{
if (isset($field['alias']) && $field['alias'] == 1)
{
return true;
}
}
}
}
}
}
return false;
}
public function getDynamicScripts($type)
{
// get from global helper
return ComponentbuilderHelper::getDynamicScripts($type);
@ -831,7 +870,8 @@ class ComponentbuilderModelAjax extends JModelList
if ($this->canEdit($id, $view))
{
$edit = "index.php?option=com_componentbuilder&view=".$views."&task=".$view.".edit&id=".$id.$this->ref;
return ' <a onclick="UIkit.modal.confirm(\''.JText::_('COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_ON_THIS_PAGE_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE').'\', function(){ window.location.href = \''.$edit.'\' })" href="javascript:void(0)" class="uk-icon-pencil"></a>';
$title = ComponentbuilderHelper::safeString(JText::_('COM_COMPONENTBUILDER_EDIT').' '.$view, 'W');
return ' <a onclick="UIkit.modal.confirm(\''.JText::_('COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_ON_THIS_PAGE_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE').'\', function(){ window.location.href = \''.$edit.'\' })" href="javascript:void(0)" class="uk-icon-pencil" title="'.$title.'"></a>';
}
return '';
@ -1120,8 +1160,12 @@ class ComponentbuilderModelAjax extends JModelList
// get the linked to
if ($linked = $this->getLinkedTo($values['a_view'], $values['a_id']))
{
// just return it for now as an unordered list
return '<div class="control-group"><ul class="uk-list uk-list-striped"><li>' .implode('</li><li>', $linked) . '</li></ul></div></div>';
// just return it for now a table
$table = '<div class="control-group"><table class="uk-table uk-table-hover uk-table-striped uk-table-condensed">';
$table .= '<caption>'.JText::sprintf('COM_COMPONENTBUILDER_PLACES_ACROSS_JCB_WHERE_THIS_S_IS_LINKED', ComponentbuilderHelper::safeString($values['a_view'], 'w')).'</caption>';
$table .= '<thead><tr><th>'.JText::_('COM_COMPONENTBUILDER_TYPE_NAME').'</th></tr></thead>';
$table .= '<tbody><tr><td>' .implode('</td></tr><tr><td>', $linked) . '</td></tr></tbody></table></div>';
return $table;
}
}
}
@ -1299,66 +1343,69 @@ class ComponentbuilderModelAjax extends JModelList
// Used in template
public function getTemplateDetails($id)
{
// set table
$table = false;
// Get a db connection.
$db = JFactory::getDbo();
$db = JFactory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.alias','a.template','b.name')));
$query->from($db->quoteName('#__componentbuilder_template', 'a'));
$query->join('LEFT', $db->quoteName('#__componentbuilder_dynamic_get', 'b') . ' ON (' . $db->quoteName('b.id') . ' = ' . $db->quoteName('a.dynamic_get') . ')');
$query->where($db->quoteName('a.id') . ' != '.(int) $id);
$query->where($db->quoteName('a.published') . ' = 1');
$query->where($db->quoteName('a.published') . ' = 1');
// Reset the query using our newly populated query object.
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$results = $db->loadObjectList();
$templateString = array('<h3>Template Code Snippets</h3><div class="row-fluid form-horizontal-desktop">');
$templateString = array();
foreach ($results as $result)
{
$templateString[] = "<div>dynamicGet: <b>".$result->name."</b><br /><code>&lt;?php echo \$this->loadTemplate('".ComponentbuilderHelper::safeString($result->alias)."'); ?&gt;</code></div>";
$templateString[] = "<td><b>".$result->name."</b></td><td><code>&lt;?php echo \$this->loadTemplate('".ComponentbuilderHelper::safeString($result->alias)."'); ?&gt;</code></td>";
}
$templateString[] = "</div><hr />";
return implode("\n",$templateString);
// build the table
$table = '<h2>'.JText::_('COM_COMPONENTBUILDER_TEMPLATE_CODE_SNIPPETS').'</h2><table class="uk-table uk-table-hover uk-table-striped uk-table-condensed">';
$table .= '<caption>'.JText::_('COM_COMPONENTBUILDER_TO_ADD_SIMPLY_COPY_AND_PAST_THE_SNIPPET_INTO_YOUR_CODE').'</caption>';
$table .= '<thead><tr><th>'.JText::_('COM_COMPONENTBUILDER_NAME_OF_DYNAMICGET').'</th><th>'.JText::_('COM_COMPONENTBUILDER_SNIPPET').'</th></thead>';
$table .= '<tbody><tr>'.implode("</tr><tr>",$templateString)."</tr></tbody></table>";
}
return false;
return $table;
}
// Used in layout
public function getLayoutDetails($id)
{
// set table
$table = false;
// Get a db connection.
$db = JFactory::getDbo();
$db = JFactory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.alias','a.layout','b.getcustom','b.gettype','b.name')));
$query->from($db->quoteName('#__componentbuilder_layout', 'a'));
$query->join('LEFT', $db->quoteName('#__componentbuilder_dynamic_get', 'b') . ' ON (' . $db->quoteName('b.id') . ' = ' . $db->quoteName('a.dynamic_get') . ')');
$query->where($db->quoteName('a.id') . ' != '.(int) $id);
$query->where($db->quoteName('a.published') . ' = 1');
$query->where($db->quoteName('a.published') . ' = 1');
// Reset the query using our newly populated query object.
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$results = $db->loadObjectList();
$layoutString = array('<h3>Layout Code Snippets</h3><div class="row-fluid form-horizontal-desktop">');
$layoutString = array();
foreach ($results as $result)
{
switch ($result->gettype)
{
case 1:
// single
$layoutString[] = "<div>dynamicGet: <b>".$result->name."</b><br /><code>&lt;?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->item); ?&gt;</code></div>";
$layoutString[] = "<td><b>".$result->name."</b></td><td><code>&lt;?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->item); ?&gt;</code></td>";
break;
case 2:
// list
$layoutString[] = "<div>dynamicGet: <b>".$result->name."</b><br /><code>&lt;?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->items); ?&gt;</code></div>";
$layoutString[] = "<td><b>".$result->name."</b></td><td><code>&lt;?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->items); ?&gt;</code></td>";
break;
case 3:
case 4:
@ -1372,14 +1419,17 @@ class ComponentbuilderModelAjax extends JModelList
{
$varName = $result->getcustom;
}
$layoutString[] = "<div>dynamicGet: <b>".$result->name."</b><br /><code>&lt;?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->".$varName."); ?&gt;</code></div>";
$layoutString[] = "<td><b>".$result->name."</b></td><td><code>&lt;?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->".$varName."); ?&gt;</code></td>";
break;
}
}
$layoutString[] = "</div><hr />";
return implode("\n",$layoutString);
// build the table
$table = '<h2>'.JText::_('COM_COMPONENTBUILDER_LAYOUT_CODE_SNIPPETS').'</h2><table class="uk-table uk-table-hover uk-table-striped uk-table-condensed">';
$table .= '<caption>'.JText::_('COM_COMPONENTBUILDER_TO_ADD_SIMPLY_COPY_AND_PAST_THE_SNIPPET_INTO_YOUR_CODE').'</caption>';
$table .= '<thead><tr><th>'.JText::_('COM_COMPONENTBUILDER_NAME_OF_DYNAMICGET').'</th><th>'.JText::_('COM_COMPONENTBUILDER_SNIPPET').'</th></thead>';
$table .= '<tbody><tr>'.implode("</tr><tr>",$layoutString)."</tr></tbody></table>";
}
return false;
return $table;
}
// Used in dynamic_get
@ -2029,6 +2079,126 @@ class ComponentbuilderModelAjax extends JModelList
return false;
}
// Used in validation_rule
public function getExistingValidationRuleCode($name)
{
// make sure we have all the exiting rule names
if ($names = ComponentbuilderHelper::getExistingValidationRuleNames())
{
// check that this is a valid rule file
if (ComponentbuilderHelper::checkArray($names) && in_array($name, $names))
{
// get the full path to rule file
$path = JPATH_LIBRARIES . '/src/Form/Rule/'.$name.'Rule.php';
// get all the code
if ($code = ComponentbuilderHelper::getFileContents($path))
{
// remove the class details and the ending }
$codeArray = (array) explode("FormRule\n{\n", $code);
if (isset($codeArray[1]))
{
return array('values' => rtrim(rtrim(rtrim($codeArray[1]),'}')));
}
}
}
}
return false;
}
public function checkRuleName($name, $id)
{
$name = ComponentbuilderHelper::safeString($name);
if ($found = ComponentbuilderHelper::getVar('validation_rule', $name, 'name', 'id'))
{
if ((int) $id !== (int) $found)
{
return array (
'message' => JText::sprintf('COM_COMPONENTBUILDER_SORRY_THIS_VALIDATION_RULE_NAME_S_ALREADY_EXIST_IN_YOUR_SYSTEM', $name),
'status' => 'danger',
'timeout' => 6000);
}
}
// now check the existing once
if ($names = ComponentbuilderHelper::getExistingValidationRuleNames(true))
{
if (in_array($name, $names))
{
return array (
'message' => JText::sprintf('COM_COMPONENTBUILDER_SORRY_THIS_VALIDATION_RULE_NAME_S_ALREADY_EXIST_AS_PART_OF_THE_JOOMLA_CORE_NO_NEED_TO_CREATE_IT_IF_YOU_ARE_ADAPTING_IT_GIVE_IT_YOUR_OWN_UNIQUE_NAME', $name),
'status' => 'danger',
'timeout' => 10000);
}
}
return array (
'name' => $name,
'message' => JText::sprintf('COM_COMPONENTBUILDER_GREAT_THIS_VALIDATION_RULE_NAME_S_WILL_WORK', $name),
'status' => 'success',
'timeout' => 5000);
}
public function getValidationRulesTable($id)
{
// get all the validation rules
if ($rules = $this->getValidationRules())
{
// build table
$table = '<div class="control-group"><table class="uk-table uk-table-hover uk-table-striped uk-table-condensed">';
$table .= '<caption>'.JText::sprintf('COM_COMPONENTBUILDER_THE_AVAILABLE_VALIDATION_RULES_FOR_THE_VALIDATE_ATTRIBUTE_ARE').'</caption>';
$table .= '<thead><tr><th class="uk-text-right">'.JText::_('COM_COMPONENTBUILDER_VALIDATE').'</th><th>'.JText::_('COM_COMPONENTBUILDER_DESCRIPTION').'</th></tr></thead>';
$table .= '<tbody>';
foreach ($rules as $name => $decs)
{
// just load the values
$decs = (ComponentbuilderHelper::checkString($decs) && !is_numeric($decs)) ? $decs : '';
$table .= '<tr><td class="uk-text-right"><code>'.$name.'</code></td><td>'. $decs. '</td></tr>';
}
return $table.'</tbody></table></div>';
}
return false;
}
public function getValidationRules()
{
// custom rule names
$names = array();
// make sure we have all the exiting rule names
if (!$exitingNames = ComponentbuilderHelper::getExistingValidationRuleNames(true))
{
// stop (something is wrong)
return false;
}
// convert names to keys
$exitingNames = array_flip($exitingNames);
// load the descriptions (taken from https://docs.joomla.org/Server-side_form_validation)
$exitingNames["boolean"] = JText::_("COM_COMPONENTBUILDER_ACCEPTS_ONLY_THE_VALUES_ZERO_ONE_TRUE_OR_FALSE_CASEINSENSITIVE");
$exitingNames["color"] = JText::_("COM_COMPONENTBUILDER_ACCEPTS_ONLY_EMPTY_VALUES_CONVERTED_TO_ZERO_AND_STRINGS_IN_THE_FORM_RGB_OR_RRGGBB_WHERE_R_G_AND_B_ARE_HEX_VALUES");
$exitingNames["email"] = JText::_("COM_COMPONENTBUILDER_ACCEPTS_AN_EMAIL_ADDRESS_SATISFIES_A_BASIC_SYNTAX_CHECK_IN_THE_PATTERN_OF_QUOTXYZZQUOT_WITH_NO_INVALID_CHARACTERS");
$exitingNames["equals"] = JText::sprintf("COM_COMPONENTBUILDER_REQUIRES_THE_VALUE_TO_BE_THE_SAME_AS_THAT_HELD_IN_THE_FIELD_NAMED_QUOTFIELDQUOT_EGS", '<br /><code>&lt;input<br />&nbsp;&nbsp;type="text"<br />&nbsp;&nbsp;name="email_check"<br />&nbsp;&nbsp;validate="equals"<br />&nbsp;&nbsp;field="email"<br />/&gt;</code>');
$exitingNames["options"] = JText::_("COM_COMPONENTBUILDER_REQUIRES_THE_VALUE_ENTERED_BE_ONE_OF_THE_OPTIONS_IN_AN_ELEMENT_OF_TYPEQUOTLISTQUOT_THAT_IS_THAT_THE_ELEMENT_IS_A_SELECT_LIST");
$exitingNames["tel"] = JText::_("COM_COMPONENTBUILDER_REQUIRES_THE_VALUE_TO_BE_A_TELEPHONE_NUMBER_COMPLYING_WITH_THE_STANDARDS_OF_NANPA_ITUT_TRECEONE_HUNDRED_AND_SIXTY_FOUR_OR_IETF_RFCFOUR_THOUSAND_NINE_HUNDRED_AND_THIRTY_THREE");
$exitingNames["url"] = JText::sprintf("COM_COMPONENTBUILDER_VALIDATES_THAT_THE_VALUE_IS_A_URL_WITH_A_VALID_SCHEME_WHICH_CAN_BE_RESTRICTED_BY_THE_OPTIONAL_COMMASEPARATED_FIELD_SCHEME_AND_PASSES_A_BASIC_SYNTAX_CHECK_EGS", '<br /><code>&lt;input<br />&nbsp;&nbsp;type="text"<br />&nbsp;&nbsp;name="link"<br />&nbsp;&nbsp;validate="url"<br />&nbsp;&nbsp;scheme="http,https,mailto"<br />/&gt;</code>');
$exitingNames["username"] = JText::_("COM_COMPONENTBUILDER_VALIDATES_THAT_THE_VALUE_DOES_NOT_APPEAR_AS_A_USERNAME_ON_THE_SYSTEM_THAT_IS_THAT_IT_IS_A_VALID_NEW_USERNAME_DOES_NOT_SYNTAX_CHECK_IT_AS_A_VALID_NAME");
// now get the custom created rules
$db = JFactory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.name','a.short_description')));
$query->from($db->quoteName('#__componentbuilder_validation_rule','a'));
$query->where($db->quoteName('a.published') . ' >= 1');
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$names = $db->loadAssocList('name', 'short_description');
}
// merge the arrays
$rules = ComponentbuilderHelper::mergeArrays(array($exitingNames, $names));
// sort the array
ksort($rules);
// return the validation rules
return $rules;
}
// Used in field
public function getFieldOptions($id)
{

View File

@ -880,9 +880,9 @@ class ComponentbuilderModelComponent_admin_views extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -880,9 +880,9 @@ class ComponentbuilderModelComponent_config extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -880,9 +880,9 @@ class ComponentbuilderModelComponent_custom_admin_menus extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -880,9 +880,9 @@ class ComponentbuilderModelComponent_custom_admin_views extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -892,9 +892,9 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -944,9 +944,9 @@ class ComponentbuilderModelComponent_files_folders extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -880,9 +880,9 @@ class ComponentbuilderModelComponent_mysql_tweaks extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -880,9 +880,9 @@ class ComponentbuilderModelComponent_site_views extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -880,9 +880,9 @@ class ComponentbuilderModelComponent_updates extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -43,12 +43,14 @@ class ComponentbuilderModelComponentbuilder extends JModelList
$icons = array();
// view groups array
$viewGroups = array(
'main' => array('png.compiler', 'png.joomla_component.add', 'png.joomla_components', 'png.admin_view.add', 'png.admin_views', 'png.custom_admin_view.add', 'png.custom_admin_views', 'png.site_view.add', 'png.site_views', 'png.template.add', 'png.templates', 'png.layout.add', 'png.layouts', 'png.dynamic_get.add', 'png.dynamic_gets', 'png.custom_codes', 'png.libraries', 'png.snippet.add', 'png.snippets', 'png||getsnippets||index.php?option=com_componentbuilder&view=get_snippets', 'png.field.add', 'png.fields', 'png.fields.catid', 'png.fieldtype.add', 'png.fieldtypes', 'png.fieldtypes.catid', 'png.language_translations', 'png.servers', 'png.help_document.add', 'png.help_documents')
'main' => array('png.compiler', 'png.joomla_component.add', 'png.joomla_components', 'png.admin_view.add', 'png.admin_views', 'png||importjcbpackages||index.php?option=com_componentbuilder&view=import_joomla_components&target=smartPackage', 'png.custom_admin_view.add', 'png.custom_admin_views', 'png.site_view.add', 'png.site_views', 'png.template.add', 'png.templates', 'png.layout.add', 'png.layouts', 'png.dynamic_get.add', 'png.dynamic_gets', 'png.custom_codes', 'png.libraries', 'png.snippets', 'png.get_snippets', 'png.validation_rules', 'png.field.add', 'png.fields', 'png.fields.catid', 'png.fieldtype.add', 'png.fieldtypes', 'png.fieldtypes.catid', 'png.language_translations', 'png.servers', 'png.help_documents')
);
// view access array
$viewAccess = array(
'compiler.submenu' => 'compiler.submenu',
'compiler.dashboard_list' => 'compiler.dashboard_list',
'get_snippets.submenu' => 'get_snippets.submenu',
'get_snippets.dashboard_list' => 'get_snippets.dashboard_list',
'joomla_component.create' => 'joomla_component.create',
'joomla_components.access' => 'joomla_component.access',
'joomla_component.access' => 'joomla_component.access',
@ -101,7 +103,11 @@ class ComponentbuilderModelComponentbuilder extends JModelList
'snippet.access' => 'snippet.access',
'snippets.submenu' => 'snippet.submenu',
'snippets.dashboard_list' => 'snippet.dashboard_list',
'snippet.dashboard_add' => 'snippet.dashboard_add',
'validation_rule.create' => 'validation_rule.create',
'validation_rules.access' => 'validation_rule.access',
'validation_rule.access' => 'validation_rule.access',
'validation_rules.submenu' => 'validation_rule.submenu',
'validation_rules.dashboard_list' => 'validation_rule.dashboard_list',
'field.create' => 'field.create',
'fields.access' => 'field.access',
'field.access' => 'field.access',
@ -133,7 +139,6 @@ class ComponentbuilderModelComponentbuilder extends JModelList
'help_document.access' => 'help_document.access',
'help_documents.submenu' => 'help_document.submenu',
'help_documents.dashboard_list' => 'help_document.dashboard_list',
'help_document.dashboard_add' => 'help_document.dashboard_add',
'admin_fields.create' => 'admin_fields.create',
'admins_fields.access' => 'admin_fields.access',
'admin_fields.access' => 'admin_fields.access',

View File

@ -1140,9 +1140,9 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -876,9 +876,9 @@ class ComponentbuilderModelCustom_code extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -1146,9 +1146,9 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -973,9 +973,9 @@ class ComponentbuilderModelField extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -0,0 +1,205 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage aliasbuilder.php
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import the list field type
jimport('joomla.form.helper');
JFormHelper::loadFieldClass('list');
/**
* Aliasbuilder Form Field class for the Componentbuilder component
*/
class JFormFieldAliasbuilder extends JFormFieldList
{
/**
* The aliasbuilder field type.
*
* @var string
*/
public $type = 'aliasbuilder';
/**
* Override to add new button
*
* @return string The field input markup.
*
* @since 3.2
*/
protected function getInput()
{
// see if we should add buttons
$setButton = $this->getAttribute('button');
// get html
$html = parent::getInput();
// if true set button
if ($setButton === 'true')
{
$button = array();
$script = array();
$buttonName = $this->getAttribute('name');
// get the input from url
$app = JFactory::getApplication();
$jinput = $app->input;
// get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// check if new item
$ref = '';
$refJ = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
}
$user = JFactory::getUser();
// only add if user allowed to create field
if ($user->authorise('field.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build Create button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
href="index.php?option=com_componentbuilder&amp;view=field&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span></a>';
}
// only add if user allowed to edit field
if (($buttonName === 'field' || $buttonName === 'fields') && $user->authorise('field.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build edit button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
<span class="icon-edit"></span></a>';
// build script
$script[] = "
jQuery(document).ready(function() {
jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) {
e.preventDefault();
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
function ".$buttonName."Button(value) {
if (value > 0) {
// hide the create button
jQuery('#".$buttonName."Create').hide();
// show edit button
jQuery('#".$buttonName."Edit').show();
var url = 'index.php?option=com_componentbuilder&view=fields&task=field.edit&id='+value+'".$refJ."';
jQuery('#".$buttonName."Edit').attr('href', url);
} else {
// show the create button
jQuery('#".$buttonName."Create').show();
// hide edit button
jQuery('#".$buttonName."Edit').hide();
}
}";
}
// check if button was created for field field.
if (is_array($button) && count($button) > 0)
{
// Load the needed script.
$document = JFactory::getDocument();
$document->addScriptDeclaration(implode(' ',$script));
// return the button attached to input field.
return '<div class="input-append">' .$html . implode('',$button).'</div>';
}
}
return $html;
}
/**
* Method to get a list of options for a list input.
*
* @return array An array of JHtml options.
*/
public function getOptions()
{
// load the db opbject
$db = JFactory::getDBO();
// get the input from url
$jinput = JFactory::getApplication()->input;
// get the id
$adminView = $jinput->getInt('id', 0);
// rest the fields ids
$fieldIds = array();
if (is_numeric($adminView) && $adminView >= 1)
{
// get all the fields linked to the admin view
if ($addFields = ComponentbuilderHelper::getVar('admin_fields', (int) $adminView, 'admin_view', 'addfields'))
{
if (ComponentbuilderHelper::checkJson($addFields))
{
$addFields = json_decode($addFields, true);
if (ComponentbuilderHelper::checkArray($addFields))
{
foreach($addFields as $addField)
{
if (isset($addField['field']) && (!isset($addField['alias']) || 1 != $addField['alias']))
{
$fieldIds[] = (int) $addField['field'];
}
}
}
}
}
}
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.id','a.name','b.name'),array('id','name','type')));
$query->from($db->quoteName('#__componentbuilder_field', 'a'));
$query->join('LEFT', $db->quoteName('#__componentbuilder_fieldtype', 'b') . ' ON (' . $db->quoteName('a.fieldtype') . ' = ' . $db->quoteName('b.id') . ')');
$query->where($db->quoteName('a.published') . ' >= 1');
// filter by fields linked
if (ComponentbuilderHelper::checkArray($fieldIds))
{
// only load these fields
$query->where($db->quoteName('a.id') . ' IN (' . implode(',', $fieldIds) . ')');
}
$query->order('a.name ASC');
$db->setQuery((string)$query);
$items = $db->loadObjectList();
$options = array();
if ($items)
{
foreach($items as $item)
{
$options[] = JHtml::_('select.option', $item->id, $item->name . ' [' . $item->type . ']');
}
}
return $options;
}
}

View File

@ -0,0 +1,165 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage existingvalidationrules.php
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import the list field type
jimport('joomla.form.helper');
JFormHelper::loadFieldClass('list');
/**
* Existingvalidationrules Form Field class for the Componentbuilder component
*/
class JFormFieldExistingvalidationrules extends JFormFieldList
{
/**
* The existingvalidationrules field type.
*
* @var string
*/
public $type = 'existingvalidationrules';
/**
* Override to add new button
*
* @return string The field input markup.
*
* @since 3.2
*/
protected function getInput()
{
// see if we should add buttons
$setButton = $this->getAttribute('button');
// get html
$html = parent::getInput();
// if true set button
if ($setButton === 'true')
{
$button = array();
$script = array();
$buttonName = $this->getAttribute('name');
// get the input from url
$app = JFactory::getApplication();
$jinput = $app->input;
// get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// check if new item
$ref = '';
$refJ = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
}
$user = JFactory::getUser();
// only add if user allowed to create validation_rule
if ($user->authorise('validation_rule.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build Create button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
href="index.php?option=com_componentbuilder&amp;view=validation_rule&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span></a>';
}
// only add if user allowed to edit validation_rule
if (($buttonName === 'validation_rule' || $buttonName === 'validation_rules') && $user->authorise('validation_rule.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build edit button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
<span class="icon-edit"></span></a>';
// build script
$script[] = "
jQuery(document).ready(function() {
jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) {
e.preventDefault();
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
function ".$buttonName."Button(value) {
if (value > 0) {
// hide the create button
jQuery('#".$buttonName."Create').hide();
// show edit button
jQuery('#".$buttonName."Edit').show();
var url = 'index.php?option=com_componentbuilder&view=validation_rules&task=validation_rule.edit&id='+value+'".$refJ."';
jQuery('#".$buttonName."Edit').attr('href', url);
} else {
// show the create button
jQuery('#".$buttonName."Create').show();
// hide edit button
jQuery('#".$buttonName."Edit').hide();
}
}";
}
// check if button was created for validation_rule field.
if (is_array($button) && count($button) > 0)
{
// Load the needed script.
$document = JFactory::getDocument();
$document->addScriptDeclaration(implode(' ',$script));
// return the button attached to input field.
return '<div class="input-append">' .$html . implode('',$button).'</div>';
}
}
return $html;
}
/**
* Method to get a list of options for a list input.
*
* @return array An array of JHtml options.
*/
public function getOptions()
{
// get the existing validation rules names
if ($items = ComponentbuilderHelper::getExistingValidationRuleNames())
{
// load the items
$options = array(JHtml::_('select.option', '', 'Select an option'));
foreach($items as $item)
{
$options[] = JHtml::_('select.option', $item, ComponentbuilderHelper::safeString($item, 'Ww'));
}
return $options;
}
return array(JHtml::_('select.option', '', JText::_('COM_COMPONENTBUILDER_NO_VALIDATION_RULES_FOUND')));
}
}

View File

@ -1140,9 +1140,9 @@ class ComponentbuilderModelFieldtype extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -1199,6 +1199,8 @@ function isSet(val)
jQuery(document).ready(function()
{
// check if this view has alias field
checkAliasField();
// get the linked details
getLinked();
// set button
@ -1214,6 +1216,35 @@ jQuery(document).ready(function()
addButton('field','create_edit_buttons'); // <-- third
});
function checkAliasField() {
checkAliasField_server(1).done(function(result) {
if(result){
// remove the notice
jQuery('.note_create_edit_notice_p').remove();
} else {
// hide everything about alias management
jQuery('#jform_alias_builder_type').closest('.control-group').remove();
jQuery('#jform_alias_builder').closest('.control-group').remove();
jQuery('.note_alias_builder_default').closest('.control-group').remove();
jQuery('.note_alias_builder_custom').closest('.control-group').remove();
}
});
}
function checkAliasField_server(type){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.checkAliasField&format=json&vdm="+vastDevMod;
if(token.length > 0 && type > 0){
var request = 'token='+token+'&type=' + type;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'jsonp',
data: request,
jsonp: 'callback'
});
}
function getAjaxDisplay(type){
getAjaxDisplay_server(type).done(function(result) {
if(result){
@ -1267,10 +1298,10 @@ function addButtonID(type, where, size){
});
}
function addButton_server(type){
function addButton_server(type, size){
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&vdm="+vastDevMod);
if(token.length > 0 && type.length > 0){
var request = 'token='+token+'&type='+type;
var request = 'token='+token+'&type='+type+'&size='+size;
}
return jQuery.ajax({
type: 'GET',
@ -1280,10 +1311,16 @@ function addButton_server(type){
jsonp: 'callback'
});
}
function addButton(type,where){
addButton_server(type).done(function(result) {
function addButton(type, where, size){
// just to insure that default behaviour still works
size = typeof size !== 'undefined' ? size : 1;
addButton_server(type, size).done(function(result) {
if(result){
addData(result,'#jform_'+where);
if (2 == size) {
jQuery('#'+where).html(result);
} else {
addData(result, '#jform_'+where);
}
}
})
}

View File

@ -144,20 +144,6 @@
message="COM_COMPONENTBUILDER_ADMIN_VIEW_SHORT_DESCRIPTION_MESSAGE"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_SHORT_DESCRIPTION_HINT"
/>
<!-- Add_php_after_publish Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_php_after_publish"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_PUBLISH_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_ADMIN_VIEW_YES</option>
<option value="0">
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
</field>
<!-- Add_php_batchmove Field. Type: Radio. (joomla) -->
<field
type="radio"
@ -214,21 +200,41 @@
<option value="0">
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
</field>
<!-- Php_import_save Field. Type: Textarea. (joomla) -->
<!-- Icon_add Field. Type: Media. (joomla) -->
<field
type="media"
name="icon_add"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ICON_ADD_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_ICON_ADD_DESCRIPTION"
directory=""
/>
<!-- Html_import_view Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="php_import_save"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SAVE_LABEL"
name="html_import_view"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_HTML_IMPORT_VIEW_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SAVE_DESCRIPTION"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_HTML_IMPORT_VIEW_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SAVE_HINT"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_HTML_IMPORT_VIEW_HINT"
required="true"
/>
<!-- Note_beginner_import Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_beginner_import" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_BEGINNER_IMPORT_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_BEGINNER_IMPORT_DESCRIPTION" heading="h4" class="alert alert-info note_beginner_import" />
<!-- Add_sql Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_sql"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_SQL_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_ADMIN_VIEW_YES</option>
<option value="0">
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
</field>
<!-- Type Field. Type: List. (joomla) -->
<field
type="list"
@ -280,11 +286,11 @@
description="COM_COMPONENTBUILDER_ADMIN_VIEW_ICON_CATEGORY_DESCRIPTION"
directory=""
/>
<!-- Add_php_after_delete Field. Type: Radio. (joomla) -->
<!-- Add_php_after_publish Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_php_after_delete"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_DELETE_LABEL"
name="add_php_after_publish"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_PUBLISH_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
@ -300,11 +306,11 @@
name="not_required"
default="[]"
/>
<!-- Add_sql Field. Type: Radio. (joomla) -->
<!-- Add_php_after_delete Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_sql"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_SQL_LABEL"
name="add_php_after_delete"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_DELETE_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
@ -316,19 +322,8 @@
</field>
<!-- Note_on_permissions Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_on_permissions" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_PERMISSIONS_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_PERMISSIONS_DESCRIPTION" heading="h4" class="alert alert-info note_on_permissions" />
<!-- Html_import_view Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="html_import_view"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_HTML_IMPORT_VIEW_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_HTML_IMPORT_VIEW_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_HTML_IMPORT_VIEW_HINT"
required="true"
/>
<!-- Note_beginner_import Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_beginner_import" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_BEGINNER_IMPORT_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_BEGINNER_IMPORT_DESCRIPTION" heading="h4" class="alert alert-info note_beginner_import" />
<!-- Addpermissions Field. Type: Subform. (joomla) -->
<field
type="subform"
@ -403,21 +398,26 @@
</field>
</form>
</field>
<!-- Icon_add Field. Type: Media. (joomla) -->
<!-- Php_import_save Field. Type: Textarea. (joomla) -->
<field
type="media"
name="icon_add"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ICON_ADD_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_ICON_ADD_DESCRIPTION"
directory=""
type="textarea"
name="php_import_save"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SAVE_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SAVE_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SAVE_HINT"
required="true"
/>
<!-- Note_on_tabs Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_on_tabs" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_TABS_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_TABS_DESCRIPTION" heading="h4" class="alert alert-info note_on_tabs" />
<!-- Add_php_before_save Field. Type: Radio. (joomla) -->
<!-- Add_php_getitems_after_all Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_php_before_save"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_SAVE_LABEL"
name="add_php_getitems_after_all"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEMS_AFTER_ALL_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
@ -456,11 +456,11 @@
/>
</form>
</field>
<!-- Add_php_postsavehook Field. Type: Radio. (joomla) -->
<!-- Add_php_before_save Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_php_postsavehook"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_POSTSAVEHOOK_LABEL"
name="add_php_before_save"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_SAVE_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
@ -472,11 +472,11 @@
</field>
<!-- Note_on_linked_views Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_on_linked_views" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_LINKED_VIEWS_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_LINKED_VIEWS_DESCRIPTION" heading="h4" class="alert alert-info note_on_linked_views" />
<!-- Add_php_batchcopy Field. Type: Radio. (joomla) -->
<!-- Add_php_postsavehook Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_php_batchcopy"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BATCHCOPY_LABEL"
name="add_php_postsavehook"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_POSTSAVEHOOK_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
@ -576,6 +576,22 @@
</field>
</form>
</field>
<!-- Add_php_batchcopy Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_php_batchcopy"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BATCHCOPY_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_ADMIN_VIEW_YES</option>
<option value="0">
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
</field>
<!-- Note_create_edit_notice Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_create_edit_notice" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_NOTICE_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_NOTICE_DESCRIPTION" heading="h4" class="alert alert-info note_create_edit_notice" />
<!-- Add_php_before_publish Field. Type: Radio. (joomla) -->
<field
type="radio"
@ -590,8 +606,20 @@
<option value="0">
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
</field>
<!-- Note_create_edit_notice Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_create_edit_notice" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_NOTICE_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_NOTICE_DESCRIPTION" heading="h4" class="alert alert-info note_create_edit_notice" />
<!-- Alias_builder_type Field. Type: Radio. (joomla) -->
<field
type="radio"
name="alias_builder_type"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ALIAS_BUILDER_TYPE_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_ALIAS_BUILDER_TYPE_DESCRIPTION"
class="btn-group btn-group-yesno"
default="1">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_ADMIN_VIEW_DEFAULT</option>
<option value="2">
COM_COMPONENTBUILDER_ADMIN_VIEW_CUSTOM</option>
</field>
<!-- Add_php_before_delete Field. Type: Radio. (joomla) -->
<field
type="radio"
@ -606,8 +634,8 @@
<option value="0">
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
</field>
<!-- Note_create_edit_buttons Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_create_edit_buttons" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_BUTTONS_DESCRIPTION" class="note_create_edit_buttons" />
<!-- Note_alias_builder_custom Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_alias_builder_custom" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ALIAS_BUILDER_CUSTOM_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ALIAS_BUILDER_CUSTOM_DESCRIPTION" heading="h4" class="alert alert-info note_alias_builder_custom" showon="alias_builder_type:2" />
<!-- Add_php_document Field. Type: Radio. (joomla) -->
<field
type="radio"
@ -622,8 +650,8 @@
<option value="0">
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
</field>
<!-- Note_create_edit_display Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_create_edit_display" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_DISPLAY_DESCRIPTION" class="note_create_edit_display" />
<!-- Note_alias_builder_default Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_alias_builder_default" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ALIAS_BUILDER_DEFAULT_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ALIAS_BUILDER_DEFAULT_DESCRIPTION" heading="h4" class="alert alert-info note_alias_builder_default" showon="alias_builder_type:1" />
<!-- Addtables Field. Type: Subform. (joomla) -->
<field
type="subform"
@ -660,20 +688,16 @@
/>
</form>
</field>
<!-- Add_css_view Field. Type: Radio. (joomla) -->
<!-- Alias_builder Field. Type: Aliasbuilder. (custom) -->
<field
type="radio"
name="add_css_view"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CSS_VIEW_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_ADMIN_VIEW_YES</option>
<option value="0">
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
</field>
type="aliasbuilder"
name="alias_builder"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ALIAS_BUILDER_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_ALIAS_BUILDER_DESCRIPTION"
class="list_class fieldFull"
multiple="true"
showon="alias_builder_type:2"
/>
<!-- Add_custom_import Field. Type: Radio. (joomla) -->
<field
type="radio"
@ -689,11 +713,11 @@
<option value="0">
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
</field>
<!-- Add_php_getitems Field. Type: Radio. (joomla) -->
<!-- Add_php_getitem Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_php_getitems"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEMS_LABEL"
name="add_php_getitem"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEM_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
@ -716,11 +740,11 @@
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_HEADERS_HINT"
required="true"
/>
<!-- Add_php_getitems_after_all Field. Type: Radio. (joomla) -->
<!-- Add_php_getitems Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_php_getitems_after_all"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEMS_AFTER_ALL_LABEL"
name="add_php_getitems"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEMS_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
@ -730,19 +754,8 @@
<option value="0">
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
</field>
<!-- Css_view Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="css_view"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_CSS_VIEW_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_CSS_VIEW_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_CSS_VIEW_HINT"
required="true"
/>
<!-- Note_create_edit_buttons Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_create_edit_buttons" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_BUTTONS_DESCRIPTION" class="note_create_edit_buttons" />
<!-- Icon Field. Type: Media. (joomla) -->
<field
type="media"
@ -751,6 +764,21 @@
description="COM_COMPONENTBUILDER_ADMIN_VIEW_ICON_DESCRIPTION"
directory=""
/>
<!-- Php_getitem Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="php_getitem"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEM_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEM_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEM_HINT"
required="true"
/>
<!-- Note_create_edit_display Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_create_edit_display" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_DISPLAY_DESCRIPTION" class="note_create_edit_display" />
<!-- Php_getitems Field. Type: Textarea. (joomla) -->
<field
type="textarea"
@ -764,11 +792,11 @@
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEMS_HINT"
required="true"
/>
<!-- Add_css_views Field. Type: Radio. (joomla) -->
<!-- Add_css_view Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_css_views"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CSS_VIEWS_LABEL"
name="add_css_view"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CSS_VIEW_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
@ -791,17 +819,17 @@
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEMS_AFTER_ALL_HINT"
required="true"
/>
<!-- Css_views Field. Type: Textarea. (joomla) -->
<!-- Css_view Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="css_views"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_CSS_VIEWS_LABEL"
name="css_view"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_CSS_VIEW_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_CSS_VIEWS_DESCRIPTION"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_CSS_VIEW_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_CSS_VIEWS_HINT"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_CSS_VIEW_HINT"
required="true"
/>
<!-- Php_getlistquery Field. Type: Textarea. (joomla) -->
@ -817,11 +845,11 @@
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETLISTQUERY_HINT"
required="true"
/>
<!-- Add_javascript_view_file Field. Type: Radio. (joomla) -->
<!-- Add_css_views Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_javascript_view_file"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_JAVASCRIPT_VIEW_FILE_LABEL"
name="add_css_views"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CSS_VIEWS_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
@ -844,17 +872,17 @@
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_SAVE_HINT"
required="true"
/>
<!-- Javascript_view_file Field. Type: Textarea. (joomla) -->
<!-- Css_views Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="javascript_view_file"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEW_FILE_LABEL"
name="css_views"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_CSS_VIEWS_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEW_FILE_DESCRIPTION"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_CSS_VIEWS_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEW_FILE_HINT"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_CSS_VIEWS_HINT"
required="true"
/>
<!-- Php_save Field. Type: Textarea. (joomla) -->
@ -870,11 +898,11 @@
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_SAVE_HINT"
required="true"
/>
<!-- Add_javascript_view_footer Field. Type: Radio. (joomla) -->
<!-- Add_javascript_view_file Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_javascript_view_footer"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_JAVASCRIPT_VIEW_FOOTER_LABEL"
name="add_javascript_view_file"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_JAVASCRIPT_VIEW_FILE_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
@ -897,17 +925,17 @@
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_POSTSAVEHOOK_HINT"
required="true"
/>
<!-- Javascript_view_footer Field. Type: Textarea. (joomla) -->
<!-- Javascript_view_file Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="javascript_view_footer"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEW_FOOTER_LABEL"
name="javascript_view_file"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEW_FILE_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEW_FOOTER_DESCRIPTION"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEW_FILE_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEW_FOOTER_HINT"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEW_FILE_HINT"
required="true"
/>
<!-- Php_allowedit Field. Type: Textarea. (joomla) -->
@ -923,11 +951,11 @@
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_ALLOWEDIT_HINT"
required="true"
/>
<!-- Add_javascript_views_file Field. Type: Radio. (joomla) -->
<!-- Add_javascript_view_footer Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_javascript_views_file"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_JAVASCRIPT_VIEWS_FILE_LABEL"
name="add_javascript_view_footer"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_JAVASCRIPT_VIEW_FOOTER_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
@ -950,17 +978,17 @@
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHCOPY_HINT"
required="true"
/>
<!-- Javascript_views_file Field. Type: Textarea. (joomla) -->
<!-- Javascript_view_footer Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="javascript_views_file"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEWS_FILE_LABEL"
name="javascript_view_footer"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEW_FOOTER_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEWS_FILE_DESCRIPTION"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEW_FOOTER_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEWS_FILE_HINT"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEW_FOOTER_HINT"
required="true"
/>
<!-- Php_batchmove Field. Type: Textarea. (joomla) -->
@ -976,11 +1004,11 @@
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHMOVE_HINT"
required="true"
/>
<!-- Add_javascript_views_footer Field. Type: Radio. (joomla) -->
<!-- Add_javascript_views_file Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_javascript_views_footer"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_JAVASCRIPT_VIEWS_FOOTER_LABEL"
name="add_javascript_views_file"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_JAVASCRIPT_VIEWS_FILE_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
@ -1003,17 +1031,17 @@
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_PUBLISH_HINT"
required="true"
/>
<!-- Javascript_views_footer Field. Type: Textarea. (joomla) -->
<!-- Javascript_views_file Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="javascript_views_footer"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEWS_FOOTER_LABEL"
name="javascript_views_file"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEWS_FILE_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEWS_FOOTER_DESCRIPTION"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEWS_FILE_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEWS_FOOTER_HINT"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEWS_FILE_HINT"
required="true"
/>
<!-- Php_after_publish Field. Type: Textarea. (joomla) -->
@ -1029,11 +1057,11 @@
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_PUBLISH_HINT"
required="true"
/>
<!-- Add_custom_button Field. Type: Radio. (joomla) -->
<!-- Add_javascript_views_footer Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_custom_button"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CUSTOM_BUTTON_LABEL"
name="add_javascript_views_footer"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_JAVASCRIPT_VIEWS_FOOTER_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
@ -1056,6 +1084,59 @@
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_DELETE_HINT"
required="true"
/>
<!-- Javascript_views_footer Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="javascript_views_footer"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEWS_FOOTER_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEWS_FOOTER_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEWS_FOOTER_HINT"
required="true"
/>
<!-- Php_after_delete Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="php_after_delete"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_DELETE_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_DELETE_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_DELETE_HINT"
required="true"
/>
<!-- Add_custom_button Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_custom_button"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CUSTOM_BUTTON_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_ADMIN_VIEW_YES</option>
<option value="0">
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
</field>
<!-- Php_document Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="php_document"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_DOCUMENT_LABEL"
rows="17"
cols="5"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_DOCUMENT_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_DOCUMENT_HINT"
required="true"
/>
<!-- Custom_button Field. Type: Subform. (joomla) -->
<field
type="subform"
@ -1565,58 +1646,6 @@
</field>
</form>
</field>
<!-- Php_after_delete Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="php_after_delete"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_DELETE_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_DELETE_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_DELETE_HINT"
required="true"
/>
<!-- Php_controller Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="php_controller"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_HINT"
required="false"
/>
<!-- Php_document Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="php_document"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_DOCUMENT_LABEL"
rows="17"
cols="5"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_DOCUMENT_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_DOCUMENT_HINT"
required="true"
/>
<!-- Php_model Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="php_model"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_MODEL_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_MODEL_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_MODEL_HINT"
required="false"
/>
<!-- Source Field. Type: Radio. (joomla) -->
<field
type="radio"
@ -1630,17 +1659,17 @@
<option value="2">
COM_COMPONENTBUILDER_ADMIN_VIEW_DUMP</option>
</field>
<!-- Php_controller_list Field. Type: Textarea. (joomla) -->
<!-- Php_controller Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="php_controller_list"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_LIST_LABEL"
name="php_controller"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_LIST_DESCRIPTION"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_LIST_HINT"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_HINT"
required="false"
/>
<!-- Sql Field. Type: Textarea. (joomla) -->
@ -1656,6 +1685,47 @@
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_SQL_HINT"
required="true"
/>
<!-- Php_model Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="php_model"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_MODEL_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_MODEL_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_MODEL_HINT"
required="false"
/>
<!-- Note_advanced_import Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_advanced_import" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ADVANCED_IMPORT_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ADVANCED_IMPORT_DESCRIPTION" heading="h4" class="alert alert-success note_advanced_import" />
<!-- Php_controller_list Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="php_controller_list"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_LIST_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_LIST_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_LIST_HINT"
required="false"
/>
<!-- Php_import_display Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="php_import_display"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DISPLAY_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DISPLAY_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DISPLAY_HINT"
required="true"
/>
<!-- Php_model_list Field. Type: Textarea. (joomla) -->
<field
type="textarea"
@ -1669,8 +1739,19 @@
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_MODEL_LIST_HINT"
required="false"
/>
<!-- Note_advanced_import Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_advanced_import" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ADVANCED_IMPORT_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ADVANCED_IMPORT_DESCRIPTION" heading="h4" class="alert alert-success note_advanced_import" />
<!-- Php_import Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="php_import"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_HINT"
required="true"
/>
<!-- Add_php_ajax Field. Type: Radio. (joomla) -->
<field
type="radio"
@ -1685,17 +1766,17 @@
<option value="0">
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
</field>
<!-- Php_import_display Field. Type: Textarea. (joomla) -->
<!-- Php_import_setdata Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="php_import_display"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DISPLAY_LABEL"
name="php_import_setdata"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SETDATA_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DISPLAY_DESCRIPTION"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SETDATA_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DISPLAY_HINT"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SETDATA_HINT"
required="true"
/>
<!-- Php_ajaxmethod Field. Type: Textarea. (joomla) -->
@ -1711,17 +1792,17 @@
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AJAXMETHOD_HINT"
required="true"
/>
<!-- Php_import Field. Type: Textarea. (joomla) -->
<!-- Php_import_ext Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="php_import"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_LABEL"
name="php_import_ext"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_EXT_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DESCRIPTION"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_EXT_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_HINT"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_EXT_HINT"
required="true"
/>
<!-- Ajax_input Field. Type: Subform. (joomla) -->
@ -1856,59 +1937,6 @@
/>
</form>
</field>
<!-- Php_import_setdata Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="php_import_setdata"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SETDATA_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SETDATA_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SETDATA_HINT"
required="true"
/>
<!-- Add_php_getitem Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_php_getitem"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEM_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_ADMIN_VIEW_YES</option>
<option value="0">
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
</field>
<!-- Php_import_ext Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="php_import_ext"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_EXT_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_EXT_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_EXT_HINT"
required="true"
/>
<!-- Php_getitem Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="php_getitem"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEM_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEM_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEM_HINT"
required="true"
/>
</fieldset>
<!-- Access Control Fields. -->

View File

@ -278,12 +278,12 @@ function checkFunctionName(functioName) {
// now start search for where the function is used
usedin(result.name, ide);
} else if(result.message){
// show notice that functioName is not okay
// show notice that functionName is not okay
jQuery.UIkit.notify({message: result.message, timeout: 5000, status: result.status, pos: 'top-right'});
jQuery('#jform_function_name').val('');
} else {
// set an error that message was not send
jQuery.UIkit.notify({message: 'Function name already taken, please try again.', timeout: 5000, status: 'danger', pos: 'top-right'});
jQuery.UIkit.notify({message: Joomla.JText._('COM_COMPONENTBUILDER_FUNCTION_NAME_ALREADY_TAKEN_PLEASE_TRY_AGAIN'), timeout: 5000, status: 'danger', pos: 'top-right'});
jQuery('#jform_function_name').val('');
}
// set custom code placeholder
@ -291,7 +291,7 @@ function checkFunctionName(functioName) {
});
} else {
// set an error that message was not send
jQuery.UIkit.notify({message: 'You must add an unique function name.', timeout: 5000, status: 'danger', pos: 'top-right'});
jQuery.UIkit.notify({message: Joomla.JText._('COM_COMPONENTBUILDER_YOU_MUST_ADD_AN_UNIQUE_FUNCTION_NAME'), timeout: 5000, status: 'danger', pos: 'top-right'});
jQuery('#jform_function_name').val('');
// set custom code placeholder
setCustomCodePlaceholder();

View File

@ -514,6 +514,10 @@ jQuery(document).ready(function()
{
// get the linked details
getLinked();
// get the validation rules
getValidationRulesTable();
// set button to create more fields
addButton('validation_rule', 'validation_rules_header', 2);
});
function getLinked_server(type){
@ -537,6 +541,33 @@ function getLinked(){
}
});
}
function addButton_server(type, size){
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&vdm="+vastDevMod);
if(token.length > 0 && type.length > 0){
var request = 'token='+token+'&type='+type+'&size='+size;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'jsonp',
data: request,
jsonp: 'callback'
});
}
function addButton(type, where, size){
// just to insure that default behaviour still works
size = typeof size !== 'undefined' ? size : 1;
addButton_server(type, size).done(function(result) {
if(result){
if (2 == size) {
jQuery('#'+where).html(result);
} else {
addData(result, '#jform_'+where);
}
}
})
}
function getFieldOptions_server(fieldId){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.fieldOptions&format=json";
@ -559,7 +590,29 @@ function getFieldOptions(id,setValue){
jQuery('textarea#jform_xml').val(result.values);
}
jQuery('#help').remove();
jQuery('.helpNote').append('<div id="help" style="margin: 10px;">'+result.description+'<br />'+result.values_description+'</div>');
jQuery('.helpNote').append('<div id="help" class="uk-scrollable-box">'+result.description+'<br />'+result.values_description+'</div>');
}
})
}
}
function getValidationRulesTable_server(){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getValidationRulesTable&format=json";
if(token.length > 0){
var request = 'token='+token+'&id=1';
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'jsonp',
data: request,
jsonp: 'callback'
});
}
function getValidationRulesTable(){
getValidationRulesTable_server().done(function(result) {
if(result){
jQuery('#display_validation_rules').html(result);
}
});
}

View File

@ -994,10 +994,10 @@ function addButtonID(type, where, size){
});
}
function addButton_server(type){
function addButton_server(type, size){
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&vdm="+vastDevMod);
if(token.length > 0 && type.length > 0){
var request = 'token='+token+'&type='+type;
var request = 'token='+token+'&type='+type+'&size='+size;
}
return jQuery.ajax({
type: 'GET',
@ -1007,10 +1007,16 @@ function addButton_server(type){
jsonp: 'callback'
});
}
function addButton(type,where){
addButton_server(type).done(function(result) {
function addButton(type, where, size){
// just to insure that default behaviour still works
size = typeof size !== 'undefined' ? size : 1;
addButton_server(type, size).done(function(result) {
if(result){
addData(result,'#jform_'+where);
if (2 == size) {
jQuery('#'+where).html(result);
} else {
addData(result, '#jform_'+where);
}
}
})
}

View File

@ -34,10 +34,10 @@ function addData(result,where){
jQuery(result).insertAfter(jQuery(where).closest('.control-group'));
}
function addButton_server(type){
function addButton_server(type, size){
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&vdm="+vastDevMod);
if(token.length > 0 && type.length > 0){
var request = 'token='+token+'&type='+type;
var request = 'token='+token+'&type='+type+'&size='+size;
}
return jQuery.ajax({
type: 'GET',
@ -47,10 +47,16 @@ function addButton_server(type){
jsonp: 'callback'
});
}
function addButton(type,where){
addButton_server(type).done(function(result) {
function addButton(type, where, size){
// just to insure that default behaviour still works
size = typeof size !== 'undefined' ? size : 1;
addButton_server(type, size).done(function(result) {
if(result){
addData(result,'#jform_'+where);
if (2 == size) {
jQuery('#'+where).html(result);
} else {
addData(result, '#jform_'+where);
}
}
})
}

View File

@ -453,10 +453,10 @@ function addButtonID(type, where, size){
});
}
function addButton_server(type){
function addButton_server(type, size){
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&vdm="+vastDevMod);
if(token.length > 0 && type.length > 0){
var request = 'token='+token+'&type='+type;
var request = 'token='+token+'&type='+type+'&size='+size;
}
return jQuery.ajax({
type: 'GET',
@ -466,10 +466,16 @@ function addButton_server(type){
jsonp: 'callback'
});
}
function addButton(type,where){
addButton_server(type).done(function(result) {
function addButton(type, where, size){
// just to insure that default behaviour still works
size = typeof size !== 'undefined' ? size : 1;
addButton_server(type, size).done(function(result) {
if(result){
addData(result,'#jform_'+where);
if (2 == size) {
jQuery('#'+where).html(result);
} else {
addData(result, '#jform_'+where);
}
}
})
}

View File

@ -0,0 +1,109 @@
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage validation_rule.js
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
jQuery(document).ready(function()
{
// get the rule name
var ruleName = jQuery('#jform_name').val();
// check if this rule name is taken
checkRuleName(ruleName);
// get type value
var rulefilename = jQuery("#jform_inherit option:selected").val();
if(jQuery('#jform_php').length == 0) {
getExistingValidationRuleCode(rulefilename);
}
// load the used in div
// jQuery('#usedin').show();
});
function getExistingValidationRuleCode_server(rulefilename){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getExistingValidationRuleCode&format=json";
if(token.length > 0 && rulefilename.length > 0){
var request = 'token='+token+'&name='+rulefilename;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'jsonp',
data: request,
jsonp: 'callback'
});
}
function getExistingValidationRuleCode(rulefilename,setValue){
getExistingValidationRuleCode_server(rulefilename).done(function(result) {
if(result.values){
jQuery('textarea#jform_php').val(result.values);
}
})
}
function checkRuleName(ruleName) {
if (ruleName.length > 2) {
var ide = jQuery('#jform_id').val();
if (ide == 0) {
ide = -1;
}
checkRuleName_server(ruleName, ide).done(function(result) {
if(result.name && result.message){
// show notice that functioName is okay
jQuery.UIkit.notify({message: result.message, timeout: result.timeout, status: result.status, pos: 'top-right'});
jQuery('#jform_name').val(result.name);
// now start search for where the function is used
usedin(result.name, ide);
} else if(result.message){
// show notice that ruleName is not okay
jQuery.UIkit.notify({message: result.message, timeout: result.timeout, status: result.status, pos: 'top-right'});
jQuery('#jform_name').val('');
} else {
// set an error that message was not send
jQuery.UIkit.notify({message: Joomla.JText._('COM_COMPONENTBUILDER_VALIDATION_RULE_NAME_ALREADY_TAKEN_PLEASE_TRY_AGAIN'), timeout: 7000, status: 'danger', pos: 'top-right'});
jQuery('#jform_name').val('');
}
});
} else {
// set an error that message was not send
jQuery.UIkit.notify({message: Joomla.JText._('COM_COMPONENTBUILDER_YOU_MUST_ADD_AN_UNIQUE_VALIDATION_RULE_NAME'), timeout: 5000, status: 'danger', pos: 'top-right'});
jQuery('#jform_name').val('');
}
}
// check Function Name
function checkRuleName_server(ruleName, ide){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.checkRuleName&format=json";
if(token.length > 0){
var request = 'token='+token+'&name='+ruleName+'&id='+ide;
}
return jQuery.ajax({
type: 'POST',
url: getUrl,
dataType: 'jsonp',
data: request,
jsonp: 'callback'
});
}

View File

@ -0,0 +1,160 @@
<?xml version="1.0" encoding="utf-8"?>
<form
addrulepath="/administrator/components/com_componentbuilder/models/rules"
addfieldpath="/administrator/components/com_componentbuilder/models/fields"
>
<fieldset name="details">
<!-- Default Fields. -->
<!-- Id Field. Type: Text (joomla) -->
<field
name="id"
type="text" class="readonly" label="JGLOBAL_FIELD_ID_LABEL"
description ="JGLOBAL_FIELD_ID_DESC" size="10" default="0"
readonly="true"
/>
<!-- Date Created Field. Type: Calendar (joomla) -->
<field
name="created"
type="calendar"
label="COM_COMPONENTBUILDER_VALIDATION_RULE_CREATED_DATE_LABEL"
description="COM_COMPONENTBUILDER_VALIDATION_RULE_CREATED_DATE_DESC"
size="22"
format="%Y-%m-%d %H:%M:%S"
filter="user_utc"
/>
<!-- User Created Field. Type: User (joomla) -->
<field
name="created_by"
type="user"
label="COM_COMPONENTBUILDER_VALIDATION_RULE_CREATED_BY_LABEL"
description="COM_COMPONENTBUILDER_VALIDATION_RULE_CREATED_BY_DESC"
/>
<!-- Published Field. Type: List (joomla) -->
<field name="published" type="list" label="JSTATUS"
description="JFIELD_PUBLISHED_DESC" class="chzn-color-state"
filter="intval" size="1" default="1" >
<option value="1">
JPUBLISHED</option>
<option value="0">
JUNPUBLISHED</option>
<option value="2">
JARCHIVED</option>
<option value="-2">
JTRASHED</option>
</field>
<!-- Date Modified Field. Type: Calendar (joomla) -->
<field name="modified" type="calendar" class="readonly"
label="COM_COMPONENTBUILDER_VALIDATION_RULE_MODIFIED_DATE_LABEL" description="COM_COMPONENTBUILDER_VALIDATION_RULE_MODIFIED_DATE_DESC"
size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" />
<!-- User Modified Field. Type: User (joomla) -->
<field name="modified_by" type="user"
label="COM_COMPONENTBUILDER_VALIDATION_RULE_MODIFIED_BY_LABEL"
description="COM_COMPONENTBUILDER_VALIDATION_RULE_MODIFIED_BY_DESC"
class="readonly"
readonly="true"
filter="unset"
/>
<!-- Access Field. Type: Accesslevel (joomla) -->
<field name="access"
type="accesslevel"
label="JFIELD_ACCESS_LABEL"
description="JFIELD_ACCESS_DESC"
default="1"
required="false"
/>
<!-- Ordering Field. Type: Numbers (joomla) -->
<field
name="ordering"
type="number"
class="inputbox validate-ordering"
label="COM_COMPONENTBUILDER_VALIDATION_RULE_ORDERING_LABEL"
description=""
default="0"
size="6"
required="false"
/>
<!-- Version Field. Type: Text (joomla) -->
<field
name="version"
type="text"
class="readonly"
label="COM_COMPONENTBUILDER_VALIDATION_RULE_VERSION_LABEL"
description="COM_COMPONENTBUILDER_VALIDATION_RULE_VERSION_DESC"
size="6"
readonly="true"
filter="unset"
/>
<!-- Dynamic Fields. -->
<!-- Name Field. Type: Text. (joomla) -->
<field
type="text"
name="name"
label="COM_COMPONENTBUILDER_VALIDATION_RULE_NAME_LABEL"
size="40"
description="COM_COMPONENTBUILDER_VALIDATION_RULE_NAME_DESCRIPTION"
class="input-large-text"
required="true"
/>
<!-- Short_description Field. Type: Text. (joomla) -->
<field
type="text"
name="short_description"
label="COM_COMPONENTBUILDER_VALIDATION_RULE_SHORT_DESCRIPTION_LABEL"
size="40"
maxlength="150"
description="COM_COMPONENTBUILDER_VALIDATION_RULE_SHORT_DESCRIPTION_DESCRIPTION"
class="text_area"
required="true"
filter="HTML"
message="COM_COMPONENTBUILDER_VALIDATION_RULE_SHORT_DESCRIPTION_MESSAGE"
hint="COM_COMPONENTBUILDER_VALIDATION_RULE_SHORT_DESCRIPTION_HINT"
/>
<!-- Inherit Field. Type: Existingvalidationrules. (custom) -->
<field
type="existingvalidationrules"
name="inherit"
label="COM_COMPONENTBUILDER_VALIDATION_RULE_INHERIT_LABEL"
description="COM_COMPONENTBUILDER_VALIDATION_RULE_INHERIT_DESCRIPTION"
class="list_class"
multiple="false"
default="0"
required="false"
button="false"
/>
<!-- Php Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="php"
label="COM_COMPONENTBUILDER_VALIDATION_RULE_PHP_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_VALIDATION_RULE_PHP_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_VALIDATION_RULE_PHP_HINT"
required="true"
/>
</fieldset>
<!-- Access Control Fields. -->
<fieldset name="accesscontrol">
<!-- Asset Id Field. Type: Hidden (joomla) -->
<field
name="asset_id"
type="hidden"
filter="unset"
/>
<!-- Rules Field. Type: Rules (joomla) -->
<field
name="rules"
type="rules"
label="Permissions in relation to this validation_rule"
translate_label="false"
filter="rules"
validate="rules"
class="inputbox"
component="com_componentbuilder"
section="validation_rule"
/>
</fieldset>
</form>

View File

@ -849,7 +849,7 @@ class ComponentbuilderModelHelp_document extends JModelAdmin
// Automatic handling of alias for empty fields
if (in_array($input->get('task'), array('apply', 'save', 'save2new')) && (int) $input->get('id') == 0)
{
if ($data['alias'] == null)
if ($data['alias'] == null || empty($data['alias']))
{
if (JFactory::getConfig()->get('unicodeslugs') == 1)
{
@ -867,8 +867,7 @@ class ComponentbuilderModelHelp_document extends JModelAdmin
$msg = JText::_('COM_COMPONENTBUILDER_HELP_DOCUMENT_SAVE_WARNING');
}
list($title, $alias) = $this->_generateNewTitle($data['alias'], $data['title']);
$data['alias'] = $alias;
$data['alias'] = $this->_generateNewTitle($data['alias']);
if (isset($msg))
{
@ -923,26 +922,49 @@ class ComponentbuilderModelHelp_document extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title/s & alias.
*
* @param string $alias The alias.
* @param string $title The title.
* @param string $alias The alias.
* @param string/array $title The title.
*
* @return array Contains the modified title and alias.
* @return array/string Contains the modified title/s and/or alias.
*
*/
protected function _generateNewTitle($alias, $title)
protected function _generateNewTitle($alias, $title = null)
{
// Alter the title & alias
// Alter the title/s & alias
$table = $this->getTable();
while ($table->load(array('alias' => $alias)))
{
$title = JString::increment($title);
// Check if this is an array of titles
if (ComponentbuilderHelper::checkArray($title))
{
foreach($title as $nr => &$_title)
{
$_title = JString::increment($_title);
}
}
// Make sure we have a title
elseif ($title)
{
$title = JString::increment($title);
}
$alias = JString::increment($alias, 'dash');
}
return array($title, $alias);
// Check if this is an array of titles
if (ComponentbuilderHelper::checkArray($title))
{
$title[] = $alias;
return $title;
}
// Make sure we have a title
elseif ($title)
{
return array($title, $alias);
}
// We only had an alias
return $alias;
}
}

View File

@ -93,6 +93,8 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
protected $fieldTypes = array();
protected $isMultiple = array();
protected $specialValue = false;
protected $checksum = null;
protected $checksumURLs = array('vdm' => 'https://raw.githubusercontent.com/vdm-io/JCB-Packages/master/');
/**
* Import an spreadsheet from either folder, url or upload.
@ -102,24 +104,30 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
*/
public function import()
{
// set the state to import
$this->setState('action', 'import');
$this->app = JFactory::getApplication();
$session = JFactory::getSession();
$package = null;
$continue = false;
// get App
$this->app = JFactory::getApplication();
// get session
$session = JFactory::getSession();
// some defaults
$package = null;
$continue = false;
// get import type
$this->getType = $this->app->input->getString('gettype', NULL);
$this->getType = $this->app->input->getString('gettype', NULL);
// do checksum validation
$this->checksum = $this->app->input->getString('checksum', NULL);
// get import type
$this->getType = $this->app->input->getString('gettype', NULL);
// get import type
$this->dataType = $session->get('dataType_VDM_IMPORTINTO', NULL);
$this->dataType = $session->get('dataType_VDM_IMPORTINTO', NULL);
// if we have no package
if ($package === null)
{
// we must allow unsafe with smart import since it is code being imported.
if ($this->dataType === 'smart_package')
{
$this->allow_unsafe = true;
}
// action based on get Type
switch ($this->getType)
{
case 'folder':
@ -136,7 +144,6 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
$package = $this->_getPackageFromUrl();
break;
case 'continue-basic':
case 'continue-ext':
$continue = true;
$package = $session->get('package', null);
@ -149,7 +156,39 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
break;
default:
$this->app->setUserState('com_componentbuilder.message', JText::_('COM_COMPONENTBUILDER_IMPORT_NO_IMPORT_TYPE_FOUND'));
$package = $session->get('package', null);
if (ComponentbuilderHelper::checkJson($package))
{
// get package
$package = json_decode($package, true);
// remove zip file
if (isset($package['packagename']))
{
$this->remove($package['packagename']);
}
// check if dir is set
if (isset($package['dir']))
{
// set auto loader
ComponentbuilderHelper::autoLoader('smart');
// get install folder
$dir = JFile::stripExt($package['dir']);
// remove unziped folder
ComponentbuilderHelper::removeFolder($dir);
}
}
// clear session
$session->clear('package');
$session->clear('dataType');
$session->clear('hasPackage');
$session->clear('smart_package_info');
$back = $session->get('backto_VDM_IMPORT', NULL);
$session->clear('backto_VDM_IMPORT');
if ($back)
{
$this->app->setUserState('com_componentbuilder.redirect_url', 'index.php?option=com_componentbuilder&view='.$back);
}
$session->clear('backto_VDM_IMPORT');
return false;
break;
}
@ -170,35 +209,28 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
if(!$continue)
{
// check if this a smart package, if true then get info
if ($this->dataType === 'smart_package')
if ($this->dataType !== 'smart_package' || !$this->getInfo($package, $session))
{
$this->getInfo($package, $session);
$this->app->setUserState('com_componentbuilder.message', JText::_('COM_COMPONENTBUILDER_THERE_WAS_AN_ERROR_GETTING_THE_PACKAGE_INFO'));
return false;
}
$package = json_encode($package);
// set package to session
$package = json_encode($package);
$session->set('package', $package);
$session->set('dataType', $this->dataType);
$session->set('hasPackage', true);
return true;
}
// set the data
if ('continue-basic' == $this->getType)
{
$headerList = json_decode($session->get($this->dataType.'_VDM_IMPORTHEADERS', false), true);
}
else
{
$headerList = null;
// force update
$this->forceUpdate = $this->app->input->getInt('force_update', 0);
// show more information
$this->moreInfo = $this->app->input->getInt('more_info', 0);
// has a key
$this->hasKey = $this->app->input->getInt('haskey', 0);
// die sleutle
$this->sleutle = $this->app->input->getString('sleutle', NULL);
}
if (!$this->setData($package, $headerList))
// force update
$this->forceUpdate = $this->app->input->getInt('force_update', 0);
// show more information
$this->moreInfo = $this->app->input->getInt('more_info', 0);
// has a key
$this->hasKey = $this->app->input->getInt('haskey', 0);
// die sleutle
$this->sleutle = $this->app->input->getString('sleutle', NULL);
// try to store/set data
if (!$this->setData($package))
{
// There was an error importing the package
$msg = JText::_('COM_COMPONENTBUILDER_IMPORT_ERROR');
@ -219,8 +251,8 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
$back = $session->get('backto_VDM_IMPORT', NULL);
if ($back)
{
$this->app->setUserState('com_componentbuilder.redirect_url', 'index.php?option=com_componentbuilder&view='.$back);
$session->clear('backto_VDM_IMPORT');
$this->app->setUserState('com_componentbuilder.redirect_url', 'index.php?option=com_componentbuilder&view='.$back);
$session->clear('backto_VDM_IMPORT');
}
$result = true;
}
@ -230,7 +262,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
// remove file after import
$this->remove($package['packagename']);
$session->clear($this->getType.'_VDM_IMPORTHEADERS');
return $result;
}
@ -244,6 +276,49 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
// extract the package
if (JFile::exists($package['dir']))
{
// does this package pass a checksum
$checksum = false;
$checksumStatus = 'warning';
$checksumMessage = JText::_('COM_COMPONENTBUILDER_PLEASE_NOTE_THAT_THIS_PACKAGE_BHAS_NOB_CHECKSUM_VALIDATION');
// do hash validation here for git repos
if (ComponentbuilderHelper::checkString($this->checksum) && isset($this->checksumURLs[$this->checksum]))
{
// get packages checksums
$checksums = ComponentbuilderHelper::getFileContents($this->checksumURLs[$this->checksum].'checksum.json');
if (ComponentbuilderHelper::checkJson($checksums))
{
// convert to array
$checksums = json_decode($checksums, true);
// get package name
$packageName = basename($package['dir']);
// check if package is found
if (isset($checksums[$packageName]))
{
// validate checksum
if ($checksums[$packageName] === sha1_file($package['dir']))
{
$validator = $this->checksumURLs[$this->checksum].str_replace('.zip', '.sha', $packageName);
$checksumMessage = JText::sprintf('COM_COMPONENTBUILDER_THIS_PACKAGE_BPASSEDB_CHECKSUM_VALIDATION_PLEASE_VALIDATE_THIS_CHECKSUM_BSB_TO_BE_THE_SAME_AS_THE_ONE_FOUND_A_S_SA', $checksums[$packageName], 'href="'.$validator.'" target="_blank" title="verify checksum">', $validator);
$checksumStatus = 'Success';
$checksum = true;
}
}
// set error
if (!$checksum)
{
$checksumMessage = JText::_('COM_COMPONENTBUILDER_BBEST_TO_NOT_CONTINUEBBR_THIS_PACKAGE_BFAILEDB_CHECKSUM_VALIDATION_THIS_COULD_BE_A_SERIOUS_SECURITY_BREACH_DO_NOT_CONTINUE');
$checksumStatus = 'error';
}
}
// set error
else
{
$checksumMessage = JText::_('COM_COMPONENTBUILDER_BBEST_TO_NOT_CONTINUEBBR_WE_COULD_NOT_LOAD_THE_CHECKSUM_FOR_THIS_PACKAGE_AND_SO_NO_VALIDATION_WAS_POSSIBLE_THIS_MAY_BE_DUE_TO_YOUR_NETWORK_OR_A_CHANGE_TO_THAT_PACKAGE_NAME');
$checksumStatus = 'error';
}
}
// do not have check sum validation
$this->app->enqueueMessage($checksumMessage, $checksumStatus);
// get the zip adapter
$zip = JArchive::getAdapter('zip');
// set the directory name
@ -469,11 +544,6 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
// check the extension
switch(strtolower(pathinfo($file, PATHINFO_EXTENSION)))
{
case 'xls':
case 'ods':
case 'csv':
return true;
break;
case 'zip':
if ($this->dataType === 'smart_package')
{
@ -519,32 +589,11 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
* @return boolean false on failure
*
**/
protected function setData($package, $target_headers)
protected function setData($package)
{
$jinput = JFactory::getApplication()->input;
// set the data based on the type of import being done
if ('continue-basic' === $this->getType && ComponentbuilderHelper::checkArray($target_headers))
{
foreach($target_headers as $header)
{
$data['target_headers'][$header] = $jinput->getString($header, null);
}
// make sure the file is loaded
JLoader::import('PHPExcel', JPATH_COMPONENT_ADMINISTRATOR . '/helpers');
// set the data
if(isset($package['dir']))
{
$inputFileType = PHPExcel_IOFactory::identify($package['dir']);
$excelReader = PHPExcel_IOFactory::createReader($inputFileType);
$excelReader->setReadDataOnly(true);
$excelObj = $excelReader->load($package['dir']);
$data['array'] = $excelObj->getActiveSheet()->toArray(null, true,true,true);
$excelObj->disconnectWorksheets();
unset($excelObj);
return $this->saveBasic($data);
}
}
elseif ('continue-ext' === $this->getType)
if ('continue-ext' === $this->getType)
{
// set the data
if(isset($package['dir']))
@ -685,14 +734,13 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
**/
protected function saveSmartItems($table)
{
$success = true;
if (isset($this->data[$table]) && ComponentbuilderHelper::checkArray($this->data[$table]))
{
// get global action permissions
$canDo = ComponentbuilderHelper::getActions($table);
$canEdit = $canDo->get('core.edit');
$canState = $canDo->get('core.edit.state');
$canCreate = $canDo->get('core.create');
$canDo = ComponentbuilderHelper::getActions($table);
$canEdit = $canDo->get('core.edit');
$canState = $canDo->get('core.edit.state');
$canCreate = $canDo->get('core.create');
// set id keeper
if (!isset($this->newID[$table]))
{
@ -770,7 +818,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
}
}
}
return $success;
return true;
}
/**
@ -799,6 +847,11 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
$this->app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_BCUSTOM_FILESB_NOT_MOVE_TO_CORRECT_LOCATION'), 'error');
$success = false;
}
// display more import info
elseif ($this->moreInfo)
{
$this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_SOME_BCUSTOM_FILESB_WERE_MOVED_TO_BSB', $customPath), 'success');
}
}
// check if we have images
$imageDir = str_replace('//', '/', $this->dir . '/images');
@ -810,6 +863,11 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
$this->app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_BIMAGESB_NOT_MOVE_TO_CORRECT_LOCATION'), 'error');
$success = false;
}
// display more import info
elseif ($this->moreInfo)
{
$this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_SOME_BIMAGESB_WERE_MOVED_TO_BSB', $imagesPath), 'success');
}
}
// now move the dynamic files if found
$dynamicDir = str_replace('//', '/', $this->dir . '/dynamic');
@ -826,9 +884,14 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
$fullPath = str_replace('//', '/', $dynamicDir . '/' . $folder);
if (!JFolder::exists($fullPath) || !JFolder::copy($fullPath, $destination,'',true))
{
$this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_FOLDER_BSB_WAS_NOT_MOVE_TO_S', $folder, $destination), 'error');
$this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_FOLDER_BSB_WAS_NOT_MOVE_TO_BSB', $folder, $destination), 'error');
$success = false;
}
// display more import info
elseif ($this->moreInfo)
{
$this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_FOLDER_BSB_WAS_MOVED_TO_BSB', $folder, $destination), 'success');
}
}
}
// get a list of files
@ -842,9 +905,14 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
$fullPath = str_replace('//', '/', $dynamicDir . '/' . $file);
if (!JFile::exists($fullPath) || !JFile::copy($fullPath, $destination))
{
$this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_FILE_BSB_WAS_NOT_MOVE_TO_S', $file, $destination), 'error');
$this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_FILE_BSB_WAS_NOT_MOVE_TO_BSB', $file, $destination), 'error');
$success = false;
}
// display more import info
elseif ($this->moreInfo)
{
$this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_FILE_BSB_WAS_MOVED_TO_BSB', $file, $destination), 'success');
}
}
}
}
@ -902,7 +970,13 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
// write the decrypted data back to file
if (!ComponentbuilderHelper::writeFile($file, rtrim($unlocker->decryptString($data), "\0")))
{
// we should add error handler here in case file could not be unlocked
// in case file could not be unlocked
$this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_FILE_BSB_COULD_NOT_BE_UNLOCKED', $file), 'error');
}
// display more import info
elseif ($this->moreInfo)
{
$this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_FILE_BSB_WAS_SUCCESSFULLY_UNLOCKED', $file), 'success');
}
}
@ -1359,21 +1433,21 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
}
// repeatable fields to update
$updaterR = array(
// repeatablefield => checker
'join_view_table' => 'view_table',
'join_db_table' => 'db_table',
'order' => 'table_key',
'where' => 'table_key',
'global' => 'name',
'filter' => 'filter_type'
);
// repeatablefield => checker
'join_view_table' => 'view_table',
'join_db_table' => 'db_table',
'order' => 'table_key',
'where' => 'table_key',
'global' => 'name',
'filter' => 'filter_type'
);
// update the repeatable fields
$item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
// subform fields to target
$updaterT = array(
// subformfield => field => type_value
'join_view_table' => array('view_table' => 'admin_view')
);
// subformfield => field => type_value
'join_view_table' => array('view_table' => 'admin_view')
);
// update the subform ids
$this->updateSubformsIDs($item, 'dynamic_get', $updaterT);
break;
@ -1396,10 +1470,10 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
$item = $this->setNewID($item, 'snippet', 'snippet', $type);
// repeatable fields to update
$updaterR = array(
// repeatablefield => checker
'ajax_input' => 'value_name',
'custom_button' => 'name'
);
// repeatablefield => checker
'ajax_input' => 'value_name',
'custom_button' => 'name'
);
// update the repeatable fields
$item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
break;
@ -1441,14 +1515,14 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
unset($item->addconditions);
// repeatable fields to update
$updaterR = array(
// repeatablefield => checker
'ajax_input' => 'value_name',
'custom_button' => 'name',
'addtables' => 'table',
'addlinked_views' => 'adminview',
'addtabs' => 'name',
'addpermissions' => 'action'
);
// repeatablefield => checker
'ajax_input' => 'value_name',
'custom_button' => 'name',
'addtables' => 'table',
'addlinked_views' => 'adminview',
'addtabs' => 'name',
'addpermissions' => 'action'
);
// update the repeatable fields
$item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
break;
@ -1572,9 +1646,9 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
}
// repeatable fields to update
$updaterR = array(
// repeatablefield => checker
'addcontributors' => 'name'
);
// repeatablefield => checker
'addcontributors' => 'name'
);
// update the repeatable fields
$item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
break;
@ -1587,16 +1661,16 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
}
// repeatable fields to update
$updaterR = array(
// repeatablefield => checker
'addadmin_views' => 'adminview'
);
// repeatablefield => checker
'addadmin_views' => 'adminview'
);
// update the repeatable fields
$item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
// subform fields to target
$updaterT = array(
// subformfield => array( field => type_value )
'addadmin_views' => array('adminview' => 'admin_view')
);
// subformfield => array( field => type_value )
'addadmin_views' => array('adminview' => 'admin_view')
);
// update the subform ids
$this->updateSubformsIDs($item, 'component_admin_views', $updaterT);
break;
@ -1609,16 +1683,16 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
}
// repeatable fields to update
$updaterR = array(
// repeatablefield => checker
'addsite_views' => 'siteview'
);
// repeatablefield => checker
'addsite_views' => 'siteview'
);
// update the repeatable fields
$item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
// subform fields to target
$updaterT = array(
// subformfield => array( field => type_value )
'addsite_views' => array('siteview' => 'site_view')
);
// subformfield => array( field => type_value )
'addsite_views' => array('siteview' => 'site_view')
);
// update the subform ids
$this->updateSubformsIDs($item, 'component_site_views', $updaterT);
break;
@ -1631,16 +1705,16 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
}
// repeatable fields to update
$updaterR = array(
// repeatablefield => checker
'addcustom_admin_views' => 'customadminview'
);
// repeatablefield => checker
'addcustom_admin_views' => 'customadminview'
);
// update the repeatable fields
$item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
// subform fields to target
$updaterT = array(
// subformfield => array( field => type_value )
'addcustom_admin_views' => array('customadminview' => 'custom_admin_view', 'adminviews' => 'admin_view', 'before' => 'admin_view')
);
// subformfield => array( field => type_value )
'addcustom_admin_views' => array('customadminview' => 'custom_admin_view', 'adminviews' => 'admin_view', 'before' => 'admin_view')
);
// update the subform ids
$this->updateSubformsIDs($item, 'component_custom_admin_views', $updaterT);
break;
@ -1653,9 +1727,9 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
}
// repeatable fields to update
$updaterR = array(
// repeatablefield => checker
'version_update' => 'version'
);
// repeatablefield => checker
'version_update' => 'version'
);
// update the repeatable fields
$item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
break;
@ -1675,9 +1749,9 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
$item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
// subform fields to target
$updaterT = array(
// subformfield => array( field => type_value )
'sql_tweak' => array('adminview' => 'admin_view')
);
// subformfield => array( field => type_value )
'sql_tweak' => array('adminview' => 'admin_view')
);
// update the subform ids
$this->updateSubformsIDs($item, 'component_mysql_tweaks', $updaterT);
break;
@ -1690,16 +1764,16 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
}
// repeatable fields to update
$updaterR = array(
// repeatablefield => checker
'addcustommenus' => 'name'
);
// repeatablefield => checker
'addcustommenus' => 'name'
);
// update the repeatable fields
$item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
// subform fields to target
$updaterT = array(
// subformfield => array( field => type_value )
'addcustommenus' => array('before' => 'admin_view')
);
// subformfield => array( field => type_value )
'addcustommenus' => array('before' => 'admin_view')
);
// update the subform ids
$this->updateSubformsIDs($item, 'component_custom_admin_menus', $updaterT);
break;
@ -1712,16 +1786,16 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
}
// repeatable fields to update
$updaterR = array(
// repeatablefield => checker
'addconfig' => 'field'
);
// repeatablefield => checker
'addconfig' => 'field'
);
// update the repeatable fields
$item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
// subform fields to target
$updaterT = array(
// subformfield => array( field => type_value )
'addconfig' => array('field' => 'field')
);
// subformfield => array( field => type_value )
'addconfig' => array('field' => 'field')
);
// update the subform ids
$this->updateSubformsIDs($item, 'component_config', $updaterT);
break;
@ -1734,9 +1808,9 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
}
// repeatable fields to update
$updaterR = array(
// repeatablefield => checker
'dashboard_tab' => 'name'
);
// repeatablefield => checker
'dashboard_tab' => 'name'
);
// update the repeatable fields
$item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
break;
@ -1749,10 +1823,10 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
}
// repeatable fields to update
$updaterR = array(
// repeatablefield => checker
'addfiles' => 'file',
'addfolders' => 'folder'
);
// repeatablefield => checker
'addfiles' => 'file',
'addfolders' => 'folder'
);
// update the repeatable fields
$item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
break;
@ -1978,6 +2052,11 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
}
// add the data to the mover
$this->divergedDataMover[$table][$uniqueKey]->{$type} = $values;
// display more import info
if ($this->moreInfo)
{
$this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_WE_SUCCESSFULLY_MOVED_BSB', ComponentbuilderHelper::safeString($type, 'Ww') . ' to ('.ComponentbuilderHelper::safeString($table, 'w').')'), 'success');
}
// success
return true;
}
@ -2442,223 +2521,6 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
return false;
}
/**
* Save the data from the file to the database
*
* @param array $data The values to save
*
* @return boolean false on failure
*
**/
protected function saveBasic($data)
{
// import the data if there is any
if(ComponentbuilderHelper::checkArray($data['array']))
{
// get user object
$this->user = JFactory::getUser();
// remove header if it has headers
$id_key = $data['target_headers']['id'];
$published_key = $data['target_headers']['published'];
$ordering_key = $data['target_headers']['ordering'];
// get the first array set
$firstSet = reset($data['array']);
// check if first array is a header array and remove if true
if($firstSet[$id_key] == 'id' || $firstSet[$published_key] == 'published' || $firstSet[$ordering_key] == 'ordering')
{
array_shift($data['array']);
}
// make sure there is still values in array and that it was not only headers
if(ComponentbuilderHelper::checkArray($data['array']) && $this->user->authorise($this->dataType.'.import', 'com_componentbuilder') && $this->user->authorise('core.import', 'com_componentbuilder'))
{
// set target.
$target = array_flip($data['target_headers']);
// set some defaults
$todayDate = JFactory::getDate()->toSql();
// get global action permissions
$canDo = ComponentbuilderHelper::getActions($this->dataType);
$canEdit = $canDo->get('core.edit');
$canState = $canDo->get('core.edit.state');
$canCreate = $canDo->get('core.create');
$hasAlias = $this->getAliasesUsed($this->dataType);
// prosses the data
foreach($data['array'] as $row)
{
$found = false;
if (isset($row[$id_key]) && is_numeric($row[$id_key]) && $row[$id_key] > 0)
{
// raw items import & update!
$query = $this->_db->getQuery(true);
$query
->select('version')
->from($this->_db->quoteName('#__componentbuilder_'.$this->dataType))
->where($this->_db->quoteName('id') . ' = '. $this->_db->quote($row[$id_key]));
// Reset the query using our newly populated query object.
$this->_db->setQuery($query);
$this->_db->execute();
$found = $this->_db->getNumRows();
}
if($found && $canEdit)
{
// update item
$id = $row[$id_key];
$version = $this->_db->loadResult();
// reset all buckets
$query = $this->_db->getQuery(true);
$fields = array();
// Fields to update.
foreach($row as $key => $cell)
{
// ignore column
if ('IGNORE' == $target[$key])
{
continue;
}
// update modified
if ('modified_by' == $target[$key])
{
continue;
}
// update modified
if ('modified' == $target[$key])
{
continue;
}
// update version
if ('version' == $target[$key])
{
$cell = (int) $version + 1;
}
// verify publish authority
if ('published' == $target[$key] && !$canState)
{
continue;
}
// set to update array
if(in_array($key, $data['target_headers']) && is_numeric($cell))
{
$fields[] = $this->_db->quoteName($target[$key]) . ' = ' . $cell;
}
elseif(in_array($key, $data['target_headers']) && is_string($cell))
{
$fields[] = $this->_db->quoteName($target[$key]) . ' = ' . $this->_db->quote($cell);
}
elseif(in_array($key, $data['target_headers']) && is_null($cell))
{
// if import data is null then set empty
$fields[] = $this->_db->quoteName($target[$key]) . " = ''";
}
}
// load the defaults
$fields[] = $this->_db->quoteName('modified_by') . ' = ' . $this->_db->quote($this->user->id);
$fields[] = $this->_db->quoteName('modified') . ' = ' . $this->_db->quote($todayDate);
// Conditions for which records should be updated.
$conditions = array(
$this->_db->quoteName('id') . ' = ' . $id
);
$query->update($this->_db->quoteName('#__componentbuilder_' . $this->dataType))->set($fields)->where($conditions);
$this->_db->setQuery($query);
$this->_db->execute();
}
elseif ($canCreate)
{
// insert item
$query = $this->_db->getQuery(true);
// reset all buckets
$columns = array();
$values = array();
$version = false;
// Insert columns. Insert values.
foreach($row as $key => $cell)
{
// ignore column
if ('IGNORE' == $target[$key])
{
continue;
}
// remove id
if ('id' == $target[$key])
{
continue;
}
// update created
if ('created_by' == $target[$key])
{
continue;
}
// update created
if ('created' == $target[$key])
{
continue;
}
// Make sure the alias is incremented
if ('alias' == $target[$key])
{
$cell = $this->getAlias($cell,$this->dataType);
}
// update version
if ('version' == $target[$key])
{
$cell = 1;
$version = true;
}
// set to insert array
if(in_array($key, $data['target_headers']) && is_numeric($cell))
{
$columns[] = $target[$key];
$values[] = $cell;
}
elseif(in_array($key, $data['target_headers']) && is_string($cell))
{
$columns[] = $target[$key];
$values[] = $this->_db->quote($cell);
}
elseif(in_array($key, $data['target_headers']) && is_null($cell))
{
// if import data is null then set empty
$columns[] = $target[$key];
$values[] = "''";
}
}
// load the defaults
$columns[] = 'created_by';
$values[] = $this->_db->quote($this->user->id);
$columns[] = 'created';
$values[] = $this->_db->quote($todayDate);
if (!$version)
{
$columns[] = 'version';
$values[] = 1;
}
// Prepare the insert query.
$query
->insert($this->_db->quoteName('#__componentbuilder_'.$this->dataType))
->columns($this->_db->quoteName($columns))
->values(implode(',', $values));
// Set the query using our newly populated query object and execute it.
$this->_db->setQuery($query);
$done = $this->_db->execute();
if ($done)
{
$aId = $this->_db->insertid();
// make sure the access of asset is set
ComponentbuilderHelper::setAsset($aId,$this->dataType);
}
}
else
{
return false;
}
}
return true;
}
}
return false;
}
/**
* Update constant path with real full path value
*

View File

@ -1233,9 +1233,9 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -826,9 +826,9 @@ class ComponentbuilderModelLanguage extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -885,9 +885,9 @@ class ComponentbuilderModelLanguage_translation extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -885,7 +885,7 @@ class ComponentbuilderModelLayout extends JModelAdmin
// Automatic handling of alias for empty fields
if (in_array($input->get('task'), array('apply', 'save', 'save2new')) && (int) $input->get('id') == 0)
{
if ($data['alias'] == null)
if ($data['alias'] == null || empty($data['alias']))
{
if (JFactory::getConfig()->get('unicodeslugs') == 1)
{
@ -903,8 +903,7 @@ class ComponentbuilderModelLayout extends JModelAdmin
$msg = JText::_('COM_COMPONENTBUILDER_LAYOUT_SAVE_WARNING');
}
list($name, $alias) = $this->_generateNewTitle($data['alias'], $data['name']);
$data['alias'] = $alias;
$data['alias'] = $this->_generateNewTitle($data['alias']);
if (isset($msg))
{
@ -959,26 +958,49 @@ class ComponentbuilderModelLayout extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title/s & alias.
*
* @param string $alias The alias.
* @param string $title The title.
* @param string $alias The alias.
* @param string/array $title The title.
*
* @return array Contains the modified title and alias.
* @return array/string Contains the modified title/s and/or alias.
*
*/
protected function _generateNewTitle($alias, $title)
protected function _generateNewTitle($alias, $title = null)
{
// Alter the title & alias
// Alter the title/s & alias
$table = $this->getTable();
while ($table->load(array('alias' => $alias)))
{
$title = JString::increment($title);
// Check if this is an array of titles
if (ComponentbuilderHelper::checkArray($title))
{
foreach($title as $nr => &$_title)
{
$_title = JString::increment($_title);
}
}
// Make sure we have a title
elseif ($title)
{
$title = JString::increment($title);
}
$alias = JString::increment($alias, 'dash');
}
return array($title, $alias);
// Check if this is an array of titles
if (ComponentbuilderHelper::checkArray($title))
{
$title[] = $alias;
return $title;
}
// Make sure we have a title
elseif ($title)
{
return array($title, $alias);
}
// We only had an alias
return $alias;
}
}

View File

@ -1026,9 +1026,9 @@ class ComponentbuilderModelLibrary extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -849,9 +849,9 @@ class ComponentbuilderModelLibrary_config extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -933,9 +933,9 @@ class ComponentbuilderModelLibrary_files_folders_urls extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -1064,9 +1064,9 @@ class ComponentbuilderModelServer extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -1163,9 +1163,9 @@ class ComponentbuilderModelSite_view extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -856,9 +856,9 @@ class ComponentbuilderModelSnippet extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -826,9 +826,9 @@ class ComponentbuilderModelSnippet_type extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -885,7 +885,7 @@ class ComponentbuilderModelTemplate extends JModelAdmin
// Automatic handling of alias for empty fields
if (in_array($input->get('task'), array('apply', 'save', 'save2new')) && (int) $input->get('id') == 0)
{
if ($data['alias'] == null)
if ($data['alias'] == null || empty($data['alias']))
{
if (JFactory::getConfig()->get('unicodeslugs') == 1)
{
@ -903,8 +903,7 @@ class ComponentbuilderModelTemplate extends JModelAdmin
$msg = JText::_('COM_COMPONENTBUILDER_TEMPLATE_SAVE_WARNING');
}
list($name, $alias) = $this->_generateNewTitle($data['alias'], $data['name']);
$data['alias'] = $alias;
$data['alias'] = $this->_generateNewTitle($data['alias']);
if (isset($msg))
{
@ -959,26 +958,49 @@ class ComponentbuilderModelTemplate extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title/s & alias.
*
* @param string $alias The alias.
* @param string $title The title.
* @param string $alias The alias.
* @param string/array $title The title.
*
* @return array Contains the modified title and alias.
* @return array/string Contains the modified title/s and/or alias.
*
*/
protected function _generateNewTitle($alias, $title)
protected function _generateNewTitle($alias, $title = null)
{
// Alter the title & alias
// Alter the title/s & alias
$table = $this->getTable();
while ($table->load(array('alias' => $alias)))
{
$title = JString::increment($title);
// Check if this is an array of titles
if (ComponentbuilderHelper::checkArray($title))
{
foreach($title as $nr => &$_title)
{
$_title = JString::increment($_title);
}
}
// Make sure we have a title
elseif ($title)
{
$title = JString::increment($title);
}
$alias = JString::increment($alias, 'dash');
}
return array($title, $alias);
// Check if this is an array of titles
if (ComponentbuilderHelper::checkArray($title))
{
$title[] = $alias;
return $title;
}
// Make sure we have a title
elseif ($title)
{
return array($title, $alias);
}
// We only had an alias
return $alias;
}
}

View File

@ -0,0 +1,887 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage validation_rule.php
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Registry\Registry;
// import Joomla modelform library
jimport('joomla.application.component.modeladmin');
/**
* Componentbuilder Validation_rule Model
*/
class ComponentbuilderModelValidation_rule extends JModelAdmin
{
/**
* @var string The prefix to use with controller messages.
* @since 1.6
*/
protected $text_prefix = 'COM_COMPONENTBUILDER';
/**
* The type alias for this content type.
*
* @var string
* @since 3.2
*/
public $typeAlias = 'com_componentbuilder.validation_rule';
/**
* Returns a Table object, always creating it
*
* @param type $type The table type to instantiate
* @param string $prefix A prefix for the table class name. Optional.
* @param array $config Configuration array for model. Optional.
*
* @return JTable A database object
*
* @since 1.6
*/
public function getTable($type = 'validation_rule', $prefix = 'ComponentbuilderTable', $config = array())
{
return JTable::getInstance($type, $prefix, $config);
}
public function getVDM()
{
return $this->vastDevMod;
}
/**
* Method to get a single record.
*
* @param integer $pk The id of the primary key.
*
* @return mixed Object on success, false on failure.
*
* @since 1.6
*/
public function getItem($pk = null)
{
if ($item = parent::getItem($pk))
{
if (!empty($item->params) && !is_array($item->params))
{
// Convert the params field to an array.
$registry = new Registry;
$registry->loadString($item->params);
$item->params = $registry->toArray();
}
if (!empty($item->metadata))
{
// Convert the metadata field to an array.
$registry = new Registry;
$registry->loadString($item->metadata);
$item->metadata = $registry->toArray();
}
if (!empty($item->php))
{
// base64 Decode php.
$item->php = base64_decode($item->php);
}
if (empty($item->id))
{
$id = 0;
}
else
{
$id = $item->id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('validation_rule__'.$id))
{
$this->vastDevMod = $vdm;
}
else
{
$this->vastDevMod = ComponentbuilderHelper::randomkey(50);
ComponentbuilderHelper::set($this->vastDevMod, 'validation_rule__'.$id);
ComponentbuilderHelper::set('validation_rule__'.$id, $this->vastDevMod);
}
if (!empty($item->id))
{
$item->tags = new JHelperTags;
$item->tags->getTagIds($item->id, 'com_componentbuilder.validation_rule');
}
}
return $item;
}
/**
* Method to get the record form.
*
* @param array $data Data for the form.
* @param boolean $loadData True if the form is to load its own data (default case), false if not.
*
* @return mixed A JForm object on success, false on failure
*
* @since 1.6
*/
public function getForm($data = array(), $loadData = true)
{
// Get the form.
$form = $this->loadForm('com_componentbuilder.validation_rule', 'validation_rule', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form))
{
return false;
}
$jinput = JFactory::getApplication()->input;
// The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
if ($jinput->get('a_id'))
{
$id = $jinput->get('a_id', 0, 'INT');
}
// The back end uses id so we use that the rest of the time and set it to 0 by default.
else
{
$id = $jinput->get('id', 0, 'INT');
}
$user = JFactory::getUser();
// Check for existing item.
// Modify the form based on Edit State access controls.
if ($id != 0 && (!$user->authorise('validation_rule.edit.state', 'com_componentbuilder.validation_rule.' . (int) $id))
|| ($id == 0 && !$user->authorise('validation_rule.edit.state', 'com_componentbuilder')))
{
// Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true');
// Disable fields while saving.
$form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset');
}
// If this is a new item insure the greated by is set.
if (0 == $id)
{
// Set the created_by to this user
$form->setValue('created_by', null, $user->id);
}
// Modify the form based on Edit Creaded By access controls.
if (!$user->authorise('core.edit.created_by', 'com_componentbuilder'))
{
// Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
// Disable fields for display.
$form->setFieldAttribute('created_by', 'readonly', 'true');
// Disable fields while saving.
$form->setFieldAttribute('created_by', 'filter', 'unset');
}
// Modify the form based on Edit Creaded Date access controls.
if (!$user->authorise('core.edit.created', 'com_componentbuilder'))
{
// Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true');
// Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset');
}
// Only load these values if no id is found
if (0 == $id)
{
// Set redirected field name
$redirectedField = $jinput->get('ref', null, 'STRING');
// Set redirected field value
$redirectedValue = $jinput->get('refid', 0, 'INT');
if (0 != $redirectedValue && $redirectedField)
{
// Now set the local-redirected field default value
$form->setValue($redirectedField, null, $redirectedValue);
}
}
return $form;
}
/**
* Method to get the script that have to be included on the form
*
* @return string script files
*/
public function getScript()
{
return 'administrator/components/com_componentbuilder/models/forms/validation_rule.js';
}
/**
* Method to test whether a record can be deleted.
*
* @param object $record A record object.
*
* @return boolean True if allowed to delete the record. Defaults to the permission set in the component.
*
* @since 1.6
*/
protected function canDelete($record)
{
if (!empty($record->id))
{
if ($record->published != -2)
{
return;
}
$user = JFactory::getUser();
// The record has been set. Check the record permissions.
return $user->authorise('validation_rule.delete', 'com_componentbuilder.validation_rule.' . (int) $record->id);
}
return false;
}
/**
* Method to test whether a record can have its state edited.
*
* @param object $record A record object.
*
* @return boolean True if allowed to change the state of the record. Defaults to the permission set in the component.
*
* @since 1.6
*/
protected function canEditState($record)
{
$user = JFactory::getUser();
$recordId = (!empty($record->id)) ? $record->id : 0;
if ($recordId)
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('validation_rule.edit.state', 'com_componentbuilder.validation_rule.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
return false;
}
}
// In the absense of better information, revert to the component permissions.
return $user->authorise('validation_rule.edit.state', 'com_componentbuilder');
}
/**
* Method override to check if you can edit an existing record.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
* @since 2.5
*/
protected function allowEdit($data = array(), $key = 'id')
{
// Check specific edit permission then general edit permission.
$user = JFactory::getUser();
return $user->authorise('validation_rule.edit', 'com_componentbuilder.validation_rule.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('validation_rule.edit', 'com_componentbuilder');
}
/**
* Prepare and sanitise the table data prior to saving.
*
* @param JTable $table A JTable object.
*
* @return void
*
* @since 1.6
*/
protected function prepareTable($table)
{
$date = JFactory::getDate();
$user = JFactory::getUser();
if (isset($table->name))
{
$table->name = htmlspecialchars_decode($table->name, ENT_QUOTES);
}
if (isset($table->alias) && empty($table->alias))
{
$table->generateAlias();
}
if (empty($table->id))
{
$table->created = $date->toSql();
// set the user
if ($table->created_by == 0 || empty($table->created_by))
{
$table->created_by = $user->id;
}
// Set ordering to the last item if not set
if (empty($table->ordering))
{
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select('MAX(ordering)')
->from($db->quoteName('#__componentbuilder_validation_rule'));
$db->setQuery($query);
$max = $db->loadResult();
$table->ordering = $max + 1;
}
}
else
{
$table->modified = $date->toSql();
$table->modified_by = $user->id;
}
if (!empty($table->id))
{
// Increment the items version number.
$table->version++;
}
}
/**
* Method to get the data that should be injected in the form.
*
* @return mixed The data for the form.
*
* @since 1.6
*/
protected function loadFormData()
{
// Check the session for previously entered form data.
$data = JFactory::getApplication()->getUserState('com_componentbuilder.edit.validation_rule.data', array());
if (empty($data))
{
$data = $this->getItem();
}
return $data;
}
/**
* Method to get the unique fields of this table.
*
* @return mixed An array of field names, boolean false if none is set.
*
* @since 3.0
*/
protected function getUniqeFields()
{
return false;
}
/**
* Method to delete one or more records.
*
* @param array &$pks An array of record primary keys.
*
* @return boolean True if successful, false if an error occurs.
*
* @since 12.2
*/
public function delete(&$pks)
{
if (!parent::delete($pks))
{
return false;
}
return true;
}
/**
* Method to change the published state of one or more records.
*
* @param array &$pks A list of the primary keys to change.
* @param integer $value The value of the published state.
*
* @return boolean True on success.
*
* @since 12.2
*/
public function publish(&$pks, $value = 1)
{
if (!parent::publish($pks, $value))
{
return false;
}
return true;
}
/**
* Method to perform batch operations on an item or a set of items.
*
* @param array $commands An array of commands to perform.
* @param array $pks An array of item ids.
* @param array $contexts An array of item contexts.
*
* @return boolean Returns true on success, false on failure.
*
* @since 12.2
*/
public function batch($commands, $pks, $contexts)
{
// Sanitize ids.
$pks = array_unique($pks);
JArrayHelper::toInteger($pks);
// Remove any values of zero.
if (array_search(0, $pks, true))
{
unset($pks[array_search(0, $pks, true)]);
}
if (empty($pks))
{
$this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED'));
return false;
}
$done = false;
// Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
$this->contentType = new JUcmType;
$this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ComponentbuilderHelper::getActions('validation_rule');
$this->batchSet = true;
if (!$this->canDo->get('core.batch'))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION'));
return false;
}
if ($this->type == false)
{
$type = new JUcmType;
$this->type = $type->getTypeByAlias($this->typeAlias);
}
$this->tagsObserver = $this->table->getObserverOfClass('JTableObserverTags');
if (!empty($commands['move_copy']))
{
$cmd = JArrayHelper::getValue($commands, 'move_copy', 'c');
if ($cmd == 'c')
{
$result = $this->batchCopy($commands, $pks, $contexts);
if (is_array($result))
{
foreach ($result as $old => $new)
{
$contexts[$new] = $contexts[$old];
}
$pks = array_values($result);
}
else
{
return false;
}
}
elseif ($cmd == 'm' && !$this->batchMove($commands, $pks, $contexts))
{
return false;
}
$done = true;
}
if (!$done)
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION'));
return false;
}
// Clear the cache
$this->cleanCache();
return true;
}
/**
* Batch copy items to a new category or current.
*
* @param integer $values The new values.
* @param array $pks An array of row IDs.
* @param array $contexts An array of item contexts.
*
* @return mixed An array of new IDs on success, boolean false on failure.
*
* @since 12.2
*/
protected function batchCopy($values, $pks, $contexts)
{
if (empty($this->batchSet))
{
// Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
$this->canDo = ComponentbuilderHelper::getActions('validation_rule');
}
if (!$this->canDo->get('validation_rule.create') && !$this->canDo->get('validation_rule.batch'))
{
return false;
}
// get list of uniqe fields
$uniqeFields = $this->getUniqeFields();
// remove move_copy from array
unset($values['move_copy']);
// make sure published is set
if (!isset($values['published']))
{
$values['published'] = 0;
}
elseif (isset($values['published']) && !$this->canDo->get('validation_rule.edit.state'))
{
$values['published'] = 0;
}
$newIds = array();
// Parent exists so let's proceed
while (!empty($pks))
{
// Pop the first ID off the stack
$pk = array_shift($pks);
$this->table->reset();
// only allow copy if user may edit this item.
if (!$this->user->authorise('validation_rule.edit', $contexts[$pk]))
{
// Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
// Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// Fatal error
$this->setError($error);
return false;
}
else
{
// Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
}
// Only for strings
if (ComponentbuilderHelper::checkString($this->table->name) && !is_numeric($this->table->name))
{
$this->table->name = $this->generateUniqe('name',$this->table->name);
}
// insert all set values
if (ComponentbuilderHelper::checkArray($values))
{
foreach ($values as $key => $value)
{
if (strlen($value) > 0 && isset($this->table->$key))
{
$this->table->$key = $value;
}
}
}
// update all uniqe fields
if (ComponentbuilderHelper::checkArray($uniqeFields))
{
foreach ($uniqeFields as $uniqeField)
{
$this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField);
}
}
// Reset the ID because we are making a copy
$this->table->id = 0;
// TODO: Deal with ordering?
// $this->table->ordering = 1;
// Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
return false;
}
if (!empty($this->type))
{
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
return false;
}
// Get the new item ID
$newId = $this->table->get('id');
// Add the new ID to the array
$newIds[$pk] = $newId;
}
// Clean the cache
$this->cleanCache();
return $newIds;
}
/**
* Batch move items to a new category
*
* @param integer $value The new category ID.
* @param array $pks An array of row IDs.
* @param array $contexts An array of item contexts.
*
* @return boolean True if successful, false otherwise and internal error is set.
*
* @since 12.2
*/
protected function batchMove($values, $pks, $contexts)
{
if (empty($this->batchSet))
{
// Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
$this->canDo = ComponentbuilderHelper::getActions('validation_rule');
}
if (!$this->canDo->get('validation_rule.edit') && !$this->canDo->get('validation_rule.batch'))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
return false;
}
// make sure published only updates if user has the permission.
if (isset($values['published']) && !$this->canDo->get('validation_rule.edit.state'))
{
unset($values['published']);
}
// remove move_copy from array
unset($values['move_copy']);
// Parent exists so we proceed
foreach ($pks as $pk)
{
if (!$this->user->authorise('validation_rule.edit', $contexts[$pk]))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
return false;
}
// Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// Fatal error
$this->setError($error);
return false;
}
else
{
// Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
}
// insert all set values.
if (ComponentbuilderHelper::checkArray($values))
{
foreach ($values as $key => $value)
{
// Do special action for access.
if ('access' === $key && strlen($value) > 0)
{
$this->table->$key = $value;
}
elseif (strlen($value) > 0 && isset($this->table->$key))
{
$this->table->$key = $value;
}
}
}
// Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
return false;
}
if (!empty($this->type))
{
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
return false;
}
}
// Clean the cache
$this->cleanCache();
return true;
}
/**
* Method to save the form data.
*
* @param array $data The form data.
*
* @return boolean True on success.
*
* @since 1.6
*/
public function save($data)
{
$input = JFactory::getApplication()->input;
$filter = JFilterInput::getInstance();
// set the metadata to the Item Data
if (isset($data['metadata']) && isset($data['metadata']['author']))
{
$data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM');
$metadata = new JRegistry;
$metadata->loadArray($data['metadata']);
$data['metadata'] = (string) $metadata;
}
// Set the php string to base64 string.
if (isset($data['php']))
{
$data['php'] = base64_encode($data['php']);
}
// Set the Params Items to data
if (isset($data['params']) && is_array($data['params']))
{
$params = new JRegistry;
$params->loadArray($data['params']);
$data['params'] = (string) $params;
}
// Alter the uniqe field for save as copy
if ($input->get('task') === 'save2copy')
{
// Automatic handling of other uniqe fields
$uniqeFields = $this->getUniqeFields();
if (ComponentbuilderHelper::checkArray($uniqeFields))
{
foreach ($uniqeFields as $uniqeField)
{
$data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]);
}
}
}
if (parent::save($data))
{
return true;
}
return false;
}
/**
* Method to generate a uniqe value.
*
* @param string $field name.
* @param string $value data.
*
* @return string New value.
*
* @since 3.0
*/
protected function generateUniqe($field,$value)
{
// set field value uniqe
$table = $this->getTable();
while ($table->load(array($field => $value)))
{
$value = JString::increment($value);
}
return $value;
}
/**
* Method to change the title
*
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*
*/
protected function _generateNewTitle($title)
{
// Alter the title
$table = $this->getTable();
while ($table->load(array('title' => $title)))
{
$title = JString::increment($title);
}
return $title;
}
}

View File

@ -0,0 +1,377 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage validation_rules.php
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import the Joomla modellist library
jimport('joomla.application.component.modellist');
/**
* Validation_rules Model
*/
class ComponentbuilderModelValidation_rules extends JModelList
{
public function __construct($config = array())
{
if (empty($config['filter_fields']))
{
$config['filter_fields'] = array(
'a.id','id',
'a.published','published',
'a.ordering','ordering',
'a.created_by','created_by',
'a.modified_by','modified_by',
'a.name','name',
'a.short_description','short_description'
);
}
parent::__construct($config);
}
/**
* Method to auto-populate the model state.
*
* @return void
*/
protected function populateState($ordering = null, $direction = null)
{
$app = JFactory::getApplication();
// Adjust the context to support modal layouts.
if ($layout = $app->input->get('layout'))
{
$this->context .= '.' . $layout;
}
$name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name');
$this->setState('filter.name', $name);
$short_description = $this->getUserStateFromRequest($this->context . '.filter.short_description', 'filter_short_description');
$this->setState('filter.short_description', $short_description);
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
$this->setState('filter.sorting', $sorting);
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
$this->setState('filter.access', $access);
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
$this->setState('filter.search', $search);
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
$this->setState('filter.published', $published);
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
$this->setState('filter.created_by', $created_by);
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
$this->setState('filter.created', $created);
// List state information.
parent::populateState($ordering, $direction);
}
/**
* Method to get an array of data items.
*
* @return mixed An array of data items on success, false on failure.
*/
public function getItems()
{
// check in items
$this->checkInNow();
// load parent items
$items = parent::getItems();
// set values to display correctly.
if (ComponentbuilderHelper::checkArray($items))
{
// get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
$access = ($user->authorise('validation_rule.access', 'com_componentbuilder.validation_rule.' . (int) $item->id) && $user->authorise('validation_rule.access', 'com_componentbuilder'));
if (!$access)
{
unset($items[$nr]);
continue;
}
}
}
// return items
return $items;
}
/**
* Method to build an SQL query to load the list data.
*
* @return string An SQL query
*/
protected function getListQuery()
{
// Get the user object.
$user = JFactory::getUser();
// Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// Select some fields
$query->select('a.*');
// From the componentbuilder_item table
$query->from($db->quoteName('#__componentbuilder_validation_rule', 'a'));
// Filter by published state
$published = $this->getState('filter.published');
if (is_numeric($published))
{
$query->where('a.published = ' . (int) $published);
}
elseif ($published === '')
{
$query->where('(a.published = 0 OR a.published = 1)');
}
// Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// Implement View Level Access
if (!$user->authorise('core.options', 'com_componentbuilder'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// Filter by search.
$search = $this->getState('filter.search');
if (!empty($search))
{
if (stripos($search, 'id:') === 0)
{
$query->where('a.id = ' . (int) substr($search, 3));
}
else
{
$search = $db->quote('%' . $db->escape($search) . '%');
$query->where('(a.name LIKE '.$search.' OR a.short_description LIKE '.$search.')');
}
}
// Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
$orderDirn = $this->state->get('list.direction', 'asc');
if ($orderCol != '')
{
$query->order($db->escape($orderCol . ' ' . $orderDirn));
}
return $query;
}
/**
* Method to get list export data.
*
* @return mixed An array of data items on success, false on failure.
*/
public function getExportData($pks)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
{
// Set a value to know this is exporting method.
$_export = true;
// Get the user object.
$user = JFactory::getUser();
// Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// Select some fields
$query->select('a.*');
// From the componentbuilder_validation_rule table
$query->from($db->quoteName('#__componentbuilder_validation_rule', 'a'));
$query->where('a.id IN (' . implode(',',$pks) . ')');
// Implement View Level Access
if (!$user->authorise('core.options', 'com_componentbuilder'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// Order the results by ordering
$query->order('a.ordering ASC');
// Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// set values to display correctly.
if (ComponentbuilderHelper::checkArray($items))
{
// get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
$access = ($user->authorise('validation_rule.access', 'com_componentbuilder.validation_rule.' . (int) $item->id) && $user->authorise('validation_rule.access', 'com_componentbuilder'));
if (!$access)
{
unset($items[$nr]);
continue;
}
// decode php
$item->php = base64_decode($item->php);
// unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);
unset($item->checked_out_time);
}
}
// Add headers to items array.
$headers = $this->getExImPortHeaders();
if (ComponentbuilderHelper::checkObject($headers))
{
array_unshift($items,$headers);
}
return $items;
}
}
return false;
}
/**
* Method to get header.
*
* @return mixed An array of data items on success, false on failure.
*/
public function getExImPortHeaders()
{
// Get a db connection.
$db = JFactory::getDbo();
// get the columns
$columns = $db->getTableColumns("#__componentbuilder_validation_rule");
if (ComponentbuilderHelper::checkArray($columns))
{
// remove the headers you don't import/export.
unset($columns['asset_id']);
unset($columns['checked_out']);
unset($columns['checked_out_time']);
$headers = new stdClass();
foreach ($columns as $column => $type)
{
$headers->{$column} = $column;
}
return $headers;
}
return false;
}
/**
* Method to get a store id based on model configuration state.
*
* @return string A store id.
*
*/
protected function getStoreId($id = '')
{
// Compile the store id.
$id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published');
$id .= ':' . $this->getState('filter.ordering');
$id .= ':' . $this->getState('filter.created_by');
$id .= ':' . $this->getState('filter.modified_by');
$id .= ':' . $this->getState('filter.name');
$id .= ':' . $this->getState('filter.short_description');
return parent::getStoreId($id);
}
/**
* Build an SQL query to checkin all items left checked out longer then a set time.
*
* @return a bool
*
*/
protected function checkInNow()
{
// Get set check in time
$time = JComponentHelper::getParams('com_componentbuilder')->get('check_in');
if ($time)
{
// Get a db connection.
$db = JFactory::getDbo();
// reset query
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_validation_rule'));
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
$query = $db->getQuery(true);
// Fields to update.
$fields = array(
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
$db->quoteName('checked_out') . '=0'
);
// Conditions for which records should be updated.
$conditions = array(
$db->quoteName('checked_out') . '!=0',
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
$query->update($db->quoteName('#__componentbuilder_validation_rule'))->set($fields)->where($conditions);
$db->setQuery($query);
$db->execute();
}
}
return false;
}
}

View File

@ -161,6 +161,8 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_view` (
`addtables` TEXT NOT NULL,
`addtabs` TEXT NOT NULL,
`ajax_input` TEXT NOT NULL,
`alias_builder` VARCHAR(255) NOT NULL DEFAULT '',
`alias_builder_type` CHAR NOT NULL DEFAULT '',
`css_view` TEXT NOT NULL,
`css_views` TEXT NOT NULL,
`custom_button` TEXT NOT NULL,
@ -227,25 +229,26 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_view` (
KEY `idx_state` (`published`),
KEY `idx_name_single` (`name_single`),
KEY `idx_name_list` (`name_list`),
KEY `idx_add_php_after_publish` (`add_php_after_publish`),
KEY `idx_add_php_batchmove` (`add_php_batchmove`),
KEY `idx_add_php_allowedit` (`add_php_allowedit`),
KEY `idx_add_php_save` (`add_php_save`),
KEY `idx_add_php_getlistquery` (`add_php_getlistquery`),
KEY `idx_add_sql` (`add_sql`),
KEY `idx_type` (`type`),
KEY `idx_add_fadein` (`add_fadein`),
KEY `idx_add_php_after_publish` (`add_php_after_publish`),
KEY `idx_add_php_after_delete` (`add_php_after_delete`),
KEY `idx_add_sql` (`add_sql`),
KEY `idx_add_php_getitems_after_all` (`add_php_getitems_after_all`),
KEY `idx_add_php_before_save` (`add_php_before_save`),
KEY `idx_add_php_postsavehook` (`add_php_postsavehook`),
KEY `idx_add_php_batchcopy` (`add_php_batchcopy`),
KEY `idx_add_php_before_publish` (`add_php_before_publish`),
KEY `idx_add_php_before_delete` (`add_php_before_delete`),
KEY `idx_add_php_document` (`add_php_document`),
KEY `idx_add_css_view` (`add_css_view`),
KEY `idx_add_custom_import` (`add_custom_import`),
KEY `idx_add_php_getitem` (`add_php_getitem`),
KEY `idx_add_php_getitems` (`add_php_getitems`),
KEY `idx_add_php_getitems_after_all` (`add_php_getitems_after_all`),
KEY `idx_add_css_view` (`add_css_view`),
KEY `idx_add_css_views` (`add_css_views`),
KEY `idx_add_javascript_view_file` (`add_javascript_view_file`),
KEY `idx_add_javascript_view_footer` (`add_javascript_view_footer`),
@ -253,8 +256,7 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_view` (
KEY `idx_add_javascript_views_footer` (`add_javascript_views_footer`),
KEY `idx_add_custom_button` (`add_custom_button`),
KEY `idx_source` (`source`),
KEY `idx_add_php_ajax` (`add_php_ajax`),
KEY `idx_add_php_getitem` (`add_php_getitem`)
KEY `idx_add_php_ajax` (`add_php_ajax`)
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `#__componentbuilder_custom_admin_view` (
@ -654,6 +656,34 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_snippet` (
KEY `idx_library` (`library`)
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `#__componentbuilder_validation_rule` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.',
`inherit` CHAR NOT NULL DEFAULT '',
`name` VARCHAR(255) NOT NULL DEFAULT '',
`php` MEDIUMTEXT NOT NULL,
`short_description` VARCHAR(255) NOT NULL DEFAULT '',
`params` text NOT NULL DEFAULT '',
`published` TINYINT(3) NOT NULL DEFAULT 1,
`created_by` INT(10) unsigned NOT NULL DEFAULT 0,
`modified_by` INT(10) unsigned NOT NULL DEFAULT 0,
`created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`checked_out` int(11) unsigned NOT NULL DEFAULT 0,
`checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`version` INT(10) unsigned NOT NULL DEFAULT 1,
`hits` INT(10) unsigned NOT NULL DEFAULT 0,
`access` INT(10) unsigned NOT NULL DEFAULT 0,
`ordering` INT(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY `idx_access` (`access`),
KEY `idx_checkout` (`checked_out`),
KEY `idx_createdby` (`created_by`),
KEY `idx_modifiedby` (`modified_by`),
KEY `idx_state` (`published`),
KEY `idx_name` (`name`)
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `#__componentbuilder_field` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.',
@ -1476,7 +1506,7 @@ INSERT INTO `#__componentbuilder_fieldtype` (`id`, `catid`, `description`, `name
(11, '', 'The list form field type provides a drop down list or a list box of custom-defined entries. If the field has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected.', 'List', '{\"properties0\":{\"name\":\"type\",\"example\":\"list\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be list.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mylist\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select an option\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"\",\"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.\"},\"properties13\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties4\":{\"name\":\"class\",\"example\":\"list_class\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties5\":{\"name\":\"multiple\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) is whether multiple items can be selected at the same time (true or false).\"},\"properties6\":{\"name\":\"filter\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) filter options\"},\"properties7\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties14\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties8\":{\"name\":\"option\",\"example\":\"0|Option 1,1|Option 2,2|Option 1\",\"adjustable\":\"1\",\"description\":\"(mandatory) set the options of this radio. Separate options with commas and use the pipe symbol to separate value from text.\"},\"properties9\":{\"name\":\"default\",\"example\":\"0\",\"adjustable\":\"1\",\"description\":\"(optional) is the default list item value.\"},\"properties10\":{\"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+\"},\"properties11\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"}}', 'provides a drop down list of custom-defined entries.', '', 1, 5, '', ''),
(12, '', 'The media form field type provides modal access to the media manager for the choice of an image. Users with appropriate permissions will be able to upload files.', 'Media', '{\"properties0\":{\"name\":\"type\",\"example\":\"media\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) must be media.\"},\"properties1\":{\"name\":\"name\",\"example\":\"media\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Media\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"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.\"},\"properties4\":{\"name\":\"directory\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the directory from which the user will be able to choose a file. This attribute should be relative to the top level \\/images\\/ folder.\"},\"properties5\":{\"name\":\"preview\",\"example\":\"false\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) shows or hides the preview of the currently chosen image. (\\\"true\\\": Show always, \\\"tooltip\\\": Show as tooltip, \\\"false\\\": Show never) (since Joomla! 2.5.5)\"},\"properties6\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'provides modal access to the media manager for insertion of images with upload for users with appropriate permissions.', '', 1, 2, '', ''),
(13, '', 'Provides a meter to show value in a range, updated with jQuery if needed or simply a fixed value.', 'Meter', '{\"properties0\":{\"name\":\"type\",\"example\":\"meter\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) must be meter.\"},\"properties1\":{\"name\":\"name\",\"example\":\"meter\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Meter\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"width\",\"example\":\"330px\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is the width of meter box\"},\"properties4\":{\"name\":\"color\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) The background color\"},\"properties5\":{\"name\":\"default\",\"example\":\"9\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties6\":{\"name\":\"animated\",\"example\":\"1\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) lets the bar have strips\"},\"properties7\":{\"name\":\"active\",\"example\":\"1\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) lets the strips on the bar move\"},\"properties8\":{\"name\":\"description\",\"example\":\"Enter some description\",\"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.\"},\"properties9\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties10\":{\"name\":\"min\",\"example\":\"1\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(mandatory) this value is the min on the meter.\"},\"properties11\":{\"name\":\"max\",\"example\":\"20\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(mandatory) this value is the max on meter.\"},\"properties12\":{\"name\":\"step\",\"example\":\"1\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) each option will be the previous option incremented by this integer, starting with the first value until the last value is reached.\"},\"properties13\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'Provides a meter to show value in a range.', '', 1, 2, '', ''),
(14, '', 'This form field makes it possible to create titles, texts, descriptions and even alert boxes. It also allows you to bring order in the settings for extensions, by separating them with useful titles. Or adding descriptions for certain settings (without hav', 'Note', '{\"properties0\":{\"name\":\"type\",\"example\":\"note\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) must be note\"},\"properties1\":{\"name\":\"name\",\"example\":\"note_one\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"The notice\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(mandatory or optional if using description) (translatable) is the descriptive title of the note \"},\"properties3\":{\"name\":\"description\",\"example\":\"The notice description\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional if using label)(translatable) the description\\/text of the note \"},\"properties4\":{\"name\":\"heading\",\"example\":\"h4\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) the type of heading element to use for the label (default: h4)\"},\"properties5\":{\"name\":\"class\",\"example\":\"alert\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) a class name (or class names), like these examples ( alert, alert alert-info, alert alert-success, alert alert-error )\"},\"properties6\":{\"name\":\"close\",\"example\":\"true\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) a value of \'true\' (for alerts) or the value for the data-dismiss of the bootstrap close icon\"},\"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+\"}}', 'supports a one line text field.', '', 1, 3, '', ''),
(14, '', 'This form field makes it possible to create titles, texts, descriptions and even alert boxes. It also allows you to bring order in the settings for extensions, by separating them with useful titles. Or adding descriptions for certain settings (without having to rely on the tooltips). Or adding any other text you want.', 'Note', '{\"properties0\":{\"name\":\"type\",\"example\":\"note\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be note\"},\"properties1\":{\"name\":\"name\",\"example\":\"note_one\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"The notice\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory or optional if using description) (translatable) is the descriptive title of the note \"},\"properties3\":{\"name\":\"description\",\"example\":\"The notice description\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional if using label)(translatable) the description\\/text of the note \"},\"properties4\":{\"name\":\"heading\",\"example\":\"h4\",\"adjustable\":\"1\",\"description\":\"(optional) the type of heading element to use for the label (default: h4)\"},\"properties5\":{\"name\":\"class\",\"example\":\"alert\",\"adjustable\":\"1\",\"description\":\"(optional) a class name (or class names), like these examples ( alert, alert alert-info, alert alert-success, alert alert-error )\"},\"properties6\":{\"name\":\"close\",\"example\":\"true\",\"adjustable\":\"1\",\"description\":\"(optional) a value of \'true\' (for alerts) or the value for the data-dismiss of the bootstrap close icon\"},\"properties7\":{\"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+\"}}', 'supports a one line text field.', '', 1, 4, '', ''),
(15, '', 'Provides a one line text box with up-down handles to set a number in the field.', 'Number', '{\"properties0\":{\"name\":\"type\",\"example\":\"number\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) must be number.\"},\"properties1\":{\"name\":\"name\",\"example\":\"number\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Number\",\"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 value.\"},\"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\":\"class\",\"example\":\"text_area\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties6\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties7\":{\"name\":\"min\",\"example\":\"1\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) this value is the lowest on the list.\"},\"properties8\":{\"name\":\"max\",\"example\":\"40\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) this value is the highest on the list.\"},\"properties9\":{\"name\":\"step\",\"example\":\"5\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) each option will be the previous option incremented by this integer, starting with the first value until the last value is reached.\"},\"properties10\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) Javascript that should run on changing of the value.\"},\"properties11\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'Provides a one line text box with up-down handles to set a number in the field.', '', 1, 2, '', ''),
(16, '', 'The password form field type provides a text box for entry of a password. The password characters will be obscured as they are entered. If the field has a saved value this is entered (in obscured form) into the text box. If not, the default value (if any)', 'Password', '{\"properties0\":{\"name\":\"type\",\"example\":\"password\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be password.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mypassword\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Enter A Password\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"size\",\"example\":\"10\",\"adjustable\":\"1\",\"description\":\"(optional) is the width of the text box in characters. If omitted the width is determined by the browser. The value of size does not limit the number of characters that may be entered.\"},\"properties4\":{\"name\":\"default\",\"example\":\"secret\",\"adjustable\":\"1\",\"description\":\"(optional) is the default password.\"},\"properties5\":{\"name\":\"description\",\"example\":\"\",\"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.\"},\"properties11\":{\"name\":\"message\",\"example\":\"Error! Please add password here.\",\"adjustable\":\"1\",\"description\":\"(optional) The error message that will be displayed instead of the default message.\"},\"properties6\":{\"name\":\"class\",\"example\":\"text_area\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties7\":{\"name\":\"readonly\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties8\":{\"name\":\"disabled\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties9\":{\"name\":\"required\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties17\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties10\":{\"name\":\"filter\",\"example\":\"raw\",\"adjustable\":\"1\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties12\":{\"name\":\"hint\",\"example\":\"Your Password Here\",\"adjustable\":\"1\",\"description\":\"(optional) The placeholder to display inside the text box.\"},\"properties13\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"},\"properties14\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"}}', 'provides a text box for entry of a password. The password characters will be obscured as they are entered.', '', 1, 5, '', ''),
(17, '', 'The radio form field type provides radio buttons to select different options. If the field has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected.', 'Radio', '{\"properties0\":{\"name\":\"type\",\"example\":\"radio\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be radio.\"},\"properties1\":{\"name\":\"name\",\"example\":\"myradiovalue\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select an option\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"\",\"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\":\"class\",\"example\":\"btn-group btn-group-yesno\",\"adjustable\":\"1\",\"description\":\"(optional) New in Joomla 3, if set to class=\\\"btn-group btn-group-yesno\\\" will show the nice coloured buttons\"},\"properties5\":{\"name\":\"option\",\"example\":\"1|Yes,0|No\",\"adjustable\":\"1\",\"description\":\"(mandatory) set the options of this radio. Separate options with commas and use the pipe symbol to separate value from text.\"},\"properties6\":{\"name\":\"default\",\"example\":\"0\",\"adjustable\":\"1\",\"description\":\"(optional) is the default radio button item value.\"},\"properties7\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties8\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties9\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties14\":{\"name\":\"readonly\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties10\":{\"name\":\"disabled\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties11\":{\"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+\"},\"properties12\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"}}', 'provides radio buttons to select different options.', '', 1, 7, '', ''),
@ -1489,12 +1519,12 @@ INSERT INTO `#__componentbuilder_fieldtype` (`id`, `catid`, `description`, `name
(24, '', 'The text form field type provides a text box for data entry. If the field has a value saved, this value is displayed when the page is first loaded. If not, the default value (if any) is selected.', 'Text', '{\"properties0\":{\"name\":\"type\",\"example\":\"text\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be text.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mytextvalue\",\"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\":\"size\",\"example\":\"10\",\"adjustable\":\"1\",\"description\":\"(optional) is the width of the text box in characters. If omitted the width is determined by the browser. The value of size does not limit the number of characters that may be entered.\"},\"properties4\":{\"name\":\"maxlength\",\"example\":\"50\",\"adjustable\":\"1\",\"description\":\"(optional) limits the number of characters that may be entered.\"},\"properties5\":{\"name\":\"default\",\"example\":\"Some text\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties6\":{\"name\":\"description\",\"example\":\"Enter some description\",\"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.\"},\"properties7\":{\"name\":\"class\",\"example\":\"text_area\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties8\":{\"name\":\"readonly\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties9\":{\"name\":\"disabled\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties10\":{\"name\":\"required\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties11\":{\"name\":\"filter\",\"example\":\"STRING\",\"adjustable\":\"1\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties12\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties13\":{\"name\":\"field\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) used in validation of \\\"equals\\\" to link the field to match.\"},\"properties14\":{\"name\":\"message\",\"example\":\"Error! Please add some text here.\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) The error message that will be displayed instead of the default message.\"},\"properties15\":{\"name\":\"hint\",\"example\":\"Your Name Here\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) The placeholder to display inside the text box.\"},\"properties16\":{\"name\":\"autocomplete\",\"example\":\"on\",\"adjustable\":\"1\",\"description\":\"(optional) The autocomplete state for the form field. If \'off\' element will not be automatically completed by browser.\"},\"properties17\":{\"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+\"},\"properties18\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"}}', 'provides a text box for data entry.', '', 1, 8, '', ''),
(25, '', 'The textarea form field type provides a text area for entry of multi-line text. If the field has a value saved, this value is displayed when the page is first loaded. If not, the default value (if any) is selected.', 'Textarea', '{\"properties0\":{\"name\":\"type\",\"example\":\"textarea\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be textarea.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mytextarea\",\"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\":\"rows\",\"example\":\"10\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the height of the visible text area in lines. If omitted the width is determined by the browser. The value of rows does not limit the number of lines that may be entered.\"},\"properties4\":{\"name\":\"cols\",\"example\":\"5\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the width of the visible text area in characters. If omitted the width is determined by the browser. The value of cols does not limit the number of characters that may be entered.\"},\"properties5\":{\"name\":\"default\",\"example\":\"default text\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties6\":{\"name\":\"description\",\"example\":\"Text Area\",\"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.\"},\"properties16\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties7\":{\"name\":\"class\",\"example\":\"text_area\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties8\":{\"name\":\"filter\",\"example\":\"raw\",\"adjustable\":\"1\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties9\":{\"name\":\"hint\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) The placeholder to display inside the textarea.\"},\"properties10\":{\"name\":\"required\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties17\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties11\":{\"name\":\"readonly\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties12\":{\"name\":\"disabled\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"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+\"},\"properties14\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"}}', 'provides a text area for entry of multi-line text.', '', 1, 6, '', ''),
(26, '', 'The timezones form field type provides a drop down list of time zones. If the field has a value saved, this value is displayed when the page is first loaded. If not, the default value (if any) is selected.', 'Timezone', '{\"properties0\":{\"name\":\"type\",\"example\":\"timezone\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) must be timezone.\"},\"properties1\":{\"name\":\"name\",\"example\":\"timezone\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Timezone\",\"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 time zone. For example, use \'-10\' for \'(UTC -10:00) Hawaii\'.\"},\"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\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'provides a drop down list of time zones.', '', 1, 2, '', ''),
(27, '', 'This field essentially is a text field with the type of url. If a fully qualified url (that is one with a scheme and domain such as http://example.com) is entered and it uses idn (that is uses characters that are non ascii such as ê or Ψ) it will translat', 'URL', '{\"properties0\":{\"name\":\"type\",\"example\":\"url\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be url.\"},\"properties1\":{\"name\":\"name\",\"example\":\"website\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Website\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"size\",\"example\":\"10\",\"adjustable\":\"1\",\"description\":\"(optional) is the width of the text box in characters. If omitted the width is determined by the browser. The value of size does not limit the number of characters that may be entered.\"},\"properties4\":{\"name\":\"maxlength\",\"example\":\"50\",\"adjustable\":\"1\",\"description\":\"(optional) limits the number of characters that may be entered.\"},\"properties5\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties6\":{\"name\":\"description\",\"example\":\"Enter website address\",\"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.\"},\"properties7\":{\"name\":\"class\",\"example\":\"text_area\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties8\":{\"name\":\"readonly\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties9\":{\"name\":\"disabled\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties10\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties11\":{\"name\":\"filter\",\"example\":\"url\",\"adjustable\":\"1\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties12\":{\"name\":\"validated\",\"example\":\"url\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties13\":{\"name\":\"message\",\"example\":\"Error! Please add website here.\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties14\":{\"name\":\"hint\",\"example\":\"Your Website Here\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) The placeholder to display inside the text box.\"},\"properties15\":{\"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+\"},\"properties16\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"}}', 'provides a URL text input field.', '', 1, 5, '', ''),
(27, '', 'This field essentially is a text field with the type of url. If a fully qualified url (that is one with a scheme and domain such as http://example.com) is entered and it uses idn (that is uses characters that are non ascii such as ê or Ψ) it will translat', 'URL', '{\"properties0\":{\"name\":\"type\",\"example\":\"url\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be url.\"},\"properties1\":{\"name\":\"name\",\"example\":\"website\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Website\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"size\",\"example\":\"10\",\"adjustable\":\"1\",\"description\":\"(optional) is the width of the text box in characters. If omitted the width is determined by the browser. The value of size does not limit the number of characters that may be entered.\"},\"properties4\":{\"name\":\"maxlength\",\"example\":\"50\",\"adjustable\":\"1\",\"description\":\"(optional) limits the number of characters that may be entered.\"},\"properties5\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties6\":{\"name\":\"description\",\"example\":\"Enter website address\",\"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.\"},\"properties7\":{\"name\":\"class\",\"example\":\"text_area\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties8\":{\"name\":\"readonly\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties9\":{\"name\":\"disabled\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties10\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties11\":{\"name\":\"filter\",\"example\":\"url\",\"adjustable\":\"1\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties12\":{\"name\":\"validated\",\"example\":\"url\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties18\":{\"name\":\"scheme\",\"example\":\"http,https,mailto\",\"adjustable\":\"1\",\"description\":\"(optional) Validates that the value is a URL with a valid scheme (which can be restricted by the optional comma-separated field \'scheme\'), and passes a basic syntax check.\"},\"properties13\":{\"name\":\"message\",\"example\":\"Error! Please add website here.\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties14\":{\"name\":\"hint\",\"example\":\"Your Website Here\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) The placeholder to display inside the text box.\"},\"properties15\":{\"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+\"},\"properties16\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"}}', 'provides a URL text input field.', '', 1, 6, '', ''),
(28, '', 'The user form field type provides a modal select box of users.', 'User', '{\"properties0\":{\"name\":\"type\",\"example\":\"user\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) must be user.\"},\"properties1\":{\"name\":\"name\",\"example\":\"user\",\"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\":\"User\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"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.\"},\"properties4\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is a CSS class name for the HTML form field.\"},\"properties5\":{\"name\":\"size\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is the width of the text box in characters. If omitted the width is determined by the browser. The value of size does not limit the number of characters that may be entered.\"},\"properties6\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties7\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'provides a modal list of users.', '', 1, 2, '', ''),
(29, '', 'The usergroup form field type provides a modal select box of user groups.', 'Usergroup', '{\"properties0\":{\"name\":\"type\",\"example\":\"usergroup\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) must be usergroup.\"},\"properties1\":{\"name\":\"name\",\"example\":\"usergroup\",\"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\":\"Group\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"Select a group\",\"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\":\"size\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is the width of the text box in characters. If omitted the width is determined by the browser. The value of size does not limit the number of characters that may be entered.\"},\"properties6\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is the field required true if yes.\"},\"properties7\":{\"name\":\"multiple\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) If set to multiple then allows more than one usergroup to be selected.\"},\"properties8\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'provides a drop down list of user groups.', '', 1, 2, '', ''),
(30, '', 'The filelist form field type provides a drop down list of files from a specified directory. If the field has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected.\r\n\r\nBy default, the first item on the', 'Filelist', '{\"properties0\":{\"name\":\"type\",\"example\":\"filelist\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) must be filelist.\"},\"properties1\":{\"name\":\"name\",\"example\":\"myfile\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select a file\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"directory\",\"example\":\"images\\/stories\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is the filesystem path to the directory containing the files to be listed. If omitted the directory given by JPATH_ROOT is assumed.\"},\"properties4\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is the default file name.\"},\"properties5\":{\"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.\"},\"properties6\":{\"name\":\"filter\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is a regular expression string which is used to filter the list of files selected for inclusion in the drop-down list. If omitted, all files in the directory are included. The filter argument expression is applied before the exclude argument expression. For information on constructing regular expressions see Regular expressions in parameter arguments.\"},\"properties7\":{\"name\":\"exclude\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is a regular expression string which is used to exclude files from the list. The exclude argument expression is applied after the filter argument expression. For information on constructing regular expressions see Regular expressions in parameter arguments.\"},\"properties8\":{\"name\":\"stripext\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is a Boolean argument. If true then file name extensions will be stripped from the file names listed. Also note that the file name will be saved without the extension too.\"},\"properties9\":{\"name\":\"hide_none\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is a Boolean argument. If true, the \'- Do not use -\' item is omitted from the drop-down list.\"},\"properties10\":{\"name\":\"hide_default\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is a Boolean argument. If true, the \'- Use default -\' item is omitted from the drop-down list.\"},\"properties11\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'Provides a drop down list of files from a specified directory.', '', 1, 2, '', 1),
(31, '', 'The folderlist form field type provides a drop down list of folders from a specfied directory. If the field has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected.\r\n\r\nBy default, the first item on ', 'Folderlist', '{\"properties0\":{\"name\":\"type\",\"example\":\"folderlist\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) must be folderlist.\"},\"properties1\":{\"name\":\"name\",\"example\":\"myfolder\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select a folder\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"directory\",\"example\":\"images\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the filesystem path to the directory containing the folders to be listed.\"},\"properties4\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is the default folder name.\"},\"properties5\":{\"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.\"},\"properties6\":{\"name\":\"filter\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is a regular expression string which is used to filter the list of folders selected for inclusion in the drop-down list. If omitted, all folders in the directory are included. The filter argument expression is applied before the exclude argument expression. For information on constructing regular expressions see Regular expressions in parameter arguments.\"},\"properties7\":{\"name\":\"exclude\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is a regular expression string which is used to exclude folders from the list. The exclude argument expression is applied after the filter argument expression. For information on constructing regular expressions see Regular expressions in parameter arguments.\"},\"properties8\":{\"name\":\"hide_none\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is a Boolean argument. If true, the \'- Do not use -\' item is omitted from the drop-down list.\"},\"properties9\":{\"name\":\"hide_default\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is a Boolean argument. If true, the \'- Use default -\' item is omitted from the drop-down list.\"},\"properties10\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'Provides a drop down list of folders from a specified directory.', '', 1, 2, '', 2),
(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. Note 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\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) must be file.\"},\"properties1\":{\"name\":\"name\",\"example\":\"myfilevalue\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"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\",\"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\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) (not translatable) is the default value, but doesn\'t mean much for a file.\"},\"properties5\":{\"name\":\"size\",\"example\":\"10\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is the width of the file box in characters.\"},\"properties6\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is a CSS class name for the HTML form field.\"},\"properties7\":{\"name\":\"labelclass\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) adds a CSS class for form field\'s label; for Joomla 2.5.4+\"},\"properties8\":{\"name\":\"disabled\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) HTML equivalent attribute\"},\"properties9\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"},\"properties10\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) For Joomla form validating it to be filled in\"},\"properties11\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) Whether to Joomla validate the field according to rules\"},\"properties12\":{\"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 an input field for files', '', 1, 1, '', 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),
(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);

View File

@ -8,6 +8,7 @@ DROP TABLE IF EXISTS `#__componentbuilder_dynamic_get`;
DROP TABLE IF EXISTS `#__componentbuilder_custom_code`;
DROP TABLE IF EXISTS `#__componentbuilder_library`;
DROP TABLE IF EXISTS `#__componentbuilder_snippet`;
DROP TABLE IF EXISTS `#__componentbuilder_validation_rule`;
DROP TABLE IF EXISTS `#__componentbuilder_field`;
DROP TABLE IF EXISTS `#__componentbuilder_fieldtype`;
DROP TABLE IF EXISTS `#__componentbuilder_language_translation`;

View File

@ -1 +0,0 @@

View File

@ -1 +0,0 @@

View File

@ -1 +0,0 @@

View File

@ -1 +0,0 @@

View File

@ -1 +0,0 @@

View File

@ -1 +0,0 @@

View File

@ -1 +0,0 @@

View File

@ -1 +0,0 @@

View File

@ -1 +0,0 @@

View File

@ -0,0 +1,31 @@
CREATE TABLE IF NOT EXISTS `#__componentbuilder_validation_rule` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.',
`inherit` CHAR NOT NULL DEFAULT '',
`name` VARCHAR(255) NOT NULL DEFAULT '',
`php` MEDIUMTEXT NOT NULL,
`short_description` VARCHAR(255) NOT NULL DEFAULT '',
`params` text NOT NULL DEFAULT '',
`published` TINYINT(3) NOT NULL DEFAULT 1,
`created_by` INT(10) unsigned NOT NULL DEFAULT 0,
`modified_by` INT(10) unsigned NOT NULL DEFAULT 0,
`created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`checked_out` int(11) unsigned NOT NULL DEFAULT 0,
`checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`version` INT(10) unsigned NOT NULL DEFAULT 1,
`hits` INT(10) unsigned NOT NULL DEFAULT 0,
`access` INT(10) unsigned NOT NULL DEFAULT 0,
`ordering` INT(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY `idx_access` (`access`),
KEY `idx_checkout` (`checked_out`),
KEY `idx_createdby` (`created_by`),
KEY `idx_modifiedby` (`modified_by`),
KEY `idx_state` (`published`),
KEY `idx_name` (`name`)
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
ALTER TABLE `#__componentbuilder_admin_view` ADD `alias_builder` VARCHAR(255) NOT NULL DEFAULT '' AFTER `ajax_input`;
ALTER TABLE `#__componentbuilder_admin_view` ADD `alias_builder_type` CHAR NOT NULL DEFAULT '' AFTER `alias_builder`;

View File

@ -0,0 +1,351 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage validation_rule.php
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Registry\Registry;
// import Joomla table library
jimport('joomla.database.table');
/**
* Validation_rules Table class
*/
class ComponentbuilderTableValidation_rule extends JTable
{
/**
* Ensure the params and metadata in json encoded in the bind method
*
* @var array
* @since 3.3
*/
protected $_jsonEncode = array('params', 'metadata');
/**
* Constructor
*
* @param object Database connector object
*/
function __construct(&$db)
{
parent::__construct('#__componentbuilder_validation_rule', 'id', $db);
// Adding History Options
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_componentbuilder.validation_rule'));
}
public function bind($array, $ignore = '')
{
if (isset($array['params']) && is_array($array['params']))
{
$registry = new JRegistry;
$registry->loadArray($array['params']);
$array['params'] = (string) $registry;
}
if (isset($array['metadata']) && is_array($array['metadata']))
{
$registry = new JRegistry;
$registry->loadArray($array['metadata']);
$array['metadata'] = (string) $registry;
}
// Bind the rules.
if (isset($array['rules']) && is_array($array['rules']))
{
$rules = new JAccessRules($array['rules']);
$this->setRules($rules);
}
return parent::bind($array, $ignore);
}
/**
* Overload the store method for the Validation_rule table.
*
* @param boolean Toggle whether null values should be updated.
* @return boolean True on success, false on failure.
* @since 1.6
*/
public function store($updateNulls = false)
{
$date = JFactory::getDate();
$user = JFactory::getUser();
if ($this->id)
{
// Existing item
$this->modified = $date->toSql();
$this->modified_by = $user->get('id');
}
else
{
// New validation_rule. A validation_rule created and created_by field can be set by the user,
// so we don't touch either of these if they are set.
if (!(int) $this->created)
{
$this->created = $date->toSql();
}
if (empty($this->created_by))
{
$this->created_by = $user->get('id');
}
}
if (isset($this->alias))
{
// Verify that the alias is unique
$table = JTable::getInstance('validation_rule', 'ComponentbuilderTable');
if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0))
{
$this->setError(JText::_('COM_COMPONENTBUILDER_VALIDATION_RULE_ERROR_UNIQUE_ALIAS'));
return false;
}
}
if (isset($this->url))
{
// Convert IDN urls to punycode
$this->url = JStringPunycode::urlToPunycode($this->url);
}
if (isset($this->website))
{
// Convert IDN urls to punycode
$this->website = JStringPunycode::urlToPunycode($this->website);
}
return parent::store($updateNulls);
}
/**
* Overloaded check method to ensure data integrity.
*
* @return boolean True on success.
*/
public function check()
{
if (isset($this->alias))
{
// Generate a valid alias
$this->generateAlias();
$table = JTable::getInstance('validation_rule', 'componentbuilderTable');
while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0))
{
$this->alias = JString::increment($this->alias, 'dash');
}
}
/*
* Clean up keywords -- eliminate extra spaces between phrases
* and cr (\r) and lf (\n) characters from string.
* Only process if not empty.
*/
if (!empty($this->metakey))
{
// Array of characters to remove.
$bad_characters = array("\n", "\r", "\"", "<", ">");
// Remove bad characters.
$after_clean = JString::str_ireplace($bad_characters, "", $this->metakey);
// Create array using commas as delimiter.
$keys = explode(',', $after_clean);
$clean_keys = array();
foreach ($keys as $key)
{
// Ignore blank keywords.
if (trim($key))
{
$clean_keys[] = trim($key);
}
}
// Put array back together delimited by ", "
$this->metakey = implode(", ", $clean_keys);
}
// Clean up description -- eliminate quotes and <> brackets
if (!empty($this->metadesc))
{
// Only process if not empty
$bad_characters = array("\"", "<", ">");
$this->metadesc = JString::str_ireplace($bad_characters, "", $this->metadesc);
}
// If we don't have any access rules set at this point just use an empty JAccessRules class
if (!$this->getRules())
{
$rules = $this->getDefaultAssetValues('com_componentbuilder.validation_rule.'.$this->id);
$this->setRules($rules);
}
// Set ordering
if ($this->published < 0)
{
// Set ordering to 0 if state is archived or trashed
$this->ordering = 0;
}
return true;
}
/**
* Gets the default asset values for a component.
*
* @param $string $component The component asset name to search for
*
* @return JAccessRules The JAccessRules object for the asset
*/
protected function getDefaultAssetValues($component, $try = true)
{
// Need to find the asset id by the name of the component.
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select($db->quoteName('id'))
->from($db->quoteName('#__assets'))
->where($db->quoteName('name') . ' = ' . $db->quote($component));
$db->setQuery($query);
$db->execute();
if ($db->loadRowList())
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
return JAccess::getAssetRules($assetId);
}
// try again
elseif ($try)
{
$try = explode('.',$component);
$result = $this->getDefaultAssetValues($try[0], false);
if ($result instanceof JAccessRules)
{
if (isset($try[1]))
{
$_result = (string) $result;
$_result = json_decode($_result);
foreach ($_result as $name => &$rule)
{
$v = explode('.', $name);
if ($try[1] !== $v[0])
{
// remove since it is not part of this view
unset($_result->$name);
}
else
{
// clear the value since we inherit
$rule = array();
}
}
// check if there are any view values remaining
if (count($_result))
{
$_result = json_encode($_result);
$_result = array($_result);
// Instantiate and return the JAccessRules object for the asset rules.
$rules = new JAccessRules;
$rules->mergeCollection($_result);
return $rules;
}
}
return $result;
}
}
return JAccess::getAssetRules(0);
}
/**
* Method to compute the default name of the asset.
* The default name is in the form 'table_name.id'
* where id is the value of the primary key of the table.
*
* @return string
* @since 2.5
*/
protected function _getAssetName()
{
$k = $this->_tbl_key;
return 'com_componentbuilder.validation_rule.'.(int) $this->$k;
}
/**
* Method to return the title to use for the asset table.
*
* @return string
* @since 2.5
*/
protected function _getAssetTitle()
{
if (isset($this->title))
{
return $this->title;
}
return '';
}
/**
* Get the parent asset id for the record
*
* @return int
* @since 2.5
*/
protected function _getAssetParentId(JTable $table = NULL, $id = NULL)
{
$asset = JTable::getInstance('Asset');
$asset->loadByName('com_componentbuilder');
return $asset->id;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
}
}

View File

@ -208,6 +208,9 @@ class ComponentbuilderViewCustom_code extends JViewLegacy
$this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');
$this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true);
$this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true);
// need to add some language strings
JText::script('COM_COMPONENTBUILDER_FUNCTION_NAME_ALREADY_TAKEN_PLEASE_TRY_AGAIN');
JText::script('COM_COMPONENTBUILDER_YOU_MUST_ADD_AN_UNIQUE_FUNCTION_NAME');
JText::script('view not acceptable. Error');
}
}

View File

@ -294,9 +294,13 @@ jQuery('#adminForm').on('change', '#jform_add_javascript_views_footer',function
jQuery(function() {
jQuery("code").click(function() {
jQuery(this).selText().addClass("selected");
});
setTimeout(
function() {
// load the on click event
jQuery("code").click(function() {
jQuery(this).selText().addClass("selected");
});
}, 2000);
});
jQuery.fn.selText = function() {
@ -335,6 +339,23 @@ jQuery(document).ready(function() {
}
});
<?php
$app = JFactory::getApplication();
?>
function JRouter(link) {
<?php
if ($app->isSite())
{
echo 'var url = "'.JURI::root().'";';
}
else
{
echo 'var url = "";';
}
?>
return url+link;
}
// nice little dot trick :)
jQuery(document).ready( function($) {
var x=0;

View File

@ -32,48 +32,20 @@ JHtml::_('script', 'system/core.js', false, true);
JHtml::_('behavior.keepalive');
?>
<script type="text/javascript">
<?php if ($this->hasPackage && ComponentbuilderHelper::checkArray($this->headerList)) : ?>
Joomla.continueBasicImport = function()
{
var form = document.getElementById('adminForm');
var error = false;
var therequired = [<?php $i = 0; foreach($this->headerList as $name => $title) { echo ($i != 0)? ', "vdm_'.$name.'"':'"vdm_'.$name.'"'; $i++; } ?>];
for(i = 0; i < therequired.length; i++)
{
if(jQuery('#'+therequired[i]).val() == "" )
{
error = true;
break;
}
}
// do field validation
if (error)
{
alert("<?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_MSG_PLEASE_SELECT_ALL_COLUMNS', true); ?>");
}
else
{
jQuery('#loading').css('display', 'block');
form.gettype.value = 'continue-basic';
form.submit();
}
};
<?php elseif ($this->hasPackage && $this->dataType === 'smart_package'): ?>
<?php if ($this->hasPackage && $this->dataType === 'smart_package'): ?>
Joomla.continueExtImport = function()
{
var form = document.getElementById('adminForm');
var error = false;
// do field validation
if (error)
{
alert("<?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_MSG_PLEASE_SELECT_ALL_COLUMNS', true); ?>");
}
else
{
jQuery('#loading').css('display', 'block');
form.gettype.value = 'continue-ext';
form.submit();
}
jQuery('#loading').css('display', 'block');
form.gettype.value = 'continue-ext';
form.submit();
};
Joomla.cancelImport = function()
{
var form = document.getElementById('adminForm');
jQuery('#loading').css('display', 'block');
form.gettype.value = 'cancel-ext';
form.submit();
};
<?php else: ?>
Joomla.submitbutton = function()
@ -133,6 +105,7 @@ JHtml::_('behavior.keepalive');
// set the url
form.import_url.value = form.vdm_package.value;
jQuery('#loading').css('display', 'block');
form.checksum.value = 'vdm';
form.gettype.value = 'url';
form.submit();
}
@ -160,7 +133,7 @@ jQuery(document).ready(function($) {
});
</script>
<?php $formats = ($this->dataType === 'smart_package') ? '.zip' : '.csv .xls .ods'; ?>
<?php $formats = ($this->dataType === 'smart_package') ? '.zip' : 'none'; ?>
<div id="installer-import" class="clearfix">
<form enctype="multipart/form-data" action="<?php echo JRoute::_('index.php?option=com_componentbuilder&view=import_joomla_components');?>" method="post" name="adminForm" id="adminForm" class="form-horizontal form-validate">
@ -173,39 +146,7 @@ jQuery(document).ready(function($) {
<?php else : ?>
<div id="j-main-container">
<?php endif;?>
<?php if ($this->hasPackage && ComponentbuilderHelper::checkArray($this->headerList) && ComponentbuilderHelper::checkArray($this->headers)) : ?>
<?php echo JHtml::_('bootstrap.startTabSet', 'jcbImportTab', array('active' => $this->activeTab)); ?>
<?php echo JHtml::_('bootstrap.addTab', 'jcbImportTab', 'basic', JText::_('COM_COMPONENTBUILDER_BASIC_METHOD', true)); ?>
<fieldset class="uploadform">
<legend><?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_LINK_FILE_TO_TABLE_COLUMNS'); ?></legend>
<div class="control-group">
<label class="control-label" ><h4><?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_TABLE_COLUMNS'); ?></h4></label>
<div class="controls">
<label class="control-label" ><h4><?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_FILE_COLUMNS'); ?></h4></label>
</div>
</div>
<?php foreach($this->headerList as $name => $title): ?>
<div class="control-group">
<label for="<?php echo $name; ?>" class="control-label" ><?php echo $title; ?></label>
<div class="controls">
<select name="<?php echo $name; ?>" id="vdm_<?php echo $name; ?>" required class="required input_box" >
<option value=""><?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_PLEASE_SELECT_COLUMN'); ?></option>
<option value="IGNORE"><?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_IGNORE_COLUMN'); ?></option>
<?php foreach($this->headers as $value => $option): ?>
<?php $selected = (strtolower($option) == strtolower ($title) || strtolower($option) == strtolower($name))? 'selected="selected"':''; ?>
<option value="<?php echo ComponentbuilderHelper::htmlEscape($value); ?>" class="required" <?php echo $selected ?>><?php echo ComponentbuilderHelper::htmlEscape($option); ?></option>
<?php endforeach; ?>
</select>
</div>
</div>
<?php endforeach; ?>
<div class="form-actions">
<input class="btn btn-primary" type="button" value="<?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_CONTINUE'); ?>" onclick="Joomla.continueBasicImport()" />
</div>
</fieldset>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php elseif ($this->hasPackage && $this->dataType === 'smart_package') : ?>
<?php if ($this->hasPackage && $this->dataType === 'smart_package') : ?>
<?php
if (isset($this->packageInfo['name']) && ComponentbuilderHelper::checkArray($this->packageInfo['name']))
{
@ -237,7 +178,10 @@ jQuery(document).ready(function($) {
<?php endforeach; ?>
<?php endif; ?>
<div class="form-actions">
<input class="btn btn-primary" type="button" value="<?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_CONTINUE'); ?>" onclick="Joomla.continueExtImport()" />
<div class="btn-group">
<input class="btn btn-primary" type="button" value="<?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_CONTINUE'); ?>" onclick="Joomla.continueExtImport()" />
<input class="btn" type="button" value="<?php echo JText::_('COM_COMPONENTBUILDER_CANCEL'); ?>" onclick="Joomla.cancelImport()" />
</div>
</div>
</fieldset>
<?php if (!$hasOwner): ?>
@ -398,8 +342,10 @@ jQuery(document).ready(function($) {
<?php echo JHtml::_('bootstrap.addTab', 'jcbImportTab', 'url_vdm', JText::_('COM_COMPONENTBUILDER_VDM_PACKAGES', true)); ?>
<fieldset class="uploadform">
<legend><?php echo JText::_("COM_COMPONENTBUILDER_PACKAGES_FROM_VAST_DEVELOPMENT_METHOD"); ?></legend>
<p><?php echo JText::sprintf('COM_COMPONENTBUILDER_ALL_OF_THESE_PACKAGES_ARE_A_FULLY_DEVELOPEDMAPPED_COMPONENTS_FOR_JCB_THEY_CAN_BE_SEEN_AS_DEMO_CONTENT_OR_BASE_IMAGES_FROM_WHICH_TO_START_YOUR_PROJECTBR_ALWAYS_MAKE_SURE_YOU_ARE_ON_THE_LATEST_VERSION_OF_JCB_BEFORE_IMPORTING_ANY_OF_THESE_PACKAGES_SHOULD_ANY_OF_THEM_FAIL_TO_IMPORT_A_S_PLEASE_LET_US_KNOWA', 'href="https://www.vdm.io/support" target="_blank" title="Should any of these packages fail to import please let us know, some need a key of course."'); ?></p>
<p><?php echo JText::sprintf('COM_COMPONENTBUILDER_THESE_ARE_THE_SAME_PACKAGES_FOUND_ON_A_S_GITHUBA_AND_CAN_BE_IMPORTED_BY_SIMPLY_MAKING_A_SELECTION_AND_THEN_CLICKING_THE_GET_PACKAGE_BUTTONBR_SOME_OF_THESE_PACKAGES_WOULD_REQUIRE_A_KEY_SINCE_THEY_ARE_NOT_FREE_A_S_GET_A_KEY_TODAYA', 'href="https://github.com/vdm-io/JCB-Packages" target="_blank" title="gitHub Reposetory"', 'href="http://vdm.bz/jcb-packages" target="_blank" title="get a key to import the paid packages."'); ?></p>
<div class="alert alert-success">
<p><?php echo JText::sprintf('COM_COMPONENTBUILDER_ALL_OF_THESE_PACKAGES_ARE_A_FULLY_DEVELOPEDMAPPED_COMPONENTS_FOR_JCB_THEY_CAN_BE_SEEN_AS_DEMO_CONTENT_OR_BASE_IMAGES_FROM_WHICH_TO_START_YOUR_PROJECTBR_ALWAYS_MAKE_SURE_YOU_ARE_ON_THE_LATEST_VERSION_OF_JCB_BEFORE_IMPORTING_ANY_OF_THESE_PACKAGES_SHOULD_ANY_OF_THEM_FAIL_TO_IMPORT_A_S_PLEASE_LET_US_KNOWA', 'href="https://www.vdm.io/support" target="_blank" title="Should any of these packages fail to import please let us know, some need a key of course."'); ?></p>
<p><?php echo JText::sprintf('COM_COMPONENTBUILDER_THESE_ARE_THE_SAME_PACKAGES_FOUND_ON_A_S_GITHUBA_AND_CAN_BE_IMPORTED_BY_SIMPLY_MAKING_A_SELECTION_AND_THEN_CLICKING_THE_GET_PACKAGE_BUTTONBR_SOME_OF_THESE_PACKAGES_WOULD_REQUIRE_A_KEY_SINCE_THEY_ARE_NOT_FREE_A_S_GET_A_KEY_TODAYA', 'href="https://github.com/vdm-io/JCB-Packages" target="_blank" title="gitHub Reposetory"', 'href="http://vdm.bz/jcb-packages" target="_blank" title="get a key to import the paid packages."'); ?></p>
</div>
<?php foreach ($this->vdmPackages as $field): ?>
<div class="control-group">
<div class="control-label"><?php echo $field->label;?></div>
@ -416,6 +362,7 @@ jQuery(document).ready(function($) {
<?php echo JHtml::_('bootstrap.endTabSet'); ?>
<input type="hidden" name="gettype" value="upload" />
<input type="hidden" name="checksum" value="0" />
<?php endif; ?>
<input type="hidden" name="task" value="import_joomla_components.import" />
<?php echo JHtml::_('form.token'); ?>

View File

@ -72,16 +72,9 @@ class ComponentbuilderViewImport_joomla_components extends JViewLegacy
// get the session object
$session = JFactory::getSession();
// check if it has package
$this->hasPackage = $session->get('hasPackage', false);
$this->dataType = $session->get('dataType', false);
if($this->hasPackage && $this->dataType && $this->dataType !== 'smart_package')
{
$this->headerList = json_decode($session->get($this->dataType.'_VDM_IMPORTHEADERS', false),true);
$this->headers = ComponentbuilderHelper::getFileHeaders($this->dataType);
// clear the data type
$session->clear('dataType');
}
elseif (!$this->dataType)
$this->hasPackage = $session->get('hasPackage', false);
$this->dataType = $session->get('dataType', false);
if (!$this->dataType)
{
$this->dataType = $session->get('dataType_VDM_IMPORTINTO', null);
}
@ -125,7 +118,7 @@ class ComponentbuilderViewImport_joomla_components extends JViewLegacy
$radio2 = JFormHelper::loadFieldType('radio',true);
// Switch to show more information about the import
$xml = '<field label="'.JText::_('COM_COMPONENTBUILDER_QUITE').'" description="'.JText::_('COM_COMPONENTBUILDER_SELECT_IF_THE_IMPORT_SHOULD_BE_SHOWING_MORE_OR_LESS_INFORMATION_DURING_IMPORT').'" name="more_info" type="radio" class="btn-group btn-group-yesno" default="0" filter="INT">';
$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">';
$xml .= '<option value="0">'.JText::_('COM_COMPONENTBUILDER_YES').'</option> <option value="1">'.JText::_('COM_COMPONENTBUILDER_NO').'</option>';
$xml .= "</field>";
// prepare the xml

View File

@ -198,7 +198,16 @@ class ComponentbuilderViewLayout extends JViewLegacy
// Add Ajax Token
$this->document->addScriptDeclaration("var token = '".JSession::getFormToken()."';");
$this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');
$this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/layout/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');
$this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/layout/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');
// add the Uikit v2 style sheets
$this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');
$this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');
// add Uikit v2 JavaScripts
$this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');
$this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true);
$this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true);
JText::script('view not acceptable. Error');
}
}

View File

@ -198,7 +198,16 @@ class ComponentbuilderViewTemplate extends JViewLegacy
// Add Ajax Token
$this->document->addScriptDeclaration("var token = '".JSession::getFormToken()."';");
$this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');
$this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/template/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');
$this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/template/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');
// add the Uikit v2 style sheets
$this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');
$this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');
// add Uikit v2 JavaScripts
$this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');
$this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true);
$this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true);
JText::script('view not acceptable. Error');
}
}

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