Added validation rules resolve gh-254. Removed empty sql files. Improved the field area.

This commit is contained in:
Llewellyn van der Merwe 2018-03-27 11:57:16 +02:00
parent 856a6fad3f
commit 0ba2a0e8cf
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
72 changed files with 5002 additions and 337 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! 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) > 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) + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](http://joomlacomponentbuilder.com) + *Name*: [Component Builder](http://joomlacomponentbuilder.com)
+ *First Build*: 30th April, 2015 + *First Build*: 30th April, 2015
+ *Last Build*: 24th March, 2018 + *Last Build*: 27th March, 2018
+ *Version*: 2.7.0 + *Version*: 2.7.1
+ *Copyright*: Copyright (C) 2015. All Rights Reserved + *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
+ *Line count*: **186317** + *Line count*: **190902**
+ *Field count*: **994** + *Field count*: **1007**
+ *File count*: **1173** + *File count*: **1196**
+ *Folder count*: **189** + *Folder count*: **193**
> This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com). > This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@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! 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) > 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) + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](http://joomlacomponentbuilder.com) + *Name*: [Component Builder](http://joomlacomponentbuilder.com)
+ *First Build*: 30th April, 2015 + *First Build*: 30th April, 2015
+ *Last Build*: 24th March, 2018 + *Last Build*: 27th March, 2018
+ *Version*: 2.7.0 + *Version*: 2.7.1
+ *Copyright*: Copyright (C) 2015. All Rights Reserved + *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
+ *Line count*: **186317** + *Line count*: **190902**
+ *Field count*: **994** + *Field count*: **1007**
+ *File count*: **1173** + *File count*: **1196**
+ *Folder count*: **189** + *Folder count*: **193**
> This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com). > This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@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="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.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.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.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.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.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.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="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.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.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.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.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.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" /> <action name="help_document.edit" title="COM_COMPONENTBUILDER_HELP_DOCUMENTS_EDIT" description="COM_COMPONENTBUILDER_HELP_DOCUMENTS_EDIT_DESC" />
@ -358,6 +359,18 @@
<action name="template.export" title="COM_COMPONENTBUILDER_TEMPLATES_EXPORT" description="COM_COMPONENTBUILDER_TEMPLATES_EXPORT_DESC" /> <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.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="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>
<section name="joomla_component"> <section name="joomla_component">
<action name="joomla_component.edit" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_DESC" /> <action name="joomla_component.edit" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_DESC" />
@ -455,6 +468,15 @@
<action name="snippet.access" title="COM_COMPONENTBUILDER_SNIPPETS_ACCESS" description="COM_COMPONENTBUILDER_SNIPPETS_ACCESS_DESC" /> <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" /> <action name="snippet.version" title="COM_COMPONENTBUILDER_SNIPPETS_EDIT_VERSION" description="COM_COMPONENTBUILDER_SNIPPETS_EDIT_VERSION_DESC" />
</section> </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"> <section name="field">
<action name="field.edit" title="COM_COMPONENTBUILDER_FIELDS_EDIT" description="COM_COMPONENTBUILDER_FIELDS_EDIT_DESC" /> <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" /> <action name="field.edit.state" title="COM_COMPONENTBUILDER_FIELDS_EDIT_STATE" description="COM_COMPONENTBUILDER_FIELDS_EDIT_STATE_DESC" />

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: 18 KiB

View File

@ -26,22 +26,17 @@ defined('_JEXEC') or die('Restricted access');
?> ?>
###BOM### ###BOM###
// No direct access to this file namespace Joomla\CMS\Form\Rule;
defined('_JEXEC') or die('Restricted access');
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 class JFormRule###Name### extends FormRule
{ {###VALIDATION_RULE_METHODS###
/**
* The regular expression.
*
* @access protected
* @var string
* @since 2.5
*/
protected $regex = '^[^_]+$';
} }

View File

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

View File

@ -60,6 +60,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
$this->registerTask('getDynamicValues', 'ajax'); $this->registerTask('getDynamicValues', 'ajax');
$this->registerTask('checkFunctionName', 'ajax'); $this->registerTask('checkFunctionName', 'ajax');
$this->registerTask('usedin', 'ajax'); $this->registerTask('usedin', 'ajax');
$this->registerTask('getExistingValidationRuleCode', 'ajax');
$this->registerTask('getValidationRulesTable', 'ajax');
$this->registerTask('checkRuleName', 'ajax');
$this->registerTask('fieldOptions', 'ajax'); $this->registerTask('fieldOptions', 'ajax');
$this->registerTask('snippetDetails', 'ajax'); $this->registerTask('snippetDetails', 'ajax');
$this->registerTask('setSnippetGithub', 'ajax'); $this->registerTask('setSnippetGithub', 'ajax');
@ -771,6 +774,121 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
} }
} }
break; 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': case 'fieldOptions':
try 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(); public $sqlTweak = array();
/**
* The validation rules that should be added
*
* @var array
*/
public $validationRules = array();
/** /**
* The admin views data array * The admin views data array
* *
@ -2083,6 +2090,37 @@ class Get
// load the values form params // load the values form params
$field->xml = $this->setDynamicValues(json_decode($field->xml)); $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, $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
}
}
}
}
}
// load the type values form type params // load the type values form type params
$field->properties = (isset($field->properties) && ComponentbuilderHelper::checkJson($field->properties)) ? json_decode($field->properties, true) : null; $field->properties = (isset($field->properties) && ComponentbuilderHelper::checkJson($field->properties)) ? json_decode($field->properties, true) : null;
if (ComponentbuilderHelper::checkArray($field->properties)) if (ComponentbuilderHelper::checkArray($field->properties))

View File

@ -2083,6 +2083,15 @@ class Fields extends Structure
// get the actual field name // get the actual field name
$xmlValue = $this->setPlaceholders($name, $placeholders); $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') elseif ($property['name'] === 'extension' || $property['name'] === 'directory' || $property['name'] === 'formsource')
{ {
$xmlValue = ComponentbuilderHelper::getBetween($field['settings']->xml, $property['name'] . '="', '"'); $xmlValue = ComponentbuilderHelper::getBetween($field['settings']->xml, $property['name'] . '="', '"');
@ -2290,6 +2299,16 @@ class Fields extends Structure
{ {
$fieldAttributes['display'] = $display; $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; return $fieldAttributes;

View File

@ -816,6 +816,21 @@ class Infusion extends Interpretation
$this->fileContentDynamic['ajax']['###AJAX_SITE_MODEL_METHODS###'] = $this->setAjaxModelMethods('site'); $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 // run the second run if needed
if (isset($this->secondRunAdmin) && ComponentbuilderHelper::checkArray($this->secondRunAdmin)) if (isset($this->secondRunAdmin) && ComponentbuilderHelper::checkArray($this->secondRunAdmin))
{ {

View File

@ -158,6 +158,60 @@ abstract class ComponentbuilderHelper
return $object; 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) public static function getDynamicScripts($type, $fieldName = false)
{ {
// if field name is passed the convert to type // if field name is passed the convert to type
@ -1626,10 +1680,13 @@ abstract class ComponentbuilderHelper
{ {
$result = $db->loadObject(); $result = $db->loadObject();
$properties = json_decode($result->properties,true); $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) foreach ($properties as $property)
{ {
$field['values_description'] .= '<li><b>'.$property['name'].'</b> '.$property['description'].'</li>'; $example = (isset($property['example']) && self::checkString($property['example'])) ? '<code>'.$property['example'].'</code>' : '';
$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']])) if(isset($settings[$property['name']]))
{ {
$field['values'] .= "\n\t".$property['name'].'="'.$settings[$property['name']].'" '; $field['values'] .= "\n\t".$property['name'].'="'.$settings[$property['name']].'" ';
@ -1640,7 +1697,7 @@ abstract class ComponentbuilderHelper
} }
} }
$field['values'] .= "\n/>"; $field['values'] .= "\n/>";
$field['values_description'] .= '</ul>'; $field['values_description'] .= '</tbody></table>';
// return found field options // return found field options
return $field; 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'); 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')) 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'); 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="Component Builder"
COM_COMPONENTBUILDER_ABOVE_TABS="Above Tabs" 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_BULK_TOOLS="Access Bulk Tools"
COM_COMPONENTBUILDER_ACCESS_DENIED="Access denied!" COM_COMPONENTBUILDER_ACCESS_DENIED="Access denied!"
COM_COMPONENTBUILDER_ACTIVE_ONLY_FOUR_TEXT_FIELD="Active (only 4 text_field)" COM_COMPONENTBUILDER_ACTIVE_ONLY_FOUR_TEXT_FIELD="Active (only 4 text_field)"
@ -3190,9 +3193,8 @@ COM_COMPONENTBUILDER_DASHBOARD_FIELDTYPES="Fieldtypes<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_FIELDTYPES_CATID="Category &nbsp;For<br />Fieldtypes" COM_COMPONENTBUILDER_DASHBOARD_FIELDTYPES_CATID="Category &nbsp;For<br />Fieldtypes"
COM_COMPONENTBUILDER_DASHBOARD_FIELDTYPE_ADD="Add&nbsp;Fieldtype<br /><br />" COM_COMPONENTBUILDER_DASHBOARD_FIELDTYPE_ADD="Add&nbsp;Fieldtype<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_FIELD_ADD="Add&nbsp;Field<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_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_IMPORTJCBPACKAGES="Import JCB Packages<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_JOOMLA_COMPONENTS="Joomla Components<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_JOOMLA_COMPONENT_ADD="Add&nbsp;Joomla Component<br /><br />"
@ -3207,6 +3209,7 @@ COM_COMPONENTBUILDER_DASHBOARD_SITE_VIEW_ADD="Add&nbsp;Site View<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_SNIPPETS="Snippets<br /><br />" COM_COMPONENTBUILDER_DASHBOARD_SNIPPETS="Snippets<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_TEMPLATES="Templates<br /><br />" COM_COMPONENTBUILDER_DASHBOARD_TEMPLATES="Templates<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_TEMPLATE_ADD="Add&nbsp;Template<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_DATE="Date"
COM_COMPONENTBUILDER_DEBUG_LINE_NUMBERS="Debug (line numbers)" COM_COMPONENTBUILDER_DEBUG_LINE_NUMBERS="Debug (line numbers)"
COM_COMPONENTBUILDER_DEFAULT_LINK="Default (link)" COM_COMPONENTBUILDER_DEFAULT_LINK="Default (link)"
@ -3559,6 +3562,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_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_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_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_EXPORTIMPORT_DATA="Export/Import Data"
COM_COMPONENTBUILDER_EXPORT_COMPLETED="Export Completed!" COM_COMPONENTBUILDER_EXPORT_COMPLETED="Export Completed!"
COM_COMPONENTBUILDER_EXPORT_COMPONENTS="Export Components" COM_COMPONENTBUILDER_EXPORT_COMPONENTS="Export Components"
@ -3813,31 +3817,91 @@ COM_COMPONENTBUILDER_FIELD_NO="No"
COM_COMPONENTBUILDER_FIELD_NONE="None" COM_COMPONENTBUILDER_FIELD_NONE="None"
COM_COMPONENTBUILDER_FIELD_NONE_SET="None Set" COM_COMPONENTBUILDER_FIELD_NONE_SET="None Set"
COM_COMPONENTBUILDER_FIELD_NOTE_FILTER_INFORMATION_DESCRIPTION="<div class='form-horizontal'> COM_COMPONENTBUILDER_FIELD_NOTE_FILTER_INFORMATION_DESCRIPTION="<div class='form-horizontal'>
<div class='span6'> <div class='span4'>
<h1>Filter Information</h1> <h1>Filter Information</h1>
<b>The available values for the filter attribute are:</b><br /> <!-- The available values for the filter attribute are: -->
<p> <table class='uk-table uk-table-hover uk-table-striped uk-table-condensed'>
<code>INT</code> - An integer,<br /> <caption>The available values for the filter attribute are:</caption>
<code>UINT</code> - An unsigned integer,<br /> <thead>
<code>FLOAT</code> - A floating point number,<br /> <tr>
<code>BOOLEAN</code> - A boolean value,<br /> <th class='uk-text-right'>Filter</th>
<code>WORD</code> - A string containing A-Z or underscores only (not case sensitive),<br /> <th>Description</th>
<code>ALNUM</code> - A string containing A-Z or 0-9 only (not case sensitive),<br /> </tr>
<code>CMD</code> - A string containing A-Z, 0-9, underscores, periods or hyphens (not case sensitive),<br /> </thead>
<code>BASE64</code> - A string containing A-Z, 0-9, forward slashes, plus or equals (not case sensitive),<br /> <tbody>
<code>STRING</code> - A fully decoded and sanitized string (default),<br /> <tr>
<code>HTML</code> - A sanitized string,<br /> <td class='uk-text-right'><code>INT</code></td>
<code>ARRAY</code> - An array,<br /> <td>An integer</td>
<code>PATH</code> - A sanitized file path,<br /> </tr>
<code>USERNAME</code> - Do not use (use an application specific filter),<br /> <tr>
<code>RAW</code> - The raw string is returned with no filtering,<br /> <td class='uk-text-right'><code>UINT</code></td>
<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. <td>An unsigned integer</td>
</p> </tr>
</div> <tr>
<div class='span6'> <td class='uk-text-right'><code>FLOAT</code></td>
<h1>Linked To</h1> <td>A floating point number</td>
<div id='display_linked_to'>Searching the database.<span class='loading-dots'></span></div> </tr>
</div> <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</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>" </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 /> 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 /> <a href='https://www.whmcs.com/addons/licensing-addon/' target='_blank'>https://www.whmcs.com/addons/licensing-addon/</a><br />
@ -3891,6 +3955,7 @@ COM_COMPONENTBUILDER_FOLDER_BSB_WAS_MOVED_TO_BSB="Folder <b>%s</b> was moved to
COM_COMPONENTBUILDER_FOLDER_BSB_WAS_NOT_MOVE_TO_BSB="Folder <b>%s</b> was not move 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_FORCE_LOCAL_UPDATE="Force Local Update"
COM_COMPONENTBUILDER_FULL_WIDTH_IN_TAB="Full Width in Tab" 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_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_GETTING_AVAILABLE_LIBRARIES="Getting available libraries"
COM_COMPONENTBUILDER_GET_ALL_NEW_SNIPPETS="Get All New Snippets" COM_COMPONENTBUILDER_GET_ALL_NEW_SNIPPETS="Get All New Snippets"
@ -3902,6 +3967,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_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="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_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_DESC="The compiler"
COM_COMPONENTBUILDER_GET_SNIPPETS_LAYOUTS_BUTTON_ACCESS="Get Snippets Layouts Button Access" 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_LAYOUTS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the layouts button."
@ -3911,6 +3978,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_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="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_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="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_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>" 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>"
@ -3918,6 +3987,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_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_GLOBAL="Global"
COM_COMPONENTBUILDER_GREAT_THIS_FUNCTION_NAME_WILL_WORK="Great, this function name will work!" 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_HAS_METADATA="Has Metadata"
COM_COMPONENTBUILDER_HELP_DOCUMENT="Help Document" COM_COMPONENTBUILDER_HELP_DOCUMENT="Help Document"
COM_COMPONENTBUILDER_HELP_DOCUMENTS="Help Documents" COM_COMPONENTBUILDER_HELP_DOCUMENTS="Help Documents"
@ -3929,8 +3999,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_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="Help Documents Create"
COM_COMPONENTBUILDER_HELP_DOCUMENTS_CREATE_DESC="Allows the users in this group to create create help documents" 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="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_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" COM_COMPONENTBUILDER_HELP_DOCUMENTS_DELETE="Help Documents Delete"
@ -4081,6 +4149,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_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_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_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_SELECT_FILE_URL="Enter file URL"
COM_COMPONENTBUILDER_IMPORT_SUCCESS="Great! Import successful." COM_COMPONENTBUILDER_IMPORT_SUCCESS="Great! Import successful."
COM_COMPONENTBUILDER_IMPORT_TABLE_COLUMNS="Table Columns" COM_COMPONENTBUILDER_IMPORT_TABLE_COLUMNS="Table Columns"
@ -4772,6 +4841,7 @@ COM_COMPONENTBUILDER_LAYOUT_ALIAS_DESCRIPTION="Add Name in Code Here"
COM_COMPONENTBUILDER_LAYOUT_ALIAS_HINT="codename" COM_COMPONENTBUILDER_LAYOUT_ALIAS_HINT="codename"
COM_COMPONENTBUILDER_LAYOUT_ALIAS_LABEL="Name in Code" COM_COMPONENTBUILDER_LAYOUT_ALIAS_LABEL="Name in Code"
COM_COMPONENTBUILDER_LAYOUT_ALIAS_MESSAGE="Error! Please add name in code here." 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_DESC="The user that created this Layout."
COM_COMPONENTBUILDER_LAYOUT_CREATED_BY_LABEL="Created By" COM_COMPONENTBUILDER_LAYOUT_CREATED_BY_LABEL="Created By"
COM_COMPONENTBUILDER_LAYOUT_CREATED_DATE_DESC="The date this Layout was created." COM_COMPONENTBUILDER_LAYOUT_CREATED_DATE_DESC="The date this Layout was created."
@ -5231,6 +5301,7 @@ COM_COMPONENTBUILDER_MIN_LENGTH_ONLY_FOUR_TEXT_FIELD="Min Length (only 4 text_fi
COM_COMPONENTBUILDER_NAME="Name" COM_COMPONENTBUILDER_NAME="Name"
COM_COMPONENTBUILDER_NAME_ASC="Name (Asc)" COM_COMPONENTBUILDER_NAME_ASC="Name (Asc)"
COM_COMPONENTBUILDER_NAME_DESC="Name (Desc)" COM_COMPONENTBUILDER_NAME_DESC="Name (Desc)"
COM_COMPONENTBUILDER_NAME_OF_DYNAMICGET="Name of dynamicGet"
COM_COMPONENTBUILDER_NEED_HELP="Need help?" COM_COMPONENTBUILDER_NEED_HELP="Need help?"
COM_COMPONENTBUILDER_NEW="New" COM_COMPONENTBUILDER_NEW="New"
COM_COMPONENTBUILDER_NEW_ISSUE="New Issue" COM_COMPONENTBUILDER_NEW_ISSUE="New Issue"
@ -5253,6 +5324,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_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_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_TYPE="No Type"
COM_COMPONENTBUILDER_NO_VALIDATION_RULES_FOUND="No validation rules found."
COM_COMPONENTBUILDER_OFFICIAL_VDM_PACKAGES="Official VDM Packages" COM_COMPONENTBUILDER_OFFICIAL_VDM_PACKAGES="Official VDM Packages"
COM_COMPONENTBUILDER_ON_GITHUB="on Github" COM_COMPONENTBUILDER_ON_GITHUB="on Github"
COM_COMPONENTBUILDER_OPEN="Open" COM_COMPONENTBUILDER_OPEN="Open"
@ -5274,6 +5346,7 @@ COM_COMPONENTBUILDER_PACKAGE_OWNER_NOT_SET="Package Owner Not Set"
COM_COMPONENTBUILDER_PATH_CODESCODE="Path: <code>%s</code>" 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_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_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_FILES_TO_S="Please add files to (%s)"
COM_COMPONENTBUILDER_PLEASE_ADD_FOLDERS_TO_S="Please add folders 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_CHECK_AGAIN_LATTER="Please check again latter."
@ -5282,6 +5355,7 @@ COM_COMPONENTBUILDER_PLEASE_SELECT_A_COMPONENT_THAT_YOU_WOULD_LIKE_TO_COMPILE="P
COM_COMPONENTBUILDER_PLEASE_TRY_AGAIN_LATER="Please try again later" 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_CLEARING_THE_TMP_FOLDER="Please wait! Clearing the tmp folder"
COM_COMPONENTBUILDER_PLEASE_WAIT_LOADING="Please wait, loading" COM_COMPONENTBUILDER_PLEASE_WAIT_LOADING="Please wait, loading"
COM_COMPONENTBUILDER_PROPERTY="Property"
COM_COMPONENTBUILDER_PUBLIC_ACCESS="Public Access" COM_COMPONENTBUILDER_PUBLIC_ACCESS="Public Access"
COM_COMPONENTBUILDER_PUBLISHED="Published" COM_COMPONENTBUILDER_PUBLISHED="Published"
COM_COMPONENTBUILDER_PUBLISHING="Publishing" COM_COMPONENTBUILDER_PUBLISHING="Publishing"
@ -5290,6 +5364,9 @@ COM_COMPONENTBUILDER_READY_TO_COMPILE_A_COMPONENT="Ready to compile a component"
COM_COMPONENTBUILDER_RELEASED_THIS="released this" COM_COMPONENTBUILDER_RELEASED_THIS="released this"
COM_COMPONENTBUILDER_RENAME="Rename" COM_COMPONENTBUILDER_RENAME="Rename"
COM_COMPONENTBUILDER_REPORT_AN_ISSUE_BSB="Report an issue: <b>%s</b>" 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_RESPOND_TO_THIS_ISSUE_ON_GITHUB="Respond to this issue on Github"
COM_COMPONENTBUILDER_REVERT_ALL_AHEAD_SNIPPETS="Revert All Ahead Snippets" COM_COMPONENTBUILDER_REVERT_ALL_AHEAD_SNIPPETS="Revert All Ahead Snippets"
COM_COMPONENTBUILDER_REVIEW_THIS_ISSUE_ON_GITHUB="Review this issue on Github" COM_COMPONENTBUILDER_REVIEW_THIS_ISSUE_ON_GITHUB="Review this issue on Github"
@ -6117,6 +6194,8 @@ 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_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_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_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_SORTABLE="Sortable"
COM_COMPONENTBUILDER_SUBMENU="Submenu" COM_COMPONENTBUILDER_SUBMENU="Submenu"
COM_COMPONENTBUILDER_SUBMENU_ADMIN_VIEWS="Admin Views" COM_COMPONENTBUILDER_SUBMENU_ADMIN_VIEWS="Admin Views"
@ -6138,6 +6217,7 @@ COM_COMPONENTBUILDER_SUBMENU_SERVERS="Servers"
COM_COMPONENTBUILDER_SUBMENU_SITE_VIEWS="Site Views" COM_COMPONENTBUILDER_SUBMENU_SITE_VIEWS="Site Views"
COM_COMPONENTBUILDER_SUBMENU_SNIPPETS="Snippets" COM_COMPONENTBUILDER_SUBMENU_SNIPPETS="Snippets"
COM_COMPONENTBUILDER_SUBMENU_TEMPLATES="Templates" 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="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_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" COM_COMPONENTBUILDER_S_BEING_IMPORTED="%s Being Imported"
@ -6202,6 +6282,7 @@ COM_COMPONENTBUILDER_TEMPLATE_ALIAS_DESCRIPTION="Add Name in Code Here"
COM_COMPONENTBUILDER_TEMPLATE_ALIAS_HINT="codename" COM_COMPONENTBUILDER_TEMPLATE_ALIAS_HINT="codename"
COM_COMPONENTBUILDER_TEMPLATE_ALIAS_LABEL="Name in Code" COM_COMPONENTBUILDER_TEMPLATE_ALIAS_LABEL="Name in Code"
COM_COMPONENTBUILDER_TEMPLATE_ALIAS_MESSAGE="Error! Please add name in code here." 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_DESC="The user that created this Template."
COM_COMPONENTBUILDER_TEMPLATE_CREATED_BY_LABEL="Created By" COM_COMPONENTBUILDER_TEMPLATE_CREATED_BY_LABEL="Created By"
COM_COMPONENTBUILDER_TEMPLATE_CREATED_DATE_DESC="The date this Template was created." COM_COMPONENTBUILDER_TEMPLATE_CREATED_DATE_DESC="The date this Template was created."
@ -6273,6 +6354,7 @@ COM_COMPONENTBUILDER_THERE_HAS_BEEN_AN_ERROR_IF_THIS_CONTINUES_PLEASE_INFORM_YOU
COM_COMPONENTBUILDER_THERE_WAS_AN_ERROR_GETTING_THE_PACKAGE_INFO="There was an error getting the package info." 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_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_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_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_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." 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."
@ -6311,6 +6393,7 @@ COM_COMPONENTBUILDER_THIS_PACKAGE_BPASSEDB_CHECKSUM_VALIDATION_PLEASE_VALIDATE_T
COM_COMPONENTBUILDER_THIS_PACKAGE_HAS_NO_KEY="This package has no key." COM_COMPONENTBUILDER_THIS_PACKAGE_HAS_NO_KEY="This package has no key."
COM_COMPONENTBUILDER_TITLE="Title" COM_COMPONENTBUILDER_TITLE="Title"
COM_COMPONENTBUILDER_TOTAL_DOWNLOADS="total downloads" 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_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_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," COM_COMPONENTBUILDER_TO_SHARE_THESE_SNIPPETS_WITH_THE_REST_OF_THE_JCB_COMMUNITY="To share these snippets with the rest of the JCB community,"
@ -6322,6 +6405,7 @@ COM_COMPONENTBUILDER_TYPE="Type"
COM_COMPONENTBUILDER_TYPE_ASC="Type (Asc)" COM_COMPONENTBUILDER_TYPE_ASC="Type (Asc)"
COM_COMPONENTBUILDER_TYPE_DESC="Type (Desc)" COM_COMPONENTBUILDER_TYPE_DESC="Type (Desc)"
COM_COMPONENTBUILDER_TYPE_ERROR="Type Error" 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_UNACTIVE_ONLY_FOUR_TEXT_FIELD="Unactive (only 4 text_field)"
COM_COMPONENTBUILDER_UNDERNEATH_TABS="Underneath Tabs" COM_COMPONENTBUILDER_UNDERNEATH_TABS="Underneath Tabs"
COM_COMPONENTBUILDER_UPDATE="Update" COM_COMPONENTBUILDER_UPDATE="Update"
@ -6333,6 +6417,90 @@ COM_COMPONENTBUILDER_USED_IN="used in"
COM_COMPONENTBUILDER_USE_BATCH="Use Batch" 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_BATCH_DESC=" Allows users in this group to use batch copy/update method."
COM_COMPONENTBUILDER_USE_KEY="Use Key" 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_NOTICE_BOARD="VDM Notice Board"
COM_COMPONENTBUILDER_VDM_PACKAGES="VDM Packages" COM_COMPONENTBUILDER_VDM_PACKAGES="VDM Packages"
COM_COMPONENTBUILDER_VERSION="Version" COM_COMPONENTBUILDER_VERSION="Version"
@ -6361,6 +6529,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_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="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_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_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_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." 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_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="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_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="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_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" 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_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="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_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="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_SNIPPETS_TEMPLATES_BUTTON_ACCESS_DESC=" Allows the users in this group to access the templates button."
COM_COMPONENTBUILDER_HELP_DOCUMENTS_ACCESS="Help Documents Access" 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_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="Help Documents Create"
COM_COMPONENTBUILDER_HELP_DOCUMENTS_CREATE_DESC="Allows the users in this group to create create help documents" 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="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_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" 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_SITE_VIEWS="Site Views"
COM_COMPONENTBUILDER_MENU_SNIPPETS="Snippets" COM_COMPONENTBUILDER_MENU_SNIPPETS="Snippets"
COM_COMPONENTBUILDER_MENU_TEMPLATES="Templates" COM_COMPONENTBUILDER_MENU_TEMPLATES="Templates"
COM_COMPONENTBUILDER_MENU_VALIDATION_RULES="Validation Rules"
COM_COMPONENTBUILDER_SERVERS_ACCESS="Servers Access" COM_COMPONENTBUILDER_SERVERS_ACCESS="Servers Access"
COM_COMPONENTBUILDER_SERVERS_ACCESS_DESC="Allows the users in this group to access access servers" COM_COMPONENTBUILDER_SERVERS_ACCESS_DESC="Allows the users in this group to access access servers"
COM_COMPONENTBUILDER_SERVERS_BATCH_USE="Servers Batch Use" COM_COMPONENTBUILDER_SERVERS_BATCH_USE="Servers Batch Use"
@ -764,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_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="Use Batch"
COM_COMPONENTBUILDER_USE_BATCH_DESC=" Allows users in this group to use batch copy/update method." 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

@ -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

@ -1120,8 +1120,12 @@ class ComponentbuilderModelAjax extends JModelList
// get the linked to // get the linked to
if ($linked = $this->getLinkedTo($values['a_view'], $values['a_id'])) if ($linked = $this->getLinkedTo($values['a_view'], $values['a_id']))
{ {
// just return it for now as an unordered list // just return it for now a table
return '<div class="control-group"><ul class="uk-list uk-list-striped"><li>' .implode('</li><li>', $linked) . '</li></ul></div></div>'; $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,9 +1303,10 @@ class ComponentbuilderModelAjax extends JModelList
// Used in template // Used in template
public function getTemplateDetails($id) public function getTemplateDetails($id)
{ {
// set table
$table = false;
// Get a db connection. // Get a db connection.
$db = JFactory::getDbo(); $db = JFactory::getDbo();
// Create a new query object. // Create a new query object.
$query = $db->getQuery(true); $query = $db->getQuery(true);
$query->select($db->quoteName(array('a.alias','a.template','b.name'))); $query->select($db->quoteName(array('a.alias','a.template','b.name')));
@ -1309,30 +1314,33 @@ class ComponentbuilderModelAjax extends JModelList
$query->join('LEFT', $db->quoteName('#__componentbuilder_dynamic_get', 'b') . ' ON (' . $db->quoteName('b.id') . ' = ' . $db->quoteName('a.dynamic_get') . ')'); $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.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. // Reset the query using our newly populated query object.
$db->setQuery($query); $db->setQuery($query);
$db->execute(); $db->execute();
if ($db->getNumRows()) if ($db->getNumRows())
{ {
$results = $db->loadObjectList(); $results = $db->loadObjectList();
$templateString = array('<h3>Template Code Snippets</h3><div class="row-fluid form-horizontal-desktop">'); $templateString = array();
foreach ($results as $result) 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 />"; // build the table
return implode("\n",$templateString); $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 // Used in layout
public function getLayoutDetails($id) public function getLayoutDetails($id)
{ {
// set table
$table = false;
// Get a db connection. // Get a db connection.
$db = JFactory::getDbo(); $db = JFactory::getDbo();
// Create a new query object. // Create a new query object.
$query = $db->getQuery(true); $query = $db->getQuery(true);
$query->select($db->quoteName(array('a.alias','a.layout','b.getcustom','b.gettype','b.name'))); $query->select($db->quoteName(array('a.alias','a.layout','b.getcustom','b.gettype','b.name')));
@ -1340,25 +1348,24 @@ class ComponentbuilderModelAjax extends JModelList
$query->join('LEFT', $db->quoteName('#__componentbuilder_dynamic_get', 'b') . ' ON (' . $db->quoteName('b.id') . ' = ' . $db->quoteName('a.dynamic_get') . ')'); $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.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. // Reset the query using our newly populated query object.
$db->setQuery($query); $db->setQuery($query);
$db->execute(); $db->execute();
if ($db->getNumRows()) if ($db->getNumRows())
{ {
$results = $db->loadObjectList(); $results = $db->loadObjectList();
$layoutString = array('<h3>Layout Code Snippets</h3><div class="row-fluid form-horizontal-desktop">'); $layoutString = array();
foreach ($results as $result) foreach ($results as $result)
{ {
switch ($result->gettype) switch ($result->gettype)
{ {
case 1: case 1:
// single // 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; break;
case 2: case 2:
// list // 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; break;
case 3: case 3:
case 4: case 4:
@ -1372,14 +1379,17 @@ class ComponentbuilderModelAjax extends JModelList
{ {
$varName = $result->getcustom; $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; break;
} }
} }
$layoutString[] = "</div><hr />"; // build the table
return implode("\n",$layoutString); $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 // Used in dynamic_get
@ -2029,6 +2039,126 @@ class ComponentbuilderModelAjax extends JModelList
return false; 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 type="text" name="email_check" validate="equals" field="email" /&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 type="text" name="link" validate="url" scheme="http,https,mailto" /&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 // Used in field
public function getFieldOptions($id) public function getFieldOptions($id)
{ {

View File

@ -43,12 +43,14 @@ class ComponentbuilderModelComponentbuilder extends JModelList
$icons = array(); $icons = array();
// view groups array // view groups array
$viewGroups = array( $viewGroups = array(
'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||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 // view access array
$viewAccess = array( $viewAccess = array(
'compiler.submenu' => 'compiler.submenu', 'compiler.submenu' => 'compiler.submenu',
'compiler.dashboard_list' => 'compiler.dashboard_list', '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_component.create' => 'joomla_component.create',
'joomla_components.access' => 'joomla_component.access', 'joomla_components.access' => 'joomla_component.access',
'joomla_component.access' => 'joomla_component.access', 'joomla_component.access' => 'joomla_component.access',
@ -101,6 +103,11 @@ class ComponentbuilderModelComponentbuilder extends JModelList
'snippet.access' => 'snippet.access', 'snippet.access' => 'snippet.access',
'snippets.submenu' => 'snippet.submenu', 'snippets.submenu' => 'snippet.submenu',
'snippets.dashboard_list' => 'snippet.dashboard_list', 'snippets.dashboard_list' => 'snippet.dashboard_list',
'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', 'field.create' => 'field.create',
'fields.access' => 'field.access', 'fields.access' => 'field.access',
'field.access' => 'field.access', 'field.access' => 'field.access',
@ -132,7 +139,6 @@ class ComponentbuilderModelComponentbuilder extends JModelList
'help_document.access' => 'help_document.access', 'help_document.access' => 'help_document.access',
'help_documents.submenu' => 'help_document.submenu', 'help_documents.submenu' => 'help_document.submenu',
'help_documents.dashboard_list' => 'help_document.dashboard_list', 'help_documents.dashboard_list' => 'help_document.dashboard_list',
'help_document.dashboard_add' => 'help_document.dashboard_add',
'admin_fields.create' => 'admin_fields.create', 'admin_fields.create' => 'admin_fields.create',
'admins_fields.access' => 'admin_fields.access', 'admins_fields.access' => 'admin_fields.access',
'admin_fields.access' => 'admin_fields.access', 'admin_fields.access' => 'admin_fields.access',

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

@ -278,12 +278,12 @@ function checkFunctionName(functioName) {
// now start search for where the function is used // now start search for where the function is used
usedin(result.name, ide); usedin(result.name, ide);
} else if(result.message){ } 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.UIkit.notify({message: result.message, timeout: 5000, status: result.status, pos: 'top-right'});
jQuery('#jform_function_name').val(''); jQuery('#jform_function_name').val('');
} else { } else {
// set an error that message was not send // 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(''); jQuery('#jform_function_name').val('');
} }
// set custom code placeholder // set custom code placeholder
@ -291,7 +291,7 @@ function checkFunctionName(functioName) {
}); });
} else { } else {
// set an error that message was not send // 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(''); jQuery('#jform_function_name').val('');
// set custom code placeholder // set custom code placeholder
setCustomCodePlaceholder(); setCustomCodePlaceholder();

View File

@ -514,6 +514,8 @@ jQuery(document).ready(function()
{ {
// get the linked details // get the linked details
getLinked(); getLinked();
// get the validation rules
getValidationRulesTable();
}); });
function getLinked_server(type){ function getLinked_server(type){
@ -563,3 +565,25 @@ function getFieldOptions(id,setValue){
} }
}) })
} }
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

@ -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

@ -1433,21 +1433,21 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
} }
// repeatable fields to update // repeatable fields to update
$updaterR = array( $updaterR = array(
// repeatablefield => checker // repeatablefield => checker
'join_view_table' => 'view_table', 'join_view_table' => 'view_table',
'join_db_table' => 'db_table', 'join_db_table' => 'db_table',
'order' => 'table_key', 'order' => 'table_key',
'where' => 'table_key', 'where' => 'table_key',
'global' => 'name', 'global' => 'name',
'filter' => 'filter_type' 'filter' => 'filter_type'
); );
// update the repeatable fields // update the repeatable fields
$item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR); $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
// subform fields to target // subform fields to target
$updaterT = array( $updaterT = array(
// subformfield => field => type_value // subformfield => field => type_value
'join_view_table' => array('view_table' => 'admin_view') 'join_view_table' => array('view_table' => 'admin_view')
); );
// update the subform ids // update the subform ids
$this->updateSubformsIDs($item, 'dynamic_get', $updaterT); $this->updateSubformsIDs($item, 'dynamic_get', $updaterT);
break; break;
@ -1470,10 +1470,10 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
$item = $this->setNewID($item, 'snippet', 'snippet', $type); $item = $this->setNewID($item, 'snippet', 'snippet', $type);
// repeatable fields to update // repeatable fields to update
$updaterR = array( $updaterR = array(
// repeatablefield => checker // repeatablefield => checker
'ajax_input' => 'value_name', 'ajax_input' => 'value_name',
'custom_button' => 'name' 'custom_button' => 'name'
); );
// update the repeatable fields // update the repeatable fields
$item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR); $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
break; break;
@ -1515,14 +1515,14 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
unset($item->addconditions); unset($item->addconditions);
// repeatable fields to update // repeatable fields to update
$updaterR = array( $updaterR = array(
// repeatablefield => checker // repeatablefield => checker
'ajax_input' => 'value_name', 'ajax_input' => 'value_name',
'custom_button' => 'name', 'custom_button' => 'name',
'addtables' => 'table', 'addtables' => 'table',
'addlinked_views' => 'adminview', 'addlinked_views' => 'adminview',
'addtabs' => 'name', 'addtabs' => 'name',
'addpermissions' => 'action' 'addpermissions' => 'action'
); );
// update the repeatable fields // update the repeatable fields
$item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR); $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
break; break;
@ -1646,9 +1646,9 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
} }
// repeatable fields to update // repeatable fields to update
$updaterR = array( $updaterR = array(
// repeatablefield => checker // repeatablefield => checker
'addcontributors' => 'name' 'addcontributors' => 'name'
); );
// update the repeatable fields // update the repeatable fields
$item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR); $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
break; break;
@ -1661,16 +1661,16 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
} }
// repeatable fields to update // repeatable fields to update
$updaterR = array( $updaterR = array(
// repeatablefield => checker // repeatablefield => checker
'addadmin_views' => 'adminview' 'addadmin_views' => 'adminview'
); );
// update the repeatable fields // update the repeatable fields
$item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR); $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
// subform fields to target // subform fields to target
$updaterT = array( $updaterT = array(
// subformfield => array( field => type_value ) // subformfield => array( field => type_value )
'addadmin_views' => array('adminview' => 'admin_view') 'addadmin_views' => array('adminview' => 'admin_view')
); );
// update the subform ids // update the subform ids
$this->updateSubformsIDs($item, 'component_admin_views', $updaterT); $this->updateSubformsIDs($item, 'component_admin_views', $updaterT);
break; break;
@ -1683,16 +1683,16 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
} }
// repeatable fields to update // repeatable fields to update
$updaterR = array( $updaterR = array(
// repeatablefield => checker // repeatablefield => checker
'addsite_views' => 'siteview' 'addsite_views' => 'siteview'
); );
// update the repeatable fields // update the repeatable fields
$item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR); $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
// subform fields to target // subform fields to target
$updaterT = array( $updaterT = array(
// subformfield => array( field => type_value ) // subformfield => array( field => type_value )
'addsite_views' => array('siteview' => 'site_view') 'addsite_views' => array('siteview' => 'site_view')
); );
// update the subform ids // update the subform ids
$this->updateSubformsIDs($item, 'component_site_views', $updaterT); $this->updateSubformsIDs($item, 'component_site_views', $updaterT);
break; break;
@ -1705,16 +1705,16 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
} }
// repeatable fields to update // repeatable fields to update
$updaterR = array( $updaterR = array(
// repeatablefield => checker // repeatablefield => checker
'addcustom_admin_views' => 'customadminview' 'addcustom_admin_views' => 'customadminview'
); );
// update the repeatable fields // update the repeatable fields
$item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR); $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
// subform fields to target // subform fields to target
$updaterT = array( $updaterT = array(
// subformfield => array( field => type_value ) // subformfield => array( field => type_value )
'addcustom_admin_views' => array('customadminview' => 'custom_admin_view', 'adminviews' => 'admin_view', 'before' => 'admin_view') 'addcustom_admin_views' => array('customadminview' => 'custom_admin_view', 'adminviews' => 'admin_view', 'before' => 'admin_view')
); );
// update the subform ids // update the subform ids
$this->updateSubformsIDs($item, 'component_custom_admin_views', $updaterT); $this->updateSubformsIDs($item, 'component_custom_admin_views', $updaterT);
break; break;
@ -1727,9 +1727,9 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
} }
// repeatable fields to update // repeatable fields to update
$updaterR = array( $updaterR = array(
// repeatablefield => checker // repeatablefield => checker
'version_update' => 'version' 'version_update' => 'version'
); );
// update the repeatable fields // update the repeatable fields
$item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR); $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
break; break;
@ -1749,9 +1749,9 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
$item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR); $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
// subform fields to target // subform fields to target
$updaterT = array( $updaterT = array(
// subformfield => array( field => type_value ) // subformfield => array( field => type_value )
'sql_tweak' => array('adminview' => 'admin_view') 'sql_tweak' => array('adminview' => 'admin_view')
); );
// update the subform ids // update the subform ids
$this->updateSubformsIDs($item, 'component_mysql_tweaks', $updaterT); $this->updateSubformsIDs($item, 'component_mysql_tweaks', $updaterT);
break; break;
@ -1764,16 +1764,16 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
} }
// repeatable fields to update // repeatable fields to update
$updaterR = array( $updaterR = array(
// repeatablefield => checker // repeatablefield => checker
'addcustommenus' => 'name' 'addcustommenus' => 'name'
); );
// update the repeatable fields // update the repeatable fields
$item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR); $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
// subform fields to target // subform fields to target
$updaterT = array( $updaterT = array(
// subformfield => array( field => type_value ) // subformfield => array( field => type_value )
'addcustommenus' => array('before' => 'admin_view') 'addcustommenus' => array('before' => 'admin_view')
); );
// update the subform ids // update the subform ids
$this->updateSubformsIDs($item, 'component_custom_admin_menus', $updaterT); $this->updateSubformsIDs($item, 'component_custom_admin_menus', $updaterT);
break; break;
@ -1786,16 +1786,16 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
} }
// repeatable fields to update // repeatable fields to update
$updaterR = array( $updaterR = array(
// repeatablefield => checker // repeatablefield => checker
'addconfig' => 'field' 'addconfig' => 'field'
); );
// update the repeatable fields // update the repeatable fields
$item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR); $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
// subform fields to target // subform fields to target
$updaterT = array( $updaterT = array(
// subformfield => array( field => type_value ) // subformfield => array( field => type_value )
'addconfig' => array('field' => 'field') 'addconfig' => array('field' => 'field')
); );
// update the subform ids // update the subform ids
$this->updateSubformsIDs($item, 'component_config', $updaterT); $this->updateSubformsIDs($item, 'component_config', $updaterT);
break; break;
@ -1808,9 +1808,9 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
} }
// repeatable fields to update // repeatable fields to update
$updaterR = array( $updaterR = array(
// repeatablefield => checker // repeatablefield => checker
'dashboard_tab' => 'name' 'dashboard_tab' => 'name'
); );
// update the repeatable fields // update the repeatable fields
$item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR); $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
break; break;
@ -1823,10 +1823,10 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
} }
// repeatable fields to update // repeatable fields to update
$updaterR = array( $updaterR = array(
// repeatablefield => checker // repeatablefield => checker
'addfiles' => 'file', 'addfiles' => 'file',
'addfolders' => 'folder' 'addfolders' => 'folder'
); );
// update the repeatable fields // update the repeatable fields
$item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR); $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
break; break;

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 & alias.
*
* @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

@ -654,6 +654,34 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_snippet` (
KEY `idx_library` (`library`) KEY `idx_library` (`library`)
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; ) 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` ( CREATE TABLE IF NOT EXISTS `#__componentbuilder_field` (
`id` INT(11) NOT NULL AUTO_INCREMENT, `id` INT(11) NOT NULL AUTO_INCREMENT,
`asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.',
@ -1476,7 +1504,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, '', ''), (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, '', ''), (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, '', ''), (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, '', ''), (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, '', ''), (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, '', ''), (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, '', ''),
@ -1494,7 +1522,7 @@ INSERT INTO `#__componentbuilder_fieldtype` (`id`, `catid`, `description`, `name
(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, '', ''), (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), (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), (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), (33, '', 'The menuitem form field type provides a drop down grouped list of the available menu items from your Joomla site.', 'menuitem', '{\"properties0\":{\"name\":\"type\",\"example\":\"menuitem\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) must be menuitem.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mymenuitem\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select a menu item\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is the default menu item. Note that this is the ItemID number of the menu item.\"},\"properties4\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties5\":{\"name\":\"published\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) determines whether all menu items are listed or only published menu items. If state is \'0\' then all menu items will be listed. If state is \'1\' then only published menu items will be listed.\"},\"properties6\":{\"name\":\"filter\",\"example\":\"int\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties7\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) Allows you to hide the field based on the value(s) of another field; for Joomla 3.2.4+\"}}', 'provides a drop down list of the available menu items from your Joomla site.', '', 1, 2, '', 4),
(34, '', 'Remember all views already have [accesslevel] added by default, only add this if you need more custom access selection! Provides a dropdown list of accesslevel options with the current option selected.', 'Accesslevel', '{\"properties0\":{\"name\":\"type\",\"example\":\"accesslevel\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) must be accesslevel\"},\"properties1\":{\"name\":\"name\",\"example\":\"accesstwo\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the field. This must match the name of the query results column that contains the values that will be shown to the user in the drop-down list, unless a different name is specified in the value_field attribute. \"},\"properties2\":{\"name\":\"label\",\"example\":\"Access Two\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"Select a access level to this concept.\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is a CSS class name for the HTML form field.\"},\"properties5\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is the field required true if yes.\"},\"properties6\":{\"name\":\"multiple\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) If set to multiple then allows more than one usergroup to be selected.\"},\"properties7\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'List of accesslevels', '', 1, 1, '', 5), (34, '', 'Remember all views already have [accesslevel] added by default, only add this if you need more custom access selection! Provides a dropdown list of accesslevel options with the current option selected.', 'Accesslevel', '{\"properties0\":{\"name\":\"type\",\"example\":\"accesslevel\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) must be accesslevel\"},\"properties1\":{\"name\":\"name\",\"example\":\"accesstwo\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the field. This must match the name of the query results column that contains the values that will be shown to the user in the drop-down list, unless a different name is specified in the value_field attribute. \"},\"properties2\":{\"name\":\"label\",\"example\":\"Access Two\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"Select a access level to this concept.\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is a CSS class name for the HTML form field.\"},\"properties5\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is the field required true if yes.\"},\"properties6\":{\"name\":\"multiple\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) If set to multiple then allows more than one usergroup to be selected.\"},\"properties7\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'List of accesslevels', '', 1, 1, '', 5),
(35, '', 'Provides a form with rows of fields that you specify. As many options can be added as desired. Note this form field has a jQuery based javascript file as a dependency.', 'Subform', '{\"properties0\":{\"name\":\"type\",\"example\":\"subform\",\"description\":\"(mandatory) must be subform.\"},\"properties1\":{\"name\":\"name\",\"example\":\"options\",\"adjustable\":\"1\",\"description\":\"(mandatory) is the unique name of the parameter\"},\"properties2\":{\"name\":\"label\",\"example\":\"The Option List\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"layout\",\"example\":\"joomla.form.field.subform.repeatable-table\",\"adjustable\":\"1\",\"description\":\"(mandatory) The layout for the repeatable table.\"},\"properties4\":{\"name\":\"multiple\",\"example\":\"true\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The rows to be multiple.\"},\"properties5\":{\"name\":\"fields\",\"example\":\"1,2,3\",\"adjustable\":\"1\",\"description\":\"(mandatory) The fields to add to the modal. All fields must first be created in component builder as a field before you can add them here, since you must use the id of the field. Separate the field ids with commas. Do not add custom fields that are not also used in this component.\"},\"properties6\":{\"name\":\"formsource\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) you can add a path to a xml file containing the fields.\"},\"properties7\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) description text for the form field. Displays at the top of the modal with the name as well as in the usual position in the form\"},\"properties8\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The default value for the form field if the field is left empty. Note this has to be a json string compatible with the contents of the form field.\"},\"properties9\":{\"name\":\"icon\",\"example\":\"list\",\"adjustable\":\"1\",\"description\":\"(optional) The icon to show on the select button (is prefixed with \\\"icon-\\\").\"},\"properties10\":{\"name\":\"maximum\",\"example\":\"50\",\"adjustable\":\"1\",\"description\":\"(optional) The maximum number of rows of fields allowed (by default 999 to be effectively infinite)\"},\"properties11\":{\"name\":\"filter\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Use only if you would like to save raw data, since the default is best.\"},\"properties12\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'Allows form fields which can have as many options as the user desires.', '', 1, 9, '', 6); (35, '', 'Provides a form with rows of fields that you specify. As many options can be added as desired. Note this form field has a jQuery based javascript file as a dependency.', 'Subform', '{\"properties0\":{\"name\":\"type\",\"example\":\"subform\",\"description\":\"(mandatory) must be subform.\"},\"properties1\":{\"name\":\"name\",\"example\":\"options\",\"adjustable\":\"1\",\"description\":\"(mandatory) is the unique name of the parameter\"},\"properties2\":{\"name\":\"label\",\"example\":\"The Option List\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"layout\",\"example\":\"joomla.form.field.subform.repeatable-table\",\"adjustable\":\"1\",\"description\":\"(mandatory) The layout for the repeatable table.\"},\"properties4\":{\"name\":\"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_custom_code`;
DROP TABLE IF EXISTS `#__componentbuilder_library`; DROP TABLE IF EXISTS `#__componentbuilder_library`;
DROP TABLE IF EXISTS `#__componentbuilder_snippet`; DROP TABLE IF EXISTS `#__componentbuilder_snippet`;
DROP TABLE IF EXISTS `#__componentbuilder_validation_rule`;
DROP TABLE IF EXISTS `#__componentbuilder_field`; DROP TABLE IF EXISTS `#__componentbuilder_field`;
DROP TABLE IF EXISTS `#__componentbuilder_fieldtype`; DROP TABLE IF EXISTS `#__componentbuilder_fieldtype`;
DROP TABLE IF EXISTS `#__componentbuilder_language_translation`; 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,27 @@
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;

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/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/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); $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'); 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(function() {
jQuery("code").click(function() { setTimeout(
jQuery(this).selText().addClass("selected"); function() {
}); // load the on click event
jQuery("code").click(function() {
jQuery(this).selText().addClass("selected");
});
}, 2000);
}); });
jQuery.fn.selText = function() { jQuery.fn.selText = function() {

View File

@ -199,6 +199,15 @@ class ComponentbuilderViewLayout extends JViewLegacy
$this->document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); $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() . $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'); JText::script('view not acceptable. Error');
} }
} }

View File

@ -199,6 +199,15 @@ class ComponentbuilderViewTemplate extends JViewLegacy
$this->document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); $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() . $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'); JText::script('view not acceptable. Error');
} }
} }

View File

@ -0,0 +1,49 @@
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage submitbutton.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
/-----------------------------------------------------------------------------------------------------------------------------*/
Joomla.submitbutton = function(task)
{
if (task == ''){
return false;
} else {
var isValid=true;
var action = task.split('.');
if (action[1] != 'cancel' && action[1] != 'close'){
var forms = $$('form.form-validate');
for (var i=0;i<forms.length;i++){
if (!document.formvalidator.isValid(forms[i])){
isValid = false;
break;
}
}
}
if (isValid){
Joomla.submitform(task);
return true;
} else {
alert(Joomla.JText._('validation_rule, some values are not acceptable.','Some values are unacceptable'));
return false;
}
}
}

View File

@ -0,0 +1,156 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage edit.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');
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
$componentParams = JComponentHelper::getParams('com_componentbuilder');
?>
<script type="text/javascript">
// waiting spinner
var outerDiv = jQuery('body');
jQuery('<div id="loading"></div>')
.css("background", "rgba(255, 255, 255, .8) url('components/com_componentbuilder/assets/images/import.gif') 50% 15% no-repeat")
.css("top", outerDiv.position().top - jQuery(window).scrollTop())
.css("left", outerDiv.position().left - jQuery(window).scrollLeft())
.css("width", outerDiv.width())
.css("height", outerDiv.height())
.css("position", "fixed")
.css("opacity", "0.80")
.css("-ms-filter", "progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)")
.css("filter", "alpha(opacity = 80)")
.css("display", "none")
.appendTo(outerDiv);
jQuery('#loading').show();
// when page is ready remove and show
jQuery(window).load(function() {
jQuery('#componentbuilder_loader').fadeIn('fast');
jQuery('#loading').hide();
});
</script>
<div id="componentbuilder_loader" style="display: none;">
<form action="<?php echo JRoute::_('index.php?option=com_componentbuilder&layout=edit&id='.(int) $this->item->id.$this->referral); ?>" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
<?php echo JLayoutHelper::render('validation_rule.extends_formrule_above', $this); ?>
<div class="form-horizontal">
<?php echo JHtml::_('bootstrap.startTabSet', 'validation_ruleTab', array('active' => 'extends_formrule')); ?>
<?php echo JHtml::_('bootstrap.addTab', 'validation_ruleTab', 'extends_formrule', JText::_('COM_COMPONENTBUILDER_VALIDATION_RULE_EXTENDS_FORMRULE', true)); ?>
<div class="row-fluid form-horizontal-desktop">
<div class="span6">
<?php echo JLayoutHelper::render('validation_rule.extends_formrule_left', $this); ?>
</div>
<div class="span6">
<?php echo JLayoutHelper::render('validation_rule.extends_formrule_right', $this); ?>
</div>
</div>
<div class="row-fluid form-horizontal-desktop">
<div class="span12">
<?php echo JLayoutHelper::render('validation_rule.extends_formrule_fullwidth', $this); ?>
</div>
</div>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php if ($this->canDo->get('validation_rule.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('validation_rule.edit.state') || $this->canDo->get('core.edit.created')) : ?>
<?php echo JHtml::_('bootstrap.addTab', 'validation_ruleTab', 'publishing', JText::_('COM_COMPONENTBUILDER_VALIDATION_RULE_PUBLISHING', true)); ?>
<div class="row-fluid form-horizontal-desktop">
<div class="span6">
<?php echo JLayoutHelper::render('validation_rule.publishing', $this); ?>
</div>
<div class="span6">
<?php echo JLayoutHelper::render('validation_rule.publlshing', $this); ?>
</div>
</div>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php endif; ?>
<?php if ($this->canDo->get('core.admin')) : ?>
<?php echo JHtml::_('bootstrap.addTab', 'validation_ruleTab', 'permissions', JText::_('COM_COMPONENTBUILDER_VALIDATION_RULE_PERMISSION', true)); ?>
<div class="row-fluid form-horizontal-desktop">
<div class="span12">
<fieldset class="adminform">
<div class="adminformlist">
<?php foreach ($this->form->getFieldset('accesscontrol') as $field): ?>
<div>
<?php echo $field->label; echo $field->input;?>
</div>
<div class="clearfix"></div>
<?php endforeach; ?>
</div>
</fieldset>
</div>
</div>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php endif; ?>
<?php echo JHtml::_('bootstrap.endTabSet'); ?>
<div>
<input type="hidden" name="task" value="validation_rule.edit" />
<?php echo JHtml::_('form.token'); ?>
</div>
</div>
</div>
</form>
</div>
<script type="text/javascript">
jQuery('#componentbuilder_loader').on('change', '#jform_inherit',function (e) {
e.preventDefault();
// get type value
var rulefilename = jQuery("#jform_inherit option:selected").val();
getExistingValidationRuleCode(rulefilename);
});
jQuery('#componentbuilder_loader').on('change', '#jform_name',function (e)
{
var ruleName = jQuery('#jform_name').val();
// check if this rule name is taken
checkRuleName(ruleName);
});
// nice little dot trick :)
jQuery(document).ready( function($) {
var x=0;
setInterval(function() {
var dots = "";
x++;
for (var y=0; y < x%8; y++) {
dots+=".";
}
$(".loading-dots").text(dots);
} , 500);
});
</script>

View File

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

View File

@ -0,0 +1,218 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage view.html.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 view library
jimport('joomla.application.component.view');
/**
* Validation_rule View class
*/
class ComponentbuilderViewValidation_rule extends JViewLegacy
{
/**
* display method of View
* @return void
*/
public function display($tpl = null)
{
// Assign the variables
$this->form = $this->get('Form');
$this->item = $this->get('Item');
$this->script = $this->get('Script');
$this->state = $this->get('State');
// get action permissions
$this->canDo = ComponentbuilderHelper::getActions('validation_rule',$this->item);
// get input
$jinput = JFactory::getApplication()->input;
$this->ref = $jinput->get('ref', 0, 'word');
$this->refid = $jinput->get('refid', 0, 'int');
$this->referral = '';
if ($this->refid)
{
// return to the item that refered to this item
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
}
elseif($this->ref)
{
// return to the list view that refered to this item
$this->referral = '&ref='.(string)$this->ref;
}
// Set the toolbar
$this->addToolBar();
// Check for errors.
if (count($errors = $this->get('Errors')))
{
throw new Exception(implode("\n", $errors), 500);
}
// Display the template
parent::display($tpl);
// Set the document
$this->setDocument();
}
/**
* Setting the toolbar
*/
protected function addToolBar()
{
JFactory::getApplication()->input->set('hidemainmenu', true);
$user = JFactory::getUser();
$userId = $user->id;
$isNew = $this->item->id == 0;
JToolbarHelper::title( JText::_($isNew ? 'COM_COMPONENTBUILDER_VALIDATION_RULE_NEW' : 'COM_COMPONENTBUILDER_VALIDATION_RULE_EDIT'), 'pencil-2 article-add');
// Built the actions for new and existing records.
if ($this->refid || $this->ref)
{
if ($this->canDo->get('validation_rule.create') && $isNew)
{
// We can create the record.
JToolBarHelper::save('validation_rule.save', 'JTOOLBAR_SAVE');
}
elseif ($this->canDo->get('validation_rule.edit'))
{
// We can save the record.
JToolBarHelper::save('validation_rule.save', 'JTOOLBAR_SAVE');
}
if ($isNew)
{
// Do not creat but cancel.
JToolBarHelper::cancel('validation_rule.cancel', 'JTOOLBAR_CANCEL');
}
else
{
// We can close it.
JToolBarHelper::cancel('validation_rule.cancel', 'JTOOLBAR_CLOSE');
}
}
else
{
if ($isNew)
{
// For new records, check the create permission.
if ($this->canDo->get('validation_rule.create'))
{
JToolBarHelper::apply('validation_rule.apply', 'JTOOLBAR_APPLY');
JToolBarHelper::save('validation_rule.save', 'JTOOLBAR_SAVE');
JToolBarHelper::custom('validation_rule.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
};
JToolBarHelper::cancel('validation_rule.cancel', 'JTOOLBAR_CANCEL');
}
else
{
if ($this->canDo->get('validation_rule.edit'))
{
// We can save the new record
JToolBarHelper::apply('validation_rule.apply', 'JTOOLBAR_APPLY');
JToolBarHelper::save('validation_rule.save', 'JTOOLBAR_SAVE');
// We can save this record, but check the create permission to see
// if we can return to make a new one.
if ($this->canDo->get('validation_rule.create'))
{
JToolBarHelper::custom('validation_rule.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
}
}
$canVersion = ($this->canDo->get('core.version') && $this->canDo->get('validation_rule.version'));
if ($this->state->params->get('save_history', 1) && $this->canDo->get('validation_rule.edit') && $canVersion)
{
JToolbarHelper::versions('com_componentbuilder.validation_rule', $this->item->id);
}
if ($this->canDo->get('validation_rule.create'))
{
JToolBarHelper::custom('validation_rule.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);
}
JToolBarHelper::cancel('validation_rule.cancel', 'JTOOLBAR_CLOSE');
}
}
JToolbarHelper::divider();
// set help url for this view if found
$help_url = ComponentbuilderHelper::getHelpUrl('validation_rule');
if (ComponentbuilderHelper::checkString($help_url))
{
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
}
}
/**
* Escapes a value for output in a view script.
*
* @param mixed $var The output to escape.
*
* @return mixed The escaped value.
*/
public function escape($var)
{
if(strlen($var) > 30)
{
// use the helper htmlEscape method instead and shorten the string
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30);
}
// use the helper htmlEscape method instead.
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
}
/**
* Method to set up the document properties
*
* @return void
*/
protected function setDocument()
{
$isNew = ($this->item->id < 1);
if (!isset($this->document))
{
$this->document = JFactory::getDocument();
}
$this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_VALIDATION_RULE_NEW' : 'COM_COMPONENTBUILDER_VALIDATION_RULE_EDIT'));
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/validation_rule.css", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');
// 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/validation_rule/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);
// add var key
$this->document->addScriptDeclaration("var vastDevMod = '".$this->get('VDM')."';");
// need to add some language strings
JText::script('COM_COMPONENTBUILDER_VALIDATION_RULE_NAME_ALREADY_TAKEN_PLEASE_TRY_AGAIN');
JText::script('COM_COMPONENTBUILDER_YOU_MUST_ADD_AN_UNIQUE_VALIDATION_RULE_NAME');
JText::script('view not acceptable. Error');
}
}

View File

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

View File

@ -0,0 +1,99 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage default.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');
// load tooltip behavior
JHtml::_('behavior.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('dropdown.init');
JHtml::_('formbehavior.chosen', 'select');
if ($this->saveOrder)
{
$saveOrderingUrl = 'index.php?option=com_componentbuilder&task=validation_rules.saveOrderAjax&tmpl=component';
JHtml::_('sortablelist.sortable', 'validation_ruleList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl);
}
?>
<script type="text/javascript">
Joomla.orderTable = function()
{
table = document.getElementById("sortTable");
direction = document.getElementById("directionTable");
order = table.options[table.selectedIndex].value;
if (order != '<?php echo $this->listOrder; ?>')
{
dirn = 'asc';
}
else
{
dirn = direction.options[direction.selectedIndex].value;
}
Joomla.tableOrdering(order, dirn, '');
}
</script>
<form action="<?php echo JRoute::_('index.php?option=com_componentbuilder&view=validation_rules'); ?>" method="post" name="adminForm" id="adminForm">
<?php if(!empty( $this->sidebar)): ?>
<div id="j-sidebar-container" class="span2">
<?php echo $this->sidebar; ?>
</div>
<div id="j-main-container" class="span10">
<?php else : ?>
<div id="j-main-container">
<?php endif; ?>
<?php if (empty($this->items)): ?>
<?php echo $this->loadTemplate('toolbar');?>
<div class="alert alert-no-items">
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div>
<?php else : ?>
<?php echo $this->loadTemplate('toolbar');?>
<table class="table table-striped" id="validation_ruleList">
<thead><?php echo $this->loadTemplate('head');?></thead>
<tfoot><?php echo $this->loadTemplate('foot');?></tfoot>
<tbody><?php echo $this->loadTemplate('body');?></tbody>
</table>
<?php //Load the batch processing form. ?>
<?php if ($this->canCreate && $this->canEdit) : ?>
<?php echo JHtml::_(
'bootstrap.renderModal',
'collapseModal',
array(
'title' => JText::_('COM_COMPONENTBUILDER_VALIDATION_RULES_BATCH_OPTIONS'),
'footer' => $this->loadTemplate('batch_footer')
),
$this->loadTemplate('batch_body')
); ?>
<?php endif; ?>
<input type="hidden" name="filter_order" value="" />
<input type="hidden" name="filter_order_Dir" value="" />
<input type="hidden" name="boxchecked" value="0" />
</div>
<?php endif; ?>
<input type="hidden" name="task" value="" />
<?php echo JHtml::_('form.token'); ?>
</form>

View File

@ -0,0 +1,32 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage default_batch_body.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');
?>
<p><?php echo JText::_('COM_COMPONENTBUILDER_VALIDATION_RULES_BATCH_TIP'); ?></p>
<?php echo $this->batchDisplay; ?>

View File

@ -0,0 +1,37 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage default_batch_footer.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');
?>
<!-- clear the batch values if cancel -->
<button class="btn" type="button" onclick="" data-dismiss="modal">
<?php echo JText::_('JCANCEL'); ?>
</button>
<!-- post the batch values if process -->
<button class="btn btn-success" type="submit" onclick="Joomla.submitbutton('validation_rule.batch');">
<?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?>
</button>

View File

@ -0,0 +1,111 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage default_body.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');
$edit = "index.php?option=com_componentbuilder&view=validation_rules&task=validation_rule.edit";
?>
<?php foreach ($this->items as $i => $item): ?>
<?php
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
$userChkOut = JFactory::getUser($item->checked_out);
$canDo = ComponentbuilderHelper::getActions('validation_rule',$item,'validation_rules');
?>
<tr class="row<?php echo $i % 2; ?>">
<td class="order nowrap center hidden-phone">
<?php if ($canDo->get('validation_rule.edit.state')): ?>
<?php
if ($this->saveOrder)
{
$iconClass = ' inactive';
}
else
{
$iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED');
}
?>
<span class="sortable-handler<?php echo $iconClass; ?>">
<i class="icon-menu"></i>
</span>
<?php if ($this->saveOrder) : ?>
<input type="text" style="display:none" name="order[]" size="5"
value="<?php echo $item->ordering; ?>" class="width-20 text-area-order " />
<?php endif; ?>
<?php else: ?>
&#8942;
<?php endif; ?>
</td>
<td class="nowrap center">
<?php if ($canDo->get('validation_rule.edit')): ?>
<?php if ($item->checked_out) : ?>
<?php if ($canCheckin) : ?>
<?php echo JHtml::_('grid.id', $i, $item->id); ?>
<?php else: ?>
&#9633;
<?php endif; ?>
<?php else: ?>
<?php echo JHtml::_('grid.id', $i, $item->id); ?>
<?php endif; ?>
<?php else: ?>
&#9633;
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('validation_rule.edit')): ?>
<div class="name">
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'validation_rules.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->name); ?></div>
<?php endif; ?>
</td>
<td class="hidden-phone">
<?php echo $this->escape($item->short_description); ?>
</td>
<td class="center">
<?php if ($canDo->get('validation_rule.edit.state')) : ?>
<?php if ($item->checked_out) : ?>
<?php if ($canCheckin) : ?>
<?php echo JHtml::_('jgrid.published', $item->published, $i, 'validation_rules.', true, 'cb'); ?>
<?php else: ?>
<?php echo JHtml::_('jgrid.published', $item->published, $i, 'validation_rules.', false, 'cb'); ?>
<?php endif; ?>
<?php else: ?>
<?php echo JHtml::_('jgrid.published', $item->published, $i, 'validation_rules.', true, 'cb'); ?>
<?php endif; ?>
<?php else: ?>
<?php echo JHtml::_('jgrid.published', $item->published, $i, 'validation_rules.', false, 'cb'); ?>
<?php endif; ?>
</td>
<td class="nowrap center hidden-phone">
<?php echo $item->id; ?>
</td>
</tr>
<?php endforeach; ?>

View File

@ -0,0 +1,32 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage default_foot.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');
?>
<tr>
<td colspan="6"><?php echo $this->pagination->getListFooter(); ?></td>
</tr>

View File

@ -0,0 +1,64 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage default_head.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');
?>
<tr>
<?php if ($this->canEdit&& $this->canState): ?>
<th width="1%" class="nowrap center hidden-phone">
<?php echo JHtml::_('grid.sort', '<i class="icon-menu-2"></i>', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?>
</th>
<th width="20" class="nowrap center">
<?php echo JHtml::_('grid.checkall'); ?>
</th>
<?php else: ?>
<th width="20" class="nowrap center hidden-phone">
&#9662;
</th>
<th width="20" class="nowrap center">
&#9632;
</th>
<?php endif; ?>
<th class="nowrap" >
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_VALIDATION_RULE_NAME_LABEL', 'name', $this->listDirn, $this->listOrder); ?>
</th>
<th class="nowrap hidden-phone" >
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_VALIDATION_RULE_SHORT_DESCRIPTION_LABEL', 'short_description', $this->listDirn, $this->listOrder); ?>
</th>
<?php if ($this->canState): ?>
<th width="10" class="nowrap center" >
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_VALIDATION_RULE_STATUS', 'published', $this->listDirn, $this->listOrder); ?>
</th>
<?php else: ?>
<th width="10" class="nowrap center" >
<?php echo JText::_('COM_COMPONENTBUILDER_VALIDATION_RULE_STATUS'); ?>
</th>
<?php endif; ?>
<th width="5" class="nowrap center hidden-phone" >
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_VALIDATION_RULE_ID', 'id', $this->listDirn, $this->listOrder); ?>
</th>
</tr>

View File

@ -0,0 +1,59 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage default_toolbar.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');
?>
<div id="filter-bar" class="btn-toolbar">
<div class="filter-search btn-group pull-left">
<label for="filter_search" class="element-invisible"><?php echo JText::_('Search');?></label>
<input type="text" name="filter_search" id="filter_search" placeholder="<?php echo JText::_('JSEARCH_FILTER'); ?>" value="<?php echo $this->escape($this->state->get('filter.search')); ?>" class="hasTooltip" title="<?php echo JHtml::tooltipText('Search Validation_rules'); ?>" />
</div>
<div class="btn-group pull-left">
<button type="submit" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>"><i class="icon-search"></i></button>
<button type="button" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_CLEAR'); ?>" onclick="document.id('filter_search').value='';this.form.submit();"><i class="icon-remove"></i></button>
</div>
<div class="btn-group pull-right hidden-phone">
<label for="limit" class="element-invisible"><?php echo JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC');?></label>
<?php echo $this->pagination->getLimitBox(); ?>
</div>
<div class="btn-group pull-right hidden-phone">
<label for="directionTable" class="element-invisible"><?php echo JText::_('JFIELD_ORDERING_DESC');?></label>
<select name="directionTable" id="directionTable" class="input-medium" onchange="Joomla.orderTable()">
<option value=""><?php echo JText::_('JFIELD_ORDERING_DESC');?></option>
<option value="asc" <?php if ($this->listDirn == 'asc') echo 'selected="selected"'; ?>><?php echo JText::_('JGLOBAL_ORDER_ASCENDING');?></option>
<option value="desc" <?php if ($this->listDirn == 'desc') echo 'selected="selected"'; ?>><?php echo JText::_('JGLOBAL_ORDER_DESCENDING');?></option>
</select>
</div>
<div class="btn-group pull-right">
<label for="sortTable" class="element-invisible"><?php echo JText::_('JGLOBAL_SORT_BY');?></label>
<select name="sortTable" id="sortTable" class="input-medium" onchange="Joomla.orderTable()">
<option value=""><?php echo JText::_('JGLOBAL_SORT_BY');?></option>
<?php echo JHtml::_('select.options', $this->getSortFields(), 'value', 'text', $this->listOrder);?>
</select>
</div>
</div>
<div class="clearfix"> </div>

View File

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

View File

@ -0,0 +1,253 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage view.html.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 view library
jimport('joomla.application.component.view');
/**
* Componentbuilder View class for the Validation_rules
*/
class ComponentbuilderViewValidation_rules extends JViewLegacy
{
/**
* Validation_rules view display method
* @return void
*/
function display($tpl = null)
{
if ($this->getLayout() !== 'modal')
{
// Include helper submenu
ComponentbuilderHelper::addSubmenu('validation_rules');
}
// Assign data to the view
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$this->state = $this->get('State');
$this->user = JFactory::getUser();
$this->listOrder = $this->escape($this->state->get('list.ordering'));
$this->listDirn = $this->escape($this->state->get('list.direction'));
$this->saveOrder = $this->listOrder == 'ordering';
// get global action permissions
$this->canDo = ComponentbuilderHelper::getActions('validation_rule');
$this->canEdit = $this->canDo->get('validation_rule.edit');
$this->canState = $this->canDo->get('validation_rule.edit.state');
$this->canCreate = $this->canDo->get('validation_rule.create');
$this->canDelete = $this->canDo->get('validation_rule.delete');
$this->canBatch = $this->canDo->get('core.batch');
// We don't need toolbar in the modal window.
if ($this->getLayout() !== 'modal')
{
$this->addToolbar();
$this->sidebar = JHtmlSidebar::render();
// load the batch html
if ($this->canCreate && $this->canEdit && $this->canState)
{
$this->batchDisplay = JHtmlBatch_::render();
}
}
// Check for errors.
if (count($errors = $this->get('Errors')))
{
throw new Exception(implode("\n", $errors), 500);
}
// Display the template
parent::display($tpl);
// Set the document
$this->setDocument();
}
/**
* Setting the toolbar
*/
protected function addToolBar()
{
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_VALIDATION_RULES'), 'shield');
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=validation_rules');
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
if ($this->canCreate)
{
JToolBarHelper::addNew('validation_rule.add');
}
// Only load if there are items
if (ComponentbuilderHelper::checkArray($this->items))
{
if ($this->canEdit)
{
JToolBarHelper::editList('validation_rule.edit');
}
if ($this->canState)
{
JToolBarHelper::publishList('validation_rules.publish');
JToolBarHelper::unpublishList('validation_rules.unpublish');
JToolBarHelper::archiveList('validation_rules.archive');
if ($this->canDo->get('core.admin'))
{
JToolBarHelper::checkin('validation_rules.checkin');
}
}
// Add a batch button
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
{
// Get the toolbar object instance
$bar = JToolBar::getInstance('toolbar');
// set the batch button name
$title = JText::_('JTOOLBAR_BATCH');
// Instantiate a new JLayoutFile instance and render the batch button
$layout = new JLayoutFile('joomla.toolbar.batch');
// add the button to the page
$dhtml = $layout->render(array('title' => $title));
$bar->appendButton('Custom', $dhtml, 'batch');
}
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
{
JToolbarHelper::deleteList('', 'validation_rules.delete', 'JTOOLBAR_EMPTY_TRASH');
}
elseif ($this->canState && $this->canDelete)
{
JToolbarHelper::trash('validation_rules.trash');
}
if ($this->canDo->get('core.export') && $this->canDo->get('validation_rule.export'))
{
JToolBarHelper::custom('validation_rules.exportData', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_DATA', true);
}
}
if ($this->canDo->get('core.import') && $this->canDo->get('validation_rule.import'))
{
JToolBarHelper::custom('validation_rules.importData', 'upload', '', 'COM_COMPONENTBUILDER_IMPORT_DATA', false);
}
// set help url for this view if found
$help_url = ComponentbuilderHelper::getHelpUrl('validation_rules');
if (ComponentbuilderHelper::checkString($help_url))
{
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
}
// add the options comp button
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
{
JToolBarHelper::preferences('com_componentbuilder');
}
if ($this->canState)
{
JHtmlSidebar::addFilter(
JText::_('JOPTION_SELECT_PUBLISHED'),
'filter_published',
JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true)
);
// only load if batch allowed
if ($this->canBatch)
{
JHtmlBatch_::addListSelection(
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_STATE'),
'batch[published]',
JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true)
);
}
}
JHtmlSidebar::addFilter(
JText::_('JOPTION_SELECT_ACCESS'),
'filter_access',
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access'))
);
if ($this->canBatch && $this->canCreate && $this->canEdit)
{
JHtmlBatch_::addListSelection(
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
'batch[access]',
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
);
}
}
/**
* Method to set up the document properties
*
* @return void
*/
protected function setDocument()
{
if (!isset($this->document))
{
$this->document = JFactory::getDocument();
}
$this->document->setTitle(JText::_('COM_COMPONENTBUILDER_VALIDATION_RULES'));
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/validation_rules.css", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');
}
/**
* Escapes a value for output in a view script.
*
* @param mixed $var The output to escape.
*
* @return mixed The escaped value.
*/
public function escape($var)
{
if(strlen($var) > 50)
{
// use the helper htmlEscape method instead and shorten the string
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true);
}
// use the helper htmlEscape method instead.
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
}
/**
* Returns an array of fields the table can be sorted by
*
* @return array Array containing the field name to sort by as the key and display text as value
*/
protected function getSortFields()
{
return array(
'a.sorting' => JText::_('JGRID_HEADING_ORDERING'),
'a.published' => JText::_('JSTATUS'),
'a.name' => JText::_('COM_COMPONENTBUILDER_VALIDATION_RULE_NAME_LABEL'),
'a.short_description' => JText::_('COM_COMPONENTBUILDER_VALIDATION_RULE_SHORT_DESCRIPTION_LABEL'),
'a.id' => JText::_('JGRID_HEADING_ID')
);
}
}

View File

@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2" method="upgrade"> <extension type="component" version="3.2" method="upgrade">
<name>COM_COMPONENTBUILDER</name> <name>COM_COMPONENTBUILDER</name>
<creationDate>24th March, 2018</creationDate> <creationDate>27th March, 2018</creationDate>
<author>Llewellyn van der Merwe</author> <author>Llewellyn van der Merwe</author>
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail> <authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
<authorUrl>http://joomlacomponentbuilder.com</authorUrl> <authorUrl>http://joomlacomponentbuilder.com</authorUrl>
<copyright>Copyright (C) 2015. All Rights Reserved</copyright> <copyright>Copyright (C) 2015. All Rights Reserved</copyright>
<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license> <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
<version>2.7.0</version> <version>2.7.1</version>
<description><![CDATA[ <description><![CDATA[
<h1>Component Builder (v.2.7.0)</h1> <h1>Component Builder (v.2.7.1)</h1>
<div style="clear: both;"></div> <div style="clear: both;"></div>
<p>The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time. <p>The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time.
@ -83,6 +83,7 @@ Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/compo
<menu option="com_componentbuilder" view="custom_codes">COM_COMPONENTBUILDER_MENU_CUSTOM_CODES</menu> <menu option="com_componentbuilder" view="custom_codes">COM_COMPONENTBUILDER_MENU_CUSTOM_CODES</menu>
<menu option="com_componentbuilder" view="libraries">COM_COMPONENTBUILDER_MENU_LIBRARIES</menu> <menu option="com_componentbuilder" view="libraries">COM_COMPONENTBUILDER_MENU_LIBRARIES</menu>
<menu option="com_componentbuilder" view="snippets">COM_COMPONENTBUILDER_MENU_SNIPPETS</menu> <menu option="com_componentbuilder" view="snippets">COM_COMPONENTBUILDER_MENU_SNIPPETS</menu>
<menu option="com_componentbuilder" view="validation_rules">COM_COMPONENTBUILDER_MENU_VALIDATION_RULES</menu>
<menu option="com_componentbuilder" view="fields">COM_COMPONENTBUILDER_MENU_FIELDS</menu> <menu option="com_componentbuilder" view="fields">COM_COMPONENTBUILDER_MENU_FIELDS</menu>
<menu option="com_componentbuilder" view="fieldtypes">COM_COMPONENTBUILDER_MENU_FIELDTYPES</menu> <menu option="com_componentbuilder" view="fieldtypes">COM_COMPONENTBUILDER_MENU_FIELDTYPES</menu>
<menu option="com_componentbuilder" view="language_translations">COM_COMPONENTBUILDER_MENU_LANGUAGE_TRANSLATIONS</menu> <menu option="com_componentbuilder" view="language_translations">COM_COMPONENTBUILDER_MENU_LANGUAGE_TRANSLATIONS</menu>

View File

@ -1,21 +1,4 @@
<updates> <updates>
<update>
<name>Component Builder</name>
<description>Builds Complex Joomla Components</description>
<element>com_componentbuilder</element>
<type>component</type>
<version>2.5.0</version>
<infourl title="Component Builder!">http://joomlacomponentbuilder.com</infourl>
<downloads>
<downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.5.0/JCB_v2.5.0.zip</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
</tags>
<maintainer>Llewellyn van der Merwe</maintainer>
<maintainerurl>http://joomlacomponentbuilder.com</maintainerurl>
<targetplatform name="joomla" version="3.*"/>
</update>
<update> <update>
<name>Component Builder</name> <name>Component Builder</name>
<description>Builds Complex Joomla Components</description> <description>Builds Complex Joomla Components</description>
@ -67,23 +50,6 @@
<maintainerurl>http://joomlacomponentbuilder.com</maintainerurl> <maintainerurl>http://joomlacomponentbuilder.com</maintainerurl>
<targetplatform name="joomla" version="3.*"/> <targetplatform name="joomla" version="3.*"/>
</update> </update>
<update>
<name>Component Builder</name>
<description>Builds Complex Joomla Components</description>
<element>com_componentbuilder</element>
<type>component</type>
<version>2.5.4</version>
<infourl title="Component Builder!">http://joomlacomponentbuilder.com</infourl>
<downloads>
<downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.5.4/JCB_v2.5.4.zip</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
</tags>
<maintainer>Llewellyn van der Merwe</maintainer>
<maintainerurl>http://joomlacomponentbuilder.com</maintainerurl>
<targetplatform name="joomla" version="3.*"/>
</update>
<update> <update>
<name>Component Builder</name> <name>Component Builder</name>
<description>Builds Complex Joomla Components</description> <description>Builds Complex Joomla Components</description>
@ -152,57 +118,6 @@
<maintainerurl>http://joomlacomponentbuilder.com</maintainerurl> <maintainerurl>http://joomlacomponentbuilder.com</maintainerurl>
<targetplatform name="joomla" version="3.*"/> <targetplatform name="joomla" version="3.*"/>
</update> </update>
<update>
<name>Component Builder</name>
<description>Builds Complex Joomla Components</description>
<element>com_componentbuilder</element>
<type>component</type>
<version>2.6.0</version>
<infourl title="Component Builder!">http://joomlacomponentbuilder.com</infourl>
<downloads>
<downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.6.0/JCB_v2.6.0.zip</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
</tags>
<maintainer>Llewellyn van der Merwe</maintainer>
<maintainerurl>http://joomlacomponentbuilder.com</maintainerurl>
<targetplatform name="joomla" version="3.*"/>
</update>
<update>
<name>Component Builder</name>
<description>Builds Complex Joomla Components</description>
<element>com_componentbuilder</element>
<type>component</type>
<version>2.6.1</version>
<infourl title="Component Builder!">http://joomlacomponentbuilder.com</infourl>
<downloads>
<downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.6.1/JCB_v2.6.1.zip</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
</tags>
<maintainer>Llewellyn van der Merwe</maintainer>
<maintainerurl>http://joomlacomponentbuilder.com</maintainerurl>
<targetplatform name="joomla" version="3.*"/>
</update>
<update>
<name>Component Builder</name>
<description>Builds Complex Joomla Components</description>
<element>com_componentbuilder</element>
<type>component</type>
<version>2.6.2</version>
<infourl title="Component Builder!">http://joomlacomponentbuilder.com</infourl>
<downloads>
<downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.6.2/JCB_v2.6.2.zip</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
</tags>
<maintainer>Llewellyn van der Merwe</maintainer>
<maintainerurl>http://joomlacomponentbuilder.com</maintainerurl>
<targetplatform name="joomla" version="3.*"/>
</update>
<update> <update>
<name>Component Builder</name> <name>Component Builder</name>
<description>Builds Complex Joomla Components</description> <description>Builds Complex Joomla Components</description>
@ -271,40 +186,6 @@
<maintainerurl>http://joomlacomponentbuilder.com</maintainerurl> <maintainerurl>http://joomlacomponentbuilder.com</maintainerurl>
<targetplatform name="joomla" version="3.*"/> <targetplatform name="joomla" version="3.*"/>
</update> </update>
<update>
<name>Component Builder</name>
<description>Builds Complex Joomla Components</description>
<element>com_componentbuilder</element>
<type>component</type>
<version>2.6.7</version>
<infourl title="Component Builder!">http://joomlacomponentbuilder.com</infourl>
<downloads>
<downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.6.7/JCB_v2.6.7.zip</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
</tags>
<maintainer>Llewellyn van der Merwe</maintainer>
<maintainerurl>http://joomlacomponentbuilder.com</maintainerurl>
<targetplatform name="joomla" version="3.*"/>
</update>
<update>
<name>Component Builder</name>
<description>Builds Complex Joomla Components</description>
<element>com_componentbuilder</element>
<type>component</type>
<version>2.6.8</version>
<infourl title="Component Builder!">http://joomlacomponentbuilder.com</infourl>
<downloads>
<downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.6.8/JCB_v2.6.8.zip</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
</tags>
<maintainer>Llewellyn van der Merwe</maintainer>
<maintainerurl>http://joomlacomponentbuilder.com</maintainerurl>
<targetplatform name="joomla" version="3.*"/>
</update>
<update> <update>
<name>Component Builder</name> <name>Component Builder</name>
<description>Builds Complex Joomla Components</description> <description>Builds Complex Joomla Components</description>
@ -322,23 +203,6 @@
<maintainerurl>http://joomlacomponentbuilder.com</maintainerurl> <maintainerurl>http://joomlacomponentbuilder.com</maintainerurl>
<targetplatform name="joomla" version="3.*"/> <targetplatform name="joomla" version="3.*"/>
</update> </update>
<update>
<name>Component Builder</name>
<description>Builds Complex Joomla Components</description>
<element>com_componentbuilder</element>
<type>component</type>
<version>2.6.10</version>
<infourl title="Component Builder!">http://joomlacomponentbuilder.com</infourl>
<downloads>
<downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.6.10/JCB_v2.6.10.zip</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
</tags>
<maintainer>Llewellyn van der Merwe</maintainer>
<maintainerurl>http://joomlacomponentbuilder.com</maintainerurl>
<targetplatform name="joomla" version="3.*"/>
</update>
<update> <update>
<name>Component Builder</name> <name>Component Builder</name>
<description>Builds Complex Joomla Components</description> <description>Builds Complex Joomla Components</description>
@ -407,23 +271,6 @@
<maintainerurl>http://joomlacomponentbuilder.com</maintainerurl> <maintainerurl>http://joomlacomponentbuilder.com</maintainerurl>
<targetplatform name="joomla" version="3.*"/> <targetplatform name="joomla" version="3.*"/>
</update> </update>
<update>
<name>Component Builder</name>
<description>Builds Complex Joomla Components</description>
<element>com_componentbuilder</element>
<type>component</type>
<version>2.6.15</version>
<infourl title="Component Builder!">http://joomlacomponentbuilder.com</infourl>
<downloads>
<downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.6.15/JCB_v2.6.15.zip</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
</tags>
<maintainer>Llewellyn van der Merwe</maintainer>
<maintainerurl>http://joomlacomponentbuilder.com</maintainerurl>
<targetplatform name="joomla" version="3.*"/>
</update>
<update> <update>
<name>Component Builder</name> <name>Component Builder</name>
<description>Builds Complex Joomla Components</description> <description>Builds Complex Joomla Components</description>
@ -475,4 +322,21 @@
<maintainerurl>http://joomlacomponentbuilder.com</maintainerurl> <maintainerurl>http://joomlacomponentbuilder.com</maintainerurl>
<targetplatform name="joomla" version="3.*"/> <targetplatform name="joomla" version="3.*"/>
</update> </update>
<update>
<name>Component Builder</name>
<description>Builds Complex Joomla Components</description>
<element>com_componentbuilder</element>
<type>component</type>
<version>2.7.1</version>
<infourl title="Component Builder!">http://joomlacomponentbuilder.com</infourl>
<downloads>
<downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.7.1/JCB_v2.7.1.zip</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
</tags>
<maintainer>Llewellyn van der Merwe</maintainer>
<maintainerurl>http://joomlacomponentbuilder.com</maintainerurl>
<targetplatform name="joomla" version="3.*"/>
</update>
</updates> </updates>

View File

@ -918,6 +918,92 @@ class com_componentbuilderInstallerScript
} }
} }
// Create a new query object.
$query = $db->getQuery(true);
// Select id from content type table
$query->select($db->quoteName('type_id'));
$query->from($db->quoteName('#__content_types'));
// Where Validation_rule alias is found
$query->where( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.validation_rule') );
$db->setQuery($query);
// Execute query to see if alias is found
$db->execute();
$validation_rule_found = $db->getNumRows();
// Now check if there were any rows
if ($validation_rule_found)
{
// Since there are load the needed validation_rule type ids
$validation_rule_ids = $db->loadColumn();
// Remove Validation_rule from the content type table
$validation_rule_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.validation_rule') );
// Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__content_types'));
$query->where($validation_rule_condition);
$db->setQuery($query);
// Execute the query to remove Validation_rule items
$validation_rule_done = $db->execute();
if ($validation_rule_done);
{
// If succesfully remove Validation_rule add queued success message.
$app->enqueueMessage(JText::_('The (com_componentbuilder.validation_rule) type alias was removed from the <b>#__content_type</b> table'));
}
// Remove Validation_rule items from the contentitem tag map table
$validation_rule_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.validation_rule') );
// Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__contentitem_tag_map'));
$query->where($validation_rule_condition);
$db->setQuery($query);
// Execute the query to remove Validation_rule items
$validation_rule_done = $db->execute();
if ($validation_rule_done);
{
// If succesfully remove Validation_rule add queued success message.
$app->enqueueMessage(JText::_('The (com_componentbuilder.validation_rule) type alias was removed from the <b>#__contentitem_tag_map</b> table'));
}
// Remove Validation_rule items from the ucm content table
$validation_rule_condition = array( $db->quoteName('core_type_alias') . ' = ' . $db->quote('com_componentbuilder.validation_rule') );
// Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_content'));
$query->where($validation_rule_condition);
$db->setQuery($query);
// Execute the query to remove Validation_rule items
$validation_rule_done = $db->execute();
if ($validation_rule_done);
{
// If succesfully remove Validation_rule add queued success message.
$app->enqueueMessage(JText::_('The (com_componentbuilder.validation_rule) type alias was removed from the <b>#__ucm_content</b> table'));
}
// Make sure that all the Validation_rule items are cleared from DB
foreach ($validation_rule_ids as $validation_rule_id)
{
// Remove Validation_rule items from the ucm base table
$validation_rule_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $validation_rule_id);
// Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_base'));
$query->where($validation_rule_condition);
$db->setQuery($query);
// Execute the query to remove Validation_rule items
$db->execute();
// Remove Validation_rule items from the ucm history table
$validation_rule_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $validation_rule_id);
// Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_history'));
$query->where($validation_rule_condition);
$db->setQuery($query);
// Execute the query to remove Validation_rule items
$db->execute();
}
}
// Create a new query object. // Create a new query object.
$query = $db->getQuery(true); $query = $db->getQuery(true);
// Select id from content type table // Select id from content type table
@ -3325,6 +3411,18 @@ class com_componentbuilderInstallerScript
// Set the object into the content types table. // Set the object into the content types table.
$snippet_Inserted = $db->insertObject('#__content_types', $snippet); $snippet_Inserted = $db->insertObject('#__content_types', $snippet);
// Create the validation_rule content type object.
$validation_rule = new stdClass();
$validation_rule->type_title = 'Componentbuilder Validation_rule';
$validation_rule->type_alias = 'com_componentbuilder.validation_rule';
$validation_rule->table = '{"special": {"dbtable": "#__componentbuilder_validation_rule","key": "id","type": "Validation_rule","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
$validation_rule->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","short_description":"short_description","inherit":"inherit","php":"php"}}';
$validation_rule->router = 'ComponentbuilderHelperRoute::getValidation_ruleRoute';
$validation_rule->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/validation_rule.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "inherit","targetTable": "#__componentbuilder_validation_rule","targetColumn": "id","displayColumn": "name"}]}';
// Set the object into the content types table.
$validation_rule_Inserted = $db->insertObject('#__content_types', $validation_rule);
// Create the field content type object. // Create the field content type object.
$field = new stdClass(); $field = new stdClass();
$field->type_title = 'Componentbuilder Field'; $field->type_title = 'Componentbuilder Field';
@ -3905,6 +4003,35 @@ class com_componentbuilderInstallerScript
$snippet_Inserted = $db->insertObject('#__content_types', $snippet); $snippet_Inserted = $db->insertObject('#__content_types', $snippet);
} }
// Create the validation_rule content type object.
$validation_rule = new stdClass();
$validation_rule->type_title = 'Componentbuilder Validation_rule';
$validation_rule->type_alias = 'com_componentbuilder.validation_rule';
$validation_rule->table = '{"special": {"dbtable": "#__componentbuilder_validation_rule","key": "id","type": "Validation_rule","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
$validation_rule->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","short_description":"short_description","inherit":"inherit","php":"php"}}';
$validation_rule->router = 'ComponentbuilderHelperRoute::getValidation_ruleRoute';
$validation_rule->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/validation_rule.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "inherit","targetTable": "#__componentbuilder_validation_rule","targetColumn": "id","displayColumn": "name"}]}';
// Check if validation_rule type is already in content_type DB.
$validation_rule_id = null;
$query = $db->getQuery(true);
$query->select($db->quoteName(array('type_id')));
$query->from($db->quoteName('#__content_types'));
$query->where($db->quoteName('type_alias') . ' LIKE '. $db->quote($validation_rule->type_alias));
$db->setQuery($query);
$db->execute();
// Set the object into the content types table.
if ($db->getNumRows())
{
$validation_rule->type_id = $db->loadResult();
$validation_rule_Updated = $db->updateObject('#__content_types', $validation_rule, 'type_id');
}
else
{
$validation_rule_Inserted = $db->insertObject('#__content_types', $validation_rule);
}
// Create the field content type object. // Create the field content type object.
$field = new stdClass(); $field = new stdClass();
$field->type_title = 'Componentbuilder Field'; $field->type_title = 'Componentbuilder Field';
@ -4751,7 +4878,7 @@ class com_componentbuilderInstallerScript
echo '<a target="_blank" href="http://joomlacomponentbuilder.com" title="Component Builder"> echo '<a target="_blank" href="http://joomlacomponentbuilder.com" title="Component Builder">
<img src="components/com_componentbuilder/assets/images/vdm-component.jpg"/> <img src="components/com_componentbuilder/assets/images/vdm-component.jpg"/>
</a> </a>
<h3>Upgrade to Version 2.7.0 Was Successful! Let us know if anything is not working as expected.</h3>'; <h3>Upgrade to Version 2.7.1 Was Successful! Let us know if anything is not working as expected.</h3>';
} }
} }

View File

@ -692,10 +692,13 @@ abstract class ComponentbuilderHelper
{ {
$result = $db->loadObject(); $result = $db->loadObject();
$properties = json_decode($result->properties,true); $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) foreach ($properties as $property)
{ {
$field['values_description'] .= '<li><b>'.$property['name'].'</b> '.$property['description'].'</li>'; $example = (isset($property['example']) && self::checkString($property['example'])) ? '<code>'.$property['example'].'</code>' : '';
$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']])) if(isset($settings[$property['name']]))
{ {
$field['values'] .= "\n\t".$property['name'].'="'.$settings[$property['name']].'" '; $field['values'] .= "\n\t".$property['name'].'="'.$settings[$property['name']].'" ';
@ -706,7 +709,7 @@ abstract class ComponentbuilderHelper
} }
} }
$field['values'] .= "\n/>"; $field['values'] .= "\n/>";
$field['values_description'] .= '</ul>'; $field['values_description'] .= '</tbody></table>';
// return found field options // return found field options
return $field; return $field;
} }

View File

@ -8,6 +8,7 @@ COM_COMPONENTBUILDER_CHECK_YOUR_OWNER_DETAILS_IT_HAS_NOT_BEEN_SET_OPEN_THE_JCB_G
COM_COMPONENTBUILDER_COMPANY_S="Company: %s" COM_COMPONENTBUILDER_COMPANY_S="Company: %s"
COM_COMPONENTBUILDER_COPYRIGHT_S="Copyright: %s" COM_COMPONENTBUILDER_COPYRIGHT_S="Copyright: %s"
COM_COMPONENTBUILDER_CREATE_NEW_S="Create New %s" COM_COMPONENTBUILDER_CREATE_NEW_S="Create New %s"
COM_COMPONENTBUILDER_DESCRIPTION="Description"
COM_COMPONENTBUILDER_EDIT_S="Edit %s" COM_COMPONENTBUILDER_EDIT_S="Edit %s"
COM_COMPONENTBUILDER_EMAIL_S="Email: %s" COM_COMPONENTBUILDER_EMAIL_S="Email: %s"
COM_COMPONENTBUILDER_EMAIL_WITH_THE_NEW_KEY_WAS_SEND="Email with the new key was send" COM_COMPONENTBUILDER_EMAIL_WITH_THE_NEW_KEY_WAS_SEND="Email with the new key was send"
@ -18,6 +19,7 @@ COM_COMPONENTBUILDER_EMLICENSEEM_BSB="<em>License:</em> <b>%s</b>"
COM_COMPONENTBUILDER_EMOWNEREM_BSB="<em>Owner:</em> <b>%s</b>" COM_COMPONENTBUILDER_EMOWNEREM_BSB="<em>Owner:</em> <b>%s</b>"
COM_COMPONENTBUILDER_EMWEBSITEEM_BSB="<em>Website:</em> <b>%s</b>" COM_COMPONENTBUILDER_EMWEBSITEEM_BSB="<em>Website:</em> <b>%s</b>"
COM_COMPONENTBUILDER_ERROR="Error!" COM_COMPONENTBUILDER_ERROR="Error!"
COM_COMPONENTBUILDER_EXAMPLE="Example"
COM_COMPONENTBUILDER_FILE="File" COM_COMPONENTBUILDER_FILE="File"
COM_COMPONENTBUILDER_FOLDER="Folder" COM_COMPONENTBUILDER_FOLDER="Folder"
COM_COMPONENTBUILDER_HTWOCURL_NOT_FOUNDHTWOPPLEASE_SETUP_CURL_ON_YOUR_SYSTEM_OR_BCOMPONENTBUILDERB_WILL_NOT_FUNCTION_CORRECTLYP="<h2>Curl Not Found!</h2><p>Please setup curl on your system, or <b>componentbuilder</b> will not function correctly!</p>" COM_COMPONENTBUILDER_HTWOCURL_NOT_FOUNDHTWOPPLEASE_SETUP_CURL_ON_YOUR_SYSTEM_OR_BCOMPONENTBUILDERB_WILL_NOT_FUNCTION_CORRECTLYP="<h2>Curl Not Found!</h2><p>Please setup curl on your system, or <b>componentbuilder</b> will not function correctly!</p>"
@ -34,6 +36,7 @@ COM_COMPONENTBUILDER_OWNER_DETAILS_WAS_SET="Owner details was set"
COM_COMPONENTBUILDER_OWNER_S="Owner: %s" COM_COMPONENTBUILDER_OWNER_S="Owner: %s"
COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS="Package Owner Details" COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS="Package Owner Details"
COM_COMPONENTBUILDER_PACKAGE_OWNER_NOT_SET="Package Owner Not Set" COM_COMPONENTBUILDER_PACKAGE_OWNER_NOT_SET="Package Owner Not Set"
COM_COMPONENTBUILDER_PROPERTY="Property"
COM_COMPONENTBUILDER_SBR_YOU_CAN_ADD_AN_BACCESS_TOKENB_TO_GETBIBLE_GLOBAL_OPTIONS_TO_MAKE_AUTHENTICATED_REQUESTS_AN_ACCESS_TOKEN_WITH_ONLY_PUBLIC_ACCESS_WILL_DO="%s<br />You can add an <b>access token<b/> to getBible global options to make authenticated requests. An access token with only public access will do." COM_COMPONENTBUILDER_SBR_YOU_CAN_ADD_AN_BACCESS_TOKENB_TO_GETBIBLE_GLOBAL_OPTIONS_TO_MAKE_AUTHENTICATED_REQUESTS_AN_ACCESS_TOKEN_WITH_ONLY_PUBLIC_ACCESS_WILL_DO="%s<br />You can add an <b>access token<b/> to getBible global options to make authenticated requests. An access token with only public access will do."
COM_COMPONENTBUILDER_SINCE_THE_OWNER_DETAILS_ARE_DISPLAYED_DURING_BIMPORT_PROCESSB_BEFORE_ADDING_THE_KEY_THIS_WAY_IF_THE_USERDEV_BDOES_NOTB_HAVE_THE_KEY_THEY_CAN_SEE_BWHERE_TO_GET_ITB="Since the owner details are displayed during <b>import process</b> before adding the key, this way if the user/dev <b>does not</b> have the key they can see <b>where to get it</b>." COM_COMPONENTBUILDER_SINCE_THE_OWNER_DETAILS_ARE_DISPLAYED_DURING_BIMPORT_PROCESSB_BEFORE_ADDING_THE_KEY_THIS_WAY_IF_THE_USERDEV_BDOES_NOTB_HAVE_THE_KEY_THEY_CAN_SEE_BWHERE_TO_GET_ITB="Since the owner details are displayed during <b>import process</b> before adding the key, this way if the user/dev <b>does not</b> have the key they can see <b>where to get it</b>."
COM_COMPONENTBUILDER_SINCE_THE_OWNER_DETAILS_ARE_DISPLAYED_DURING_IMPORT_PROCESS_BEFORE_ADDING_THE_KEY_THIS_WAY_IF_THE_USERDEV_DOES_NOT_HAVE_THE_KEY_THEY_CAN_SEE_WHERE_TO_GET_IT="Since the owner details are displayed during import process before adding the key, this way if the user/dev does not have the key they can see where to get it." COM_COMPONENTBUILDER_SINCE_THE_OWNER_DETAILS_ARE_DISPLAYED_DURING_IMPORT_PROCESS_BEFORE_ADDING_THE_KEY_THIS_WAY_IF_THE_USERDEV_DOES_NOT_HAVE_THE_KEY_THEY_CAN_SEE_WHERE_TO_GET_IT="Since the owner details are displayed during import process before adding the key, this way if the user/dev does not have the key they can see where to get it."