Fixed issue that caused duplicate company creation, also made email field in company profile a required field. All other changes are only random variable name and date changes (due to automation)
This commit is contained in:
parent
68c2c767d0
commit
b659da2beb
@ -26,7 +26,7 @@ max_input_vars = 5000
|
||||
+ *Version*: 3.3.6
|
||||
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
|
||||
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
+ *Line count*: **83710**
|
||||
+ *Line count*: **83729**
|
||||
+ *File count*: **552**
|
||||
+ *Folder count*: **101**
|
||||
|
||||
|
@ -331,9 +331,13 @@ class CostbenefitprojectionControllerCompany extends JControllerForm
|
||||
{
|
||||
if ($validData['id'] >= 0)
|
||||
{
|
||||
// get user object
|
||||
$user = JFactory::getUser();
|
||||
// if id is 0 get id
|
||||
if (0 >= (int) $validData['id'])
|
||||
{
|
||||
// Get the created by id
|
||||
$created_by = (isset($validData['created_by']) && $validData['created_by'] > 0) ? $validData['created_by'] : $user->id;
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
// Create a new query object.
|
||||
@ -345,8 +349,11 @@ class CostbenefitprojectionControllerCompany extends JControllerForm
|
||||
$query->where($db->quoteName('email') . ' = '. $db->quote($validData['email']));
|
||||
$query->where($db->quoteName('country') . ' = '. (int) $validData['country']);
|
||||
$query->where($db->quoteName('service_provider') . ' = '. (int) $validData['service_provider']);
|
||||
$query->where($db->quoteName('created_by') . ' = '. (int) $validData['created_by']);
|
||||
$query->where($db->quoteName('created') . ' = '. $db->quote($validData['created']));
|
||||
$query->where($db->quoteName('created_by') . ' = '. (int) $created_by);
|
||||
if (isset($validData['created']))
|
||||
{
|
||||
$query->where($db->quoteName('created') . ' = '. $db->quote($validData['created']));
|
||||
}
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
@ -361,8 +368,6 @@ class CostbenefitprojectionControllerCompany extends JControllerForm
|
||||
// user setup if not set
|
||||
if (0 >= (int) $validData['user'] && (int) $validData['id'] > 0)
|
||||
{
|
||||
// get user object
|
||||
$user = JFactory::getUser();
|
||||
$userIs = CostbenefitprojectionHelper::userIs($user->id);
|
||||
if (1 == $userIs)
|
||||
{
|
||||
|
@ -324,9 +324,13 @@ class CostbenefitprojectionControllerService_provider extends JControllerForm
|
||||
{
|
||||
if ($validData['id'] >= 0)
|
||||
{
|
||||
// get user object
|
||||
$user = JFactory::getUser();
|
||||
// if id is 0 get id
|
||||
if (0 >= (int) $validData['id'])
|
||||
{
|
||||
// Get the created by id
|
||||
$created_by = (isset($validData['created_by']) && $validData['created_by'] > 0) ? $validData['created_by'] : $user->id;
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
// Create a new query object.
|
||||
@ -334,9 +338,14 @@ class CostbenefitprojectionControllerService_provider extends JControllerForm
|
||||
// Select id of this service_provider
|
||||
$query->select($db->quoteName(array('id')));
|
||||
$query->from($db->quoteName('#__costbenefitprojection_service_provider'));
|
||||
$query->where($db->quoteName('publicemail') . ' = '. $db->quote($validData['publicemail']));
|
||||
$query->where($db->quoteName('publicname') . ' = '. $db->quote($validData['publicname']));
|
||||
$query->where($db->quoteName('country') . ' = '. (int) $validData['country']);
|
||||
$query->where($db->quoteName('created_by') . ' = '. (int) $validData['created_by']);
|
||||
$query->where($db->quoteName('created') . ' = '. $db->quote($validData['created']));
|
||||
$query->where($db->quoteName('created_by') . ' = '. (int) $created_by);
|
||||
if (isset($validData['created']))
|
||||
{
|
||||
$query->where($db->quoteName('created') . ' = '. $db->quote($validData['created']));
|
||||
}
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
|
@ -22,7 +22,7 @@
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// set the defaults
|
||||
$items = $displayData->oabinterventions;
|
||||
$items = $displayData->uhjinterventions;
|
||||
$user = JFactory::getUser();
|
||||
$id = $displayData->item->id;
|
||||
$edit = "index.php?option=com_costbenefitprojection&view=interventions&task=intervention.edit";
|
||||
|
@ -22,7 +22,7 @@
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// set the defaults
|
||||
$items = $displayData->tmyscaling_factors;
|
||||
$items = $displayData->uzwscaling_factors;
|
||||
$user = JFactory::getUser();
|
||||
$id = $displayData->item->id;
|
||||
$edit = "index.php?option=com_costbenefitprojection&view=scaling_factors&task=scaling_factor.edit";
|
||||
|
@ -22,7 +22,7 @@
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// set the defaults
|
||||
$items = $displayData->vmqcompanies;
|
||||
$items = $displayData->wbzcompanies;
|
||||
$user = JFactory::getUser();
|
||||
$id = $displayData->item->id;
|
||||
$edit = "index.php?option=com_costbenefitprojection&view=companies&task=company.edit";
|
||||
|
@ -22,7 +22,7 @@
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// set the defaults
|
||||
$items = $displayData->jirinterventions;
|
||||
$items = $displayData->fwdinterventions;
|
||||
$user = JFactory::getUser();
|
||||
$id = $displayData->item->id;
|
||||
$edit = "index.php?option=com_costbenefitprojection&view=interventions&task=intervention.edit";
|
||||
|
@ -22,7 +22,7 @@
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// set the defaults
|
||||
$items = $displayData->oehservice_providers;
|
||||
$items = $displayData->mvlservice_providers;
|
||||
$user = JFactory::getUser();
|
||||
$id = $displayData->item->id;
|
||||
$edit = "index.php?option=com_costbenefitprojection&view=service_providers&task=service_provider.edit";
|
||||
|
@ -22,7 +22,7 @@
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// set the defaults
|
||||
$items = $displayData->dpvcompanies;
|
||||
$items = $displayData->vnfcompanies;
|
||||
$user = JFactory::getUser();
|
||||
$id = $displayData->item->id;
|
||||
$edit = "index.php?option=com_costbenefitprojection&view=companies&task=company.edit";
|
||||
|
@ -154,8 +154,8 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
|
||||
$item->tags->getTagIds($item->id, 'com_costbenefitprojection.company');
|
||||
}
|
||||
}
|
||||
$this->companyuvgj = $item->id;
|
||||
$this->companygdxw = $item->id;
|
||||
$this->companyaioc = $item->id;
|
||||
$this->companydlkv = $item->id;
|
||||
|
||||
return $item;
|
||||
}
|
||||
@ -165,7 +165,7 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
public function getTmyscaling_factors()
|
||||
public function getUzwscaling_factors()
|
||||
{
|
||||
// Get the user object.
|
||||
$user = JFactory::getUser();
|
||||
@ -204,15 +204,15 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
|
||||
$query->select($db->quoteName('h.name','company_name'));
|
||||
$query->join('LEFT', $db->quoteName('#__costbenefitprojection_company', 'h') . ' ON (' . $db->quoteName('a.company') . ' = ' . $db->quoteName('h.id') . ')');
|
||||
|
||||
// Filter by companyuvgj global.
|
||||
$companyuvgj = $this->companyuvgj;
|
||||
if (is_numeric($companyuvgj ))
|
||||
// Filter by companyaioc global.
|
||||
$companyaioc = $this->companyaioc;
|
||||
if (is_numeric($companyaioc ))
|
||||
{
|
||||
$query->where('a.company = ' . (int) $companyuvgj );
|
||||
$query->where('a.company = ' . (int) $companyaioc );
|
||||
}
|
||||
elseif (is_string($companyuvgj))
|
||||
elseif (is_string($companyaioc))
|
||||
{
|
||||
$query->where('a.company = ' . $db->quote($companyuvgj));
|
||||
$query->where('a.company = ' . $db->quote($companyaioc));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -255,7 +255,7 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
public function getOabinterventions()
|
||||
public function getUhjinterventions()
|
||||
{
|
||||
// Get the user object.
|
||||
$user = JFactory::getUser();
|
||||
@ -290,15 +290,15 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
|
||||
$query->select($db->quoteName('g.name','company_name'));
|
||||
$query->join('LEFT', $db->quoteName('#__costbenefitprojection_company', 'g') . ' ON (' . $db->quoteName('a.company') . ' = ' . $db->quoteName('g.id') . ')');
|
||||
|
||||
// Filter by companygdxw global.
|
||||
$companygdxw = $this->companygdxw;
|
||||
if (is_numeric($companygdxw ))
|
||||
// Filter by companydlkv global.
|
||||
$companydlkv = $this->companydlkv;
|
||||
if (is_numeric($companydlkv ))
|
||||
{
|
||||
$query->where('a.company = ' . (int) $companygdxw );
|
||||
$query->where('a.company = ' . (int) $companydlkv );
|
||||
}
|
||||
elseif (is_string($companygdxw))
|
||||
elseif (is_string($companydlkv))
|
||||
{
|
||||
$query->where('a.company = ' . $db->quote($companygdxw));
|
||||
$query->where('a.company = ' . $db->quote($companydlkv));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -351,7 +351,7 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
// convert type
|
||||
$item->type = $this->selectionTranslationOabinterventions($item->type, 'type');
|
||||
$item->type = $this->selectionTranslationUhjinterventions($item->type, 'type');
|
||||
}
|
||||
}
|
||||
|
||||
@ -365,7 +365,7 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
|
||||
*
|
||||
* @return translatable string
|
||||
*/
|
||||
public function selectionTranslationOabinterventions($value,$name)
|
||||
public function selectionTranslationUhjinterventions($value,$name)
|
||||
{
|
||||
// Array of type language strings
|
||||
if ($name == 'type')
|
||||
|
@ -101,9 +101,9 @@ class CostbenefitprojectionModelCountry extends JModelAdmin
|
||||
$item->tags->getTagIds($item->id, 'com_costbenefitprojection.country');
|
||||
}
|
||||
}
|
||||
$this->countrylzhm = $item->id;
|
||||
$this->countrypxhh = $item->id;
|
||||
$this->countrygisc = $item->id;
|
||||
$this->countryruzk = $item->id;
|
||||
$this->countrylhbb = $item->id;
|
||||
$this->countryafhb = $item->id;
|
||||
|
||||
return $item;
|
||||
}
|
||||
@ -113,7 +113,7 @@ class CostbenefitprojectionModelCountry extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
public function getJirinterventions()
|
||||
public function getFwdinterventions()
|
||||
{
|
||||
// Get the user object.
|
||||
$user = JFactory::getUser();
|
||||
@ -148,15 +148,15 @@ class CostbenefitprojectionModelCountry extends JModelAdmin
|
||||
$query->select($db->quoteName('g.name','company_name'));
|
||||
$query->join('LEFT', $db->quoteName('#__costbenefitprojection_company', 'g') . ' ON (' . $db->quoteName('a.company') . ' = ' . $db->quoteName('g.id') . ')');
|
||||
|
||||
// Filter by countrylzhm global.
|
||||
$countrylzhm = $this->countrylzhm;
|
||||
if (is_numeric($countrylzhm ))
|
||||
// Filter by countryruzk global.
|
||||
$countryruzk = $this->countryruzk;
|
||||
if (is_numeric($countryruzk ))
|
||||
{
|
||||
$query->where('a.country = ' . (int) $countrylzhm );
|
||||
$query->where('a.country = ' . (int) $countryruzk );
|
||||
}
|
||||
elseif (is_string($countrylzhm))
|
||||
elseif (is_string($countryruzk))
|
||||
{
|
||||
$query->where('a.country = ' . $db->quote($countrylzhm));
|
||||
$query->where('a.country = ' . $db->quote($countryruzk));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -209,7 +209,7 @@ class CostbenefitprojectionModelCountry extends JModelAdmin
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
// convert type
|
||||
$item->type = $this->selectionTranslationJirinterventions($item->type, 'type');
|
||||
$item->type = $this->selectionTranslationFwdinterventions($item->type, 'type');
|
||||
}
|
||||
}
|
||||
|
||||
@ -223,7 +223,7 @@ class CostbenefitprojectionModelCountry extends JModelAdmin
|
||||
*
|
||||
* @return translatable string
|
||||
*/
|
||||
public function selectionTranslationJirinterventions($value,$name)
|
||||
public function selectionTranslationFwdinterventions($value,$name)
|
||||
{
|
||||
// Array of type language strings
|
||||
if ($name == 'type')
|
||||
@ -246,7 +246,7 @@ class CostbenefitprojectionModelCountry extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
public function getOehservice_providers()
|
||||
public function getMvlservice_providers()
|
||||
{
|
||||
// Get the user object.
|
||||
$user = JFactory::getUser();
|
||||
@ -285,15 +285,15 @@ class CostbenefitprojectionModelCountry extends JModelAdmin
|
||||
$query->select($db->quoteName('h.name','country_name'));
|
||||
$query->join('LEFT', $db->quoteName('#__costbenefitprojection_country', 'h') . ' ON (' . $db->quoteName('a.country') . ' = ' . $db->quoteName('h.id') . ')');
|
||||
|
||||
// Filter by countrypxhh global.
|
||||
$countrypxhh = $this->countrypxhh;
|
||||
if (is_numeric($countrypxhh ))
|
||||
// Filter by countrylhbb global.
|
||||
$countrylhbb = $this->countrylhbb;
|
||||
if (is_numeric($countrylhbb ))
|
||||
{
|
||||
$query->where('a.country = ' . (int) $countrypxhh );
|
||||
$query->where('a.country = ' . (int) $countrylhbb );
|
||||
}
|
||||
elseif (is_string($countrypxhh))
|
||||
elseif (is_string($countrylhbb))
|
||||
{
|
||||
$query->where('a.country = ' . $db->quote($countrypxhh));
|
||||
$query->where('a.country = ' . $db->quote($countrylhbb));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -336,7 +336,7 @@ class CostbenefitprojectionModelCountry extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
public function getVmqcompanies()
|
||||
public function getWbzcompanies()
|
||||
{
|
||||
// Get the user object.
|
||||
$user = JFactory::getUser();
|
||||
@ -379,15 +379,15 @@ class CostbenefitprojectionModelCountry extends JModelAdmin
|
||||
$query->select($db->quoteName('i.user','service_provider_user'));
|
||||
$query->join('LEFT', $db->quoteName('#__costbenefitprojection_service_provider', 'i') . ' ON (' . $db->quoteName('a.service_provider') . ' = ' . $db->quoteName('i.id') . ')');
|
||||
|
||||
// Filter by countrygisc global.
|
||||
$countrygisc = $this->countrygisc;
|
||||
if (is_numeric($countrygisc ))
|
||||
// Filter by countryafhb global.
|
||||
$countryafhb = $this->countryafhb;
|
||||
if (is_numeric($countryafhb ))
|
||||
{
|
||||
$query->where('a.country = ' . (int) $countrygisc );
|
||||
$query->where('a.country = ' . (int) $countryafhb );
|
||||
}
|
||||
elseif (is_string($countrygisc))
|
||||
elseif (is_string($countryafhb))
|
||||
{
|
||||
$query->where('a.country = ' . $db->quote($countrygisc));
|
||||
$query->where('a.country = ' . $db->quote($countryafhb));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -442,9 +442,9 @@ class CostbenefitprojectionModelCountry extends JModelAdmin
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
// convert department
|
||||
$item->department = $this->selectionTranslationVmqcompanies($item->department, 'department');
|
||||
$item->department = $this->selectionTranslationWbzcompanies($item->department, 'department');
|
||||
// convert per
|
||||
$item->per = $this->selectionTranslationVmqcompanies($item->per, 'per');
|
||||
$item->per = $this->selectionTranslationWbzcompanies($item->per, 'per');
|
||||
}
|
||||
}
|
||||
|
||||
@ -458,7 +458,7 @@ class CostbenefitprojectionModelCountry extends JModelAdmin
|
||||
*
|
||||
* @return translatable string
|
||||
*/
|
||||
public function selectionTranslationVmqcompanies($value,$name)
|
||||
public function selectionTranslationWbzcompanies($value,$name)
|
||||
{
|
||||
// Array of department language strings
|
||||
if ($name == 'department')
|
||||
|
@ -17,178 +17,178 @@
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// Some Global Values
|
||||
jform_GbcdqOGthK_required = false;
|
||||
jform_GbcdqOGhqS_required = false;
|
||||
jform_GbcdqOGhtp_required = false;
|
||||
jform_GbcdqOGBWR_required = false;
|
||||
jform_GbcdqOGLKL_required = false;
|
||||
jform_GbcdqOGUuq_required = false;
|
||||
jform_GbcdqOGhSY_required = false;
|
||||
jform_ChlKFlMfAG_required = false;
|
||||
jform_ChlKFlMtIW_required = false;
|
||||
jform_ChlKFlMEJX_required = false;
|
||||
jform_ChlKFlMkrk_required = false;
|
||||
jform_ChlKFlMQLg_required = false;
|
||||
jform_ChlKFlMMxt_required = false;
|
||||
jform_ChlKFlMKtb_required = false;
|
||||
|
||||
// Initial Script
|
||||
jQuery(document).ready(function()
|
||||
{
|
||||
var department_GbcdqOG = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
GbcdqOG(department_GbcdqOG);
|
||||
var department_ChlKFlM = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
ChlKFlM(department_ChlKFlM);
|
||||
|
||||
var department_kIvNEDP = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
kIvNEDP(department_kIvNEDP);
|
||||
var department_HwdjLtQ = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
HwdjLtQ(department_HwdjLtQ);
|
||||
});
|
||||
|
||||
// the GbcdqOG function
|
||||
function GbcdqOG(department_GbcdqOG)
|
||||
// the ChlKFlM function
|
||||
function ChlKFlM(department_ChlKFlM)
|
||||
{
|
||||
// set the function logic
|
||||
if (department_GbcdqOG == 2)
|
||||
if (department_ChlKFlM == 2)
|
||||
{
|
||||
jQuery('#jform_causesrisks').closest('.control-group').show();
|
||||
if (jform_GbcdqOGthK_required)
|
||||
if (jform_ChlKFlMfAG_required)
|
||||
{
|
||||
updateFieldRequired('causesrisks',0);
|
||||
jQuery('#jform_causesrisks').prop('required','required');
|
||||
jQuery('#jform_causesrisks').attr('aria-required',true);
|
||||
jQuery('#jform_causesrisks').addClass('required');
|
||||
jform_GbcdqOGthK_required = false;
|
||||
jform_ChlKFlMfAG_required = false;
|
||||
}
|
||||
|
||||
jQuery('#jform_percentfemale').closest('.control-group').show();
|
||||
jQuery('#jform_percentmale').closest('.control-group').show();
|
||||
jQuery('#jform_productivity_losses').closest('.control-group').show();
|
||||
if (jform_GbcdqOGhqS_required)
|
||||
if (jform_ChlKFlMtIW_required)
|
||||
{
|
||||
updateFieldRequired('productivity_losses',0);
|
||||
jQuery('#jform_productivity_losses').prop('required','required');
|
||||
jQuery('#jform_productivity_losses').attr('aria-required',true);
|
||||
jQuery('#jform_productivity_losses').addClass('required');
|
||||
jform_GbcdqOGhqS_required = false;
|
||||
jform_ChlKFlMtIW_required = false;
|
||||
}
|
||||
|
||||
jQuery('#jform_medical_turnovers_females').closest('.control-group').show();
|
||||
if (jform_GbcdqOGhtp_required)
|
||||
if (jform_ChlKFlMEJX_required)
|
||||
{
|
||||
updateFieldRequired('medical_turnovers_females',0);
|
||||
jQuery('#jform_medical_turnovers_females').prop('required','required');
|
||||
jQuery('#jform_medical_turnovers_females').attr('aria-required',true);
|
||||
jQuery('#jform_medical_turnovers_females').addClass('required');
|
||||
jform_GbcdqOGhtp_required = false;
|
||||
jform_ChlKFlMEJX_required = false;
|
||||
}
|
||||
|
||||
jQuery('#jform_medical_turnovers_males').closest('.control-group').show();
|
||||
if (jform_GbcdqOGBWR_required)
|
||||
if (jform_ChlKFlMkrk_required)
|
||||
{
|
||||
updateFieldRequired('medical_turnovers_males',0);
|
||||
jQuery('#jform_medical_turnovers_males').prop('required','required');
|
||||
jQuery('#jform_medical_turnovers_males').attr('aria-required',true);
|
||||
jQuery('#jform_medical_turnovers_males').addClass('required');
|
||||
jform_GbcdqOGBWR_required = false;
|
||||
jform_ChlKFlMkrk_required = false;
|
||||
}
|
||||
|
||||
jQuery('#jform_sick_leave_females').closest('.control-group').show();
|
||||
if (jform_GbcdqOGLKL_required)
|
||||
if (jform_ChlKFlMQLg_required)
|
||||
{
|
||||
updateFieldRequired('sick_leave_females',0);
|
||||
jQuery('#jform_sick_leave_females').prop('required','required');
|
||||
jQuery('#jform_sick_leave_females').attr('aria-required',true);
|
||||
jQuery('#jform_sick_leave_females').addClass('required');
|
||||
jform_GbcdqOGLKL_required = false;
|
||||
jform_ChlKFlMQLg_required = false;
|
||||
}
|
||||
|
||||
jQuery('#jform_sick_leave_males').closest('.control-group').show();
|
||||
if (jform_GbcdqOGUuq_required)
|
||||
if (jform_ChlKFlMMxt_required)
|
||||
{
|
||||
updateFieldRequired('sick_leave_males',0);
|
||||
jQuery('#jform_sick_leave_males').prop('required','required');
|
||||
jQuery('#jform_sick_leave_males').attr('aria-required',true);
|
||||
jQuery('#jform_sick_leave_males').addClass('required');
|
||||
jform_GbcdqOGUuq_required = false;
|
||||
jform_ChlKFlMMxt_required = false;
|
||||
}
|
||||
|
||||
jQuery('#jform_total_healthcare').closest('.control-group').show();
|
||||
if (jform_GbcdqOGhSY_required)
|
||||
if (jform_ChlKFlMKtb_required)
|
||||
{
|
||||
updateFieldRequired('total_healthcare',0);
|
||||
jQuery('#jform_total_healthcare').prop('required','required');
|
||||
jQuery('#jform_total_healthcare').attr('aria-required',true);
|
||||
jQuery('#jform_total_healthcare').addClass('required');
|
||||
jform_GbcdqOGhSY_required = false;
|
||||
jform_ChlKFlMKtb_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_causesrisks').closest('.control-group').hide();
|
||||
if (!jform_GbcdqOGthK_required)
|
||||
if (!jform_ChlKFlMfAG_required)
|
||||
{
|
||||
updateFieldRequired('causesrisks',1);
|
||||
jQuery('#jform_causesrisks').removeAttr('required');
|
||||
jQuery('#jform_causesrisks').removeAttr('aria-required');
|
||||
jQuery('#jform_causesrisks').removeClass('required');
|
||||
jform_GbcdqOGthK_required = true;
|
||||
jform_ChlKFlMfAG_required = true;
|
||||
}
|
||||
jQuery('#jform_percentfemale').closest('.control-group').hide();
|
||||
jQuery('#jform_percentmale').closest('.control-group').hide();
|
||||
jQuery('#jform_productivity_losses').closest('.control-group').hide();
|
||||
if (!jform_GbcdqOGhqS_required)
|
||||
if (!jform_ChlKFlMtIW_required)
|
||||
{
|
||||
updateFieldRequired('productivity_losses',1);
|
||||
jQuery('#jform_productivity_losses').removeAttr('required');
|
||||
jQuery('#jform_productivity_losses').removeAttr('aria-required');
|
||||
jQuery('#jform_productivity_losses').removeClass('required');
|
||||
jform_GbcdqOGhqS_required = true;
|
||||
jform_ChlKFlMtIW_required = true;
|
||||
}
|
||||
jQuery('#jform_medical_turnovers_females').closest('.control-group').hide();
|
||||
if (!jform_GbcdqOGhtp_required)
|
||||
if (!jform_ChlKFlMEJX_required)
|
||||
{
|
||||
updateFieldRequired('medical_turnovers_females',1);
|
||||
jQuery('#jform_medical_turnovers_females').removeAttr('required');
|
||||
jQuery('#jform_medical_turnovers_females').removeAttr('aria-required');
|
||||
jQuery('#jform_medical_turnovers_females').removeClass('required');
|
||||
jform_GbcdqOGhtp_required = true;
|
||||
jform_ChlKFlMEJX_required = true;
|
||||
}
|
||||
jQuery('#jform_medical_turnovers_males').closest('.control-group').hide();
|
||||
if (!jform_GbcdqOGBWR_required)
|
||||
if (!jform_ChlKFlMkrk_required)
|
||||
{
|
||||
updateFieldRequired('medical_turnovers_males',1);
|
||||
jQuery('#jform_medical_turnovers_males').removeAttr('required');
|
||||
jQuery('#jform_medical_turnovers_males').removeAttr('aria-required');
|
||||
jQuery('#jform_medical_turnovers_males').removeClass('required');
|
||||
jform_GbcdqOGBWR_required = true;
|
||||
jform_ChlKFlMkrk_required = true;
|
||||
}
|
||||
jQuery('#jform_sick_leave_females').closest('.control-group').hide();
|
||||
if (!jform_GbcdqOGLKL_required)
|
||||
if (!jform_ChlKFlMQLg_required)
|
||||
{
|
||||
updateFieldRequired('sick_leave_females',1);
|
||||
jQuery('#jform_sick_leave_females').removeAttr('required');
|
||||
jQuery('#jform_sick_leave_females').removeAttr('aria-required');
|
||||
jQuery('#jform_sick_leave_females').removeClass('required');
|
||||
jform_GbcdqOGLKL_required = true;
|
||||
jform_ChlKFlMQLg_required = true;
|
||||
}
|
||||
jQuery('#jform_sick_leave_males').closest('.control-group').hide();
|
||||
if (!jform_GbcdqOGUuq_required)
|
||||
if (!jform_ChlKFlMMxt_required)
|
||||
{
|
||||
updateFieldRequired('sick_leave_males',1);
|
||||
jQuery('#jform_sick_leave_males').removeAttr('required');
|
||||
jQuery('#jform_sick_leave_males').removeAttr('aria-required');
|
||||
jQuery('#jform_sick_leave_males').removeClass('required');
|
||||
jform_GbcdqOGUuq_required = true;
|
||||
jform_ChlKFlMMxt_required = true;
|
||||
}
|
||||
jQuery('#jform_total_healthcare').closest('.control-group').hide();
|
||||
if (!jform_GbcdqOGhSY_required)
|
||||
if (!jform_ChlKFlMKtb_required)
|
||||
{
|
||||
updateFieldRequired('total_healthcare',1);
|
||||
jQuery('#jform_total_healthcare').removeAttr('required');
|
||||
jQuery('#jform_total_healthcare').removeAttr('aria-required');
|
||||
jQuery('#jform_total_healthcare').removeClass('required');
|
||||
jform_GbcdqOGhSY_required = true;
|
||||
jform_ChlKFlMKtb_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the kIvNEDP function
|
||||
function kIvNEDP(department_kIvNEDP)
|
||||
// the HwdjLtQ function
|
||||
function HwdjLtQ(department_HwdjLtQ)
|
||||
{
|
||||
// set the function logic
|
||||
if (department_kIvNEDP == 1)
|
||||
if (department_HwdjLtQ == 1)
|
||||
{
|
||||
jQuery('.age_groups_note').closest('.control-group').show();
|
||||
jQuery('.cause_risk_selection_note').closest('.control-group').show();
|
||||
|
@ -17,38 +17,38 @@
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// Some Global Values
|
||||
jform_nwQaKJScpA_required = false;
|
||||
jform_rViFrVkZqx_required = false;
|
||||
jform_BUFBIxSSWh_required = false;
|
||||
jform_bgwRgitajP_required = false;
|
||||
jform_XBcfcHoKCW_required = false;
|
||||
jform_TVCOcIzKNT_required = false;
|
||||
jform_jpykTVkQjz_required = false;
|
||||
jform_eibemeGwQn_required = false;
|
||||
|
||||
// Initial Script
|
||||
jQuery(document).ready(function()
|
||||
{
|
||||
var location_BphvImg = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
BphvImg(location_BphvImg);
|
||||
var location_MbvtJEY = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
MbvtJEY(location_MbvtJEY);
|
||||
|
||||
var location_JMkoFuj = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
JMkoFuj(location_JMkoFuj);
|
||||
var location_FqaWrpo = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
FqaWrpo(location_FqaWrpo);
|
||||
|
||||
var type_nwQaKJS = jQuery("#jform_type").val();
|
||||
nwQaKJS(type_nwQaKJS);
|
||||
var type_XBcfcHo = jQuery("#jform_type").val();
|
||||
XBcfcHo(type_XBcfcHo);
|
||||
|
||||
var type_rViFrVk = jQuery("#jform_type").val();
|
||||
rViFrVk(type_rViFrVk);
|
||||
var type_TVCOcIz = jQuery("#jform_type").val();
|
||||
TVCOcIz(type_TVCOcIz);
|
||||
|
||||
var type_BUFBIxS = jQuery("#jform_type").val();
|
||||
BUFBIxS(type_BUFBIxS);
|
||||
var type_jpykTVk = jQuery("#jform_type").val();
|
||||
jpykTVk(type_jpykTVk);
|
||||
|
||||
var target_bgwRgit = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
bgwRgit(target_bgwRgit);
|
||||
var target_eibemeG = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
eibemeG(target_eibemeG);
|
||||
});
|
||||
|
||||
// the BphvImg function
|
||||
function BphvImg(location_BphvImg)
|
||||
// the MbvtJEY function
|
||||
function MbvtJEY(location_MbvtJEY)
|
||||
{
|
||||
// set the function logic
|
||||
if (location_BphvImg == 1)
|
||||
if (location_MbvtJEY == 1)
|
||||
{
|
||||
jQuery('#jform_admin_view').closest('.control-group').show();
|
||||
}
|
||||
@ -58,11 +58,11 @@ function BphvImg(location_BphvImg)
|
||||
}
|
||||
}
|
||||
|
||||
// the JMkoFuj function
|
||||
function JMkoFuj(location_JMkoFuj)
|
||||
// the FqaWrpo function
|
||||
function FqaWrpo(location_FqaWrpo)
|
||||
{
|
||||
// set the function logic
|
||||
if (location_JMkoFuj == 2)
|
||||
if (location_FqaWrpo == 2)
|
||||
{
|
||||
jQuery('#jform_site_view').closest('.control-group').show();
|
||||
}
|
||||
@ -72,198 +72,198 @@ function JMkoFuj(location_JMkoFuj)
|
||||
}
|
||||
}
|
||||
|
||||
// the nwQaKJS function
|
||||
function nwQaKJS(type_nwQaKJS)
|
||||
// the XBcfcHo function
|
||||
function XBcfcHo(type_XBcfcHo)
|
||||
{
|
||||
if (isSet(type_nwQaKJS) && type_nwQaKJS.constructor !== Array)
|
||||
if (isSet(type_XBcfcHo) && type_XBcfcHo.constructor !== Array)
|
||||
{
|
||||
var temp_nwQaKJS = type_nwQaKJS;
|
||||
var type_nwQaKJS = [];
|
||||
type_nwQaKJS.push(temp_nwQaKJS);
|
||||
var temp_XBcfcHo = type_XBcfcHo;
|
||||
var type_XBcfcHo = [];
|
||||
type_XBcfcHo.push(temp_XBcfcHo);
|
||||
}
|
||||
else if (!isSet(type_nwQaKJS))
|
||||
else if (!isSet(type_XBcfcHo))
|
||||
{
|
||||
var type_nwQaKJS = [];
|
||||
var type_XBcfcHo = [];
|
||||
}
|
||||
var type = type_nwQaKJS.some(type_nwQaKJS_SomeFunc);
|
||||
var type = type_XBcfcHo.some(type_XBcfcHo_SomeFunc);
|
||||
|
||||
|
||||
// set this function logic
|
||||
if (type)
|
||||
{
|
||||
jQuery('#jform_url').closest('.control-group').show();
|
||||
if (jform_nwQaKJScpA_required)
|
||||
if (jform_XBcfcHoKCW_required)
|
||||
{
|
||||
updateFieldRequired('url',0);
|
||||
jQuery('#jform_url').prop('required','required');
|
||||
jQuery('#jform_url').attr('aria-required',true);
|
||||
jQuery('#jform_url').addClass('required');
|
||||
jform_nwQaKJScpA_required = false;
|
||||
jform_XBcfcHoKCW_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_url').closest('.control-group').hide();
|
||||
if (!jform_nwQaKJScpA_required)
|
||||
if (!jform_XBcfcHoKCW_required)
|
||||
{
|
||||
updateFieldRequired('url',1);
|
||||
jQuery('#jform_url').removeAttr('required');
|
||||
jQuery('#jform_url').removeAttr('aria-required');
|
||||
jQuery('#jform_url').removeClass('required');
|
||||
jform_nwQaKJScpA_required = true;
|
||||
jform_XBcfcHoKCW_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the nwQaKJS Some function
|
||||
function type_nwQaKJS_SomeFunc(type_nwQaKJS)
|
||||
// the XBcfcHo Some function
|
||||
function type_XBcfcHo_SomeFunc(type_XBcfcHo)
|
||||
{
|
||||
// set the function logic
|
||||
if (type_nwQaKJS == 3)
|
||||
if (type_XBcfcHo == 3)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// the rViFrVk function
|
||||
function rViFrVk(type_rViFrVk)
|
||||
// the TVCOcIz function
|
||||
function TVCOcIz(type_TVCOcIz)
|
||||
{
|
||||
if (isSet(type_rViFrVk) && type_rViFrVk.constructor !== Array)
|
||||
if (isSet(type_TVCOcIz) && type_TVCOcIz.constructor !== Array)
|
||||
{
|
||||
var temp_rViFrVk = type_rViFrVk;
|
||||
var type_rViFrVk = [];
|
||||
type_rViFrVk.push(temp_rViFrVk);
|
||||
var temp_TVCOcIz = type_TVCOcIz;
|
||||
var type_TVCOcIz = [];
|
||||
type_TVCOcIz.push(temp_TVCOcIz);
|
||||
}
|
||||
else if (!isSet(type_rViFrVk))
|
||||
else if (!isSet(type_TVCOcIz))
|
||||
{
|
||||
var type_rViFrVk = [];
|
||||
var type_TVCOcIz = [];
|
||||
}
|
||||
var type = type_rViFrVk.some(type_rViFrVk_SomeFunc);
|
||||
var type = type_TVCOcIz.some(type_TVCOcIz_SomeFunc);
|
||||
|
||||
|
||||
// set this function logic
|
||||
if (type)
|
||||
{
|
||||
jQuery('#jform_article').closest('.control-group').show();
|
||||
if (jform_rViFrVkZqx_required)
|
||||
if (jform_TVCOcIzKNT_required)
|
||||
{
|
||||
updateFieldRequired('article',0);
|
||||
jQuery('#jform_article').prop('required','required');
|
||||
jQuery('#jform_article').attr('aria-required',true);
|
||||
jQuery('#jform_article').addClass('required');
|
||||
jform_rViFrVkZqx_required = false;
|
||||
jform_TVCOcIzKNT_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_article').closest('.control-group').hide();
|
||||
if (!jform_rViFrVkZqx_required)
|
||||
if (!jform_TVCOcIzKNT_required)
|
||||
{
|
||||
updateFieldRequired('article',1);
|
||||
jQuery('#jform_article').removeAttr('required');
|
||||
jQuery('#jform_article').removeAttr('aria-required');
|
||||
jQuery('#jform_article').removeClass('required');
|
||||
jform_rViFrVkZqx_required = true;
|
||||
jform_TVCOcIzKNT_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the rViFrVk Some function
|
||||
function type_rViFrVk_SomeFunc(type_rViFrVk)
|
||||
// the TVCOcIz Some function
|
||||
function type_TVCOcIz_SomeFunc(type_TVCOcIz)
|
||||
{
|
||||
// set the function logic
|
||||
if (type_rViFrVk == 1)
|
||||
if (type_TVCOcIz == 1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// the BUFBIxS function
|
||||
function BUFBIxS(type_BUFBIxS)
|
||||
// the jpykTVk function
|
||||
function jpykTVk(type_jpykTVk)
|
||||
{
|
||||
if (isSet(type_BUFBIxS) && type_BUFBIxS.constructor !== Array)
|
||||
if (isSet(type_jpykTVk) && type_jpykTVk.constructor !== Array)
|
||||
{
|
||||
var temp_BUFBIxS = type_BUFBIxS;
|
||||
var type_BUFBIxS = [];
|
||||
type_BUFBIxS.push(temp_BUFBIxS);
|
||||
var temp_jpykTVk = type_jpykTVk;
|
||||
var type_jpykTVk = [];
|
||||
type_jpykTVk.push(temp_jpykTVk);
|
||||
}
|
||||
else if (!isSet(type_BUFBIxS))
|
||||
else if (!isSet(type_jpykTVk))
|
||||
{
|
||||
var type_BUFBIxS = [];
|
||||
var type_jpykTVk = [];
|
||||
}
|
||||
var type = type_BUFBIxS.some(type_BUFBIxS_SomeFunc);
|
||||
var type = type_jpykTVk.some(type_jpykTVk_SomeFunc);
|
||||
|
||||
|
||||
// set this function logic
|
||||
if (type)
|
||||
{
|
||||
jQuery('#jform_content-lbl').closest('.control-group').show();
|
||||
if (jform_BUFBIxSSWh_required)
|
||||
if (jform_jpykTVkQjz_required)
|
||||
{
|
||||
updateFieldRequired('content',0);
|
||||
jQuery('#jform_content').prop('required','required');
|
||||
jQuery('#jform_content').attr('aria-required',true);
|
||||
jQuery('#jform_content').addClass('required');
|
||||
jform_BUFBIxSSWh_required = false;
|
||||
jform_jpykTVkQjz_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_content-lbl').closest('.control-group').hide();
|
||||
if (!jform_BUFBIxSSWh_required)
|
||||
if (!jform_jpykTVkQjz_required)
|
||||
{
|
||||
updateFieldRequired('content',1);
|
||||
jQuery('#jform_content').removeAttr('required');
|
||||
jQuery('#jform_content').removeAttr('aria-required');
|
||||
jQuery('#jform_content').removeClass('required');
|
||||
jform_BUFBIxSSWh_required = true;
|
||||
jform_jpykTVkQjz_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the BUFBIxS Some function
|
||||
function type_BUFBIxS_SomeFunc(type_BUFBIxS)
|
||||
// the jpykTVk Some function
|
||||
function type_jpykTVk_SomeFunc(type_jpykTVk)
|
||||
{
|
||||
// set the function logic
|
||||
if (type_BUFBIxS == 2)
|
||||
if (type_jpykTVk == 2)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// the bgwRgit function
|
||||
function bgwRgit(target_bgwRgit)
|
||||
// the eibemeG function
|
||||
function eibemeG(target_eibemeG)
|
||||
{
|
||||
// set the function logic
|
||||
if (target_bgwRgit == 1)
|
||||
if (target_eibemeG == 1)
|
||||
{
|
||||
jQuery('#jform_groups').closest('.control-group').show();
|
||||
if (jform_bgwRgitajP_required)
|
||||
if (jform_eibemeGwQn_required)
|
||||
{
|
||||
updateFieldRequired('groups',0);
|
||||
jQuery('#jform_groups').prop('required','required');
|
||||
jQuery('#jform_groups').attr('aria-required',true);
|
||||
jQuery('#jform_groups').addClass('required');
|
||||
jform_bgwRgitajP_required = false;
|
||||
jform_eibemeGwQn_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_groups').closest('.control-group').hide();
|
||||
if (!jform_bgwRgitajP_required)
|
||||
if (!jform_eibemeGwQn_required)
|
||||
{
|
||||
updateFieldRequired('groups',1);
|
||||
jQuery('#jform_groups').removeAttr('required');
|
||||
jQuery('#jform_groups').removeAttr('aria-required');
|
||||
jQuery('#jform_groups').removeClass('required');
|
||||
jform_bgwRgitajP_required = true;
|
||||
jform_eibemeGwQn_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,58 +17,58 @@
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// Some Global Values
|
||||
jform_lhGgsfCReY_required = false;
|
||||
jform_zNGkyNrDJy_required = false;
|
||||
jform_BjxWJbrVpr_required = false;
|
||||
jform_IcMhmLUigE_required = false;
|
||||
|
||||
// Initial Script
|
||||
jQuery(document).ready(function()
|
||||
{
|
||||
var type_lhGgsfC = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
lhGgsfC(type_lhGgsfC);
|
||||
var type_BjxWJbr = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
BjxWJbr(type_BjxWJbr);
|
||||
|
||||
var type_FaBOsPR = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
FaBOsPR(type_FaBOsPR);
|
||||
var type_LpRkBxe = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
LpRkBxe(type_LpRkBxe);
|
||||
|
||||
var company_zNGkyNr = jQuery("#jform_company").val();
|
||||
zNGkyNr(company_zNGkyNr);
|
||||
var company_IcMhmLU = jQuery("#jform_company").val();
|
||||
IcMhmLU(company_IcMhmLU);
|
||||
});
|
||||
|
||||
// the lhGgsfC function
|
||||
function lhGgsfC(type_lhGgsfC)
|
||||
// the BjxWJbr function
|
||||
function BjxWJbr(type_BjxWJbr)
|
||||
{
|
||||
// set the function logic
|
||||
if (type_lhGgsfC == 2)
|
||||
if (type_BjxWJbr == 2)
|
||||
{
|
||||
jQuery('#jform_interventions').closest('.control-group').show();
|
||||
if (jform_lhGgsfCReY_required)
|
||||
if (jform_BjxWJbrVpr_required)
|
||||
{
|
||||
updateFieldRequired('interventions',0);
|
||||
jQuery('#jform_interventions').prop('required','required');
|
||||
jQuery('#jform_interventions').attr('aria-required',true);
|
||||
jQuery('#jform_interventions').addClass('required');
|
||||
jform_lhGgsfCReY_required = false;
|
||||
jform_BjxWJbrVpr_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_interventions').closest('.control-group').hide();
|
||||
if (!jform_lhGgsfCReY_required)
|
||||
if (!jform_BjxWJbrVpr_required)
|
||||
{
|
||||
updateFieldRequired('interventions',1);
|
||||
jQuery('#jform_interventions').removeAttr('required');
|
||||
jQuery('#jform_interventions').removeAttr('aria-required');
|
||||
jQuery('#jform_interventions').removeClass('required');
|
||||
jform_lhGgsfCReY_required = true;
|
||||
jform_BjxWJbrVpr_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the FaBOsPR function
|
||||
function FaBOsPR(type_FaBOsPR)
|
||||
// the LpRkBxe function
|
||||
function LpRkBxe(type_LpRkBxe)
|
||||
{
|
||||
// set the function logic
|
||||
if (type_FaBOsPR == 1)
|
||||
if (type_LpRkBxe == 1)
|
||||
{
|
||||
jQuery('#jform_intervention').closest('.control-group').show();
|
||||
}
|
||||
@ -78,55 +78,55 @@ function FaBOsPR(type_FaBOsPR)
|
||||
}
|
||||
}
|
||||
|
||||
// the zNGkyNr function
|
||||
function zNGkyNr(company_zNGkyNr)
|
||||
// the IcMhmLU function
|
||||
function IcMhmLU(company_IcMhmLU)
|
||||
{
|
||||
if (isSet(company_zNGkyNr) && company_zNGkyNr.constructor !== Array)
|
||||
if (isSet(company_IcMhmLU) && company_IcMhmLU.constructor !== Array)
|
||||
{
|
||||
var temp_zNGkyNr = company_zNGkyNr;
|
||||
var company_zNGkyNr = [];
|
||||
company_zNGkyNr.push(temp_zNGkyNr);
|
||||
var temp_IcMhmLU = company_IcMhmLU;
|
||||
var company_IcMhmLU = [];
|
||||
company_IcMhmLU.push(temp_IcMhmLU);
|
||||
}
|
||||
else if (!isSet(company_zNGkyNr))
|
||||
else if (!isSet(company_IcMhmLU))
|
||||
{
|
||||
var company_zNGkyNr = [];
|
||||
var company_IcMhmLU = [];
|
||||
}
|
||||
var company = company_zNGkyNr.some(company_zNGkyNr_SomeFunc);
|
||||
var company = company_IcMhmLU.some(company_IcMhmLU_SomeFunc);
|
||||
|
||||
|
||||
// set this function logic
|
||||
if (company)
|
||||
{
|
||||
jQuery('#jform_country').closest('.control-group').show();
|
||||
if (jform_zNGkyNrDJy_required)
|
||||
if (jform_IcMhmLUigE_required)
|
||||
{
|
||||
updateFieldRequired('country',0);
|
||||
jQuery('#jform_country').prop('required','required');
|
||||
jQuery('#jform_country').attr('aria-required',true);
|
||||
jQuery('#jform_country').addClass('required');
|
||||
jform_zNGkyNrDJy_required = false;
|
||||
jform_IcMhmLUigE_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_country').closest('.control-group').hide();
|
||||
if (!jform_zNGkyNrDJy_required)
|
||||
if (!jform_IcMhmLUigE_required)
|
||||
{
|
||||
updateFieldRequired('country',1);
|
||||
jQuery('#jform_country').removeAttr('required');
|
||||
jQuery('#jform_country').removeAttr('aria-required');
|
||||
jQuery('#jform_country').removeClass('required');
|
||||
jform_zNGkyNrDJy_required = true;
|
||||
jform_IcMhmLUigE_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the zNGkyNr Some function
|
||||
function company_zNGkyNr_SomeFunc(company_zNGkyNr)
|
||||
// the IcMhmLU Some function
|
||||
function company_IcMhmLU_SomeFunc(company_IcMhmLU)
|
||||
{
|
||||
// set the function logic
|
||||
if (company_zNGkyNr == 0)
|
||||
if (company_IcMhmLU == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -17,64 +17,64 @@
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// Some Global Values
|
||||
jform_RjkWaieBCR_required = false;
|
||||
jform_oZNUsPGVRM_required = false;
|
||||
|
||||
// Initial Script
|
||||
jQuery(document).ready(function()
|
||||
{
|
||||
var company_RjkWaie = jQuery("#jform_company").val();
|
||||
RjkWaie(company_RjkWaie);
|
||||
var company_oZNUsPG = jQuery("#jform_company").val();
|
||||
oZNUsPG(company_oZNUsPG);
|
||||
});
|
||||
|
||||
// the RjkWaie function
|
||||
function RjkWaie(company_RjkWaie)
|
||||
// the oZNUsPG function
|
||||
function oZNUsPG(company_oZNUsPG)
|
||||
{
|
||||
if (isSet(company_RjkWaie) && company_RjkWaie.constructor !== Array)
|
||||
if (isSet(company_oZNUsPG) && company_oZNUsPG.constructor !== Array)
|
||||
{
|
||||
var temp_RjkWaie = company_RjkWaie;
|
||||
var company_RjkWaie = [];
|
||||
company_RjkWaie.push(temp_RjkWaie);
|
||||
var temp_oZNUsPG = company_oZNUsPG;
|
||||
var company_oZNUsPG = [];
|
||||
company_oZNUsPG.push(temp_oZNUsPG);
|
||||
}
|
||||
else if (!isSet(company_RjkWaie))
|
||||
else if (!isSet(company_oZNUsPG))
|
||||
{
|
||||
var company_RjkWaie = [];
|
||||
var company_oZNUsPG = [];
|
||||
}
|
||||
var company = company_RjkWaie.some(company_RjkWaie_SomeFunc);
|
||||
var company = company_oZNUsPG.some(company_oZNUsPG_SomeFunc);
|
||||
|
||||
|
||||
// set this function logic
|
||||
if (company)
|
||||
{
|
||||
jQuery('#jform_country').closest('.control-group').show();
|
||||
if (jform_RjkWaieBCR_required)
|
||||
if (jform_oZNUsPGVRM_required)
|
||||
{
|
||||
updateFieldRequired('country',0);
|
||||
jQuery('#jform_country').prop('required','required');
|
||||
jQuery('#jform_country').attr('aria-required',true);
|
||||
jQuery('#jform_country').addClass('required');
|
||||
jform_RjkWaieBCR_required = false;
|
||||
jform_oZNUsPGVRM_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_country').closest('.control-group').hide();
|
||||
if (!jform_RjkWaieBCR_required)
|
||||
if (!jform_oZNUsPGVRM_required)
|
||||
{
|
||||
updateFieldRequired('country',1);
|
||||
jQuery('#jform_country').removeAttr('required');
|
||||
jQuery('#jform_country').removeAttr('aria-required');
|
||||
jQuery('#jform_country').removeClass('required');
|
||||
jform_RjkWaieBCR_required = true;
|
||||
jform_oZNUsPGVRM_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the RjkWaie Some function
|
||||
function company_RjkWaie_SomeFunc(company_RjkWaie)
|
||||
// the oZNUsPG Some function
|
||||
function company_oZNUsPG_SomeFunc(company_oZNUsPG)
|
||||
{
|
||||
// set the function logic
|
||||
if (company_RjkWaie == 0)
|
||||
if (company_oZNUsPG == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ class CostbenefitprojectionModelService_provider extends JModelAdmin
|
||||
$item->tags->getTagIds($item->id, 'com_costbenefitprojection.service_provider');
|
||||
}
|
||||
}
|
||||
$this->service_providereone = $item->id;
|
||||
$this->service_providerbdqp = $item->id;
|
||||
|
||||
return $item;
|
||||
}
|
||||
@ -105,7 +105,7 @@ class CostbenefitprojectionModelService_provider extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
public function getDpvcompanies()
|
||||
public function getVnfcompanies()
|
||||
{
|
||||
// Get the user object.
|
||||
$user = JFactory::getUser();
|
||||
@ -148,15 +148,15 @@ class CostbenefitprojectionModelService_provider extends JModelAdmin
|
||||
$query->select($db->quoteName('i.user','service_provider_user'));
|
||||
$query->join('LEFT', $db->quoteName('#__costbenefitprojection_service_provider', 'i') . ' ON (' . $db->quoteName('a.service_provider') . ' = ' . $db->quoteName('i.id') . ')');
|
||||
|
||||
// Filter by service_providereone global.
|
||||
$service_providereone = $this->service_providereone;
|
||||
if (is_numeric($service_providereone ))
|
||||
// Filter by service_providerbdqp global.
|
||||
$service_providerbdqp = $this->service_providerbdqp;
|
||||
if (is_numeric($service_providerbdqp ))
|
||||
{
|
||||
$query->where('a.service_provider = ' . (int) $service_providereone );
|
||||
$query->where('a.service_provider = ' . (int) $service_providerbdqp );
|
||||
}
|
||||
elseif (is_string($service_providereone))
|
||||
elseif (is_string($service_providerbdqp))
|
||||
{
|
||||
$query->where('a.service_provider = ' . $db->quote($service_providereone));
|
||||
$query->where('a.service_provider = ' . $db->quote($service_providerbdqp));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -211,9 +211,9 @@ class CostbenefitprojectionModelService_provider extends JModelAdmin
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
// convert department
|
||||
$item->department = $this->selectionTranslationDpvcompanies($item->department, 'department');
|
||||
$item->department = $this->selectionTranslationVnfcompanies($item->department, 'department');
|
||||
// convert per
|
||||
$item->per = $this->selectionTranslationDpvcompanies($item->per, 'per');
|
||||
$item->per = $this->selectionTranslationVnfcompanies($item->per, 'per');
|
||||
}
|
||||
}
|
||||
|
||||
@ -227,7 +227,7 @@ class CostbenefitprojectionModelService_provider extends JModelAdmin
|
||||
*
|
||||
* @return translatable string
|
||||
*/
|
||||
public function selectionTranslationDpvcompanies($value,$name)
|
||||
public function selectionTranslationVnfcompanies($value,$name)
|
||||
{
|
||||
// Array of department language strings
|
||||
if ($name == 'department')
|
||||
|
@ -141,33 +141,33 @@ $componentParams = JComponentHelper::getParams('com_costbenefitprojection');
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// #jform_department listeners for department_GbcdqOG function
|
||||
// #jform_department listeners for department_ChlKFlM function
|
||||
jQuery('#jform_department').on('keyup',function()
|
||||
{
|
||||
var department_GbcdqOG = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
GbcdqOG(department_GbcdqOG);
|
||||
var department_ChlKFlM = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
ChlKFlM(department_ChlKFlM);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_department',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var department_GbcdqOG = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
GbcdqOG(department_GbcdqOG);
|
||||
var department_ChlKFlM = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
ChlKFlM(department_ChlKFlM);
|
||||
|
||||
});
|
||||
|
||||
// #jform_department listeners for department_kIvNEDP function
|
||||
// #jform_department listeners for department_HwdjLtQ function
|
||||
jQuery('#jform_department').on('keyup',function()
|
||||
{
|
||||
var department_kIvNEDP = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
kIvNEDP(department_kIvNEDP);
|
||||
var department_HwdjLtQ = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
HwdjLtQ(department_HwdjLtQ);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_department',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var department_kIvNEDP = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
kIvNEDP(department_kIvNEDP);
|
||||
var department_HwdjLtQ = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
HwdjLtQ(department_HwdjLtQ);
|
||||
|
||||
});
|
||||
|
||||
|
@ -65,10 +65,10 @@ class CostbenefitprojectionViewCompany extends JViewLegacy
|
||||
}
|
||||
|
||||
// Get Linked view data
|
||||
$this->tmyscaling_factors = $this->get('Tmyscaling_factors');
|
||||
$this->uzwscaling_factors = $this->get('Uzwscaling_factors');
|
||||
|
||||
// Get Linked view data
|
||||
$this->oabinterventions = $this->get('Oabinterventions');
|
||||
$this->uhjinterventions = $this->get('Uhjinterventions');
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
|
@ -65,13 +65,13 @@ class CostbenefitprojectionViewCountry extends JViewLegacy
|
||||
}
|
||||
|
||||
// Get Linked view data
|
||||
$this->jirinterventions = $this->get('Jirinterventions');
|
||||
$this->fwdinterventions = $this->get('Fwdinterventions');
|
||||
|
||||
// Get Linked view data
|
||||
$this->oehservice_providers = $this->get('Oehservice_providers');
|
||||
$this->mvlservice_providers = $this->get('Mvlservice_providers');
|
||||
|
||||
// Get Linked view data
|
||||
$this->vmqcompanies = $this->get('Vmqcompanies');
|
||||
$this->wbzcompanies = $this->get('Wbzcompanies');
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
|
@ -96,93 +96,93 @@ $componentParams = JComponentHelper::getParams('com_costbenefitprojection');
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// #jform_location listeners for location_BphvImg function
|
||||
// #jform_location listeners for location_MbvtJEY function
|
||||
jQuery('#jform_location').on('keyup',function()
|
||||
{
|
||||
var location_BphvImg = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
BphvImg(location_BphvImg);
|
||||
var location_MbvtJEY = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
MbvtJEY(location_MbvtJEY);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_location',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var location_BphvImg = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
BphvImg(location_BphvImg);
|
||||
var location_MbvtJEY = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
MbvtJEY(location_MbvtJEY);
|
||||
|
||||
});
|
||||
|
||||
// #jform_location listeners for location_JMkoFuj function
|
||||
// #jform_location listeners for location_FqaWrpo function
|
||||
jQuery('#jform_location').on('keyup',function()
|
||||
{
|
||||
var location_JMkoFuj = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
JMkoFuj(location_JMkoFuj);
|
||||
var location_FqaWrpo = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
FqaWrpo(location_FqaWrpo);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_location',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var location_JMkoFuj = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
JMkoFuj(location_JMkoFuj);
|
||||
var location_FqaWrpo = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
FqaWrpo(location_FqaWrpo);
|
||||
|
||||
});
|
||||
|
||||
// #jform_type listeners for type_nwQaKJS function
|
||||
// #jform_type listeners for type_XBcfcHo function
|
||||
jQuery('#jform_type').on('keyup',function()
|
||||
{
|
||||
var type_nwQaKJS = jQuery("#jform_type").val();
|
||||
nwQaKJS(type_nwQaKJS);
|
||||
var type_XBcfcHo = jQuery("#jform_type").val();
|
||||
XBcfcHo(type_XBcfcHo);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_type',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var type_nwQaKJS = jQuery("#jform_type").val();
|
||||
nwQaKJS(type_nwQaKJS);
|
||||
var type_XBcfcHo = jQuery("#jform_type").val();
|
||||
XBcfcHo(type_XBcfcHo);
|
||||
|
||||
});
|
||||
|
||||
// #jform_type listeners for type_rViFrVk function
|
||||
// #jform_type listeners for type_TVCOcIz function
|
||||
jQuery('#jform_type').on('keyup',function()
|
||||
{
|
||||
var type_rViFrVk = jQuery("#jform_type").val();
|
||||
rViFrVk(type_rViFrVk);
|
||||
var type_TVCOcIz = jQuery("#jform_type").val();
|
||||
TVCOcIz(type_TVCOcIz);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_type',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var type_rViFrVk = jQuery("#jform_type").val();
|
||||
rViFrVk(type_rViFrVk);
|
||||
var type_TVCOcIz = jQuery("#jform_type").val();
|
||||
TVCOcIz(type_TVCOcIz);
|
||||
|
||||
});
|
||||
|
||||
// #jform_type listeners for type_BUFBIxS function
|
||||
// #jform_type listeners for type_jpykTVk function
|
||||
jQuery('#jform_type').on('keyup',function()
|
||||
{
|
||||
var type_BUFBIxS = jQuery("#jform_type").val();
|
||||
BUFBIxS(type_BUFBIxS);
|
||||
var type_jpykTVk = jQuery("#jform_type").val();
|
||||
jpykTVk(type_jpykTVk);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_type',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var type_BUFBIxS = jQuery("#jform_type").val();
|
||||
BUFBIxS(type_BUFBIxS);
|
||||
var type_jpykTVk = jQuery("#jform_type").val();
|
||||
jpykTVk(type_jpykTVk);
|
||||
|
||||
});
|
||||
|
||||
// #jform_target listeners for target_bgwRgit function
|
||||
// #jform_target listeners for target_eibemeG function
|
||||
jQuery('#jform_target').on('keyup',function()
|
||||
{
|
||||
var target_bgwRgit = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
bgwRgit(target_bgwRgit);
|
||||
var target_eibemeG = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
eibemeG(target_eibemeG);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_target',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var target_bgwRgit = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
bgwRgit(target_bgwRgit);
|
||||
var target_eibemeG = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
eibemeG(target_eibemeG);
|
||||
|
||||
});
|
||||
|
||||
|
@ -103,48 +103,48 @@ $componentParams = JComponentHelper::getParams('com_costbenefitprojection');
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// #jform_type listeners for type_lhGgsfC function
|
||||
// #jform_type listeners for type_BjxWJbr function
|
||||
jQuery('#jform_type').on('keyup',function()
|
||||
{
|
||||
var type_lhGgsfC = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
lhGgsfC(type_lhGgsfC);
|
||||
var type_BjxWJbr = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
BjxWJbr(type_BjxWJbr);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_type',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var type_lhGgsfC = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
lhGgsfC(type_lhGgsfC);
|
||||
var type_BjxWJbr = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
BjxWJbr(type_BjxWJbr);
|
||||
|
||||
});
|
||||
|
||||
// #jform_type listeners for type_FaBOsPR function
|
||||
// #jform_type listeners for type_LpRkBxe function
|
||||
jQuery('#jform_type').on('keyup',function()
|
||||
{
|
||||
var type_FaBOsPR = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
FaBOsPR(type_FaBOsPR);
|
||||
var type_LpRkBxe = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
LpRkBxe(type_LpRkBxe);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_type',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var type_FaBOsPR = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
FaBOsPR(type_FaBOsPR);
|
||||
var type_LpRkBxe = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
LpRkBxe(type_LpRkBxe);
|
||||
|
||||
});
|
||||
|
||||
// #jform_company listeners for company_zNGkyNr function
|
||||
// #jform_company listeners for company_IcMhmLU function
|
||||
jQuery('#jform_company').on('keyup',function()
|
||||
{
|
||||
var company_zNGkyNr = jQuery("#jform_company").val();
|
||||
zNGkyNr(company_zNGkyNr);
|
||||
var company_IcMhmLU = jQuery("#jform_company").val();
|
||||
IcMhmLU(company_IcMhmLU);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_company',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var company_zNGkyNr = jQuery("#jform_company").val();
|
||||
zNGkyNr(company_zNGkyNr);
|
||||
var company_IcMhmLU = jQuery("#jform_company").val();
|
||||
IcMhmLU(company_IcMhmLU);
|
||||
|
||||
});
|
||||
|
||||
|
@ -88,18 +88,18 @@ $componentParams = JComponentHelper::getParams('com_costbenefitprojection');
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// #jform_company listeners for company_RjkWaie function
|
||||
// #jform_company listeners for company_oZNUsPG function
|
||||
jQuery('#jform_company').on('keyup',function()
|
||||
{
|
||||
var company_RjkWaie = jQuery("#jform_company").val();
|
||||
RjkWaie(company_RjkWaie);
|
||||
var company_oZNUsPG = jQuery("#jform_company").val();
|
||||
oZNUsPG(company_oZNUsPG);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_company',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var company_RjkWaie = jQuery("#jform_company").val();
|
||||
RjkWaie(company_RjkWaie);
|
||||
var company_oZNUsPG = jQuery("#jform_company").val();
|
||||
oZNUsPG(company_oZNUsPG);
|
||||
|
||||
});
|
||||
|
||||
|
@ -65,7 +65,7 @@ class CostbenefitprojectionViewService_provider extends JViewLegacy
|
||||
}
|
||||
|
||||
// Get Linked view data
|
||||
$this->dpvcompanies = $this->get('Dpvcompanies');
|
||||
$this->vnfcompanies = $this->get('Vnfcompanies');
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
|
@ -331,9 +331,13 @@ class CostbenefitprojectionControllerCompany extends JControllerForm
|
||||
{
|
||||
if ($validData['id'] >= 0)
|
||||
{
|
||||
// get user object
|
||||
$user = JFactory::getUser();
|
||||
// if id is 0 get id
|
||||
if (0 >= (int) $validData['id'])
|
||||
{
|
||||
// Get the created by id
|
||||
$created_by = (isset($validData['created_by']) && $validData['created_by'] > 0) ? $validData['created_by'] : $user->id;
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
// Create a new query object.
|
||||
@ -345,8 +349,11 @@ class CostbenefitprojectionControllerCompany extends JControllerForm
|
||||
$query->where($db->quoteName('email') . ' = '. $db->quote($validData['email']));
|
||||
$query->where($db->quoteName('country') . ' = '. (int) $validData['country']);
|
||||
$query->where($db->quoteName('service_provider') . ' = '. (int) $validData['service_provider']);
|
||||
$query->where($db->quoteName('created_by') . ' = '. (int) $validData['created_by']);
|
||||
$query->where($db->quoteName('created') . ' = '. $db->quote($validData['created']));
|
||||
$query->where($db->quoteName('created_by') . ' = '. (int) $created_by);
|
||||
if (isset($validData['created']))
|
||||
{
|
||||
$query->where($db->quoteName('created') . ' = '. $db->quote($validData['created']));
|
||||
}
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
@ -361,8 +368,6 @@ class CostbenefitprojectionControllerCompany extends JControllerForm
|
||||
// user setup if not set
|
||||
if (0 >= (int) $validData['user'] && (int) $validData['id'] > 0)
|
||||
{
|
||||
// get user object
|
||||
$user = JFactory::getUser();
|
||||
$userIs = CostbenefitprojectionHelper::userIs($user->id);
|
||||
if (1 == $userIs)
|
||||
{
|
||||
|
@ -22,7 +22,7 @@
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// set the defaults
|
||||
$items = $displayData->oabinterventions;
|
||||
$items = $displayData->uhjinterventions;
|
||||
$user = JFactory::getUser();
|
||||
$id = $displayData->item->id;
|
||||
$edit = "index.php?option=com_costbenefitprojection&view=interventions&task=intervention.edit";
|
||||
|
@ -22,7 +22,7 @@
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// set the defaults
|
||||
$items = $displayData->tmyscaling_factors;
|
||||
$items = $displayData->uzwscaling_factors;
|
||||
$user = JFactory::getUser();
|
||||
$id = $displayData->item->id;
|
||||
$edit = "index.php?option=com_costbenefitprojection&view=scaling_factors&task=scaling_factor.edit";
|
||||
|
@ -154,8 +154,8 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
|
||||
$item->tags->getTagIds($item->id, 'com_costbenefitprojection.company');
|
||||
}
|
||||
}
|
||||
$this->companyuvgj = $item->id;
|
||||
$this->companygdxw = $item->id;
|
||||
$this->companyaioc = $item->id;
|
||||
$this->companydlkv = $item->id;
|
||||
|
||||
return $item;
|
||||
}
|
||||
@ -165,7 +165,7 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
public function getTmyscaling_factors()
|
||||
public function getUzwscaling_factors()
|
||||
{
|
||||
// Get the user object.
|
||||
$user = JFactory::getUser();
|
||||
@ -204,15 +204,15 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
|
||||
$query->select($db->quoteName('h.name','company_name'));
|
||||
$query->join('LEFT', $db->quoteName('#__costbenefitprojection_company', 'h') . ' ON (' . $db->quoteName('a.company') . ' = ' . $db->quoteName('h.id') . ')');
|
||||
|
||||
// Filter by companyuvgj global.
|
||||
$companyuvgj = $this->companyuvgj;
|
||||
if (is_numeric($companyuvgj ))
|
||||
// Filter by companyaioc global.
|
||||
$companyaioc = $this->companyaioc;
|
||||
if (is_numeric($companyaioc ))
|
||||
{
|
||||
$query->where('a.company = ' . (int) $companyuvgj );
|
||||
$query->where('a.company = ' . (int) $companyaioc );
|
||||
}
|
||||
elseif (is_string($companyuvgj))
|
||||
elseif (is_string($companyaioc))
|
||||
{
|
||||
$query->where('a.company = ' . $db->quote($companyuvgj));
|
||||
$query->where('a.company = ' . $db->quote($companyaioc));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -255,7 +255,7 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
public function getOabinterventions()
|
||||
public function getUhjinterventions()
|
||||
{
|
||||
// Get the user object.
|
||||
$user = JFactory::getUser();
|
||||
@ -290,15 +290,15 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
|
||||
$query->select($db->quoteName('g.name','company_name'));
|
||||
$query->join('LEFT', $db->quoteName('#__costbenefitprojection_company', 'g') . ' ON (' . $db->quoteName('a.company') . ' = ' . $db->quoteName('g.id') . ')');
|
||||
|
||||
// Filter by companygdxw global.
|
||||
$companygdxw = $this->companygdxw;
|
||||
if (is_numeric($companygdxw ))
|
||||
// Filter by companydlkv global.
|
||||
$companydlkv = $this->companydlkv;
|
||||
if (is_numeric($companydlkv ))
|
||||
{
|
||||
$query->where('a.company = ' . (int) $companygdxw );
|
||||
$query->where('a.company = ' . (int) $companydlkv );
|
||||
}
|
||||
elseif (is_string($companygdxw))
|
||||
elseif (is_string($companydlkv))
|
||||
{
|
||||
$query->where('a.company = ' . $db->quote($companygdxw));
|
||||
$query->where('a.company = ' . $db->quote($companydlkv));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -351,7 +351,7 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
// convert type
|
||||
$item->type = $this->selectionTranslationOabinterventions($item->type, 'type');
|
||||
$item->type = $this->selectionTranslationUhjinterventions($item->type, 'type');
|
||||
}
|
||||
}
|
||||
|
||||
@ -365,7 +365,7 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
|
||||
*
|
||||
* @return translatable string
|
||||
*/
|
||||
public function selectionTranslationOabinterventions($value,$name)
|
||||
public function selectionTranslationUhjinterventions($value,$name)
|
||||
{
|
||||
// Array of type language strings
|
||||
if ($name == 'type')
|
||||
|
@ -17,178 +17,178 @@
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// Some Global Values
|
||||
jform_GbcdqOGthK_required = false;
|
||||
jform_GbcdqOGhqS_required = false;
|
||||
jform_GbcdqOGhtp_required = false;
|
||||
jform_GbcdqOGBWR_required = false;
|
||||
jform_GbcdqOGLKL_required = false;
|
||||
jform_GbcdqOGUuq_required = false;
|
||||
jform_GbcdqOGhSY_required = false;
|
||||
jform_ChlKFlMfAG_required = false;
|
||||
jform_ChlKFlMtIW_required = false;
|
||||
jform_ChlKFlMEJX_required = false;
|
||||
jform_ChlKFlMkrk_required = false;
|
||||
jform_ChlKFlMQLg_required = false;
|
||||
jform_ChlKFlMMxt_required = false;
|
||||
jform_ChlKFlMKtb_required = false;
|
||||
|
||||
// Initial Script
|
||||
jQuery(document).ready(function()
|
||||
{
|
||||
var department_GbcdqOG = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
GbcdqOG(department_GbcdqOG);
|
||||
var department_ChlKFlM = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
ChlKFlM(department_ChlKFlM);
|
||||
|
||||
var department_kIvNEDP = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
kIvNEDP(department_kIvNEDP);
|
||||
var department_HwdjLtQ = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
HwdjLtQ(department_HwdjLtQ);
|
||||
});
|
||||
|
||||
// the GbcdqOG function
|
||||
function GbcdqOG(department_GbcdqOG)
|
||||
// the ChlKFlM function
|
||||
function ChlKFlM(department_ChlKFlM)
|
||||
{
|
||||
// set the function logic
|
||||
if (department_GbcdqOG == 2)
|
||||
if (department_ChlKFlM == 2)
|
||||
{
|
||||
jQuery('#jform_causesrisks').closest('.control-group').show();
|
||||
if (jform_GbcdqOGthK_required)
|
||||
if (jform_ChlKFlMfAG_required)
|
||||
{
|
||||
updateFieldRequired('causesrisks',0);
|
||||
jQuery('#jform_causesrisks').prop('required','required');
|
||||
jQuery('#jform_causesrisks').attr('aria-required',true);
|
||||
jQuery('#jform_causesrisks').addClass('required');
|
||||
jform_GbcdqOGthK_required = false;
|
||||
jform_ChlKFlMfAG_required = false;
|
||||
}
|
||||
|
||||
jQuery('#jform_percentfemale').closest('.control-group').show();
|
||||
jQuery('#jform_percentmale').closest('.control-group').show();
|
||||
jQuery('#jform_productivity_losses').closest('.control-group').show();
|
||||
if (jform_GbcdqOGhqS_required)
|
||||
if (jform_ChlKFlMtIW_required)
|
||||
{
|
||||
updateFieldRequired('productivity_losses',0);
|
||||
jQuery('#jform_productivity_losses').prop('required','required');
|
||||
jQuery('#jform_productivity_losses').attr('aria-required',true);
|
||||
jQuery('#jform_productivity_losses').addClass('required');
|
||||
jform_GbcdqOGhqS_required = false;
|
||||
jform_ChlKFlMtIW_required = false;
|
||||
}
|
||||
|
||||
jQuery('#jform_medical_turnovers_females').closest('.control-group').show();
|
||||
if (jform_GbcdqOGhtp_required)
|
||||
if (jform_ChlKFlMEJX_required)
|
||||
{
|
||||
updateFieldRequired('medical_turnovers_females',0);
|
||||
jQuery('#jform_medical_turnovers_females').prop('required','required');
|
||||
jQuery('#jform_medical_turnovers_females').attr('aria-required',true);
|
||||
jQuery('#jform_medical_turnovers_females').addClass('required');
|
||||
jform_GbcdqOGhtp_required = false;
|
||||
jform_ChlKFlMEJX_required = false;
|
||||
}
|
||||
|
||||
jQuery('#jform_medical_turnovers_males').closest('.control-group').show();
|
||||
if (jform_GbcdqOGBWR_required)
|
||||
if (jform_ChlKFlMkrk_required)
|
||||
{
|
||||
updateFieldRequired('medical_turnovers_males',0);
|
||||
jQuery('#jform_medical_turnovers_males').prop('required','required');
|
||||
jQuery('#jform_medical_turnovers_males').attr('aria-required',true);
|
||||
jQuery('#jform_medical_turnovers_males').addClass('required');
|
||||
jform_GbcdqOGBWR_required = false;
|
||||
jform_ChlKFlMkrk_required = false;
|
||||
}
|
||||
|
||||
jQuery('#jform_sick_leave_females').closest('.control-group').show();
|
||||
if (jform_GbcdqOGLKL_required)
|
||||
if (jform_ChlKFlMQLg_required)
|
||||
{
|
||||
updateFieldRequired('sick_leave_females',0);
|
||||
jQuery('#jform_sick_leave_females').prop('required','required');
|
||||
jQuery('#jform_sick_leave_females').attr('aria-required',true);
|
||||
jQuery('#jform_sick_leave_females').addClass('required');
|
||||
jform_GbcdqOGLKL_required = false;
|
||||
jform_ChlKFlMQLg_required = false;
|
||||
}
|
||||
|
||||
jQuery('#jform_sick_leave_males').closest('.control-group').show();
|
||||
if (jform_GbcdqOGUuq_required)
|
||||
if (jform_ChlKFlMMxt_required)
|
||||
{
|
||||
updateFieldRequired('sick_leave_males',0);
|
||||
jQuery('#jform_sick_leave_males').prop('required','required');
|
||||
jQuery('#jform_sick_leave_males').attr('aria-required',true);
|
||||
jQuery('#jform_sick_leave_males').addClass('required');
|
||||
jform_GbcdqOGUuq_required = false;
|
||||
jform_ChlKFlMMxt_required = false;
|
||||
}
|
||||
|
||||
jQuery('#jform_total_healthcare').closest('.control-group').show();
|
||||
if (jform_GbcdqOGhSY_required)
|
||||
if (jform_ChlKFlMKtb_required)
|
||||
{
|
||||
updateFieldRequired('total_healthcare',0);
|
||||
jQuery('#jform_total_healthcare').prop('required','required');
|
||||
jQuery('#jform_total_healthcare').attr('aria-required',true);
|
||||
jQuery('#jform_total_healthcare').addClass('required');
|
||||
jform_GbcdqOGhSY_required = false;
|
||||
jform_ChlKFlMKtb_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_causesrisks').closest('.control-group').hide();
|
||||
if (!jform_GbcdqOGthK_required)
|
||||
if (!jform_ChlKFlMfAG_required)
|
||||
{
|
||||
updateFieldRequired('causesrisks',1);
|
||||
jQuery('#jform_causesrisks').removeAttr('required');
|
||||
jQuery('#jform_causesrisks').removeAttr('aria-required');
|
||||
jQuery('#jform_causesrisks').removeClass('required');
|
||||
jform_GbcdqOGthK_required = true;
|
||||
jform_ChlKFlMfAG_required = true;
|
||||
}
|
||||
jQuery('#jform_percentfemale').closest('.control-group').hide();
|
||||
jQuery('#jform_percentmale').closest('.control-group').hide();
|
||||
jQuery('#jform_productivity_losses').closest('.control-group').hide();
|
||||
if (!jform_GbcdqOGhqS_required)
|
||||
if (!jform_ChlKFlMtIW_required)
|
||||
{
|
||||
updateFieldRequired('productivity_losses',1);
|
||||
jQuery('#jform_productivity_losses').removeAttr('required');
|
||||
jQuery('#jform_productivity_losses').removeAttr('aria-required');
|
||||
jQuery('#jform_productivity_losses').removeClass('required');
|
||||
jform_GbcdqOGhqS_required = true;
|
||||
jform_ChlKFlMtIW_required = true;
|
||||
}
|
||||
jQuery('#jform_medical_turnovers_females').closest('.control-group').hide();
|
||||
if (!jform_GbcdqOGhtp_required)
|
||||
if (!jform_ChlKFlMEJX_required)
|
||||
{
|
||||
updateFieldRequired('medical_turnovers_females',1);
|
||||
jQuery('#jform_medical_turnovers_females').removeAttr('required');
|
||||
jQuery('#jform_medical_turnovers_females').removeAttr('aria-required');
|
||||
jQuery('#jform_medical_turnovers_females').removeClass('required');
|
||||
jform_GbcdqOGhtp_required = true;
|
||||
jform_ChlKFlMEJX_required = true;
|
||||
}
|
||||
jQuery('#jform_medical_turnovers_males').closest('.control-group').hide();
|
||||
if (!jform_GbcdqOGBWR_required)
|
||||
if (!jform_ChlKFlMkrk_required)
|
||||
{
|
||||
updateFieldRequired('medical_turnovers_males',1);
|
||||
jQuery('#jform_medical_turnovers_males').removeAttr('required');
|
||||
jQuery('#jform_medical_turnovers_males').removeAttr('aria-required');
|
||||
jQuery('#jform_medical_turnovers_males').removeClass('required');
|
||||
jform_GbcdqOGBWR_required = true;
|
||||
jform_ChlKFlMkrk_required = true;
|
||||
}
|
||||
jQuery('#jform_sick_leave_females').closest('.control-group').hide();
|
||||
if (!jform_GbcdqOGLKL_required)
|
||||
if (!jform_ChlKFlMQLg_required)
|
||||
{
|
||||
updateFieldRequired('sick_leave_females',1);
|
||||
jQuery('#jform_sick_leave_females').removeAttr('required');
|
||||
jQuery('#jform_sick_leave_females').removeAttr('aria-required');
|
||||
jQuery('#jform_sick_leave_females').removeClass('required');
|
||||
jform_GbcdqOGLKL_required = true;
|
||||
jform_ChlKFlMQLg_required = true;
|
||||
}
|
||||
jQuery('#jform_sick_leave_males').closest('.control-group').hide();
|
||||
if (!jform_GbcdqOGUuq_required)
|
||||
if (!jform_ChlKFlMMxt_required)
|
||||
{
|
||||
updateFieldRequired('sick_leave_males',1);
|
||||
jQuery('#jform_sick_leave_males').removeAttr('required');
|
||||
jQuery('#jform_sick_leave_males').removeAttr('aria-required');
|
||||
jQuery('#jform_sick_leave_males').removeClass('required');
|
||||
jform_GbcdqOGUuq_required = true;
|
||||
jform_ChlKFlMMxt_required = true;
|
||||
}
|
||||
jQuery('#jform_total_healthcare').closest('.control-group').hide();
|
||||
if (!jform_GbcdqOGhSY_required)
|
||||
if (!jform_ChlKFlMKtb_required)
|
||||
{
|
||||
updateFieldRequired('total_healthcare',1);
|
||||
jQuery('#jform_total_healthcare').removeAttr('required');
|
||||
jQuery('#jform_total_healthcare').removeAttr('aria-required');
|
||||
jQuery('#jform_total_healthcare').removeClass('required');
|
||||
jform_GbcdqOGhSY_required = true;
|
||||
jform_ChlKFlMKtb_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the kIvNEDP function
|
||||
function kIvNEDP(department_kIvNEDP)
|
||||
// the HwdjLtQ function
|
||||
function HwdjLtQ(department_HwdjLtQ)
|
||||
{
|
||||
// set the function logic
|
||||
if (department_kIvNEDP == 1)
|
||||
if (department_HwdjLtQ == 1)
|
||||
{
|
||||
jQuery('.age_groups_note').closest('.control-group').show();
|
||||
jQuery('.cause_risk_selection_note').closest('.control-group').show();
|
||||
|
@ -17,58 +17,58 @@
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// Some Global Values
|
||||
jform_lhGgsfCReY_required = false;
|
||||
jform_zNGkyNrDJy_required = false;
|
||||
jform_BjxWJbrVpr_required = false;
|
||||
jform_IcMhmLUigE_required = false;
|
||||
|
||||
// Initial Script
|
||||
jQuery(document).ready(function()
|
||||
{
|
||||
var type_lhGgsfC = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
lhGgsfC(type_lhGgsfC);
|
||||
var type_BjxWJbr = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
BjxWJbr(type_BjxWJbr);
|
||||
|
||||
var type_FaBOsPR = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
FaBOsPR(type_FaBOsPR);
|
||||
var type_LpRkBxe = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
LpRkBxe(type_LpRkBxe);
|
||||
|
||||
var company_zNGkyNr = jQuery("#jform_company").val();
|
||||
zNGkyNr(company_zNGkyNr);
|
||||
var company_IcMhmLU = jQuery("#jform_company").val();
|
||||
IcMhmLU(company_IcMhmLU);
|
||||
});
|
||||
|
||||
// the lhGgsfC function
|
||||
function lhGgsfC(type_lhGgsfC)
|
||||
// the BjxWJbr function
|
||||
function BjxWJbr(type_BjxWJbr)
|
||||
{
|
||||
// set the function logic
|
||||
if (type_lhGgsfC == 2)
|
||||
if (type_BjxWJbr == 2)
|
||||
{
|
||||
jQuery('#jform_interventions').closest('.control-group').show();
|
||||
if (jform_lhGgsfCReY_required)
|
||||
if (jform_BjxWJbrVpr_required)
|
||||
{
|
||||
updateFieldRequired('interventions',0);
|
||||
jQuery('#jform_interventions').prop('required','required');
|
||||
jQuery('#jform_interventions').attr('aria-required',true);
|
||||
jQuery('#jform_interventions').addClass('required');
|
||||
jform_lhGgsfCReY_required = false;
|
||||
jform_BjxWJbrVpr_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_interventions').closest('.control-group').hide();
|
||||
if (!jform_lhGgsfCReY_required)
|
||||
if (!jform_BjxWJbrVpr_required)
|
||||
{
|
||||
updateFieldRequired('interventions',1);
|
||||
jQuery('#jform_interventions').removeAttr('required');
|
||||
jQuery('#jform_interventions').removeAttr('aria-required');
|
||||
jQuery('#jform_interventions').removeClass('required');
|
||||
jform_lhGgsfCReY_required = true;
|
||||
jform_BjxWJbrVpr_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the FaBOsPR function
|
||||
function FaBOsPR(type_FaBOsPR)
|
||||
// the LpRkBxe function
|
||||
function LpRkBxe(type_LpRkBxe)
|
||||
{
|
||||
// set the function logic
|
||||
if (type_FaBOsPR == 1)
|
||||
if (type_LpRkBxe == 1)
|
||||
{
|
||||
jQuery('#jform_intervention').closest('.control-group').show();
|
||||
}
|
||||
@ -78,55 +78,55 @@ function FaBOsPR(type_FaBOsPR)
|
||||
}
|
||||
}
|
||||
|
||||
// the zNGkyNr function
|
||||
function zNGkyNr(company_zNGkyNr)
|
||||
// the IcMhmLU function
|
||||
function IcMhmLU(company_IcMhmLU)
|
||||
{
|
||||
if (isSet(company_zNGkyNr) && company_zNGkyNr.constructor !== Array)
|
||||
if (isSet(company_IcMhmLU) && company_IcMhmLU.constructor !== Array)
|
||||
{
|
||||
var temp_zNGkyNr = company_zNGkyNr;
|
||||
var company_zNGkyNr = [];
|
||||
company_zNGkyNr.push(temp_zNGkyNr);
|
||||
var temp_IcMhmLU = company_IcMhmLU;
|
||||
var company_IcMhmLU = [];
|
||||
company_IcMhmLU.push(temp_IcMhmLU);
|
||||
}
|
||||
else if (!isSet(company_zNGkyNr))
|
||||
else if (!isSet(company_IcMhmLU))
|
||||
{
|
||||
var company_zNGkyNr = [];
|
||||
var company_IcMhmLU = [];
|
||||
}
|
||||
var company = company_zNGkyNr.some(company_zNGkyNr_SomeFunc);
|
||||
var company = company_IcMhmLU.some(company_IcMhmLU_SomeFunc);
|
||||
|
||||
|
||||
// set this function logic
|
||||
if (company)
|
||||
{
|
||||
jQuery('#jform_country').closest('.control-group').show();
|
||||
if (jform_zNGkyNrDJy_required)
|
||||
if (jform_IcMhmLUigE_required)
|
||||
{
|
||||
updateFieldRequired('country',0);
|
||||
jQuery('#jform_country').prop('required','required');
|
||||
jQuery('#jform_country').attr('aria-required',true);
|
||||
jQuery('#jform_country').addClass('required');
|
||||
jform_zNGkyNrDJy_required = false;
|
||||
jform_IcMhmLUigE_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_country').closest('.control-group').hide();
|
||||
if (!jform_zNGkyNrDJy_required)
|
||||
if (!jform_IcMhmLUigE_required)
|
||||
{
|
||||
updateFieldRequired('country',1);
|
||||
jQuery('#jform_country').removeAttr('required');
|
||||
jQuery('#jform_country').removeAttr('aria-required');
|
||||
jQuery('#jform_country').removeClass('required');
|
||||
jform_zNGkyNrDJy_required = true;
|
||||
jform_IcMhmLUigE_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the zNGkyNr Some function
|
||||
function company_zNGkyNr_SomeFunc(company_zNGkyNr)
|
||||
// the IcMhmLU Some function
|
||||
function company_IcMhmLU_SomeFunc(company_IcMhmLU)
|
||||
{
|
||||
// set the function logic
|
||||
if (company_zNGkyNr == 0)
|
||||
if (company_IcMhmLU == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -17,64 +17,64 @@
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// Some Global Values
|
||||
jform_RjkWaieBCR_required = false;
|
||||
jform_oZNUsPGVRM_required = false;
|
||||
|
||||
// Initial Script
|
||||
jQuery(document).ready(function()
|
||||
{
|
||||
var company_RjkWaie = jQuery("#jform_company").val();
|
||||
RjkWaie(company_RjkWaie);
|
||||
var company_oZNUsPG = jQuery("#jform_company").val();
|
||||
oZNUsPG(company_oZNUsPG);
|
||||
});
|
||||
|
||||
// the RjkWaie function
|
||||
function RjkWaie(company_RjkWaie)
|
||||
// the oZNUsPG function
|
||||
function oZNUsPG(company_oZNUsPG)
|
||||
{
|
||||
if (isSet(company_RjkWaie) && company_RjkWaie.constructor !== Array)
|
||||
if (isSet(company_oZNUsPG) && company_oZNUsPG.constructor !== Array)
|
||||
{
|
||||
var temp_RjkWaie = company_RjkWaie;
|
||||
var company_RjkWaie = [];
|
||||
company_RjkWaie.push(temp_RjkWaie);
|
||||
var temp_oZNUsPG = company_oZNUsPG;
|
||||
var company_oZNUsPG = [];
|
||||
company_oZNUsPG.push(temp_oZNUsPG);
|
||||
}
|
||||
else if (!isSet(company_RjkWaie))
|
||||
else if (!isSet(company_oZNUsPG))
|
||||
{
|
||||
var company_RjkWaie = [];
|
||||
var company_oZNUsPG = [];
|
||||
}
|
||||
var company = company_RjkWaie.some(company_RjkWaie_SomeFunc);
|
||||
var company = company_oZNUsPG.some(company_oZNUsPG_SomeFunc);
|
||||
|
||||
|
||||
// set this function logic
|
||||
if (company)
|
||||
{
|
||||
jQuery('#jform_country').closest('.control-group').show();
|
||||
if (jform_RjkWaieBCR_required)
|
||||
if (jform_oZNUsPGVRM_required)
|
||||
{
|
||||
updateFieldRequired('country',0);
|
||||
jQuery('#jform_country').prop('required','required');
|
||||
jQuery('#jform_country').attr('aria-required',true);
|
||||
jQuery('#jform_country').addClass('required');
|
||||
jform_RjkWaieBCR_required = false;
|
||||
jform_oZNUsPGVRM_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_country').closest('.control-group').hide();
|
||||
if (!jform_RjkWaieBCR_required)
|
||||
if (!jform_oZNUsPGVRM_required)
|
||||
{
|
||||
updateFieldRequired('country',1);
|
||||
jQuery('#jform_country').removeAttr('required');
|
||||
jQuery('#jform_country').removeAttr('aria-required');
|
||||
jQuery('#jform_country').removeClass('required');
|
||||
jform_RjkWaieBCR_required = true;
|
||||
jform_oZNUsPGVRM_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the RjkWaie Some function
|
||||
function company_RjkWaie_SomeFunc(company_RjkWaie)
|
||||
// the oZNUsPG Some function
|
||||
function company_oZNUsPG_SomeFunc(company_oZNUsPG)
|
||||
{
|
||||
// set the function logic
|
||||
if (company_RjkWaie == 0)
|
||||
if (company_oZNUsPG == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -143,33 +143,33 @@ $componentParams = JComponentHelper::getParams('com_costbenefitprojection');
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// #jform_department listeners for department_GbcdqOG function
|
||||
// #jform_department listeners for department_ChlKFlM function
|
||||
jQuery('#jform_department').on('keyup',function()
|
||||
{
|
||||
var department_GbcdqOG = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
GbcdqOG(department_GbcdqOG);
|
||||
var department_ChlKFlM = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
ChlKFlM(department_ChlKFlM);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_department',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var department_GbcdqOG = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
GbcdqOG(department_GbcdqOG);
|
||||
var department_ChlKFlM = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
ChlKFlM(department_ChlKFlM);
|
||||
|
||||
});
|
||||
|
||||
// #jform_department listeners for department_kIvNEDP function
|
||||
// #jform_department listeners for department_HwdjLtQ function
|
||||
jQuery('#jform_department').on('keyup',function()
|
||||
{
|
||||
var department_kIvNEDP = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
kIvNEDP(department_kIvNEDP);
|
||||
var department_HwdjLtQ = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
HwdjLtQ(department_HwdjLtQ);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_department',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var department_kIvNEDP = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
kIvNEDP(department_kIvNEDP);
|
||||
var department_HwdjLtQ = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
HwdjLtQ(department_HwdjLtQ);
|
||||
|
||||
});
|
||||
|
||||
|
@ -65,10 +65,10 @@ class CostbenefitprojectionViewCompany extends JViewLegacy
|
||||
}
|
||||
|
||||
// Get Linked view data
|
||||
$this->tmyscaling_factors = $this->get('Tmyscaling_factors');
|
||||
$this->uzwscaling_factors = $this->get('Uzwscaling_factors');
|
||||
|
||||
// Get Linked view data
|
||||
$this->oabinterventions = $this->get('Oabinterventions');
|
||||
$this->uhjinterventions = $this->get('Uhjinterventions');
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
|
@ -105,48 +105,48 @@ $componentParams = JComponentHelper::getParams('com_costbenefitprojection');
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// #jform_type listeners for type_lhGgsfC function
|
||||
// #jform_type listeners for type_BjxWJbr function
|
||||
jQuery('#jform_type').on('keyup',function()
|
||||
{
|
||||
var type_lhGgsfC = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
lhGgsfC(type_lhGgsfC);
|
||||
var type_BjxWJbr = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
BjxWJbr(type_BjxWJbr);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_type',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var type_lhGgsfC = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
lhGgsfC(type_lhGgsfC);
|
||||
var type_BjxWJbr = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
BjxWJbr(type_BjxWJbr);
|
||||
|
||||
});
|
||||
|
||||
// #jform_type listeners for type_FaBOsPR function
|
||||
// #jform_type listeners for type_LpRkBxe function
|
||||
jQuery('#jform_type').on('keyup',function()
|
||||
{
|
||||
var type_FaBOsPR = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
FaBOsPR(type_FaBOsPR);
|
||||
var type_LpRkBxe = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
LpRkBxe(type_LpRkBxe);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_type',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var type_FaBOsPR = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
FaBOsPR(type_FaBOsPR);
|
||||
var type_LpRkBxe = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
LpRkBxe(type_LpRkBxe);
|
||||
|
||||
});
|
||||
|
||||
// #jform_company listeners for company_zNGkyNr function
|
||||
// #jform_company listeners for company_IcMhmLU function
|
||||
jQuery('#jform_company').on('keyup',function()
|
||||
{
|
||||
var company_zNGkyNr = jQuery("#jform_company").val();
|
||||
zNGkyNr(company_zNGkyNr);
|
||||
var company_IcMhmLU = jQuery("#jform_company").val();
|
||||
IcMhmLU(company_IcMhmLU);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_company',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var company_zNGkyNr = jQuery("#jform_company").val();
|
||||
zNGkyNr(company_zNGkyNr);
|
||||
var company_IcMhmLU = jQuery("#jform_company").val();
|
||||
IcMhmLU(company_IcMhmLU);
|
||||
|
||||
});
|
||||
|
||||
|
@ -90,18 +90,18 @@ $componentParams = JComponentHelper::getParams('com_costbenefitprojection');
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// #jform_company listeners for company_RjkWaie function
|
||||
// #jform_company listeners for company_oZNUsPG function
|
||||
jQuery('#jform_company').on('keyup',function()
|
||||
{
|
||||
var company_RjkWaie = jQuery("#jform_company").val();
|
||||
RjkWaie(company_RjkWaie);
|
||||
var company_oZNUsPG = jQuery("#jform_company").val();
|
||||
oZNUsPG(company_oZNUsPG);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_company',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var company_RjkWaie = jQuery("#jform_company").val();
|
||||
RjkWaie(company_RjkWaie);
|
||||
var company_oZNUsPG = jQuery("#jform_company").val();
|
||||
oZNUsPG(company_oZNUsPG);
|
||||
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user