From 49ef674c79caceccbcfb9415a46d63631c3bd3d5 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Mon, 10 Sep 2018 13:04:52 +0200 Subject: [PATCH] Made more changes to the Admin Fields Conditions area to insure that the correct behaviour is aplied to the required fields. Removed the double forward slashes from the paths in the structure area of the compiler. --- README.md | 4 +- admin/README.txt | 4 +- admin/helpers/compiler/a_Get.php | 5 + admin/helpers/compiler/b_Structure.php | 13 ++- admin/helpers/compiler/e_Interpretation.php | 81 ++++++++------ admin/models/forms/admin_view.js | 111 +++++++++++++------- admin/models/forms/custom_admin_view.js | 33 ++++-- admin/models/forms/custom_code.js | 12 ++- admin/models/forms/dynamic_get.js | 60 +++++++---- admin/models/forms/field.js | 24 +++-- admin/models/forms/help_document.js | 18 ++-- admin/models/forms/joomla_component.js | 57 ++++++---- admin/models/forms/layout.js | 3 +- admin/models/forms/library.js | 6 +- admin/models/forms/server.js | 27 +++-- admin/models/forms/site_view.js | 33 ++++-- admin/models/forms/template.js | 3 +- componentbuilder.xml | 2 +- 18 files changed, 326 insertions(+), 170 deletions(-) diff --git a/README.md b/README.md index 7cb4c3d82..d2d4d18f5 100644 --- a/README.md +++ b/README.md @@ -125,11 +125,11 @@ Watch the [proposed development workflow](https://vdm.bz/proposed-development-wo + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 8th September, 2018 ++ *Last Build*: 10th September, 2018 + *Version*: 2.9.0 + *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **192999** ++ *Line count*: **193128** + *Field count*: **1081** + *File count*: **1273** + *Folder count*: **201** diff --git a/admin/README.txt b/admin/README.txt index 7cb4c3d82..d2d4d18f5 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -125,11 +125,11 @@ Watch the [proposed development workflow](https://vdm.bz/proposed-development-wo + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 8th September, 2018 ++ *Last Build*: 10th September, 2018 + *Version*: 2.9.0 + *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **192999** ++ *Line count*: **193128** + *Field count*: **1081** + *File count*: **1273** + *Folder count*: **201** diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php index 6d9e43359..9428acc9a 100644 --- a/admin/helpers/compiler/a_Get.php +++ b/admin/helpers/compiler/a_Get.php @@ -2696,6 +2696,11 @@ class Get { return $this->uniqueFieldNames[$listViewName . $field['hash']]; } + // always make sure we have a field name and type + if (!isset($field['settings']) || !isset($field['settings']->type_name) || !isset($field['settings']->name)) + { + return 'error'; + } // set the type name $type_name = ComponentbuilderHelper::safeString($field['settings']->type_name); // set the name of the field diff --git a/admin/helpers/compiler/b_Structure.php b/admin/helpers/compiler/b_Structure.php index 8b1b4a720..6f901c8c9 100644 --- a/admin/helpers/compiler/b_Structure.php +++ b/admin/helpers/compiler/b_Structure.php @@ -964,7 +964,7 @@ class Structure extends Get } $back = true; } - // chekc if we had success + // check if we had success if ($back || $front) { return true; @@ -1308,9 +1308,11 @@ class Structure extends Get // make we have not duplicates $key_pointer = ComponentbuilderHelper::safeString($custom['folder']) . '_f' . $pointer_tracker; $pointer_tracker++; + // fix custom path + $custom['path'] = ltrim($custom['path'], '/'); // set new folder to object $versionData->move->static->$key_pointer = new stdClass(); - $versionData->move->static->$key_pointer->naam = $custom['folder']; + $versionData->move->static->$key_pointer->naam = str_replace('//','/', $custom['folder']); $versionData->move->static->$key_pointer->path = 'c0mp0n3nt/' . $custom['path']; $versionData->move->static->$key_pointer->rename = $rename; $versionData->move->static->$key_pointer->newName = $newname; @@ -1359,7 +1361,7 @@ class Structure extends Get $pointer_tracker++; // set new file to object $versionData->move->static->$key_pointer = new stdClass(); - $versionData->move->static->$key_pointer->naam = $custom['file']; + $versionData->move->static->$key_pointer->naam = str_replace('//','/',$custom['file']); // update the dynamic component name placholders in file names $custom['path'] = $this->setPlaceholders($custom['path'], $this->placeholders); // get the path info @@ -1374,6 +1376,9 @@ class Structure extends Get } elseif ('full' === $customPath) { + // fix custom path + $custom['path'] = ltrim($custom['path'], '/'); + // get file array $fileArray = explode('/', $custom['file']); // set the info $versionData->move->static->$key_pointer->path = 'c0mp0n3nt/' . $custom['path']; @@ -1383,7 +1388,7 @@ class Structure extends Get else { // fix custom path - $custom['path'] = trim($custom['path'], '/'); + $custom['path'] = ltrim($custom['path'], '/'); // set the info $versionData->move->static->$key_pointer->path = 'c0mp0n3nt/' . $custom['path']; $versionData->move->static->$key_pointer->rename = false; diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index b9167c524..e439ab1f4 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -4388,12 +4388,10 @@ class Interpretation extends Fields { if ($type !== 'static') { - //var_dump($replacment); echo PHP_EOL; $echos[$replacment] = "#" . "#" . "#" . $replacment . "#" . "#" . "#
"; } elseif ($type === 'static') { - //var_dump($replacment); echo PHP_EOL; $echos[$replacment] = "#" . "#" . "#" . $replacment . "#" . "#" . "#
"; } } @@ -9228,7 +9226,7 @@ class Interpretation extends Fields // set the if values $ifValue[$matchName] = $this->ifValueScript($matchName, $condition['match_behavior'], $condition['match_type'], $options); // set the target controls - $targetControls[$matchName] = $this->setTargetControlsScript($condition['target_field'], $targetBehavior, $targetDefault, $uniqueVar, $viewName); + $targetControls[$matchName] = $this->setTargetControlsScript($toggleSwitch[$matchName], $condition['target_field'], $targetBehavior, $targetDefault, $uniqueVar, $viewName); foreach ($relations as $relation) { @@ -9266,7 +9264,7 @@ class Interpretation extends Fields // set the if values $ifValue[$matchName] = $this->ifValueScript($matchName, $condition['match_behavior'], $condition['match_type'], $options); // set the target controls - $targetControls[$matchName] = $this->setTargetControlsScript($condition['target_field'], $targetBehavior, $targetDefault, $uniqueVar, $viewName); + $targetControls[$matchName] = $this->setTargetControlsScript($toggleSwitch[$matchName], $condition['target_field'], $targetBehavior, $targetDefault, $uniqueVar, $viewName); } } } @@ -9434,11 +9432,6 @@ class Interpretation extends Fields } $ifcounter++; } - else - { - var_dump($functions); - var_dump($ifValue);exit; - } } $func .= ")" . PHP_EOL . $this->_t(1) . "{"; } @@ -9451,19 +9444,21 @@ class Interpretation extends Fields foreach ($controls as $target => $action) { $func .= $action['behavior']; - if (ComponentbuilderHelper::checkString($action['hide'])) + if (ComponentbuilderHelper::checkString($action[$targetBehavior])) { $func .= $action[$targetBehavior]; $head .= $action['requiredVar']; } } + // check if this is a toggle switch if ($toggleSwitch[$f_matchKeys[0]]) { $func .= PHP_EOL . $this->_t(1) . "}" . PHP_EOL . $this->_t(1) . "else" . PHP_EOL . $this->_t(1) . "{"; + // load the default behavior foreach ($controls as $target => $action) { $func .= $action['default']; - if (ComponentbuilderHelper::checkString($action['hide'])) + if (ComponentbuilderHelper::checkString($action[$targetDefault])) { $func .= $action[$targetDefault]; } @@ -9680,7 +9675,7 @@ class Interpretation extends Fields return false; } - public function setTargetControlsScript($targets, $targetBehavior, $targetDefault, $uniqueVar, $viewName) + public function setTargetControlsScript($toggleSwitch, $targets, $targetBehavior, $targetDefault, $uniqueVar, $viewName) { $bucket = array(); if (ComponentbuilderHelper::checkArray($targets) && !in_array($uniqueVar, $this->targetControlsScriptChecker)) @@ -9725,25 +9720,48 @@ class Interpretation extends Fields // the hide required function if ($target['required'] === 'yes') { - $hide = PHP_EOL . $this->_t(2) . "if (!jform_" . $unique . "_required)"; - $hide .= PHP_EOL . $this->_t(2) . "{"; - $hide .= PHP_EOL . $this->_t(3) . "updateFieldRequired('" . $target['name'] . "',1);"; - $hide .= PHP_EOL . $this->_t(3) . "jQuery('#jform_" . $target['name'] . "').removeAttr('required');"; - $hide .= PHP_EOL . $this->_t(3) . "jQuery('#jform_" . $target['name'] . "').removeAttr('aria-required');"; - $hide .= PHP_EOL . $this->_t(3) . "jQuery('#jform_" . $target['name'] . "').removeClass('required');"; - $hide .= PHP_EOL . $this->_t(3) . "jform_" . $unique . "_required = true;"; - $hide .= PHP_EOL . $this->_t(2) . "}"; - $bucket[$target['name']]['hide'] = $hide; - // the show required function - $show = PHP_EOL . $this->_t(2) . "if (jform_" . $unique . "_required)"; - $show .= PHP_EOL . $this->_t(2) . "{"; - $show .= PHP_EOL . $this->_t(3) . "updateFieldRequired('" . $target['name'] . "',0);"; - $show .= PHP_EOL . $this->_t(3) . "jQuery('#jform_" . $target['name'] . "').prop('required','required');"; - $show .= PHP_EOL . $this->_t(3) . "jQuery('#jform_" . $target['name'] . "').attr('aria-required',true);"; - $show .= PHP_EOL . $this->_t(3) . "jQuery('#jform_" . $target['name'] . "').addClass('required');"; - $show .= PHP_EOL . $this->_t(3) . "jform_" . $unique . "_required = false;"; - $show .= PHP_EOL . $this->_t(2) . "}" . PHP_EOL; - $bucket[$target['name']]['show'] = $show; + if ($toggleSwitch) + { + $hide = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " remove required attribute from " . $target['name'] . " field"; + $hide .= PHP_EOL . $this->_t(2) . "if (!jform_" . $unique . "_required)"; + $hide .= PHP_EOL . $this->_t(2) . "{"; + $hide .= PHP_EOL . $this->_t(3) . "updateFieldRequired('" . $target['name'] . "',1);"; + $hide .= PHP_EOL . $this->_t(3) . "jQuery('#jform_" . $target['name'] . "').removeAttr('required');"; + $hide .= PHP_EOL . $this->_t(3) . "jQuery('#jform_" . $target['name'] . "').removeAttr('aria-required');"; + $hide .= PHP_EOL . $this->_t(3) . "jQuery('#jform_" . $target['name'] . "').removeClass('required');"; + $hide .= PHP_EOL . $this->_t(3) . "jform_" . $unique . "_required = true;"; + $hide .= PHP_EOL . $this->_t(2) . "}"; + $bucket[$target['name']]['hide'] = $hide; + // the show required function + $show = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " add required attribute to " . $target['name'] . " field"; + $show .= PHP_EOL . $this->_t(2) . "if (jform_" . $unique . "_required)"; + $show .= PHP_EOL . $this->_t(2) . "{"; + $show .= PHP_EOL . $this->_t(3) . "updateFieldRequired('" . $target['name'] . "',0);"; + $show .= PHP_EOL . $this->_t(3) . "jQuery('#jform_" . $target['name'] . "').prop('required','required');"; + $show .= PHP_EOL . $this->_t(3) . "jQuery('#jform_" . $target['name'] . "').attr('aria-required',true);"; + $show .= PHP_EOL . $this->_t(3) . "jQuery('#jform_" . $target['name'] . "').addClass('required');"; + $show .= PHP_EOL . $this->_t(3) . "jform_" . $unique . "_required = false;"; + $show .= PHP_EOL . $this->_t(2) . "}"; + $bucket[$target['name']]['show'] = $show; + } + else + { + $hide = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " remove required attribute from " . $target['name'] . " field"; + $hide .= PHP_EOL . $this->_t(2) . "updateFieldRequired('" . $target['name'] . "',1);"; + $hide .= PHP_EOL . $this->_t(2) . "jQuery('#jform_" . $target['name'] . "').removeAttr('required');"; + $hide .= PHP_EOL . $this->_t(2) . "jQuery('#jform_" . $target['name'] . "').removeAttr('aria-required');"; + $hide .= PHP_EOL . $this->_t(2) . "jQuery('#jform_" . $target['name'] . "').removeClass('required');"; + $hide .= PHP_EOL . $this->_t(2) . "jform_" . $unique . "_required = true;" . PHP_EOL; + $bucket[$target['name']]['hide'] = $hide; + // the show required function + $show = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " add required attribute to " . $target['name'] . " field"; + $show .= PHP_EOL . $this->_t(2) . "updateFieldRequired('" . $target['name'] . "',0);"; + $show .= PHP_EOL . $this->_t(2) . "jQuery('#jform_" . $target['name'] . "').prop('required','required');"; + $show .= PHP_EOL . $this->_t(2) . "jQuery('#jform_" . $target['name'] . "').attr('aria-required',true);"; + $show .= PHP_EOL . $this->_t(2) . "jQuery('#jform_" . $target['name'] . "').addClass('required');"; + $show .= PHP_EOL . $this->_t(2) . "jform_" . $unique . "_required = false;" . PHP_EOL; + $bucket[$target['name']]['show'] = $show; + } // make sure that the axaj and other needed things for this view is loaded $this->validationFixBuilder[$viewName][] = $target['name']; } @@ -9860,7 +9878,6 @@ class Interpretation extends Fields // TODO this needs a closer look, a bit buggy $userFix = " && " . $value . " != 0"; } - //echo '
'; var_dump($type);exit;
 						$string .= 'isSet(' . $value . ')' . $userFix;
 					}
 				}
diff --git a/admin/models/forms/admin_view.js b/admin/models/forms/admin_view.js
index 0ca3b2431..b453fd44f 100644
--- a/admin/models/forms/admin_view.js
+++ b/admin/models/forms/admin_view.js
@@ -150,6 +150,7 @@ function vvvvvxa(add_css_view_vvvvvxa)
 	if (add_css_view_vvvvvxa == 1)
 	{
 		jQuery('#jform_css_view-lbl').closest('.control-group').show();
+		// add required attribute to css_view field
 		if (jform_vvvvvxavwo_required)
 		{
 			updateFieldRequired('css_view',0);
@@ -158,11 +159,11 @@ function vvvvvxa(add_css_view_vvvvvxa)
 			jQuery('#jform_css_view').addClass('required');
 			jform_vvvvvxavwo_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_css_view-lbl').closest('.control-group').hide();
+		// remove required attribute from css_view field
 		if (!jform_vvvvvxavwo_required)
 		{
 			updateFieldRequired('css_view',1);
@@ -181,6 +182,7 @@ function vvvvvxb(add_css_views_vvvvvxb)
 	if (add_css_views_vvvvvxb == 1)
 	{
 		jQuery('#jform_css_views-lbl').closest('.control-group').show();
+		// add required attribute to css_views field
 		if (jform_vvvvvxbvwp_required)
 		{
 			updateFieldRequired('css_views',0);
@@ -189,11 +191,11 @@ function vvvvvxb(add_css_views_vvvvvxb)
 			jQuery('#jform_css_views').addClass('required');
 			jform_vvvvvxbvwp_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_css_views-lbl').closest('.control-group').hide();
+		// remove required attribute from css_views field
 		if (!jform_vvvvvxbvwp_required)
 		{
 			updateFieldRequired('css_views',1);
@@ -212,6 +214,7 @@ function vvvvvxc(add_javascript_view_file_vvvvvxc)
 	if (add_javascript_view_file_vvvvvxc == 1)
 	{
 		jQuery('#jform_javascript_view_file-lbl').closest('.control-group').show();
+		// add required attribute to javascript_view_file field
 		if (jform_vvvvvxcvwq_required)
 		{
 			updateFieldRequired('javascript_view_file',0);
@@ -220,11 +223,11 @@ function vvvvvxc(add_javascript_view_file_vvvvvxc)
 			jQuery('#jform_javascript_view_file').addClass('required');
 			jform_vvvvvxcvwq_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_javascript_view_file-lbl').closest('.control-group').hide();
+		// remove required attribute from javascript_view_file field
 		if (!jform_vvvvvxcvwq_required)
 		{
 			updateFieldRequired('javascript_view_file',1);
@@ -243,6 +246,7 @@ function vvvvvxd(add_javascript_views_file_vvvvvxd)
 	if (add_javascript_views_file_vvvvvxd == 1)
 	{
 		jQuery('#jform_javascript_views_file-lbl').closest('.control-group').show();
+		// add required attribute to javascript_views_file field
 		if (jform_vvvvvxdvwr_required)
 		{
 			updateFieldRequired('javascript_views_file',0);
@@ -251,11 +255,11 @@ function vvvvvxd(add_javascript_views_file_vvvvvxd)
 			jQuery('#jform_javascript_views_file').addClass('required');
 			jform_vvvvvxdvwr_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_javascript_views_file-lbl').closest('.control-group').hide();
+		// remove required attribute from javascript_views_file field
 		if (!jform_vvvvvxdvwr_required)
 		{
 			updateFieldRequired('javascript_views_file',1);
@@ -274,6 +278,7 @@ function vvvvvxe(add_javascript_view_footer_vvvvvxe)
 	if (add_javascript_view_footer_vvvvvxe == 1)
 	{
 		jQuery('#jform_javascript_view_footer-lbl').closest('.control-group').show();
+		// add required attribute to javascript_view_footer field
 		if (jform_vvvvvxevws_required)
 		{
 			updateFieldRequired('javascript_view_footer',0);
@@ -282,11 +287,11 @@ function vvvvvxe(add_javascript_view_footer_vvvvvxe)
 			jQuery('#jform_javascript_view_footer').addClass('required');
 			jform_vvvvvxevws_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_javascript_view_footer-lbl').closest('.control-group').hide();
+		// remove required attribute from javascript_view_footer field
 		if (!jform_vvvvvxevws_required)
 		{
 			updateFieldRequired('javascript_view_footer',1);
@@ -305,6 +310,7 @@ function vvvvvxf(add_javascript_views_footer_vvvvvxf)
 	if (add_javascript_views_footer_vvvvvxf == 1)
 	{
 		jQuery('#jform_javascript_views_footer-lbl').closest('.control-group').show();
+		// add required attribute to javascript_views_footer field
 		if (jform_vvvvvxfvwt_required)
 		{
 			updateFieldRequired('javascript_views_footer',0);
@@ -313,11 +319,11 @@ function vvvvvxf(add_javascript_views_footer_vvvvvxf)
 			jQuery('#jform_javascript_views_footer').addClass('required');
 			jform_vvvvvxfvwt_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_javascript_views_footer-lbl').closest('.control-group').hide();
+		// remove required attribute from javascript_views_footer field
 		if (!jform_vvvvvxfvwt_required)
 		{
 			updateFieldRequired('javascript_views_footer',1);
@@ -337,6 +343,7 @@ function vvvvvxg(add_php_ajax_vvvvvxg)
 	{
 		jQuery('#jform_ajax_input-lbl').closest('.control-group').show();
 		jQuery('#jform_php_ajaxmethod-lbl').closest('.control-group').show();
+		// add required attribute to php_ajaxmethod field
 		if (jform_vvvvvxgvwu_required)
 		{
 			updateFieldRequired('php_ajaxmethod',0);
@@ -345,12 +352,12 @@ function vvvvvxg(add_php_ajax_vvvvvxg)
 			jQuery('#jform_php_ajaxmethod').addClass('required');
 			jform_vvvvvxgvwu_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_ajax_input-lbl').closest('.control-group').hide();
 		jQuery('#jform_php_ajaxmethod-lbl').closest('.control-group').hide();
+		// remove required attribute from php_ajaxmethod field
 		if (!jform_vvvvvxgvwu_required)
 		{
 			updateFieldRequired('php_ajaxmethod',1);
@@ -369,6 +376,7 @@ function vvvvvxh(add_php_getitem_vvvvvxh)
 	if (add_php_getitem_vvvvvxh == 1)
 	{
 		jQuery('#jform_php_getitem-lbl').closest('.control-group').show();
+		// add required attribute to php_getitem field
 		if (jform_vvvvvxhvwv_required)
 		{
 			updateFieldRequired('php_getitem',0);
@@ -377,11 +385,11 @@ function vvvvvxh(add_php_getitem_vvvvvxh)
 			jQuery('#jform_php_getitem').addClass('required');
 			jform_vvvvvxhvwv_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_getitem-lbl').closest('.control-group').hide();
+		// remove required attribute from php_getitem field
 		if (!jform_vvvvvxhvwv_required)
 		{
 			updateFieldRequired('php_getitem',1);
@@ -400,6 +408,7 @@ function vvvvvxi(add_php_getitems_vvvvvxi)
 	if (add_php_getitems_vvvvvxi == 1)
 	{
 		jQuery('#jform_php_getitems-lbl').closest('.control-group').show();
+		// add required attribute to php_getitems field
 		if (jform_vvvvvxivww_required)
 		{
 			updateFieldRequired('php_getitems',0);
@@ -408,11 +417,11 @@ function vvvvvxi(add_php_getitems_vvvvvxi)
 			jQuery('#jform_php_getitems').addClass('required');
 			jform_vvvvvxivww_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_getitems-lbl').closest('.control-group').hide();
+		// remove required attribute from php_getitems field
 		if (!jform_vvvvvxivww_required)
 		{
 			updateFieldRequired('php_getitems',1);
@@ -431,6 +440,7 @@ function vvvvvxj(add_php_getitems_after_all_vvvvvxj)
 	if (add_php_getitems_after_all_vvvvvxj == 1)
 	{
 		jQuery('#jform_php_getitems_after_all-lbl').closest('.control-group').show();
+		// add required attribute to php_getitems_after_all field
 		if (jform_vvvvvxjvwx_required)
 		{
 			updateFieldRequired('php_getitems_after_all',0);
@@ -439,11 +449,11 @@ function vvvvvxj(add_php_getitems_after_all_vvvvvxj)
 			jQuery('#jform_php_getitems_after_all').addClass('required');
 			jform_vvvvvxjvwx_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_getitems_after_all-lbl').closest('.control-group').hide();
+		// remove required attribute from php_getitems_after_all field
 		if (!jform_vvvvvxjvwx_required)
 		{
 			updateFieldRequired('php_getitems_after_all',1);
@@ -462,6 +472,7 @@ function vvvvvxk(add_php_getlistquery_vvvvvxk)
 	if (add_php_getlistquery_vvvvvxk == 1)
 	{
 		jQuery('#jform_php_getlistquery-lbl').closest('.control-group').show();
+		// add required attribute to php_getlistquery field
 		if (jform_vvvvvxkvwy_required)
 		{
 			updateFieldRequired('php_getlistquery',0);
@@ -470,11 +481,11 @@ function vvvvvxk(add_php_getlistquery_vvvvvxk)
 			jQuery('#jform_php_getlistquery').addClass('required');
 			jform_vvvvvxkvwy_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_getlistquery-lbl').closest('.control-group').hide();
+		// remove required attribute from php_getlistquery field
 		if (!jform_vvvvvxkvwy_required)
 		{
 			updateFieldRequired('php_getlistquery',1);
@@ -493,6 +504,7 @@ function vvvvvxl(add_php_getform_vvvvvxl)
 	if (add_php_getform_vvvvvxl == 1)
 	{
 		jQuery('#jform_php_getform-lbl').closest('.control-group').show();
+		// add required attribute to php_getform field
 		if (jform_vvvvvxlvwz_required)
 		{
 			updateFieldRequired('php_getform',0);
@@ -501,11 +513,11 @@ function vvvvvxl(add_php_getform_vvvvvxl)
 			jQuery('#jform_php_getform').addClass('required');
 			jform_vvvvvxlvwz_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_getform-lbl').closest('.control-group').hide();
+		// remove required attribute from php_getform field
 		if (!jform_vvvvvxlvwz_required)
 		{
 			updateFieldRequired('php_getform',1);
@@ -524,6 +536,7 @@ function vvvvvxm(add_php_before_save_vvvvvxm)
 	if (add_php_before_save_vvvvvxm == 1)
 	{
 		jQuery('#jform_php_before_save-lbl').closest('.control-group').show();
+		// add required attribute to php_before_save field
 		if (jform_vvvvvxmvxa_required)
 		{
 			updateFieldRequired('php_before_save',0);
@@ -532,11 +545,11 @@ function vvvvvxm(add_php_before_save_vvvvvxm)
 			jQuery('#jform_php_before_save').addClass('required');
 			jform_vvvvvxmvxa_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_before_save-lbl').closest('.control-group').hide();
+		// remove required attribute from php_before_save field
 		if (!jform_vvvvvxmvxa_required)
 		{
 			updateFieldRequired('php_before_save',1);
@@ -555,6 +568,7 @@ function vvvvvxn(add_php_save_vvvvvxn)
 	if (add_php_save_vvvvvxn == 1)
 	{
 		jQuery('#jform_php_save-lbl').closest('.control-group').show();
+		// add required attribute to php_save field
 		if (jform_vvvvvxnvxb_required)
 		{
 			updateFieldRequired('php_save',0);
@@ -563,11 +577,11 @@ function vvvvvxn(add_php_save_vvvvvxn)
 			jQuery('#jform_php_save').addClass('required');
 			jform_vvvvvxnvxb_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_save-lbl').closest('.control-group').hide();
+		// remove required attribute from php_save field
 		if (!jform_vvvvvxnvxb_required)
 		{
 			updateFieldRequired('php_save',1);
@@ -586,6 +600,7 @@ function vvvvvxo(add_php_postsavehook_vvvvvxo)
 	if (add_php_postsavehook_vvvvvxo == 1)
 	{
 		jQuery('#jform_php_postsavehook-lbl').closest('.control-group').show();
+		// add required attribute to php_postsavehook field
 		if (jform_vvvvvxovxc_required)
 		{
 			updateFieldRequired('php_postsavehook',0);
@@ -594,11 +609,11 @@ function vvvvvxo(add_php_postsavehook_vvvvvxo)
 			jQuery('#jform_php_postsavehook').addClass('required');
 			jform_vvvvvxovxc_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_postsavehook-lbl').closest('.control-group').hide();
+		// remove required attribute from php_postsavehook field
 		if (!jform_vvvvvxovxc_required)
 		{
 			updateFieldRequired('php_postsavehook',1);
@@ -617,6 +632,7 @@ function vvvvvxp(add_php_allowadd_vvvvvxp)
 	if (add_php_allowadd_vvvvvxp == 1)
 	{
 		jQuery('#jform_php_allowadd-lbl').closest('.control-group').show();
+		// add required attribute to php_allowadd field
 		if (jform_vvvvvxpvxd_required)
 		{
 			updateFieldRequired('php_allowadd',0);
@@ -625,11 +641,11 @@ function vvvvvxp(add_php_allowadd_vvvvvxp)
 			jQuery('#jform_php_allowadd').addClass('required');
 			jform_vvvvvxpvxd_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_allowadd-lbl').closest('.control-group').hide();
+		// remove required attribute from php_allowadd field
 		if (!jform_vvvvvxpvxd_required)
 		{
 			updateFieldRequired('php_allowadd',1);
@@ -648,6 +664,7 @@ function vvvvvxq(add_php_allowedit_vvvvvxq)
 	if (add_php_allowedit_vvvvvxq == 1)
 	{
 		jQuery('#jform_php_allowedit-lbl').closest('.control-group').show();
+		// add required attribute to php_allowedit field
 		if (jform_vvvvvxqvxe_required)
 		{
 			updateFieldRequired('php_allowedit',0);
@@ -656,11 +673,11 @@ function vvvvvxq(add_php_allowedit_vvvvvxq)
 			jQuery('#jform_php_allowedit').addClass('required');
 			jform_vvvvvxqvxe_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_allowedit-lbl').closest('.control-group').hide();
+		// remove required attribute from php_allowedit field
 		if (!jform_vvvvvxqvxe_required)
 		{
 			updateFieldRequired('php_allowedit',1);
@@ -679,6 +696,7 @@ function vvvvvxr(add_php_batchcopy_vvvvvxr)
 	if (add_php_batchcopy_vvvvvxr == 1)
 	{
 		jQuery('#jform_php_batchcopy-lbl').closest('.control-group').show();
+		// add required attribute to php_batchcopy field
 		if (jform_vvvvvxrvxf_required)
 		{
 			updateFieldRequired('php_batchcopy',0);
@@ -687,11 +705,11 @@ function vvvvvxr(add_php_batchcopy_vvvvvxr)
 			jQuery('#jform_php_batchcopy').addClass('required');
 			jform_vvvvvxrvxf_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_batchcopy-lbl').closest('.control-group').hide();
+		// remove required attribute from php_batchcopy field
 		if (!jform_vvvvvxrvxf_required)
 		{
 			updateFieldRequired('php_batchcopy',1);
@@ -710,6 +728,7 @@ function vvvvvxs(add_php_batchmove_vvvvvxs)
 	if (add_php_batchmove_vvvvvxs == 1)
 	{
 		jQuery('#jform_php_batchmove-lbl').closest('.control-group').show();
+		// add required attribute to php_batchmove field
 		if (jform_vvvvvxsvxg_required)
 		{
 			updateFieldRequired('php_batchmove',0);
@@ -718,11 +737,11 @@ function vvvvvxs(add_php_batchmove_vvvvvxs)
 			jQuery('#jform_php_batchmove').addClass('required');
 			jform_vvvvvxsvxg_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_batchmove-lbl').closest('.control-group').hide();
+		// remove required attribute from php_batchmove field
 		if (!jform_vvvvvxsvxg_required)
 		{
 			updateFieldRequired('php_batchmove',1);
@@ -741,6 +760,7 @@ function vvvvvxt(add_php_before_publish_vvvvvxt)
 	if (add_php_before_publish_vvvvvxt == 1)
 	{
 		jQuery('#jform_php_before_publish-lbl').closest('.control-group').show();
+		// add required attribute to php_before_publish field
 		if (jform_vvvvvxtvxh_required)
 		{
 			updateFieldRequired('php_before_publish',0);
@@ -749,11 +769,11 @@ function vvvvvxt(add_php_before_publish_vvvvvxt)
 			jQuery('#jform_php_before_publish').addClass('required');
 			jform_vvvvvxtvxh_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_before_publish-lbl').closest('.control-group').hide();
+		// remove required attribute from php_before_publish field
 		if (!jform_vvvvvxtvxh_required)
 		{
 			updateFieldRequired('php_before_publish',1);
@@ -772,6 +792,7 @@ function vvvvvxu(add_php_after_publish_vvvvvxu)
 	if (add_php_after_publish_vvvvvxu == 1)
 	{
 		jQuery('#jform_php_after_publish-lbl').closest('.control-group').show();
+		// add required attribute to php_after_publish field
 		if (jform_vvvvvxuvxi_required)
 		{
 			updateFieldRequired('php_after_publish',0);
@@ -780,11 +801,11 @@ function vvvvvxu(add_php_after_publish_vvvvvxu)
 			jQuery('#jform_php_after_publish').addClass('required');
 			jform_vvvvvxuvxi_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_after_publish-lbl').closest('.control-group').hide();
+		// remove required attribute from php_after_publish field
 		if (!jform_vvvvvxuvxi_required)
 		{
 			updateFieldRequired('php_after_publish',1);
@@ -803,6 +824,7 @@ function vvvvvxv(add_php_before_delete_vvvvvxv)
 	if (add_php_before_delete_vvvvvxv == 1)
 	{
 		jQuery('#jform_php_before_delete-lbl').closest('.control-group').show();
+		// add required attribute to php_before_delete field
 		if (jform_vvvvvxvvxj_required)
 		{
 			updateFieldRequired('php_before_delete',0);
@@ -811,11 +833,11 @@ function vvvvvxv(add_php_before_delete_vvvvvxv)
 			jQuery('#jform_php_before_delete').addClass('required');
 			jform_vvvvvxvvxj_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_before_delete-lbl').closest('.control-group').hide();
+		// remove required attribute from php_before_delete field
 		if (!jform_vvvvvxvvxj_required)
 		{
 			updateFieldRequired('php_before_delete',1);
@@ -834,6 +856,7 @@ function vvvvvxw(add_php_after_delete_vvvvvxw)
 	if (add_php_after_delete_vvvvvxw == 1)
 	{
 		jQuery('#jform_php_after_delete-lbl').closest('.control-group').show();
+		// add required attribute to php_after_delete field
 		if (jform_vvvvvxwvxk_required)
 		{
 			updateFieldRequired('php_after_delete',0);
@@ -842,11 +865,11 @@ function vvvvvxw(add_php_after_delete_vvvvvxw)
 			jQuery('#jform_php_after_delete').addClass('required');
 			jform_vvvvvxwvxk_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_after_delete-lbl').closest('.control-group').hide();
+		// remove required attribute from php_after_delete field
 		if (!jform_vvvvvxwvxk_required)
 		{
 			updateFieldRequired('php_after_delete',1);
@@ -865,6 +888,7 @@ function vvvvvxx(add_php_document_vvvvvxx)
 	if (add_php_document_vvvvvxx == 1)
 	{
 		jQuery('#jform_php_document-lbl').closest('.control-group').show();
+		// add required attribute to php_document field
 		if (jform_vvvvvxxvxl_required)
 		{
 			updateFieldRequired('php_document',0);
@@ -873,11 +897,11 @@ function vvvvvxx(add_php_document_vvvvvxx)
 			jQuery('#jform_php_document').addClass('required');
 			jform_vvvvvxxvxl_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_document-lbl').closest('.control-group').hide();
+		// remove required attribute from php_document field
 		if (!jform_vvvvvxxvxl_required)
 		{
 			updateFieldRequired('php_document',1);
@@ -896,6 +920,7 @@ function vvvvvxy(add_sql_vvvvvxy)
 	if (add_sql_vvvvvxy == 1)
 	{
 		jQuery('#jform_source').closest('.control-group').show();
+		// add required attribute to source field
 		if (jform_vvvvvxyvxm_required)
 		{
 			updateFieldRequired('source',0);
@@ -904,11 +929,11 @@ function vvvvvxy(add_sql_vvvvvxy)
 			jQuery('#jform_source').addClass('required');
 			jform_vvvvvxyvxm_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_source').closest('.control-group').hide();
+		// remove required attribute from source field
 		if (!jform_vvvvvxyvxm_required)
 		{
 			updateFieldRequired('source',1);
@@ -927,6 +952,7 @@ function vvvvvxz(source_vvvvvxz,add_sql_vvvvvxz)
 	if (source_vvvvvxz == 2 && add_sql_vvvvvxz == 1)
 	{
 		jQuery('#jform_sql').closest('.control-group').show();
+		// add required attribute to sql field
 		if (jform_vvvvvxzvxn_required)
 		{
 			updateFieldRequired('sql',0);
@@ -935,11 +961,11 @@ function vvvvvxz(source_vvvvvxz,add_sql_vvvvvxz)
 			jQuery('#jform_sql').addClass('required');
 			jform_vvvvvxzvxn_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_sql').closest('.control-group').hide();
+		// remove required attribute from sql field
 		if (!jform_vvvvvxzvxn_required)
 		{
 			updateFieldRequired('sql',1);
@@ -972,6 +998,7 @@ function vvvvvyd(add_custom_import_vvvvvyd)
 	if (add_custom_import_vvvvvyd == 1)
 	{
 		jQuery('#jform_html_import_view').closest('.control-group').show();
+		// add required attribute to html_import_view field
 		if (jform_vvvvvydvxo_required)
 		{
 			updateFieldRequired('html_import_view',0);
@@ -980,9 +1007,9 @@ function vvvvvyd(add_custom_import_vvvvvyd)
 			jQuery('#jform_html_import_view').addClass('required');
 			jform_vvvvvydvxo_required = false;
 		}
-
 		jQuery('.note_advanced_import').closest('.control-group').show();
 		jQuery('#jform_php_import_display').closest('.control-group').show();
+		// add required attribute to php_import_display field
 		if (jform_vvvvvydvxp_required)
 		{
 			updateFieldRequired('php_import_display',0);
@@ -991,8 +1018,8 @@ function vvvvvyd(add_custom_import_vvvvvyd)
 			jQuery('#jform_php_import_display').addClass('required');
 			jform_vvvvvydvxp_required = false;
 		}
-
 		jQuery('#jform_php_import_ext').closest('.control-group').show();
+		// add required attribute to php_import_ext field
 		if (jform_vvvvvydvxq_required)
 		{
 			updateFieldRequired('php_import_ext',0);
@@ -1001,8 +1028,8 @@ function vvvvvyd(add_custom_import_vvvvvyd)
 			jQuery('#jform_php_import_ext').addClass('required');
 			jform_vvvvvydvxq_required = false;
 		}
-
 		jQuery('#jform_php_import_headers').closest('.control-group').show();
+		// add required attribute to php_import_headers field
 		if (jform_vvvvvydvxr_required)
 		{
 			updateFieldRequired('php_import_headers',0);
@@ -1011,8 +1038,8 @@ function vvvvvyd(add_custom_import_vvvvvyd)
 			jQuery('#jform_php_import_headers').addClass('required');
 			jform_vvvvvydvxr_required = false;
 		}
-
 		jQuery('#jform_php_import').closest('.control-group').show();
+		// add required attribute to php_import field
 		if (jform_vvvvvydvxs_required)
 		{
 			updateFieldRequired('php_import',0);
@@ -1021,8 +1048,8 @@ function vvvvvyd(add_custom_import_vvvvvyd)
 			jQuery('#jform_php_import').addClass('required');
 			jform_vvvvvydvxs_required = false;
 		}
-
 		jQuery('#jform_php_import_save').closest('.control-group').show();
+		// add required attribute to php_import_save field
 		if (jform_vvvvvydvxt_required)
 		{
 			updateFieldRequired('php_import_save',0);
@@ -1031,8 +1058,8 @@ function vvvvvyd(add_custom_import_vvvvvyd)
 			jQuery('#jform_php_import_save').addClass('required');
 			jform_vvvvvydvxt_required = false;
 		}
-
 		jQuery('#jform_php_import_setdata').closest('.control-group').show();
+		// add required attribute to php_import_setdata field
 		if (jform_vvvvvydvxu_required)
 		{
 			updateFieldRequired('php_import_setdata',0);
@@ -1041,11 +1068,11 @@ function vvvvvyd(add_custom_import_vvvvvyd)
 			jQuery('#jform_php_import_setdata').addClass('required');
 			jform_vvvvvydvxu_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_html_import_view').closest('.control-group').hide();
+		// remove required attribute from html_import_view field
 		if (!jform_vvvvvydvxo_required)
 		{
 			updateFieldRequired('html_import_view',1);
@@ -1056,6 +1083,7 @@ function vvvvvyd(add_custom_import_vvvvvyd)
 		}
 		jQuery('.note_advanced_import').closest('.control-group').hide();
 		jQuery('#jform_php_import_display').closest('.control-group').hide();
+		// remove required attribute from php_import_display field
 		if (!jform_vvvvvydvxp_required)
 		{
 			updateFieldRequired('php_import_display',1);
@@ -1065,6 +1093,7 @@ function vvvvvyd(add_custom_import_vvvvvyd)
 			jform_vvvvvydvxp_required = true;
 		}
 		jQuery('#jform_php_import_ext').closest('.control-group').hide();
+		// remove required attribute from php_import_ext field
 		if (!jform_vvvvvydvxq_required)
 		{
 			updateFieldRequired('php_import_ext',1);
@@ -1074,6 +1103,7 @@ function vvvvvyd(add_custom_import_vvvvvyd)
 			jform_vvvvvydvxq_required = true;
 		}
 		jQuery('#jform_php_import_headers').closest('.control-group').hide();
+		// remove required attribute from php_import_headers field
 		if (!jform_vvvvvydvxr_required)
 		{
 			updateFieldRequired('php_import_headers',1);
@@ -1083,6 +1113,7 @@ function vvvvvyd(add_custom_import_vvvvvyd)
 			jform_vvvvvydvxr_required = true;
 		}
 		jQuery('#jform_php_import').closest('.control-group').hide();
+		// remove required attribute from php_import field
 		if (!jform_vvvvvydvxs_required)
 		{
 			updateFieldRequired('php_import',1);
@@ -1092,6 +1123,7 @@ function vvvvvyd(add_custom_import_vvvvvyd)
 			jform_vvvvvydvxs_required = true;
 		}
 		jQuery('#jform_php_import_save').closest('.control-group').hide();
+		// remove required attribute from php_import_save field
 		if (!jform_vvvvvydvxt_required)
 		{
 			updateFieldRequired('php_import_save',1);
@@ -1101,6 +1133,7 @@ function vvvvvyd(add_custom_import_vvvvvyd)
 			jform_vvvvvydvxt_required = true;
 		}
 		jQuery('#jform_php_import_setdata').closest('.control-group').hide();
+		// remove required attribute from php_import_setdata field
 		if (!jform_vvvvvydvxu_required)
 		{
 			updateFieldRequired('php_import_setdata',1);
@@ -1134,6 +1167,7 @@ function vvvvvyf(add_custom_button_vvvvvyf)
 	{
 		jQuery('#jform_custom_button-lbl').closest('.control-group').show();
 		jQuery('#jform_php_controller-lbl').closest('.control-group').show();
+		// add required attribute to php_controller field
 		if (jform_vvvvvyfvxv_required)
 		{
 			updateFieldRequired('php_controller',0);
@@ -1142,8 +1176,8 @@ function vvvvvyf(add_custom_button_vvvvvyf)
 			jQuery('#jform_php_controller').addClass('required');
 			jform_vvvvvyfvxv_required = false;
 		}
-
 		jQuery('#jform_php_controller_list-lbl').closest('.control-group').show();
+		// add required attribute to php_controller_list field
 		if (jform_vvvvvyfvxw_required)
 		{
 			updateFieldRequired('php_controller_list',0);
@@ -1152,8 +1186,8 @@ function vvvvvyf(add_custom_button_vvvvvyf)
 			jQuery('#jform_php_controller_list').addClass('required');
 			jform_vvvvvyfvxw_required = false;
 		}
-
 		jQuery('#jform_php_model-lbl').closest('.control-group').show();
+		// add required attribute to php_model field
 		if (jform_vvvvvyfvxx_required)
 		{
 			updateFieldRequired('php_model',0);
@@ -1162,8 +1196,8 @@ function vvvvvyf(add_custom_button_vvvvvyf)
 			jQuery('#jform_php_model').addClass('required');
 			jform_vvvvvyfvxx_required = false;
 		}
-
 		jQuery('#jform_php_model_list-lbl').closest('.control-group').show();
+		// add required attribute to php_model_list field
 		if (jform_vvvvvyfvxy_required)
 		{
 			updateFieldRequired('php_model_list',0);
@@ -1172,12 +1206,12 @@ function vvvvvyf(add_custom_button_vvvvvyf)
 			jQuery('#jform_php_model_list').addClass('required');
 			jform_vvvvvyfvxy_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_custom_button-lbl').closest('.control-group').hide();
 		jQuery('#jform_php_controller-lbl').closest('.control-group').hide();
+		// remove required attribute from php_controller field
 		if (!jform_vvvvvyfvxv_required)
 		{
 			updateFieldRequired('php_controller',1);
@@ -1187,6 +1221,7 @@ function vvvvvyf(add_custom_button_vvvvvyf)
 			jform_vvvvvyfvxv_required = true;
 		}
 		jQuery('#jform_php_controller_list-lbl').closest('.control-group').hide();
+		// remove required attribute from php_controller_list field
 		if (!jform_vvvvvyfvxw_required)
 		{
 			updateFieldRequired('php_controller_list',1);
@@ -1196,6 +1231,7 @@ function vvvvvyf(add_custom_button_vvvvvyf)
 			jform_vvvvvyfvxw_required = true;
 		}
 		jQuery('#jform_php_model-lbl').closest('.control-group').hide();
+		// remove required attribute from php_model field
 		if (!jform_vvvvvyfvxx_required)
 		{
 			updateFieldRequired('php_model',1);
@@ -1205,6 +1241,7 @@ function vvvvvyf(add_custom_button_vvvvvyf)
 			jform_vvvvvyfvxx_required = true;
 		}
 		jQuery('#jform_php_model_list-lbl').closest('.control-group').hide();
+		// remove required attribute from php_model_list field
 		if (!jform_vvvvvyfvxy_required)
 		{
 			updateFieldRequired('php_model_list',1);
diff --git a/admin/models/forms/custom_admin_view.js b/admin/models/forms/custom_admin_view.js
index ee0fd3663..ce6dcc754 100644
--- a/admin/models/forms/custom_admin_view.js
+++ b/admin/models/forms/custom_admin_view.js
@@ -62,6 +62,7 @@ function vvvvvyg(add_php_view_vvvvvyg)
 	if (add_php_view_vvvvvyg == 1)
 	{
 		jQuery('#jform_php_view-lbl').closest('.control-group').show();
+		// add required attribute to php_view field
 		if (jform_vvvvvygvxz_required)
 		{
 			updateFieldRequired('php_view',0);
@@ -70,11 +71,11 @@ function vvvvvyg(add_php_view_vvvvvyg)
 			jQuery('#jform_php_view').addClass('required');
 			jform_vvvvvygvxz_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_view-lbl').closest('.control-group').hide();
+		// remove required attribute from php_view field
 		if (!jform_vvvvvygvxz_required)
 		{
 			updateFieldRequired('php_view',1);
@@ -93,6 +94,7 @@ function vvvvvyh(add_php_jview_display_vvvvvyh)
 	if (add_php_jview_display_vvvvvyh == 1)
 	{
 		jQuery('#jform_php_jview_display-lbl').closest('.control-group').show();
+		// add required attribute to php_jview_display field
 		if (jform_vvvvvyhvya_required)
 		{
 			updateFieldRequired('php_jview_display',0);
@@ -101,11 +103,11 @@ function vvvvvyh(add_php_jview_display_vvvvvyh)
 			jQuery('#jform_php_jview_display').addClass('required');
 			jform_vvvvvyhvya_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_jview_display-lbl').closest('.control-group').hide();
+		// remove required attribute from php_jview_display field
 		if (!jform_vvvvvyhvya_required)
 		{
 			updateFieldRequired('php_jview_display',1);
@@ -124,6 +126,7 @@ function vvvvvyi(add_php_jview_vvvvvyi)
 	if (add_php_jview_vvvvvyi == 1)
 	{
 		jQuery('#jform_php_jview-lbl').closest('.control-group').show();
+		// add required attribute to php_jview field
 		if (jform_vvvvvyivyb_required)
 		{
 			updateFieldRequired('php_jview',0);
@@ -132,11 +135,11 @@ function vvvvvyi(add_php_jview_vvvvvyi)
 			jQuery('#jform_php_jview').addClass('required');
 			jform_vvvvvyivyb_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_jview-lbl').closest('.control-group').hide();
+		// remove required attribute from php_jview field
 		if (!jform_vvvvvyivyb_required)
 		{
 			updateFieldRequired('php_jview',1);
@@ -155,6 +158,7 @@ function vvvvvyj(add_php_document_vvvvvyj)
 	if (add_php_document_vvvvvyj == 1)
 	{
 		jQuery('#jform_php_document-lbl').closest('.control-group').show();
+		// add required attribute to php_document field
 		if (jform_vvvvvyjvyc_required)
 		{
 			updateFieldRequired('php_document',0);
@@ -163,11 +167,11 @@ function vvvvvyj(add_php_document_vvvvvyj)
 			jQuery('#jform_php_document').addClass('required');
 			jform_vvvvvyjvyc_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_document-lbl').closest('.control-group').hide();
+		// remove required attribute from php_document field
 		if (!jform_vvvvvyjvyc_required)
 		{
 			updateFieldRequired('php_document',1);
@@ -186,6 +190,7 @@ function vvvvvyk(add_css_document_vvvvvyk)
 	if (add_css_document_vvvvvyk == 1)
 	{
 		jQuery('#jform_css_document-lbl').closest('.control-group').show();
+		// add required attribute to css_document field
 		if (jform_vvvvvykvyd_required)
 		{
 			updateFieldRequired('css_document',0);
@@ -194,11 +199,11 @@ function vvvvvyk(add_css_document_vvvvvyk)
 			jQuery('#jform_css_document').addClass('required');
 			jform_vvvvvykvyd_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_css_document-lbl').closest('.control-group').hide();
+		// remove required attribute from css_document field
 		if (!jform_vvvvvykvyd_required)
 		{
 			updateFieldRequired('css_document',1);
@@ -217,6 +222,7 @@ function vvvvvyl(add_javascript_file_vvvvvyl)
 	if (add_javascript_file_vvvvvyl == 1)
 	{
 		jQuery('#jform_javascript_file-lbl').closest('.control-group').show();
+		// add required attribute to javascript_file field
 		if (jform_vvvvvylvye_required)
 		{
 			updateFieldRequired('javascript_file',0);
@@ -225,11 +231,11 @@ function vvvvvyl(add_javascript_file_vvvvvyl)
 			jQuery('#jform_javascript_file').addClass('required');
 			jform_vvvvvylvye_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_javascript_file-lbl').closest('.control-group').hide();
+		// remove required attribute from javascript_file field
 		if (!jform_vvvvvylvye_required)
 		{
 			updateFieldRequired('javascript_file',1);
@@ -248,6 +254,7 @@ function vvvvvym(add_js_document_vvvvvym)
 	if (add_js_document_vvvvvym == 1)
 	{
 		jQuery('#jform_js_document-lbl').closest('.control-group').show();
+		// add required attribute to js_document field
 		if (jform_vvvvvymvyf_required)
 		{
 			updateFieldRequired('js_document',0);
@@ -256,11 +263,11 @@ function vvvvvym(add_js_document_vvvvvym)
 			jQuery('#jform_js_document').addClass('required');
 			jform_vvvvvymvyf_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_js_document-lbl').closest('.control-group').hide();
+		// remove required attribute from js_document field
 		if (!jform_vvvvvymvyf_required)
 		{
 			updateFieldRequired('js_document',1);
@@ -280,6 +287,7 @@ function vvvvvyn(add_custom_button_vvvvvyn)
 	{
 		jQuery('#jform_custom_button-lbl').closest('.control-group').show();
 		jQuery('#jform_php_controller-lbl').closest('.control-group').show();
+		// add required attribute to php_controller field
 		if (jform_vvvvvynvyg_required)
 		{
 			updateFieldRequired('php_controller',0);
@@ -288,8 +296,8 @@ function vvvvvyn(add_custom_button_vvvvvyn)
 			jQuery('#jform_php_controller').addClass('required');
 			jform_vvvvvynvyg_required = false;
 		}
-
 		jQuery('#jform_php_model-lbl').closest('.control-group').show();
+		// add required attribute to php_model field
 		if (jform_vvvvvynvyh_required)
 		{
 			updateFieldRequired('php_model',0);
@@ -298,12 +306,12 @@ function vvvvvyn(add_custom_button_vvvvvyn)
 			jQuery('#jform_php_model').addClass('required');
 			jform_vvvvvynvyh_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_custom_button-lbl').closest('.control-group').hide();
 		jQuery('#jform_php_controller-lbl').closest('.control-group').hide();
+		// remove required attribute from php_controller field
 		if (!jform_vvvvvynvyg_required)
 		{
 			updateFieldRequired('php_controller',1);
@@ -313,6 +321,7 @@ function vvvvvyn(add_custom_button_vvvvvyn)
 			jform_vvvvvynvyg_required = true;
 		}
 		jQuery('#jform_php_model-lbl').closest('.control-group').hide();
+		// remove required attribute from php_model field
 		if (!jform_vvvvvynvyh_required)
 		{
 			updateFieldRequired('php_model',1);
@@ -331,6 +340,7 @@ function vvvvvyo(add_css_vvvvvyo)
 	if (add_css_vvvvvyo == 1)
 	{
 		jQuery('#jform_css-lbl').closest('.control-group').show();
+		// add required attribute to css field
 		if (jform_vvvvvyovyi_required)
 		{
 			updateFieldRequired('css',0);
@@ -339,11 +349,11 @@ function vvvvvyo(add_css_vvvvvyo)
 			jQuery('#jform_css').addClass('required');
 			jform_vvvvvyovyi_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_css-lbl').closest('.control-group').hide();
+		// remove required attribute from css field
 		if (!jform_vvvvvyovyi_required)
 		{
 			updateFieldRequired('css',1);
@@ -363,6 +373,7 @@ function vvvvvyp(add_php_ajax_vvvvvyp)
 	{
 		jQuery('#jform_ajax_input-lbl').closest('.control-group').show();
 		jQuery('#jform_php_ajaxmethod-lbl').closest('.control-group').show();
+		// add required attribute to php_ajaxmethod field
 		if (jform_vvvvvypvyj_required)
 		{
 			updateFieldRequired('php_ajaxmethod',0);
@@ -371,12 +382,12 @@ function vvvvvyp(add_php_ajax_vvvvvyp)
 			jQuery('#jform_php_ajaxmethod').addClass('required');
 			jform_vvvvvypvyj_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_ajax_input-lbl').closest('.control-group').hide();
 		jQuery('#jform_php_ajaxmethod-lbl').closest('.control-group').hide();
+		// remove required attribute from php_ajaxmethod field
 		if (!jform_vvvvvypvyj_required)
 		{
 			updateFieldRequired('php_ajaxmethod',1);
diff --git a/admin/models/forms/custom_code.js b/admin/models/forms/custom_code.js
index 775b374a4..845c0ce39 100644
--- a/admin/models/forms/custom_code.js
+++ b/admin/models/forms/custom_code.js
@@ -39,6 +39,7 @@ function vvvvwad(target_vvvvwad)
 	if (target_vvvvwad == 2)
 	{
 		jQuery('#jform_function_name').closest('.control-group').show();
+		// add required attribute to function_name field
 		if (jform_vvvvwadvzr_required)
 		{
 			updateFieldRequired('function_name',0);
@@ -47,13 +48,13 @@ function vvvvwad(target_vvvvwad)
 			jQuery('#jform_function_name').addClass('required');
 			jform_vvvvwadvzr_required = false;
 		}
-
 		jQuery('.note_jcb_placeholder').closest('.control-group').show();
 		jQuery('#jform_system_name').closest('.control-group').show();
 	}
 	else
 	{
 		jQuery('#jform_function_name').closest('.control-group').hide();
+		// remove required attribute from function_name field
 		if (!jform_vvvvwadvzr_required)
 		{
 			updateFieldRequired('function_name',1);
@@ -74,6 +75,7 @@ function vvvvwae(target_vvvvwae)
 	if (target_vvvvwae == 1)
 	{
 		jQuery('#jform_component').closest('.control-group').show();
+		// add required attribute to component field
 		if (jform_vvvvwaevzs_required)
 		{
 			updateFieldRequired('component',0);
@@ -82,8 +84,8 @@ function vvvvwae(target_vvvvwae)
 			jQuery('#jform_component').addClass('required');
 			jform_vvvvwaevzs_required = false;
 		}
-
 		jQuery('#jform_path').closest('.control-group').show();
+		// add required attribute to path field
 		if (jform_vvvvwaevzt_required)
 		{
 			updateFieldRequired('path',0);
@@ -92,11 +94,11 @@ function vvvvwae(target_vvvvwae)
 			jQuery('#jform_path').addClass('required');
 			jform_vvvvwaevzt_required = false;
 		}
-
 		jQuery('#jform_from_line').closest('.control-group').show();
 		jQuery('#jform_hashtarget').closest('.control-group').show();
 		jQuery('#jform_to_line').closest('.control-group').show();
 		jQuery('#jform_type').closest('.control-group').show();
+		// add required attribute to type field
 		if (jform_vvvvwaevzu_required)
 		{
 			updateFieldRequired('type',0);
@@ -105,11 +107,11 @@ function vvvvwae(target_vvvvwae)
 			jQuery('#jform_type').addClass('required');
 			jform_vvvvwaevzu_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_component').closest('.control-group').hide();
+		// remove required attribute from component field
 		if (!jform_vvvvwaevzs_required)
 		{
 			updateFieldRequired('component',1);
@@ -119,6 +121,7 @@ function vvvvwae(target_vvvvwae)
 			jform_vvvvwaevzs_required = true;
 		}
 		jQuery('#jform_path').closest('.control-group').hide();
+		// remove required attribute from path field
 		if (!jform_vvvvwaevzt_required)
 		{
 			updateFieldRequired('path',1);
@@ -131,6 +134,7 @@ function vvvvwae(target_vvvvwae)
 		jQuery('#jform_hashtarget').closest('.control-group').hide();
 		jQuery('#jform_to_line').closest('.control-group').hide();
 		jQuery('#jform_type').closest('.control-group').hide();
+		// remove required attribute from type field
 		if (!jform_vvvvwaevzu_required)
 		{
 			updateFieldRequired('type',1);
diff --git a/admin/models/forms/dynamic_get.js b/admin/models/forms/dynamic_get.js
index d9ed77ce4..ec837ff82 100644
--- a/admin/models/forms/dynamic_get.js
+++ b/admin/models/forms/dynamic_get.js
@@ -125,6 +125,7 @@ function vvvvvzd(gettype_vvvvvzd)
 	if (gettype)
 	{
 		jQuery('#jform_getcustom').closest('.control-group').show();
+		// add required attribute to getcustom field
 		if (jform_vvvvvzdvyx_required)
 		{
 			updateFieldRequired('getcustom',0);
@@ -133,11 +134,11 @@ function vvvvvzd(gettype_vvvvvzd)
 			jQuery('#jform_getcustom').addClass('required');
 			jform_vvvvvzdvyx_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_getcustom').closest('.control-group').hide();
+		// remove required attribute from getcustom field
 		if (!jform_vvvvvzdvyx_required)
 		{
 			updateFieldRequired('getcustom',1);
@@ -180,6 +181,7 @@ function vvvvvze(main_source_vvvvvze)
 	if (main_source)
 	{
 		jQuery('#jform_view_table_main').closest('.control-group').show();
+		// add required attribute to view_table_main field
 		if (jform_vvvvvzevyy_required)
 		{
 			updateFieldRequired('view_table_main',0);
@@ -188,11 +190,11 @@ function vvvvvze(main_source_vvvvvze)
 			jQuery('#jform_view_table_main').addClass('required');
 			jform_vvvvvzevyy_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_view_table_main').closest('.control-group').hide();
+		// remove required attribute from view_table_main field
 		if (!jform_vvvvvzevyy_required)
 		{
 			updateFieldRequired('view_table_main',1);
@@ -235,6 +237,7 @@ function vvvvvzf(main_source_vvvvvzf)
 	if (main_source)
 	{
 		jQuery('#jform_view_selection').closest('.control-group').show();
+		// add required attribute to view_selection field
 		if (jform_vvvvvzfvyz_required)
 		{
 			updateFieldRequired('view_selection',0);
@@ -243,11 +246,11 @@ function vvvvvzf(main_source_vvvvvzf)
 			jQuery('#jform_view_selection').addClass('required');
 			jform_vvvvvzfvyz_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_view_selection').closest('.control-group').hide();
+		// remove required attribute from view_selection field
 		if (!jform_vvvvvzfvyz_required)
 		{
 			updateFieldRequired('view_selection',1);
@@ -290,6 +293,7 @@ function vvvvvzg(main_source_vvvvvzg)
 	if (main_source)
 	{
 		jQuery('#jform_db_table_main').closest('.control-group').show();
+		// add required attribute to db_table_main field
 		if (jform_vvvvvzgvza_required)
 		{
 			updateFieldRequired('db_table_main',0);
@@ -298,11 +302,11 @@ function vvvvvzg(main_source_vvvvvzg)
 			jQuery('#jform_db_table_main').addClass('required');
 			jform_vvvvvzgvza_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_db_table_main').closest('.control-group').hide();
+		// remove required attribute from db_table_main field
 		if (!jform_vvvvvzgvza_required)
 		{
 			updateFieldRequired('db_table_main',1);
@@ -345,6 +349,7 @@ function vvvvvzh(main_source_vvvvvzh)
 	if (main_source)
 	{
 		jQuery('#jform_db_selection').closest('.control-group').show();
+		// add required attribute to db_selection field
 		if (jform_vvvvvzhvzb_required)
 		{
 			updateFieldRequired('db_selection',0);
@@ -353,11 +358,11 @@ function vvvvvzh(main_source_vvvvvzh)
 			jQuery('#jform_db_selection').addClass('required');
 			jform_vvvvvzhvzb_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_db_selection').closest('.control-group').hide();
+		// remove required attribute from db_selection field
 		if (!jform_vvvvvzhvzb_required)
 		{
 			updateFieldRequired('db_selection',1);
@@ -387,6 +392,7 @@ function vvvvvzi(addcalculation_vvvvvzi)
 	if (addcalculation_vvvvvzi == 1)
 	{
 		jQuery('#jform_php_calculation-lbl').closest('.control-group').show();
+		// add required attribute to php_calculation field
 		if (jform_vvvvvzivzc_required)
 		{
 			updateFieldRequired('php_calculation',0);
@@ -395,11 +401,11 @@ function vvvvvzi(addcalculation_vvvvvzi)
 			jQuery('#jform_php_calculation').addClass('required');
 			jform_vvvvvzivzc_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_calculation-lbl').closest('.control-group').hide();
+		// remove required attribute from php_calculation field
 		if (!jform_vvvvvzivzc_required)
 		{
 			updateFieldRequired('php_calculation',1);
@@ -553,6 +559,7 @@ function vvvvvzn(main_source_vvvvvzn)
 	if (main_source)
 	{
 		jQuery('#jform_php_custom_get-lbl').closest('.control-group').show();
+		// add required attribute to php_custom_get field
 		if (jform_vvvvvznvzd_required)
 		{
 			updateFieldRequired('php_custom_get',0);
@@ -561,11 +568,11 @@ function vvvvvzn(main_source_vvvvvzn)
 			jQuery('#jform_php_custom_get').addClass('required');
 			jform_vvvvvznvzd_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_custom_get-lbl').closest('.control-group').hide();
+		// remove required attribute from php_custom_get field
 		if (!jform_vvvvvznvzd_required)
 		{
 			updateFieldRequired('php_custom_get',1);
@@ -668,6 +675,7 @@ function vvvvvzp(add_php_before_getitem_vvvvvzp,gettype_vvvvvzp)
 	if (add_php_before_getitem && gettype)
 	{
 		jQuery('#jform_php_before_getitem-lbl').closest('.control-group').show();
+		// add required attribute to php_before_getitem field
 		if (jform_vvvvvzpvze_required)
 		{
 			updateFieldRequired('php_before_getitem',0);
@@ -676,11 +684,11 @@ function vvvvvzp(add_php_before_getitem_vvvvvzp,gettype_vvvvvzp)
 			jQuery('#jform_php_before_getitem').addClass('required');
 			jform_vvvvvzpvze_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_before_getitem-lbl').closest('.control-group').hide();
+		// remove required attribute from php_before_getitem field
 		if (!jform_vvvvvzpvze_required)
 		{
 			updateFieldRequired('php_before_getitem',1);
@@ -746,6 +754,7 @@ function vvvvvzq(add_php_after_getitem_vvvvvzq,gettype_vvvvvzq)
 	if (add_php_after_getitem && gettype)
 	{
 		jQuery('#jform_php_after_getitem-lbl').closest('.control-group').show();
+		// add required attribute to php_after_getitem field
 		if (jform_vvvvvzqvzf_required)
 		{
 			updateFieldRequired('php_after_getitem',0);
@@ -754,11 +763,11 @@ function vvvvvzq(add_php_after_getitem_vvvvvzq,gettype_vvvvvzq)
 			jQuery('#jform_php_after_getitem').addClass('required');
 			jform_vvvvvzqvzf_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_after_getitem-lbl').closest('.control-group').hide();
+		// remove required attribute from php_after_getitem field
 		if (!jform_vvvvvzqvzf_required)
 		{
 			updateFieldRequired('php_after_getitem',1);
@@ -812,6 +821,7 @@ function vvvvvzs(gettype_vvvvvzs)
 	if (gettype)
 	{
 		jQuery('#jform_add_php_after_getitem').closest('.control-group').show();
+		// add required attribute to add_php_after_getitem field
 		if (jform_vvvvvzsvzg_required)
 		{
 			updateFieldRequired('add_php_after_getitem',0);
@@ -820,8 +830,8 @@ function vvvvvzs(gettype_vvvvvzs)
 			jQuery('#jform_add_php_after_getitem').addClass('required');
 			jform_vvvvvzsvzg_required = false;
 		}
-
 		jQuery('#jform_add_php_before_getitem').closest('.control-group').show();
+		// add required attribute to add_php_before_getitem field
 		if (jform_vvvvvzsvzh_required)
 		{
 			updateFieldRequired('add_php_before_getitem',0);
@@ -830,11 +840,11 @@ function vvvvvzs(gettype_vvvvvzs)
 			jQuery('#jform_add_php_before_getitem').addClass('required');
 			jform_vvvvvzsvzh_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_add_php_after_getitem').closest('.control-group').hide();
+		// remove required attribute from add_php_after_getitem field
 		if (!jform_vvvvvzsvzg_required)
 		{
 			updateFieldRequired('add_php_after_getitem',1);
@@ -844,6 +854,7 @@ function vvvvvzs(gettype_vvvvvzs)
 			jform_vvvvvzsvzg_required = true;
 		}
 		jQuery('#jform_add_php_before_getitem').closest('.control-group').hide();
+		// remove required attribute from add_php_before_getitem field
 		if (!jform_vvvvvzsvzh_required)
 		{
 			updateFieldRequired('add_php_before_getitem',1);
@@ -898,6 +909,7 @@ function vvvvvzt(add_php_getlistquery_vvvvvzt,gettype_vvvvvzt)
 	if (add_php_getlistquery && gettype)
 	{
 		jQuery('#jform_php_getlistquery-lbl').closest('.control-group').show();
+		// add required attribute to php_getlistquery field
 		if (jform_vvvvvztvzi_required)
 		{
 			updateFieldRequired('php_getlistquery',0);
@@ -906,11 +918,11 @@ function vvvvvzt(add_php_getlistquery_vvvvvzt,gettype_vvvvvzt)
 			jQuery('#jform_php_getlistquery').addClass('required');
 			jform_vvvvvztvzi_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_getlistquery-lbl').closest('.control-group').hide();
+		// remove required attribute from php_getlistquery field
 		if (!jform_vvvvvztvzi_required)
 		{
 			updateFieldRequired('php_getlistquery',1);
@@ -976,6 +988,7 @@ function vvvvvzu(add_php_before_getitems_vvvvvzu,gettype_vvvvvzu)
 	if (add_php_before_getitems && gettype)
 	{
 		jQuery('#jform_php_before_getitems-lbl').closest('.control-group').show();
+		// add required attribute to php_before_getitems field
 		if (jform_vvvvvzuvzj_required)
 		{
 			updateFieldRequired('php_before_getitems',0);
@@ -984,11 +997,11 @@ function vvvvvzu(add_php_before_getitems_vvvvvzu,gettype_vvvvvzu)
 			jQuery('#jform_php_before_getitems').addClass('required');
 			jform_vvvvvzuvzj_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_before_getitems-lbl').closest('.control-group').hide();
+		// remove required attribute from php_before_getitems field
 		if (!jform_vvvvvzuvzj_required)
 		{
 			updateFieldRequired('php_before_getitems',1);
@@ -1054,6 +1067,7 @@ function vvvvvzv(add_php_after_getitems_vvvvvzv,gettype_vvvvvzv)
 	if (add_php_after_getitems && gettype)
 	{
 		jQuery('#jform_php_after_getitems-lbl').closest('.control-group').show();
+		// add required attribute to php_after_getitems field
 		if (jform_vvvvvzvvzk_required)
 		{
 			updateFieldRequired('php_after_getitems',0);
@@ -1062,11 +1076,11 @@ function vvvvvzv(add_php_after_getitems_vvvvvzv,gettype_vvvvvzv)
 			jQuery('#jform_php_after_getitems').addClass('required');
 			jform_vvvvvzvvzk_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_after_getitems-lbl').closest('.control-group').hide();
+		// remove required attribute from php_after_getitems field
 		if (!jform_vvvvvzvvzk_required)
 		{
 			updateFieldRequired('php_after_getitems',1);
@@ -1120,6 +1134,7 @@ function vvvvvzx(gettype_vvvvvzx)
 	if (gettype)
 	{
 		jQuery('#jform_add_php_after_getitems').closest('.control-group').show();
+		// add required attribute to add_php_after_getitems field
 		if (jform_vvvvvzxvzl_required)
 		{
 			updateFieldRequired('add_php_after_getitems',0);
@@ -1128,8 +1143,8 @@ function vvvvvzx(gettype_vvvvvzx)
 			jQuery('#jform_add_php_after_getitems').addClass('required');
 			jform_vvvvvzxvzl_required = false;
 		}
-
 		jQuery('#jform_add_php_before_getitems').closest('.control-group').show();
+		// add required attribute to add_php_before_getitems field
 		if (jform_vvvvvzxvzm_required)
 		{
 			updateFieldRequired('add_php_before_getitems',0);
@@ -1138,8 +1153,8 @@ function vvvvvzx(gettype_vvvvvzx)
 			jQuery('#jform_add_php_before_getitems').addClass('required');
 			jform_vvvvvzxvzm_required = false;
 		}
-
 		jQuery('#jform_add_php_getlistquery').closest('.control-group').show();
+		// add required attribute to add_php_getlistquery field
 		if (jform_vvvvvzxvzn_required)
 		{
 			updateFieldRequired('add_php_getlistquery',0);
@@ -1148,11 +1163,11 @@ function vvvvvzx(gettype_vvvvvzx)
 			jQuery('#jform_add_php_getlistquery').addClass('required');
 			jform_vvvvvzxvzn_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_add_php_after_getitems').closest('.control-group').hide();
+		// remove required attribute from add_php_after_getitems field
 		if (!jform_vvvvvzxvzl_required)
 		{
 			updateFieldRequired('add_php_after_getitems',1);
@@ -1162,6 +1177,7 @@ function vvvvvzx(gettype_vvvvvzx)
 			jform_vvvvvzxvzl_required = true;
 		}
 		jQuery('#jform_add_php_before_getitems').closest('.control-group').hide();
+		// remove required attribute from add_php_before_getitems field
 		if (!jform_vvvvvzxvzm_required)
 		{
 			updateFieldRequired('add_php_before_getitems',1);
@@ -1171,6 +1187,7 @@ function vvvvvzx(gettype_vvvvvzx)
 			jform_vvvvvzxvzm_required = true;
 		}
 		jQuery('#jform_add_php_getlistquery').closest('.control-group').hide();
+		// remove required attribute from add_php_getlistquery field
 		if (!jform_vvvvvzxvzn_required)
 		{
 			updateFieldRequired('add_php_getlistquery',1);
@@ -1213,6 +1230,7 @@ function vvvvvzy(gettype_vvvvvzy)
 	if (gettype)
 	{
 		jQuery('#jform_pagination').closest('.control-group').show();
+		// add required attribute to pagination field
 		if (jform_vvvvvzyvzo_required)
 		{
 			updateFieldRequired('pagination',0);
@@ -1221,11 +1239,11 @@ function vvvvvzy(gettype_vvvvvzy)
 			jQuery('#jform_pagination').addClass('required');
 			jform_vvvvvzyvzo_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_pagination').closest('.control-group').hide();
+		// remove required attribute from pagination field
 		if (!jform_vvvvvzyvzo_required)
 		{
 			updateFieldRequired('pagination',1);
@@ -1268,6 +1286,7 @@ function vvvvvzz(gettype_vvvvvzz)
 	if (gettype)
 	{
 		jQuery('#jform_add_php_router_parse').closest('.control-group').show();
+		// add required attribute to add_php_router_parse field
 		if (jform_vvvvvzzvzp_required)
 		{
 			updateFieldRequired('add_php_router_parse',0);
@@ -1276,11 +1295,11 @@ function vvvvvzz(gettype_vvvvvzz)
 			jQuery('#jform_add_php_router_parse').addClass('required');
 			jform_vvvvvzzvzp_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_add_php_router_parse').closest('.control-group').hide();
+		// remove required attribute from add_php_router_parse field
 		if (!jform_vvvvvzzvzp_required)
 		{
 			updateFieldRequired('add_php_router_parse',1);
@@ -1335,6 +1354,7 @@ function vvvvwaa(gettype_vvvvwaa,add_php_router_parse_vvvvwaa)
 	if (gettype && add_php_router_parse)
 	{
 		jQuery('#jform_php_router_parse').closest('.control-group').show();
+		// add required attribute to php_router_parse field
 		if (jform_vvvvwaavzq_required)
 		{
 			updateFieldRequired('php_router_parse',0);
@@ -1343,11 +1363,11 @@ function vvvvwaa(gettype_vvvvwaa,add_php_router_parse_vvvvwaa)
 			jQuery('#jform_php_router_parse').addClass('required');
 			jform_vvvvwaavzq_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_router_parse').closest('.control-group').hide();
+		// remove required attribute from php_router_parse field
 		if (!jform_vvvvwaavzq_required)
 		{
 			updateFieldRequired('php_router_parse',1);
diff --git a/admin/models/forms/field.js b/admin/models/forms/field.js
index b595d81c4..52e117a76 100644
--- a/admin/models/forms/field.js
+++ b/admin/models/forms/field.js
@@ -70,6 +70,7 @@ function vvvvwap(datalenght_vvvvwap)
 	if (datalenght)
 	{
 		jQuery('#jform_datalenght_other').closest('.control-group').show();
+		// add required attribute to datalenght_other field
 		if (jform_vvvvwapvzx_required)
 		{
 			updateFieldRequired('datalenght_other',0);
@@ -78,11 +79,11 @@ function vvvvwap(datalenght_vvvvwap)
 			jQuery('#jform_datalenght_other').addClass('required');
 			jform_vvvvwapvzx_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_datalenght_other').closest('.control-group').hide();
+		// remove required attribute from datalenght_other field
 		if (!jform_vvvvwapvzx_required)
 		{
 			updateFieldRequired('datalenght_other',1);
@@ -125,6 +126,7 @@ function vvvvwaq(datadefault_vvvvwaq)
 	if (datadefault)
 	{
 		jQuery('#jform_datadefault_other').closest('.control-group').show();
+		// add required attribute to datadefault_other field
 		if (jform_vvvvwaqvzy_required)
 		{
 			updateFieldRequired('datadefault_other',0);
@@ -133,11 +135,11 @@ function vvvvwaq(datadefault_vvvvwaq)
 			jQuery('#jform_datadefault_other').addClass('required');
 			jform_vvvvwaqvzy_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_datadefault_other').closest('.control-group').hide();
+		// remove required attribute from datadefault_other field
 		if (!jform_vvvvwaqvzy_required)
 		{
 			updateFieldRequired('datadefault_other',1);
@@ -182,6 +184,7 @@ function vvvvwar(datatype_vvvvwar)
 		jQuery('#jform_datadefault').closest('.control-group').show();
 		jQuery('#jform_datalenght').closest('.control-group').show();
 		jQuery('#jform_indexes').closest('.control-group').show();
+		// add required attribute to indexes field
 		if (jform_vvvvwarvzz_required)
 		{
 			updateFieldRequired('indexes',0);
@@ -190,13 +193,13 @@ function vvvvwar(datatype_vvvvwar)
 			jQuery('#jform_indexes').addClass('required');
 			jform_vvvvwarvzz_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_datadefault').closest('.control-group').hide();
 		jQuery('#jform_datalenght').closest('.control-group').hide();
 		jQuery('#jform_indexes').closest('.control-group').hide();
+		// remove required attribute from indexes field
 		if (!jform_vvvvwarvzz_required)
 		{
 			updateFieldRequired('indexes',1);
@@ -239,6 +242,7 @@ function vvvvwas(datatype_vvvvwas)
 	if (datatype)
 	{
 		jQuery('#jform_store').closest('.control-group').show();
+		// add required attribute to store field
 		if (jform_vvvvwaswaa_required)
 		{
 			updateFieldRequired('store',0);
@@ -247,11 +251,11 @@ function vvvvwas(datatype_vvvvwas)
 			jQuery('#jform_store').addClass('required');
 			jform_vvvvwaswaa_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_store').closest('.control-group').hide();
+		// remove required attribute from store field
 		if (!jform_vvvvwaswaa_required)
 		{
 			updateFieldRequired('store',1);
@@ -342,6 +346,7 @@ function vvvvwav(add_css_view_vvvvwav)
 	if (add_css_view_vvvvwav == 1)
 	{
 		jQuery('#jform_css_view-lbl').closest('.control-group').show();
+		// add required attribute to css_view field
 		if (jform_vvvvwavwab_required)
 		{
 			updateFieldRequired('css_view',0);
@@ -350,11 +355,11 @@ function vvvvwav(add_css_view_vvvvwav)
 			jQuery('#jform_css_view').addClass('required');
 			jform_vvvvwavwab_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_css_view-lbl').closest('.control-group').hide();
+		// remove required attribute from css_view field
 		if (!jform_vvvvwavwab_required)
 		{
 			updateFieldRequired('css_view',1);
@@ -373,6 +378,7 @@ function vvvvwaw(add_css_views_vvvvwaw)
 	if (add_css_views_vvvvwaw == 1)
 	{
 		jQuery('#jform_css_views-lbl').closest('.control-group').show();
+		// add required attribute to css_views field
 		if (jform_vvvvwawwac_required)
 		{
 			updateFieldRequired('css_views',0);
@@ -381,11 +387,11 @@ function vvvvwaw(add_css_views_vvvvwaw)
 			jQuery('#jform_css_views').addClass('required');
 			jform_vvvvwawwac_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_css_views-lbl').closest('.control-group').hide();
+		// remove required attribute from css_views field
 		if (!jform_vvvvwawwac_required)
 		{
 			updateFieldRequired('css_views',1);
@@ -404,6 +410,7 @@ function vvvvwax(add_javascript_view_footer_vvvvwax)
 	if (add_javascript_view_footer_vvvvwax == 1)
 	{
 		jQuery('#jform_javascript_view_footer-lbl').closest('.control-group').show();
+		// add required attribute to javascript_view_footer field
 		if (jform_vvvvwaxwad_required)
 		{
 			updateFieldRequired('javascript_view_footer',0);
@@ -412,11 +419,11 @@ function vvvvwax(add_javascript_view_footer_vvvvwax)
 			jQuery('#jform_javascript_view_footer').addClass('required');
 			jform_vvvvwaxwad_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_javascript_view_footer-lbl').closest('.control-group').hide();
+		// remove required attribute from javascript_view_footer field
 		if (!jform_vvvvwaxwad_required)
 		{
 			updateFieldRequired('javascript_view_footer',1);
@@ -435,6 +442,7 @@ function vvvvway(add_javascript_views_footer_vvvvway)
 	if (add_javascript_views_footer_vvvvway == 1)
 	{
 		jQuery('#jform_javascript_views_footer-lbl').closest('.control-group').show();
+		// add required attribute to javascript_views_footer field
 		if (jform_vvvvwaywae_required)
 		{
 			updateFieldRequired('javascript_views_footer',0);
@@ -443,11 +451,11 @@ function vvvvway(add_javascript_views_footer_vvvvway)
 			jQuery('#jform_javascript_views_footer').addClass('required');
 			jform_vvvvwaywae_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_javascript_views_footer-lbl').closest('.control-group').hide();
+		// remove required attribute from javascript_views_footer field
 		if (!jform_vvvvwaywae_required)
 		{
 			updateFieldRequired('javascript_views_footer',1);
diff --git a/admin/models/forms/help_document.js b/admin/models/forms/help_document.js
index e6e778a67..6310ceeb0 100644
--- a/admin/models/forms/help_document.js
+++ b/admin/models/forms/help_document.js
@@ -45,6 +45,7 @@ function vvvvwbj(location_vvvvwbj)
 	if (location_vvvvwbj == 1)
 	{
 		jQuery('#jform_admin_view').closest('.control-group').show();
+		// add required attribute to admin_view field
 		if (jform_vvvvwbjwaq_required)
 		{
 			updateFieldRequired('admin_view',0);
@@ -53,11 +54,11 @@ function vvvvwbj(location_vvvvwbj)
 			jQuery('#jform_admin_view').addClass('required');
 			jform_vvvvwbjwaq_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_admin_view').closest('.control-group').hide();
+		// remove required attribute from admin_view field
 		if (!jform_vvvvwbjwaq_required)
 		{
 			updateFieldRequired('admin_view',1);
@@ -76,6 +77,7 @@ function vvvvwbk(location_vvvvwbk)
 	if (location_vvvvwbk == 2)
 	{
 		jQuery('#jform_site_view').closest('.control-group').show();
+		// add required attribute to site_view field
 		if (jform_vvvvwbkwar_required)
 		{
 			updateFieldRequired('site_view',0);
@@ -84,11 +86,11 @@ function vvvvwbk(location_vvvvwbk)
 			jQuery('#jform_site_view').addClass('required');
 			jform_vvvvwbkwar_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_site_view').closest('.control-group').hide();
+		// remove required attribute from site_view field
 		if (!jform_vvvvwbkwar_required)
 		{
 			updateFieldRequired('site_view',1);
@@ -120,6 +122,7 @@ function vvvvwbl(type_vvvvwbl)
 	if (type)
 	{
 		jQuery('#jform_url').closest('.control-group').show();
+		// add required attribute to url field
 		if (jform_vvvvwblwas_required)
 		{
 			updateFieldRequired('url',0);
@@ -128,11 +131,11 @@ function vvvvwbl(type_vvvvwbl)
 			jQuery('#jform_url').addClass('required');
 			jform_vvvvwblwas_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_url').closest('.control-group').hide();
+		// remove required attribute from url field
 		if (!jform_vvvvwblwas_required)
 		{
 			updateFieldRequired('url',1);
@@ -175,6 +178,7 @@ function vvvvwbm(type_vvvvwbm)
 	if (type)
 	{
 		jQuery('#jform_article').closest('.control-group').show();
+		// add required attribute to article field
 		if (jform_vvvvwbmwat_required)
 		{
 			updateFieldRequired('article',0);
@@ -183,11 +187,11 @@ function vvvvwbm(type_vvvvwbm)
 			jQuery('#jform_article').addClass('required');
 			jform_vvvvwbmwat_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_article').closest('.control-group').hide();
+		// remove required attribute from article field
 		if (!jform_vvvvwbmwat_required)
 		{
 			updateFieldRequired('article',1);
@@ -230,6 +234,7 @@ function vvvvwbn(type_vvvvwbn)
 	if (type)
 	{
 		jQuery('#jform_content-lbl').closest('.control-group').show();
+		// add required attribute to content field
 		if (jform_vvvvwbnwau_required)
 		{
 			updateFieldRequired('content',0);
@@ -238,11 +243,11 @@ function vvvvwbn(type_vvvvwbn)
 			jQuery('#jform_content').addClass('required');
 			jform_vvvvwbnwau_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_content-lbl').closest('.control-group').hide();
+		// remove required attribute from content field
 		if (!jform_vvvvwbnwau_required)
 		{
 			updateFieldRequired('content',1);
@@ -272,6 +277,7 @@ function vvvvwbo(target_vvvvwbo)
 	if (target_vvvvwbo == 1)
 	{
 		jQuery('#jform_groups').closest('.control-group').show();
+		// add required attribute to groups field
 		if (jform_vvvvwbowav_required)
 		{
 			updateFieldRequired('groups',0);
@@ -280,11 +286,11 @@ function vvvvwbo(target_vvvvwbo)
 			jQuery('#jform_groups').addClass('required');
 			jform_vvvvwbowav_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_groups').closest('.control-group').hide();
+		// remove required attribute from groups field
 		if (!jform_vvvvwbowav_required)
 		{
 			updateFieldRequired('groups',1);
diff --git a/admin/models/forms/joomla_component.js b/admin/models/forms/joomla_component.js
index ac4135ffa..0533e104c 100644
--- a/admin/models/forms/joomla_component.js
+++ b/admin/models/forms/joomla_component.js
@@ -131,6 +131,7 @@ function vvvvvvv(add_php_helper_admin_vvvvvvv)
 	if (add_php_helper_admin_vvvvvvv == 1)
 	{
 		jQuery('#jform_php_helper_admin-lbl').closest('.control-group').show();
+		// add required attribute to php_helper_admin field
 		if (jform_vvvvvvvvvv_required)
 		{
 			updateFieldRequired('php_helper_admin',0);
@@ -139,11 +140,11 @@ function vvvvvvv(add_php_helper_admin_vvvvvvv)
 			jQuery('#jform_php_helper_admin').addClass('required');
 			jform_vvvvvvvvvv_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_helper_admin-lbl').closest('.control-group').hide();
+		// remove required attribute from php_helper_admin field
 		if (!jform_vvvvvvvvvv_required)
 		{
 			updateFieldRequired('php_helper_admin',1);
@@ -162,6 +163,7 @@ function vvvvvvw(add_php_helper_site_vvvvvvw)
 	if (add_php_helper_site_vvvvvvw == 1)
 	{
 		jQuery('#jform_php_helper_site-lbl').closest('.control-group').show();
+		// add required attribute to php_helper_site field
 		if (jform_vvvvvvwvvw_required)
 		{
 			updateFieldRequired('php_helper_site',0);
@@ -170,11 +172,11 @@ function vvvvvvw(add_php_helper_site_vvvvvvw)
 			jQuery('#jform_php_helper_site').addClass('required');
 			jform_vvvvvvwvvw_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_helper_site-lbl').closest('.control-group').hide();
+		// remove required attribute from php_helper_site field
 		if (!jform_vvvvvvwvvw_required)
 		{
 			updateFieldRequired('php_helper_site',1);
@@ -193,6 +195,7 @@ function vvvvvvx(add_php_helper_both_vvvvvvx)
 	if (add_php_helper_both_vvvvvvx == 1)
 	{
 		jQuery('#jform_php_helper_both-lbl').closest('.control-group').show();
+		// add required attribute to php_helper_both field
 		if (jform_vvvvvvxvvx_required)
 		{
 			updateFieldRequired('php_helper_both',0);
@@ -201,11 +204,11 @@ function vvvvvvx(add_php_helper_both_vvvvvvx)
 			jQuery('#jform_php_helper_both').addClass('required');
 			jform_vvvvvvxvvx_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_helper_both-lbl').closest('.control-group').hide();
+		// remove required attribute from php_helper_both field
 		if (!jform_vvvvvvxvvx_required)
 		{
 			updateFieldRequired('php_helper_both',1);
@@ -224,6 +227,7 @@ function vvvvvvy(add_css_admin_vvvvvvy)
 	if (add_css_admin_vvvvvvy == 1)
 	{
 		jQuery('#jform_css_admin-lbl').closest('.control-group').show();
+		// add required attribute to css_admin field
 		if (jform_vvvvvvyvvy_required)
 		{
 			updateFieldRequired('css_admin',0);
@@ -232,11 +236,11 @@ function vvvvvvy(add_css_admin_vvvvvvy)
 			jQuery('#jform_css_admin').addClass('required');
 			jform_vvvvvvyvvy_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_css_admin-lbl').closest('.control-group').hide();
+		// remove required attribute from css_admin field
 		if (!jform_vvvvvvyvvy_required)
 		{
 			updateFieldRequired('css_admin',1);
@@ -255,6 +259,7 @@ function vvvvvvz(add_css_site_vvvvvvz)
 	if (add_css_site_vvvvvvz == 1)
 	{
 		jQuery('#jform_css_site-lbl').closest('.control-group').show();
+		// add required attribute to css_site field
 		if (jform_vvvvvvzvvz_required)
 		{
 			updateFieldRequired('css_site',0);
@@ -263,11 +268,11 @@ function vvvvvvz(add_css_site_vvvvvvz)
 			jQuery('#jform_css_site').addClass('required');
 			jform_vvvvvvzvvz_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_css_site-lbl').closest('.control-group').hide();
+		// remove required attribute from css_site field
 		if (!jform_vvvvvvzvvz_required)
 		{
 			updateFieldRequired('css_site',1);
@@ -286,6 +291,7 @@ function vvvvvwa(add_javascript_vvvvvwa)
 	if (add_javascript_vvvvvwa == 1)
 	{
 		jQuery('#jform_javascript-lbl').closest('.control-group').show();
+		// add required attribute to javascript field
 		if (jform_vvvvvwavwa_required)
 		{
 			updateFieldRequired('javascript',0);
@@ -294,11 +300,11 @@ function vvvvvwa(add_javascript_vvvvvwa)
 			jQuery('#jform_javascript').addClass('required');
 			jform_vvvvvwavwa_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_javascript-lbl').closest('.control-group').hide();
+		// remove required attribute from javascript field
 		if (!jform_vvvvvwavwa_required)
 		{
 			updateFieldRequired('javascript',1);
@@ -317,6 +323,7 @@ function vvvvvwb(add_sql_vvvvvwb)
 	if (add_sql_vvvvvwb == 1)
 	{
 		jQuery('#jform_sql').closest('.control-group').show();
+		// add required attribute to sql field
 		if (jform_vvvvvwbvwb_required)
 		{
 			updateFieldRequired('sql',0);
@@ -325,11 +332,11 @@ function vvvvvwb(add_sql_vvvvvwb)
 			jQuery('#jform_sql').addClass('required');
 			jform_vvvvvwbvwb_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_sql').closest('.control-group').hide();
+		// remove required attribute from sql field
 		if (!jform_vvvvvwbvwb_required)
 		{
 			updateFieldRequired('sql',1);
@@ -348,6 +355,7 @@ function vvvvvwc(add_sql_uninstall_vvvvvwc)
 	if (add_sql_uninstall_vvvvvwc == 1)
 	{
 		jQuery('#jform_sql_uninstall').closest('.control-group').show();
+		// add required attribute to sql_uninstall field
 		if (jform_vvvvvwcvwc_required)
 		{
 			updateFieldRequired('sql_uninstall',0);
@@ -356,11 +364,11 @@ function vvvvvwc(add_sql_uninstall_vvvvvwc)
 			jQuery('#jform_sql_uninstall').addClass('required');
 			jform_vvvvvwcvwc_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_sql_uninstall').closest('.control-group').hide();
+		// remove required attribute from sql_uninstall field
 		if (!jform_vvvvvwcvwc_required)
 		{
 			updateFieldRequired('sql_uninstall',1);
@@ -393,6 +401,7 @@ function vvvvvwe(add_license_vvvvvwe)
 	if (add_license_vvvvvwe == 1)
 	{
 		jQuery('#jform_license_type').closest('.control-group').show();
+		// add required attribute to license_type field
 		if (jform_vvvvvwevwd_required)
 		{
 			updateFieldRequired('license_type',0);
@@ -401,11 +410,11 @@ function vvvvvwe(add_license_vvvvvwe)
 			jQuery('#jform_license_type').addClass('required');
 			jform_vvvvvwevwd_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_license_type').closest('.control-group').hide();
+		// remove required attribute from license_type field
 		if (!jform_vvvvvwevwd_required)
 		{
 			updateFieldRequired('license_type',1);
@@ -424,6 +433,7 @@ function vvvvvwf(add_admin_event_vvvvvwf)
 	if (add_admin_event_vvvvvwf == 1)
 	{
 		jQuery('#jform_php_admin_event-lbl').closest('.control-group').show();
+		// add required attribute to php_admin_event field
 		if (jform_vvvvvwfvwe_required)
 		{
 			updateFieldRequired('php_admin_event',0);
@@ -432,11 +442,11 @@ function vvvvvwf(add_admin_event_vvvvvwf)
 			jQuery('#jform_php_admin_event').addClass('required');
 			jform_vvvvvwfvwe_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_admin_event-lbl').closest('.control-group').hide();
+		// remove required attribute from php_admin_event field
 		if (!jform_vvvvvwfvwe_required)
 		{
 			updateFieldRequired('php_admin_event',1);
@@ -455,6 +465,7 @@ function vvvvvwg(add_site_event_vvvvvwg)
 	if (add_site_event_vvvvvwg == 1)
 	{
 		jQuery('#jform_php_site_event-lbl').closest('.control-group').show();
+		// add required attribute to php_site_event field
 		if (jform_vvvvvwgvwf_required)
 		{
 			updateFieldRequired('php_site_event',0);
@@ -463,11 +474,11 @@ function vvvvvwg(add_site_event_vvvvvwg)
 			jQuery('#jform_php_site_event').addClass('required');
 			jform_vvvvvwgvwf_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_site_event-lbl').closest('.control-group').hide();
+		// remove required attribute from php_site_event field
 		if (!jform_vvvvvwgvwf_required)
 		{
 			updateFieldRequired('php_site_event',1);
@@ -487,6 +498,7 @@ function vvvvvwh(addreadme_vvvvvwh)
 	{
 		jQuery('.note_readme').closest('.control-group').show();
 		jQuery('#jform_readme-lbl').closest('.control-group').show();
+		// add required attribute to readme field
 		if (jform_vvvvvwhvwg_required)
 		{
 			updateFieldRequired('readme',0);
@@ -495,12 +507,12 @@ function vvvvvwh(addreadme_vvvvvwh)
 			jQuery('#jform_readme').addClass('required');
 			jform_vvvvvwhvwg_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('.note_readme').closest('.control-group').hide();
 		jQuery('#jform_readme-lbl').closest('.control-group').hide();
+		// remove required attribute from readme field
 		if (!jform_vvvvvwhvwg_required)
 		{
 			updateFieldRequired('readme',1);
@@ -567,6 +579,7 @@ function vvvvvwl(add_php_postflight_install_vvvvvwl)
 	if (add_php_postflight_install_vvvvvwl == 1)
 	{
 		jQuery('#jform_php_postflight_install-lbl').closest('.control-group').show();
+		// add required attribute to php_postflight_install field
 		if (jform_vvvvvwlvwh_required)
 		{
 			updateFieldRequired('php_postflight_install',0);
@@ -575,11 +588,11 @@ function vvvvvwl(add_php_postflight_install_vvvvvwl)
 			jQuery('#jform_php_postflight_install').addClass('required');
 			jform_vvvvvwlvwh_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_postflight_install-lbl').closest('.control-group').hide();
+		// remove required attribute from php_postflight_install field
 		if (!jform_vvvvvwlvwh_required)
 		{
 			updateFieldRequired('php_postflight_install',1);
@@ -598,6 +611,7 @@ function vvvvvwm(add_php_postflight_update_vvvvvwm)
 	if (add_php_postflight_update_vvvvvwm == 1)
 	{
 		jQuery('#jform_php_postflight_update-lbl').closest('.control-group').show();
+		// add required attribute to php_postflight_update field
 		if (jform_vvvvvwmvwi_required)
 		{
 			updateFieldRequired('php_postflight_update',0);
@@ -606,11 +620,11 @@ function vvvvvwm(add_php_postflight_update_vvvvvwm)
 			jQuery('#jform_php_postflight_update').addClass('required');
 			jform_vvvvvwmvwi_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_postflight_update-lbl').closest('.control-group').hide();
+		// remove required attribute from php_postflight_update field
 		if (!jform_vvvvvwmvwi_required)
 		{
 			updateFieldRequired('php_postflight_update',1);
@@ -629,6 +643,7 @@ function vvvvvwn(add_php_method_uninstall_vvvvvwn)
 	if (add_php_method_uninstall_vvvvvwn == 1)
 	{
 		jQuery('#jform_php_method_uninstall-lbl').closest('.control-group').show();
+		// add required attribute to php_method_uninstall field
 		if (jform_vvvvvwnvwj_required)
 		{
 			updateFieldRequired('php_method_uninstall',0);
@@ -637,11 +652,11 @@ function vvvvvwn(add_php_method_uninstall_vvvvvwn)
 			jQuery('#jform_php_method_uninstall').addClass('required');
 			jform_vvvvvwnvwj_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_method_uninstall-lbl').closest('.control-group').hide();
+		// remove required attribute from php_method_uninstall field
 		if (!jform_vvvvvwnvwj_required)
 		{
 			updateFieldRequired('php_method_uninstall',1);
@@ -660,6 +675,7 @@ function vvvvvwo(add_php_preflight_install_vvvvvwo)
 	if (add_php_preflight_install_vvvvvwo == 1)
 	{
 		jQuery('#jform_php_preflight_install-lbl').closest('.control-group').show();
+		// add required attribute to php_preflight_install field
 		if (jform_vvvvvwovwk_required)
 		{
 			updateFieldRequired('php_preflight_install',0);
@@ -668,11 +684,11 @@ function vvvvvwo(add_php_preflight_install_vvvvvwo)
 			jQuery('#jform_php_preflight_install').addClass('required');
 			jform_vvvvvwovwk_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_preflight_install-lbl').closest('.control-group').hide();
+		// remove required attribute from php_preflight_install field
 		if (!jform_vvvvvwovwk_required)
 		{
 			updateFieldRequired('php_preflight_install',1);
@@ -691,6 +707,7 @@ function vvvvvwp(add_php_preflight_update_vvvvvwp)
 	if (add_php_preflight_update_vvvvvwp == 1)
 	{
 		jQuery('#jform_php_preflight_update-lbl').closest('.control-group').show();
+		// add required attribute to php_preflight_update field
 		if (jform_vvvvvwpvwl_required)
 		{
 			updateFieldRequired('php_preflight_update',0);
@@ -699,11 +716,11 @@ function vvvvvwp(add_php_preflight_update_vvvvvwp)
 			jQuery('#jform_php_preflight_update').addClass('required');
 			jform_vvvvvwpvwl_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_preflight_update-lbl').closest('.control-group').hide();
+		// remove required attribute from php_preflight_update field
 		if (!jform_vvvvvwpvwl_required)
 		{
 			updateFieldRequired('php_preflight_update',1);
@@ -782,6 +799,7 @@ function vvvvvww(add_update_server_vvvvvww)
 	if (add_update_server_vvvvvww == 1)
 	{
 		jQuery('#jform_update_server_target').closest('.control-group').show();
+		// add required attribute to update_server_target field
 		if (jform_vvvvvwwvwm_required)
 		{
 			updateFieldRequired('update_server_target',0);
@@ -790,11 +808,11 @@ function vvvvvww(add_update_server_vvvvvww)
 			jQuery('#jform_update_server_target').addClass('required');
 			jform_vvvvvwwvwm_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_update_server_target').closest('.control-group').hide();
+		// remove required attribute from update_server_target field
 		if (!jform_vvvvvwwvwm_required)
 		{
 			updateFieldRequired('update_server_target',1);
@@ -813,6 +831,7 @@ function vvvvvwx(buildcomp_vvvvvwx)
 	if (buildcomp_vvvvvwx == 1)
 	{
 		jQuery('#jform_buildcompsql').closest('.control-group').show();
+		// add required attribute to buildcompsql field
 		if (jform_vvvvvwxvwn_required)
 		{
 			updateFieldRequired('buildcompsql',0);
@@ -821,11 +840,11 @@ function vvvvvwx(buildcomp_vvvvvwx)
 			jQuery('#jform_buildcompsql').addClass('required');
 			jform_vvvvvwxvwn_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_buildcompsql').closest('.control-group').hide();
+		// remove required attribute from buildcompsql field
 		if (!jform_vvvvvwxvwn_required)
 		{
 			updateFieldRequired('buildcompsql',1);
diff --git a/admin/models/forms/layout.js b/admin/models/forms/layout.js
index 2170f0385..f9960a44b 100644
--- a/admin/models/forms/layout.js
+++ b/admin/models/forms/layout.js
@@ -25,6 +25,7 @@ function vvvvvzc(add_php_view_vvvvvzc)
 	if (add_php_view_vvvvvzc == 1)
 	{
 		jQuery('#jform_php_view-lbl').closest('.control-group').show();
+		// add required attribute to php_view field
 		if (jform_vvvvvzcvyw_required)
 		{
 			updateFieldRequired('php_view',0);
@@ -33,11 +34,11 @@ function vvvvvzc(add_php_view_vvvvvzc)
 			jQuery('#jform_php_view').addClass('required');
 			jform_vvvvvzcvyw_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_view-lbl').closest('.control-group').hide();
+		// remove required attribute from php_view field
 		if (!jform_vvvvvzcvyw_required)
 		{
 			updateFieldRequired('php_view',1);
diff --git a/admin/models/forms/library.js b/admin/models/forms/library.js
index fde17ac9c..d4c51b0d8 100644
--- a/admin/models/forms/library.js
+++ b/admin/models/forms/library.js
@@ -98,6 +98,7 @@ function vvvvwai(how_vvvvwai)
 	if (how)
 	{
 		jQuery('#jform_php_setdocument').closest('.control-group').show();
+		// add required attribute to php_setdocument field
 		if (jform_vvvvwaivzv_required)
 		{
 			updateFieldRequired('php_setdocument',0);
@@ -106,11 +107,11 @@ function vvvvwai(how_vvvvwai)
 			jQuery('#jform_php_setdocument').addClass('required');
 			jform_vvvvwaivzv_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_setdocument').closest('.control-group').hide();
+		// remove required attribute from php_setdocument field
 		if (!jform_vvvvwaivzv_required)
 		{
 			updateFieldRequired('php_setdocument',1);
@@ -340,6 +341,7 @@ function vvvvwao(type_vvvvwao)
 	if (type_vvvvwao == 2)
 	{
 		jQuery('#jform_libraries').closest('.control-group').show();
+		// add required attribute to libraries field
 		if (jform_vvvvwaovzw_required)
 		{
 			updateFieldRequired('libraries',0);
@@ -348,11 +350,11 @@ function vvvvwao(type_vvvvwao)
 			jQuery('#jform_libraries').addClass('required');
 			jform_vvvvwaovzw_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_libraries').closest('.control-group').hide();
+		// remove required attribute from libraries field
 		if (!jform_vvvvwaovzw_required)
 		{
 			updateFieldRequired('libraries',1);
diff --git a/admin/models/forms/server.js b/admin/models/forms/server.js
index 66a8de153..ccccfc14f 100644
--- a/admin/models/forms/server.js
+++ b/admin/models/forms/server.js
@@ -65,6 +65,7 @@ function vvvvwaz(protocol_vvvvwaz)
 	if (protocol)
 	{
 		jQuery('#jform_authentication').closest('.control-group').show();
+		// add required attribute to authentication field
 		if (jform_vvvvwazwag_required)
 		{
 			updateFieldRequired('authentication',0);
@@ -73,8 +74,8 @@ function vvvvwaz(protocol_vvvvwaz)
 			jQuery('#jform_authentication').addClass('required');
 			jform_vvvvwazwag_required = false;
 		}
-
 		jQuery('#jform_host').closest('.control-group').show();
+		// add required attribute to host field
 		if (jform_vvvvwazwah_required)
 		{
 			updateFieldRequired('host',0);
@@ -83,8 +84,8 @@ function vvvvwaz(protocol_vvvvwaz)
 			jQuery('#jform_host').addClass('required');
 			jform_vvvvwazwah_required = false;
 		}
-
 		jQuery('#jform_port').closest('.control-group').show();
+		// add required attribute to port field
 		if (jform_vvvvwazwai_required)
 		{
 			updateFieldRequired('port',0);
@@ -93,8 +94,8 @@ function vvvvwaz(protocol_vvvvwaz)
 			jQuery('#jform_port').addClass('required');
 			jform_vvvvwazwai_required = false;
 		}
-
 		jQuery('#jform_path').closest('.control-group').show();
+		// add required attribute to path field
 		if (jform_vvvvwazwaj_required)
 		{
 			updateFieldRequired('path',0);
@@ -103,9 +104,9 @@ function vvvvwaz(protocol_vvvvwaz)
 			jQuery('#jform_path').addClass('required');
 			jform_vvvvwazwaj_required = false;
 		}
-
 		jQuery('.note_ssh_security').closest('.control-group').show();
 		jQuery('#jform_username').closest('.control-group').show();
+		// add required attribute to username field
 		if (jform_vvvvwazwak_required)
 		{
 			updateFieldRequired('username',0);
@@ -114,11 +115,11 @@ function vvvvwaz(protocol_vvvvwaz)
 			jQuery('#jform_username').addClass('required');
 			jform_vvvvwazwak_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_authentication').closest('.control-group').hide();
+		// remove required attribute from authentication field
 		if (!jform_vvvvwazwag_required)
 		{
 			updateFieldRequired('authentication',1);
@@ -128,6 +129,7 @@ function vvvvwaz(protocol_vvvvwaz)
 			jform_vvvvwazwag_required = true;
 		}
 		jQuery('#jform_host').closest('.control-group').hide();
+		// remove required attribute from host field
 		if (!jform_vvvvwazwah_required)
 		{
 			updateFieldRequired('host',1);
@@ -137,6 +139,7 @@ function vvvvwaz(protocol_vvvvwaz)
 			jform_vvvvwazwah_required = true;
 		}
 		jQuery('#jform_port').closest('.control-group').hide();
+		// remove required attribute from port field
 		if (!jform_vvvvwazwai_required)
 		{
 			updateFieldRequired('port',1);
@@ -146,6 +149,7 @@ function vvvvwaz(protocol_vvvvwaz)
 			jform_vvvvwazwai_required = true;
 		}
 		jQuery('#jform_path').closest('.control-group').hide();
+		// remove required attribute from path field
 		if (!jform_vvvvwazwaj_required)
 		{
 			updateFieldRequired('path',1);
@@ -156,6 +160,7 @@ function vvvvwaz(protocol_vvvvwaz)
 		}
 		jQuery('.note_ssh_security').closest('.control-group').hide();
 		jQuery('#jform_username').closest('.control-group').hide();
+		// remove required attribute from username field
 		if (!jform_vvvvwazwak_required)
 		{
 			updateFieldRequired('username',1);
@@ -199,6 +204,7 @@ function vvvvwba(protocol_vvvvwba)
 	{
 		jQuery('.note_ftp_signature').closest('.control-group').show();
 		jQuery('#jform_signature').closest('.control-group').show();
+		// add required attribute to signature field
 		if (jform_vvvvwbawal_required)
 		{
 			updateFieldRequired('signature',0);
@@ -207,12 +213,12 @@ function vvvvwba(protocol_vvvvwba)
 			jQuery('#jform_signature').addClass('required');
 			jform_vvvvwbawal_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('.note_ftp_signature').closest('.control-group').hide();
 		jQuery('#jform_signature').closest('.control-group').hide();
+		// remove required attribute from signature field
 		if (!jform_vvvvwbawal_required)
 		{
 			updateFieldRequired('signature',1);
@@ -267,6 +273,7 @@ function vvvvwbb(protocol_vvvvwbb,authentication_vvvvwbb)
 	if (protocol && authentication)
 	{
 		jQuery('#jform_password').closest('.control-group').show();
+		// add required attribute to password field
 		if (jform_vvvvwbbwam_required)
 		{
 			updateFieldRequired('password',0);
@@ -275,11 +282,11 @@ function vvvvwbb(protocol_vvvvwbb,authentication_vvvvwbb)
 			jQuery('#jform_password').addClass('required');
 			jform_vvvvwbbwam_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_password').closest('.control-group').hide();
+		// remove required attribute from password field
 		if (!jform_vvvvwbbwam_required)
 		{
 			updateFieldRequired('password',1);
@@ -345,6 +352,7 @@ function vvvvwbd(protocol_vvvvwbd,authentication_vvvvwbd)
 	if (protocol && authentication)
 	{
 		jQuery('#jform_private').closest('.control-group').show();
+		// add required attribute to private field
 		if (jform_vvvvwbdwan_required)
 		{
 			updateFieldRequired('private',0);
@@ -353,11 +361,11 @@ function vvvvwbd(protocol_vvvvwbd,authentication_vvvvwbd)
 			jQuery('#jform_private').addClass('required');
 			jform_vvvvwbdwan_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_private').closest('.control-group').hide();
+		// remove required attribute from private field
 		if (!jform_vvvvwbdwan_required)
 		{
 			updateFieldRequired('private',1);
@@ -423,6 +431,7 @@ function vvvvwbf(protocol_vvvvwbf,authentication_vvvvwbf)
 	if (protocol && authentication)
 	{
 		jQuery('#jform_private_key').closest('.control-group').show();
+		// add required attribute to private_key field
 		if (jform_vvvvwbfwao_required)
 		{
 			updateFieldRequired('private_key',0);
@@ -431,11 +440,11 @@ function vvvvwbf(protocol_vvvvwbf,authentication_vvvvwbf)
 			jQuery('#jform_private_key').addClass('required');
 			jform_vvvvwbfwao_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_private_key').closest('.control-group').hide();
+		// remove required attribute from private_key field
 		if (!jform_vvvvwbfwao_required)
 		{
 			updateFieldRequired('private_key',1);
diff --git a/admin/models/forms/site_view.js b/admin/models/forms/site_view.js
index 79bcc57b3..5e1be20e4 100644
--- a/admin/models/forms/site_view.js
+++ b/admin/models/forms/site_view.js
@@ -65,6 +65,7 @@ function vvvvvyq(add_php_view_vvvvvyq)
 	if (add_php_view_vvvvvyq == 1)
 	{
 		jQuery('#jform_php_view-lbl').closest('.control-group').show();
+		// add required attribute to php_view field
 		if (jform_vvvvvyqvyk_required)
 		{
 			updateFieldRequired('php_view',0);
@@ -73,11 +74,11 @@ function vvvvvyq(add_php_view_vvvvvyq)
 			jQuery('#jform_php_view').addClass('required');
 			jform_vvvvvyqvyk_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_view-lbl').closest('.control-group').hide();
+		// remove required attribute from php_view field
 		if (!jform_vvvvvyqvyk_required)
 		{
 			updateFieldRequired('php_view',1);
@@ -96,6 +97,7 @@ function vvvvvyr(add_php_jview_display_vvvvvyr)
 	if (add_php_jview_display_vvvvvyr == 1)
 	{
 		jQuery('#jform_php_jview_display-lbl').closest('.control-group').show();
+		// add required attribute to php_jview_display field
 		if (jform_vvvvvyrvyl_required)
 		{
 			updateFieldRequired('php_jview_display',0);
@@ -104,11 +106,11 @@ function vvvvvyr(add_php_jview_display_vvvvvyr)
 			jQuery('#jform_php_jview_display').addClass('required');
 			jform_vvvvvyrvyl_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_jview_display-lbl').closest('.control-group').hide();
+		// remove required attribute from php_jview_display field
 		if (!jform_vvvvvyrvyl_required)
 		{
 			updateFieldRequired('php_jview_display',1);
@@ -127,6 +129,7 @@ function vvvvvys(add_php_jview_vvvvvys)
 	if (add_php_jview_vvvvvys == 1)
 	{
 		jQuery('#jform_php_jview-lbl').closest('.control-group').show();
+		// add required attribute to php_jview field
 		if (jform_vvvvvysvym_required)
 		{
 			updateFieldRequired('php_jview',0);
@@ -135,11 +138,11 @@ function vvvvvys(add_php_jview_vvvvvys)
 			jQuery('#jform_php_jview').addClass('required');
 			jform_vvvvvysvym_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_jview-lbl').closest('.control-group').hide();
+		// remove required attribute from php_jview field
 		if (!jform_vvvvvysvym_required)
 		{
 			updateFieldRequired('php_jview',1);
@@ -158,6 +161,7 @@ function vvvvvyt(add_php_document_vvvvvyt)
 	if (add_php_document_vvvvvyt == 1)
 	{
 		jQuery('#jform_php_document-lbl').closest('.control-group').show();
+		// add required attribute to php_document field
 		if (jform_vvvvvytvyn_required)
 		{
 			updateFieldRequired('php_document',0);
@@ -166,11 +170,11 @@ function vvvvvyt(add_php_document_vvvvvyt)
 			jQuery('#jform_php_document').addClass('required');
 			jform_vvvvvytvyn_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_document-lbl').closest('.control-group').hide();
+		// remove required attribute from php_document field
 		if (!jform_vvvvvytvyn_required)
 		{
 			updateFieldRequired('php_document',1);
@@ -189,6 +193,7 @@ function vvvvvyu(add_css_document_vvvvvyu)
 	if (add_css_document_vvvvvyu == 1)
 	{
 		jQuery('#jform_css_document-lbl').closest('.control-group').show();
+		// add required attribute to css_document field
 		if (jform_vvvvvyuvyo_required)
 		{
 			updateFieldRequired('css_document',0);
@@ -197,11 +202,11 @@ function vvvvvyu(add_css_document_vvvvvyu)
 			jQuery('#jform_css_document').addClass('required');
 			jform_vvvvvyuvyo_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_css_document-lbl').closest('.control-group').hide();
+		// remove required attribute from css_document field
 		if (!jform_vvvvvyuvyo_required)
 		{
 			updateFieldRequired('css_document',1);
@@ -220,6 +225,7 @@ function vvvvvyv(add_javascript_file_vvvvvyv)
 	if (add_javascript_file_vvvvvyv == 1)
 	{
 		jQuery('#jform_javascript_file-lbl').closest('.control-group').show();
+		// add required attribute to javascript_file field
 		if (jform_vvvvvyvvyp_required)
 		{
 			updateFieldRequired('javascript_file',0);
@@ -228,11 +234,11 @@ function vvvvvyv(add_javascript_file_vvvvvyv)
 			jQuery('#jform_javascript_file').addClass('required');
 			jform_vvvvvyvvyp_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_javascript_file-lbl').closest('.control-group').hide();
+		// remove required attribute from javascript_file field
 		if (!jform_vvvvvyvvyp_required)
 		{
 			updateFieldRequired('javascript_file',1);
@@ -251,6 +257,7 @@ function vvvvvyw(add_js_document_vvvvvyw)
 	if (add_js_document_vvvvvyw == 1)
 	{
 		jQuery('#jform_js_document-lbl').closest('.control-group').show();
+		// add required attribute to js_document field
 		if (jform_vvvvvywvyq_required)
 		{
 			updateFieldRequired('js_document',0);
@@ -259,11 +266,11 @@ function vvvvvyw(add_js_document_vvvvvyw)
 			jQuery('#jform_js_document').addClass('required');
 			jform_vvvvvywvyq_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_js_document-lbl').closest('.control-group').hide();
+		// remove required attribute from js_document field
 		if (!jform_vvvvvywvyq_required)
 		{
 			updateFieldRequired('js_document',1);
@@ -282,6 +289,7 @@ function vvvvvyx(add_css_vvvvvyx)
 	if (add_css_vvvvvyx == 1)
 	{
 		jQuery('#jform_css-lbl').closest('.control-group').show();
+		// add required attribute to css field
 		if (jform_vvvvvyxvyr_required)
 		{
 			updateFieldRequired('css',0);
@@ -290,11 +298,11 @@ function vvvvvyx(add_css_vvvvvyx)
 			jQuery('#jform_css').addClass('required');
 			jform_vvvvvyxvyr_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_css-lbl').closest('.control-group').hide();
+		// remove required attribute from css field
 		if (!jform_vvvvvyxvyr_required)
 		{
 			updateFieldRequired('css',1);
@@ -314,6 +322,7 @@ function vvvvvyy(add_php_ajax_vvvvvyy)
 	{
 		jQuery('#jform_ajax_input-lbl').closest('.control-group').show();
 		jQuery('#jform_php_ajaxmethod-lbl').closest('.control-group').show();
+		// add required attribute to php_ajaxmethod field
 		if (jform_vvvvvyyvys_required)
 		{
 			updateFieldRequired('php_ajaxmethod',0);
@@ -322,12 +331,12 @@ function vvvvvyy(add_php_ajax_vvvvvyy)
 			jQuery('#jform_php_ajaxmethod').addClass('required');
 			jform_vvvvvyyvys_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_ajax_input-lbl').closest('.control-group').hide();
 		jQuery('#jform_php_ajaxmethod-lbl').closest('.control-group').hide();
+		// remove required attribute from php_ajaxmethod field
 		if (!jform_vvvvvyyvys_required)
 		{
 			updateFieldRequired('php_ajaxmethod',1);
@@ -347,6 +356,7 @@ function vvvvvyz(add_custom_button_vvvvvyz)
 	{
 		jQuery('#jform_custom_button-lbl').closest('.control-group').show();
 		jQuery('#jform_php_controller-lbl').closest('.control-group').show();
+		// add required attribute to php_controller field
 		if (jform_vvvvvyzvyt_required)
 		{
 			updateFieldRequired('php_controller',0);
@@ -355,8 +365,8 @@ function vvvvvyz(add_custom_button_vvvvvyz)
 			jQuery('#jform_php_controller').addClass('required');
 			jform_vvvvvyzvyt_required = false;
 		}
-
 		jQuery('#jform_php_model-lbl').closest('.control-group').show();
+		// add required attribute to php_model field
 		if (jform_vvvvvyzvyu_required)
 		{
 			updateFieldRequired('php_model',0);
@@ -365,12 +375,12 @@ function vvvvvyz(add_custom_button_vvvvvyz)
 			jQuery('#jform_php_model').addClass('required');
 			jform_vvvvvyzvyu_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_custom_button-lbl').closest('.control-group').hide();
 		jQuery('#jform_php_controller-lbl').closest('.control-group').hide();
+		// remove required attribute from php_controller field
 		if (!jform_vvvvvyzvyt_required)
 		{
 			updateFieldRequired('php_controller',1);
@@ -380,6 +390,7 @@ function vvvvvyz(add_custom_button_vvvvvyz)
 			jform_vvvvvyzvyt_required = true;
 		}
 		jQuery('#jform_php_model-lbl').closest('.control-group').hide();
+		// remove required attribute from php_model field
 		if (!jform_vvvvvyzvyu_required)
 		{
 			updateFieldRequired('php_model',1);
diff --git a/admin/models/forms/template.js b/admin/models/forms/template.js
index e008d32b4..f37cc830d 100644
--- a/admin/models/forms/template.js
+++ b/admin/models/forms/template.js
@@ -25,6 +25,7 @@ function vvvvvzb(add_php_view_vvvvvzb)
 	if (add_php_view_vvvvvzb == 1)
 	{
 		jQuery('#jform_php_view-lbl').closest('.control-group').show();
+		// add required attribute to php_view field
 		if (jform_vvvvvzbvyv_required)
 		{
 			updateFieldRequired('php_view',0);
@@ -33,11 +34,11 @@ function vvvvvzb(add_php_view_vvvvvzb)
 			jQuery('#jform_php_view').addClass('required');
 			jform_vvvvvzbvyv_required = false;
 		}
-
 	}
 	else
 	{
 		jQuery('#jform_php_view-lbl').closest('.control-group').hide();
+		// remove required attribute from php_view field
 		if (!jform_vvvvvzbvyv_required)
 		{
 			updateFieldRequired('php_view',1);
diff --git a/componentbuilder.xml b/componentbuilder.xml
index 67bc17ee3..0e9688fe8 100644
--- a/componentbuilder.xml
+++ b/componentbuilder.xml
@@ -1,7 +1,7 @@
 
 
 	COM_COMPONENTBUILDER
-	8th September, 2018
+	10th September, 2018
 	Llewellyn van der Merwe
 	llewellyn@joomlacomponentbuilder.com
 	http://www.joomlacomponentbuilder.com