All other changes are only random variable name and date changes (due to automation)
This commit is contained in:
parent
8a0c229e49
commit
d35ad78d9d
@ -22,7 +22,7 @@
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// set the defaults
|
||||
$items = $displayData->fzxinterventions;
|
||||
$items = $displayData->anuinterventions;
|
||||
$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->kmcscaling_factors;
|
||||
$items = $displayData->hbvscaling_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->ottcompanies;
|
||||
$items = $displayData->nbccompanies;
|
||||
$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->bmwinterventions;
|
||||
$items = $displayData->owninterventions;
|
||||
$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->igvservice_providers;
|
||||
$items = $displayData->sjwservice_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->wqkcompanies;
|
||||
$items = $displayData->whbcompanies;
|
||||
$user = JFactory::getUser();
|
||||
$id = $displayData->item->id;
|
||||
$edit = "index.php?option=com_costbenefitprojection&view=companies&task=company.edit";
|
||||
|
@ -145,7 +145,7 @@ class CostbenefitprojectionModelCauserisk extends JModelAdmin
|
||||
$form->setFieldAttribute('ordering', 'filter', 'unset');
|
||||
$form->setFieldAttribute('published', 'filter', 'unset');
|
||||
}
|
||||
// If this is a new item insure the greated by is set
|
||||
// If this is a new item insure the greated by is set.
|
||||
if (0 == $id)
|
||||
{
|
||||
// Set the created_by to this user
|
||||
@ -293,7 +293,7 @@ class CostbenefitprojectionModelCauserisk extends JModelAdmin
|
||||
{
|
||||
$table->created = $date->toSql();
|
||||
// set the user
|
||||
if ($table->created_by == 0)
|
||||
if ($table->created_by == 0 || empty($table->created_by))
|
||||
{
|
||||
$table->created_by = $user->id;
|
||||
}
|
||||
|
@ -154,8 +154,8 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
|
||||
$item->tags->getTagIds($item->id, 'com_costbenefitprojection.company');
|
||||
}
|
||||
}
|
||||
$this->companymbsd = $item->id;
|
||||
$this->companyeilg = $item->id;
|
||||
$this->companyihwb = $item->id;
|
||||
$this->companykzki = $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 getKmcscaling_factors()
|
||||
public function getHbvscaling_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 companymbsd global.
|
||||
$companymbsd = $this->companymbsd;
|
||||
if (is_numeric($companymbsd ))
|
||||
// Filter by companyihwb global.
|
||||
$companyihwb = $this->companyihwb;
|
||||
if (is_numeric($companyihwb ))
|
||||
{
|
||||
$query->where('a.company = ' . (int) $companymbsd );
|
||||
$query->where('a.company = ' . (int) $companyihwb );
|
||||
}
|
||||
elseif (is_string($companymbsd))
|
||||
elseif (is_string($companyihwb))
|
||||
{
|
||||
$query->where('a.company = ' . $db->quote($companymbsd));
|
||||
$query->where('a.company = ' . $db->quote($companyihwb));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -255,7 +255,7 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
public function getFzxinterventions()
|
||||
public function getAnuinterventions()
|
||||
{
|
||||
// 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 companyeilg global.
|
||||
$companyeilg = $this->companyeilg;
|
||||
if (is_numeric($companyeilg ))
|
||||
// Filter by companykzki global.
|
||||
$companykzki = $this->companykzki;
|
||||
if (is_numeric($companykzki ))
|
||||
{
|
||||
$query->where('a.company = ' . (int) $companyeilg );
|
||||
$query->where('a.company = ' . (int) $companykzki );
|
||||
}
|
||||
elseif (is_string($companyeilg))
|
||||
elseif (is_string($companykzki))
|
||||
{
|
||||
$query->where('a.company = ' . $db->quote($companyeilg));
|
||||
$query->where('a.company = ' . $db->quote($companykzki));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -351,7 +351,7 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
// convert type
|
||||
$item->type = $this->selectionTranslationFzxinterventions($item->type, 'type');
|
||||
$item->type = $this->selectionTranslationAnuinterventions($item->type, 'type');
|
||||
}
|
||||
}
|
||||
|
||||
@ -365,7 +365,7 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
|
||||
*
|
||||
* @return translatable string
|
||||
*/
|
||||
public function selectionTranslationFzxinterventions($value,$name)
|
||||
public function selectionTranslationAnuinterventions($value,$name)
|
||||
{
|
||||
// Array of type language strings
|
||||
if ($name == 'type')
|
||||
@ -429,7 +429,7 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
|
||||
$form->setFieldAttribute('ordering', 'filter', 'unset');
|
||||
$form->setFieldAttribute('published', 'filter', 'unset');
|
||||
}
|
||||
// If this is a new item insure the greated by is set
|
||||
// If this is a new item insure the greated by is set.
|
||||
if (0 == $id)
|
||||
{
|
||||
// Set the created_by to this user
|
||||
@ -767,7 +767,7 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
|
||||
{
|
||||
$table->created = $date->toSql();
|
||||
// set the user
|
||||
if ($table->created_by == 0)
|
||||
if ($table->created_by == 0 || empty($table->created_by))
|
||||
{
|
||||
$table->created_by = $user->id;
|
||||
}
|
||||
|
@ -101,9 +101,9 @@ class CostbenefitprojectionModelCountry extends JModelAdmin
|
||||
$item->tags->getTagIds($item->id, 'com_costbenefitprojection.country');
|
||||
}
|
||||
}
|
||||
$this->countryzmlp = $item->id;
|
||||
$this->countryzqkx = $item->id;
|
||||
$this->countryngav = $item->id;
|
||||
$this->countryodro = $item->id;
|
||||
$this->countrydxmm = $item->id;
|
||||
$this->countryrjsj = $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 getBmwinterventions()
|
||||
public function getOwninterventions()
|
||||
{
|
||||
// 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 countryzmlp global.
|
||||
$countryzmlp = $this->countryzmlp;
|
||||
if (is_numeric($countryzmlp ))
|
||||
// Filter by countryodro global.
|
||||
$countryodro = $this->countryodro;
|
||||
if (is_numeric($countryodro ))
|
||||
{
|
||||
$query->where('a.country = ' . (int) $countryzmlp );
|
||||
$query->where('a.country = ' . (int) $countryodro );
|
||||
}
|
||||
elseif (is_string($countryzmlp))
|
||||
elseif (is_string($countryodro))
|
||||
{
|
||||
$query->where('a.country = ' . $db->quote($countryzmlp));
|
||||
$query->where('a.country = ' . $db->quote($countryodro));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -209,7 +209,7 @@ class CostbenefitprojectionModelCountry extends JModelAdmin
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
// convert type
|
||||
$item->type = $this->selectionTranslationBmwinterventions($item->type, 'type');
|
||||
$item->type = $this->selectionTranslationOwninterventions($item->type, 'type');
|
||||
}
|
||||
}
|
||||
|
||||
@ -223,7 +223,7 @@ class CostbenefitprojectionModelCountry extends JModelAdmin
|
||||
*
|
||||
* @return translatable string
|
||||
*/
|
||||
public function selectionTranslationBmwinterventions($value,$name)
|
||||
public function selectionTranslationOwninterventions($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 getIgvservice_providers()
|
||||
public function getSjwservice_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 countryzqkx global.
|
||||
$countryzqkx = $this->countryzqkx;
|
||||
if (is_numeric($countryzqkx ))
|
||||
// Filter by countrydxmm global.
|
||||
$countrydxmm = $this->countrydxmm;
|
||||
if (is_numeric($countrydxmm ))
|
||||
{
|
||||
$query->where('a.country = ' . (int) $countryzqkx );
|
||||
$query->where('a.country = ' . (int) $countrydxmm );
|
||||
}
|
||||
elseif (is_string($countryzqkx))
|
||||
elseif (is_string($countrydxmm))
|
||||
{
|
||||
$query->where('a.country = ' . $db->quote($countryzqkx));
|
||||
$query->where('a.country = ' . $db->quote($countrydxmm));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -336,7 +336,7 @@ class CostbenefitprojectionModelCountry extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
public function getOttcompanies()
|
||||
public function getNbccompanies()
|
||||
{
|
||||
// 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 countryngav global.
|
||||
$countryngav = $this->countryngav;
|
||||
if (is_numeric($countryngav ))
|
||||
// Filter by countryrjsj global.
|
||||
$countryrjsj = $this->countryrjsj;
|
||||
if (is_numeric($countryrjsj ))
|
||||
{
|
||||
$query->where('a.country = ' . (int) $countryngav );
|
||||
$query->where('a.country = ' . (int) $countryrjsj );
|
||||
}
|
||||
elseif (is_string($countryngav))
|
||||
elseif (is_string($countryrjsj))
|
||||
{
|
||||
$query->where('a.country = ' . $db->quote($countryngav));
|
||||
$query->where('a.country = ' . $db->quote($countryrjsj));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -442,9 +442,9 @@ class CostbenefitprojectionModelCountry extends JModelAdmin
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
// convert department
|
||||
$item->department = $this->selectionTranslationOttcompanies($item->department, 'department');
|
||||
$item->department = $this->selectionTranslationNbccompanies($item->department, 'department');
|
||||
// convert per
|
||||
$item->per = $this->selectionTranslationOttcompanies($item->per, 'per');
|
||||
$item->per = $this->selectionTranslationNbccompanies($item->per, 'per');
|
||||
}
|
||||
}
|
||||
|
||||
@ -458,7 +458,7 @@ class CostbenefitprojectionModelCountry extends JModelAdmin
|
||||
*
|
||||
* @return translatable string
|
||||
*/
|
||||
public function selectionTranslationOttcompanies($value,$name)
|
||||
public function selectionTranslationNbccompanies($value,$name)
|
||||
{
|
||||
// Array of department language strings
|
||||
if ($name == 'department')
|
||||
@ -535,7 +535,7 @@ class CostbenefitprojectionModelCountry extends JModelAdmin
|
||||
$form->setFieldAttribute('ordering', 'filter', 'unset');
|
||||
$form->setFieldAttribute('published', 'filter', 'unset');
|
||||
}
|
||||
// If this is a new item insure the greated by is set
|
||||
// If this is a new item insure the greated by is set.
|
||||
if (0 == $id)
|
||||
{
|
||||
// Set the created_by to this user
|
||||
@ -693,7 +693,7 @@ class CostbenefitprojectionModelCountry extends JModelAdmin
|
||||
{
|
||||
$table->created = $date->toSql();
|
||||
// set the user
|
||||
if ($table->created_by == 0)
|
||||
if ($table->created_by == 0 || empty($table->created_by))
|
||||
{
|
||||
$table->created_by = $user->id;
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ class CostbenefitprojectionModelCurrency extends JModelAdmin
|
||||
$form->setFieldAttribute('ordering', 'filter', 'unset');
|
||||
$form->setFieldAttribute('published', 'filter', 'unset');
|
||||
}
|
||||
// If this is a new item insure the greated by is set
|
||||
// If this is a new item insure the greated by is set.
|
||||
if (0 == $id)
|
||||
{
|
||||
// Set the created_by to this user
|
||||
@ -293,7 +293,7 @@ class CostbenefitprojectionModelCurrency extends JModelAdmin
|
||||
{
|
||||
$table->created = $date->toSql();
|
||||
// set the user
|
||||
if ($table->created_by == 0)
|
||||
if ($table->created_by == 0 || empty($table->created_by))
|
||||
{
|
||||
$table->created_by = $user->id;
|
||||
}
|
||||
|
@ -17,178 +17,178 @@
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// Some Global Values
|
||||
jform_wOtXSDyUHv_required = false;
|
||||
jform_wOtXSDyltm_required = false;
|
||||
jform_wOtXSDyxVM_required = false;
|
||||
jform_wOtXSDyNqx_required = false;
|
||||
jform_wOtXSDyior_required = false;
|
||||
jform_wOtXSDymVK_required = false;
|
||||
jform_wOtXSDyyrS_required = false;
|
||||
jform_PMWNSmETkT_required = false;
|
||||
jform_PMWNSmEvwG_required = false;
|
||||
jform_PMWNSmEMOM_required = false;
|
||||
jform_PMWNSmEEfk_required = false;
|
||||
jform_PMWNSmEUYy_required = false;
|
||||
jform_PMWNSmEWiq_required = false;
|
||||
jform_PMWNSmEOgA_required = false;
|
||||
|
||||
// Initial Script
|
||||
jQuery(document).ready(function()
|
||||
{
|
||||
var department_wOtXSDy = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
wOtXSDy(department_wOtXSDy);
|
||||
var department_PMWNSmE = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
PMWNSmE(department_PMWNSmE);
|
||||
|
||||
var department_QfTgSnf = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
QfTgSnf(department_QfTgSnf);
|
||||
var department_qzPeqNQ = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
qzPeqNQ(department_qzPeqNQ);
|
||||
});
|
||||
|
||||
// the wOtXSDy function
|
||||
function wOtXSDy(department_wOtXSDy)
|
||||
// the PMWNSmE function
|
||||
function PMWNSmE(department_PMWNSmE)
|
||||
{
|
||||
// set the function logic
|
||||
if (department_wOtXSDy == 2)
|
||||
if (department_PMWNSmE == 2)
|
||||
{
|
||||
jQuery('#jform_causesrisks').closest('.control-group').show();
|
||||
if (jform_wOtXSDyUHv_required)
|
||||
if (jform_PMWNSmETkT_required)
|
||||
{
|
||||
updateFieldRequired('causesrisks',0);
|
||||
jQuery('#jform_causesrisks').prop('required','required');
|
||||
jQuery('#jform_causesrisks').attr('aria-required',true);
|
||||
jQuery('#jform_causesrisks').addClass('required');
|
||||
jform_wOtXSDyUHv_required = false;
|
||||
jform_PMWNSmETkT_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_wOtXSDyltm_required)
|
||||
if (jform_PMWNSmEvwG_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_wOtXSDyltm_required = false;
|
||||
jform_PMWNSmEvwG_required = false;
|
||||
}
|
||||
|
||||
jQuery('#jform_medical_turnovers_females').closest('.control-group').show();
|
||||
if (jform_wOtXSDyxVM_required)
|
||||
if (jform_PMWNSmEMOM_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_wOtXSDyxVM_required = false;
|
||||
jform_PMWNSmEMOM_required = false;
|
||||
}
|
||||
|
||||
jQuery('#jform_medical_turnovers_males').closest('.control-group').show();
|
||||
if (jform_wOtXSDyNqx_required)
|
||||
if (jform_PMWNSmEEfk_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_wOtXSDyNqx_required = false;
|
||||
jform_PMWNSmEEfk_required = false;
|
||||
}
|
||||
|
||||
jQuery('#jform_sick_leave_females').closest('.control-group').show();
|
||||
if (jform_wOtXSDyior_required)
|
||||
if (jform_PMWNSmEUYy_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_wOtXSDyior_required = false;
|
||||
jform_PMWNSmEUYy_required = false;
|
||||
}
|
||||
|
||||
jQuery('#jform_sick_leave_males').closest('.control-group').show();
|
||||
if (jform_wOtXSDymVK_required)
|
||||
if (jform_PMWNSmEWiq_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_wOtXSDymVK_required = false;
|
||||
jform_PMWNSmEWiq_required = false;
|
||||
}
|
||||
|
||||
jQuery('#jform_total_healthcare').closest('.control-group').show();
|
||||
if (jform_wOtXSDyyrS_required)
|
||||
if (jform_PMWNSmEOgA_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_wOtXSDyyrS_required = false;
|
||||
jform_PMWNSmEOgA_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_causesrisks').closest('.control-group').hide();
|
||||
if (!jform_wOtXSDyUHv_required)
|
||||
if (!jform_PMWNSmETkT_required)
|
||||
{
|
||||
updateFieldRequired('causesrisks',1);
|
||||
jQuery('#jform_causesrisks').removeAttr('required');
|
||||
jQuery('#jform_causesrisks').removeAttr('aria-required');
|
||||
jQuery('#jform_causesrisks').removeClass('required');
|
||||
jform_wOtXSDyUHv_required = true;
|
||||
jform_PMWNSmETkT_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_wOtXSDyltm_required)
|
||||
if (!jform_PMWNSmEvwG_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_wOtXSDyltm_required = true;
|
||||
jform_PMWNSmEvwG_required = true;
|
||||
}
|
||||
jQuery('#jform_medical_turnovers_females').closest('.control-group').hide();
|
||||
if (!jform_wOtXSDyxVM_required)
|
||||
if (!jform_PMWNSmEMOM_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_wOtXSDyxVM_required = true;
|
||||
jform_PMWNSmEMOM_required = true;
|
||||
}
|
||||
jQuery('#jform_medical_turnovers_males').closest('.control-group').hide();
|
||||
if (!jform_wOtXSDyNqx_required)
|
||||
if (!jform_PMWNSmEEfk_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_wOtXSDyNqx_required = true;
|
||||
jform_PMWNSmEEfk_required = true;
|
||||
}
|
||||
jQuery('#jform_sick_leave_females').closest('.control-group').hide();
|
||||
if (!jform_wOtXSDyior_required)
|
||||
if (!jform_PMWNSmEUYy_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_wOtXSDyior_required = true;
|
||||
jform_PMWNSmEUYy_required = true;
|
||||
}
|
||||
jQuery('#jform_sick_leave_males').closest('.control-group').hide();
|
||||
if (!jform_wOtXSDymVK_required)
|
||||
if (!jform_PMWNSmEWiq_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_wOtXSDymVK_required = true;
|
||||
jform_PMWNSmEWiq_required = true;
|
||||
}
|
||||
jQuery('#jform_total_healthcare').closest('.control-group').hide();
|
||||
if (!jform_wOtXSDyyrS_required)
|
||||
if (!jform_PMWNSmEOgA_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_wOtXSDyyrS_required = true;
|
||||
jform_PMWNSmEOgA_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the QfTgSnf function
|
||||
function QfTgSnf(department_QfTgSnf)
|
||||
// the qzPeqNQ function
|
||||
function qzPeqNQ(department_qzPeqNQ)
|
||||
{
|
||||
// set the function logic
|
||||
if (department_QfTgSnf == 1)
|
||||
if (department_qzPeqNQ == 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_FpIPbneirK_required = false;
|
||||
jform_fgOCQzCsnx_required = false;
|
||||
jform_XzczrIMrYp_required = false;
|
||||
jform_BCMduNxxVN_required = false;
|
||||
jform_nAUNRuRYvC_required = false;
|
||||
jform_AoScEjXMUe_required = false;
|
||||
jform_FrqcCsFvQO_required = false;
|
||||
jform_TguOTheFhI_required = false;
|
||||
|
||||
// Initial Script
|
||||
jQuery(document).ready(function()
|
||||
{
|
||||
var location_zJdFpwB = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
zJdFpwB(location_zJdFpwB);
|
||||
var location_cMgRrgD = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
cMgRrgD(location_cMgRrgD);
|
||||
|
||||
var location_QLgZpKd = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
QLgZpKd(location_QLgZpKd);
|
||||
var location_nhJbrdp = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
nhJbrdp(location_nhJbrdp);
|
||||
|
||||
var type_FpIPbne = jQuery("#jform_type").val();
|
||||
FpIPbne(type_FpIPbne);
|
||||
var type_nAUNRuR = jQuery("#jform_type").val();
|
||||
nAUNRuR(type_nAUNRuR);
|
||||
|
||||
var type_fgOCQzC = jQuery("#jform_type").val();
|
||||
fgOCQzC(type_fgOCQzC);
|
||||
var type_AoScEjX = jQuery("#jform_type").val();
|
||||
AoScEjX(type_AoScEjX);
|
||||
|
||||
var type_XzczrIM = jQuery("#jform_type").val();
|
||||
XzczrIM(type_XzczrIM);
|
||||
var type_FrqcCsF = jQuery("#jform_type").val();
|
||||
FrqcCsF(type_FrqcCsF);
|
||||
|
||||
var target_BCMduNx = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
BCMduNx(target_BCMduNx);
|
||||
var target_TguOThe = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
TguOThe(target_TguOThe);
|
||||
});
|
||||
|
||||
// the zJdFpwB function
|
||||
function zJdFpwB(location_zJdFpwB)
|
||||
// the cMgRrgD function
|
||||
function cMgRrgD(location_cMgRrgD)
|
||||
{
|
||||
// set the function logic
|
||||
if (location_zJdFpwB == 1)
|
||||
if (location_cMgRrgD == 1)
|
||||
{
|
||||
jQuery('#jform_admin_view').closest('.control-group').show();
|
||||
}
|
||||
@ -58,11 +58,11 @@ function zJdFpwB(location_zJdFpwB)
|
||||
}
|
||||
}
|
||||
|
||||
// the QLgZpKd function
|
||||
function QLgZpKd(location_QLgZpKd)
|
||||
// the nhJbrdp function
|
||||
function nhJbrdp(location_nhJbrdp)
|
||||
{
|
||||
// set the function logic
|
||||
if (location_QLgZpKd == 2)
|
||||
if (location_nhJbrdp == 2)
|
||||
{
|
||||
jQuery('#jform_site_view').closest('.control-group').show();
|
||||
}
|
||||
@ -72,198 +72,198 @@ function QLgZpKd(location_QLgZpKd)
|
||||
}
|
||||
}
|
||||
|
||||
// the FpIPbne function
|
||||
function FpIPbne(type_FpIPbne)
|
||||
// the nAUNRuR function
|
||||
function nAUNRuR(type_nAUNRuR)
|
||||
{
|
||||
if (isSet(type_FpIPbne) && type_FpIPbne.constructor !== Array)
|
||||
if (isSet(type_nAUNRuR) && type_nAUNRuR.constructor !== Array)
|
||||
{
|
||||
var temp_FpIPbne = type_FpIPbne;
|
||||
var type_FpIPbne = [];
|
||||
type_FpIPbne.push(temp_FpIPbne);
|
||||
var temp_nAUNRuR = type_nAUNRuR;
|
||||
var type_nAUNRuR = [];
|
||||
type_nAUNRuR.push(temp_nAUNRuR);
|
||||
}
|
||||
else if (!isSet(type_FpIPbne))
|
||||
else if (!isSet(type_nAUNRuR))
|
||||
{
|
||||
var type_FpIPbne = [];
|
||||
var type_nAUNRuR = [];
|
||||
}
|
||||
var type = type_FpIPbne.some(type_FpIPbne_SomeFunc);
|
||||
var type = type_nAUNRuR.some(type_nAUNRuR_SomeFunc);
|
||||
|
||||
|
||||
// set this function logic
|
||||
if (type)
|
||||
{
|
||||
jQuery('#jform_url').closest('.control-group').show();
|
||||
if (jform_FpIPbneirK_required)
|
||||
if (jform_nAUNRuRYvC_required)
|
||||
{
|
||||
updateFieldRequired('url',0);
|
||||
jQuery('#jform_url').prop('required','required');
|
||||
jQuery('#jform_url').attr('aria-required',true);
|
||||
jQuery('#jform_url').addClass('required');
|
||||
jform_FpIPbneirK_required = false;
|
||||
jform_nAUNRuRYvC_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_url').closest('.control-group').hide();
|
||||
if (!jform_FpIPbneirK_required)
|
||||
if (!jform_nAUNRuRYvC_required)
|
||||
{
|
||||
updateFieldRequired('url',1);
|
||||
jQuery('#jform_url').removeAttr('required');
|
||||
jQuery('#jform_url').removeAttr('aria-required');
|
||||
jQuery('#jform_url').removeClass('required');
|
||||
jform_FpIPbneirK_required = true;
|
||||
jform_nAUNRuRYvC_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the FpIPbne Some function
|
||||
function type_FpIPbne_SomeFunc(type_FpIPbne)
|
||||
// the nAUNRuR Some function
|
||||
function type_nAUNRuR_SomeFunc(type_nAUNRuR)
|
||||
{
|
||||
// set the function logic
|
||||
if (type_FpIPbne == 3)
|
||||
if (type_nAUNRuR == 3)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// the fgOCQzC function
|
||||
function fgOCQzC(type_fgOCQzC)
|
||||
// the AoScEjX function
|
||||
function AoScEjX(type_AoScEjX)
|
||||
{
|
||||
if (isSet(type_fgOCQzC) && type_fgOCQzC.constructor !== Array)
|
||||
if (isSet(type_AoScEjX) && type_AoScEjX.constructor !== Array)
|
||||
{
|
||||
var temp_fgOCQzC = type_fgOCQzC;
|
||||
var type_fgOCQzC = [];
|
||||
type_fgOCQzC.push(temp_fgOCQzC);
|
||||
var temp_AoScEjX = type_AoScEjX;
|
||||
var type_AoScEjX = [];
|
||||
type_AoScEjX.push(temp_AoScEjX);
|
||||
}
|
||||
else if (!isSet(type_fgOCQzC))
|
||||
else if (!isSet(type_AoScEjX))
|
||||
{
|
||||
var type_fgOCQzC = [];
|
||||
var type_AoScEjX = [];
|
||||
}
|
||||
var type = type_fgOCQzC.some(type_fgOCQzC_SomeFunc);
|
||||
var type = type_AoScEjX.some(type_AoScEjX_SomeFunc);
|
||||
|
||||
|
||||
// set this function logic
|
||||
if (type)
|
||||
{
|
||||
jQuery('#jform_article').closest('.control-group').show();
|
||||
if (jform_fgOCQzCsnx_required)
|
||||
if (jform_AoScEjXMUe_required)
|
||||
{
|
||||
updateFieldRequired('article',0);
|
||||
jQuery('#jform_article').prop('required','required');
|
||||
jQuery('#jform_article').attr('aria-required',true);
|
||||
jQuery('#jform_article').addClass('required');
|
||||
jform_fgOCQzCsnx_required = false;
|
||||
jform_AoScEjXMUe_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_article').closest('.control-group').hide();
|
||||
if (!jform_fgOCQzCsnx_required)
|
||||
if (!jform_AoScEjXMUe_required)
|
||||
{
|
||||
updateFieldRequired('article',1);
|
||||
jQuery('#jform_article').removeAttr('required');
|
||||
jQuery('#jform_article').removeAttr('aria-required');
|
||||
jQuery('#jform_article').removeClass('required');
|
||||
jform_fgOCQzCsnx_required = true;
|
||||
jform_AoScEjXMUe_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the fgOCQzC Some function
|
||||
function type_fgOCQzC_SomeFunc(type_fgOCQzC)
|
||||
// the AoScEjX Some function
|
||||
function type_AoScEjX_SomeFunc(type_AoScEjX)
|
||||
{
|
||||
// set the function logic
|
||||
if (type_fgOCQzC == 1)
|
||||
if (type_AoScEjX == 1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// the XzczrIM function
|
||||
function XzczrIM(type_XzczrIM)
|
||||
// the FrqcCsF function
|
||||
function FrqcCsF(type_FrqcCsF)
|
||||
{
|
||||
if (isSet(type_XzczrIM) && type_XzczrIM.constructor !== Array)
|
||||
if (isSet(type_FrqcCsF) && type_FrqcCsF.constructor !== Array)
|
||||
{
|
||||
var temp_XzczrIM = type_XzczrIM;
|
||||
var type_XzczrIM = [];
|
||||
type_XzczrIM.push(temp_XzczrIM);
|
||||
var temp_FrqcCsF = type_FrqcCsF;
|
||||
var type_FrqcCsF = [];
|
||||
type_FrqcCsF.push(temp_FrqcCsF);
|
||||
}
|
||||
else if (!isSet(type_XzczrIM))
|
||||
else if (!isSet(type_FrqcCsF))
|
||||
{
|
||||
var type_XzczrIM = [];
|
||||
var type_FrqcCsF = [];
|
||||
}
|
||||
var type = type_XzczrIM.some(type_XzczrIM_SomeFunc);
|
||||
var type = type_FrqcCsF.some(type_FrqcCsF_SomeFunc);
|
||||
|
||||
|
||||
// set this function logic
|
||||
if (type)
|
||||
{
|
||||
jQuery('#jform_content-lbl').closest('.control-group').show();
|
||||
if (jform_XzczrIMrYp_required)
|
||||
if (jform_FrqcCsFvQO_required)
|
||||
{
|
||||
updateFieldRequired('content',0);
|
||||
jQuery('#jform_content').prop('required','required');
|
||||
jQuery('#jform_content').attr('aria-required',true);
|
||||
jQuery('#jform_content').addClass('required');
|
||||
jform_XzczrIMrYp_required = false;
|
||||
jform_FrqcCsFvQO_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_content-lbl').closest('.control-group').hide();
|
||||
if (!jform_XzczrIMrYp_required)
|
||||
if (!jform_FrqcCsFvQO_required)
|
||||
{
|
||||
updateFieldRequired('content',1);
|
||||
jQuery('#jform_content').removeAttr('required');
|
||||
jQuery('#jform_content').removeAttr('aria-required');
|
||||
jQuery('#jform_content').removeClass('required');
|
||||
jform_XzczrIMrYp_required = true;
|
||||
jform_FrqcCsFvQO_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the XzczrIM Some function
|
||||
function type_XzczrIM_SomeFunc(type_XzczrIM)
|
||||
// the FrqcCsF Some function
|
||||
function type_FrqcCsF_SomeFunc(type_FrqcCsF)
|
||||
{
|
||||
// set the function logic
|
||||
if (type_XzczrIM == 2)
|
||||
if (type_FrqcCsF == 2)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// the BCMduNx function
|
||||
function BCMduNx(target_BCMduNx)
|
||||
// the TguOThe function
|
||||
function TguOThe(target_TguOThe)
|
||||
{
|
||||
// set the function logic
|
||||
if (target_BCMduNx == 1)
|
||||
if (target_TguOThe == 1)
|
||||
{
|
||||
jQuery('#jform_groups').closest('.control-group').show();
|
||||
if (jform_BCMduNxxVN_required)
|
||||
if (jform_TguOTheFhI_required)
|
||||
{
|
||||
updateFieldRequired('groups',0);
|
||||
jQuery('#jform_groups').prop('required','required');
|
||||
jQuery('#jform_groups').attr('aria-required',true);
|
||||
jQuery('#jform_groups').addClass('required');
|
||||
jform_BCMduNxxVN_required = false;
|
||||
jform_TguOTheFhI_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_groups').closest('.control-group').hide();
|
||||
if (!jform_BCMduNxxVN_required)
|
||||
if (!jform_TguOTheFhI_required)
|
||||
{
|
||||
updateFieldRequired('groups',1);
|
||||
jQuery('#jform_groups').removeAttr('required');
|
||||
jQuery('#jform_groups').removeAttr('aria-required');
|
||||
jQuery('#jform_groups').removeClass('required');
|
||||
jform_BCMduNxxVN_required = true;
|
||||
jform_TguOTheFhI_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,58 +17,58 @@
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// Some Global Values
|
||||
jform_NAdDhyizvd_required = false;
|
||||
jform_heHZMbDJNS_required = false;
|
||||
jform_LZKQahRoCu_required = false;
|
||||
jform_ihFJQrCtrT_required = false;
|
||||
|
||||
// Initial Script
|
||||
jQuery(document).ready(function()
|
||||
{
|
||||
var type_NAdDhyi = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
NAdDhyi(type_NAdDhyi);
|
||||
var type_LZKQahR = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
LZKQahR(type_LZKQahR);
|
||||
|
||||
var type_sMxiLMq = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
sMxiLMq(type_sMxiLMq);
|
||||
var type_WDFtkAe = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
WDFtkAe(type_WDFtkAe);
|
||||
|
||||
var company_heHZMbD = jQuery("#jform_company").val();
|
||||
heHZMbD(company_heHZMbD);
|
||||
var company_ihFJQrC = jQuery("#jform_company").val();
|
||||
ihFJQrC(company_ihFJQrC);
|
||||
});
|
||||
|
||||
// the NAdDhyi function
|
||||
function NAdDhyi(type_NAdDhyi)
|
||||
// the LZKQahR function
|
||||
function LZKQahR(type_LZKQahR)
|
||||
{
|
||||
// set the function logic
|
||||
if (type_NAdDhyi == 2)
|
||||
if (type_LZKQahR == 2)
|
||||
{
|
||||
jQuery('#jform_interventions').closest('.control-group').show();
|
||||
if (jform_NAdDhyizvd_required)
|
||||
if (jform_LZKQahRoCu_required)
|
||||
{
|
||||
updateFieldRequired('interventions',0);
|
||||
jQuery('#jform_interventions').prop('required','required');
|
||||
jQuery('#jform_interventions').attr('aria-required',true);
|
||||
jQuery('#jform_interventions').addClass('required');
|
||||
jform_NAdDhyizvd_required = false;
|
||||
jform_LZKQahRoCu_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_interventions').closest('.control-group').hide();
|
||||
if (!jform_NAdDhyizvd_required)
|
||||
if (!jform_LZKQahRoCu_required)
|
||||
{
|
||||
updateFieldRequired('interventions',1);
|
||||
jQuery('#jform_interventions').removeAttr('required');
|
||||
jQuery('#jform_interventions').removeAttr('aria-required');
|
||||
jQuery('#jform_interventions').removeClass('required');
|
||||
jform_NAdDhyizvd_required = true;
|
||||
jform_LZKQahRoCu_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the sMxiLMq function
|
||||
function sMxiLMq(type_sMxiLMq)
|
||||
// the WDFtkAe function
|
||||
function WDFtkAe(type_WDFtkAe)
|
||||
{
|
||||
// set the function logic
|
||||
if (type_sMxiLMq == 1)
|
||||
if (type_WDFtkAe == 1)
|
||||
{
|
||||
jQuery('#jform_intervention').closest('.control-group').show();
|
||||
}
|
||||
@ -78,55 +78,55 @@ function sMxiLMq(type_sMxiLMq)
|
||||
}
|
||||
}
|
||||
|
||||
// the heHZMbD function
|
||||
function heHZMbD(company_heHZMbD)
|
||||
// the ihFJQrC function
|
||||
function ihFJQrC(company_ihFJQrC)
|
||||
{
|
||||
if (isSet(company_heHZMbD) && company_heHZMbD.constructor !== Array)
|
||||
if (isSet(company_ihFJQrC) && company_ihFJQrC.constructor !== Array)
|
||||
{
|
||||
var temp_heHZMbD = company_heHZMbD;
|
||||
var company_heHZMbD = [];
|
||||
company_heHZMbD.push(temp_heHZMbD);
|
||||
var temp_ihFJQrC = company_ihFJQrC;
|
||||
var company_ihFJQrC = [];
|
||||
company_ihFJQrC.push(temp_ihFJQrC);
|
||||
}
|
||||
else if (!isSet(company_heHZMbD))
|
||||
else if (!isSet(company_ihFJQrC))
|
||||
{
|
||||
var company_heHZMbD = [];
|
||||
var company_ihFJQrC = [];
|
||||
}
|
||||
var company = company_heHZMbD.some(company_heHZMbD_SomeFunc);
|
||||
var company = company_ihFJQrC.some(company_ihFJQrC_SomeFunc);
|
||||
|
||||
|
||||
// set this function logic
|
||||
if (company)
|
||||
{
|
||||
jQuery('#jform_country').closest('.control-group').show();
|
||||
if (jform_heHZMbDJNS_required)
|
||||
if (jform_ihFJQrCtrT_required)
|
||||
{
|
||||
updateFieldRequired('country',0);
|
||||
jQuery('#jform_country').prop('required','required');
|
||||
jQuery('#jform_country').attr('aria-required',true);
|
||||
jQuery('#jform_country').addClass('required');
|
||||
jform_heHZMbDJNS_required = false;
|
||||
jform_ihFJQrCtrT_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_country').closest('.control-group').hide();
|
||||
if (!jform_heHZMbDJNS_required)
|
||||
if (!jform_ihFJQrCtrT_required)
|
||||
{
|
||||
updateFieldRequired('country',1);
|
||||
jQuery('#jform_country').removeAttr('required');
|
||||
jQuery('#jform_country').removeAttr('aria-required');
|
||||
jQuery('#jform_country').removeClass('required');
|
||||
jform_heHZMbDJNS_required = true;
|
||||
jform_ihFJQrCtrT_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the heHZMbD Some function
|
||||
function company_heHZMbD_SomeFunc(company_heHZMbD)
|
||||
// the ihFJQrC Some function
|
||||
function company_ihFJQrC_SomeFunc(company_ihFJQrC)
|
||||
{
|
||||
// set the function logic
|
||||
if (company_heHZMbD == 0)
|
||||
if (company_ihFJQrC == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -17,64 +17,64 @@
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// Some Global Values
|
||||
jform_KuwbJuPTpY_required = false;
|
||||
jform_LJQDUtNAlQ_required = false;
|
||||
|
||||
// Initial Script
|
||||
jQuery(document).ready(function()
|
||||
{
|
||||
var company_KuwbJuP = jQuery("#jform_company").val();
|
||||
KuwbJuP(company_KuwbJuP);
|
||||
var company_LJQDUtN = jQuery("#jform_company").val();
|
||||
LJQDUtN(company_LJQDUtN);
|
||||
});
|
||||
|
||||
// the KuwbJuP function
|
||||
function KuwbJuP(company_KuwbJuP)
|
||||
// the LJQDUtN function
|
||||
function LJQDUtN(company_LJQDUtN)
|
||||
{
|
||||
if (isSet(company_KuwbJuP) && company_KuwbJuP.constructor !== Array)
|
||||
if (isSet(company_LJQDUtN) && company_LJQDUtN.constructor !== Array)
|
||||
{
|
||||
var temp_KuwbJuP = company_KuwbJuP;
|
||||
var company_KuwbJuP = [];
|
||||
company_KuwbJuP.push(temp_KuwbJuP);
|
||||
var temp_LJQDUtN = company_LJQDUtN;
|
||||
var company_LJQDUtN = [];
|
||||
company_LJQDUtN.push(temp_LJQDUtN);
|
||||
}
|
||||
else if (!isSet(company_KuwbJuP))
|
||||
else if (!isSet(company_LJQDUtN))
|
||||
{
|
||||
var company_KuwbJuP = [];
|
||||
var company_LJQDUtN = [];
|
||||
}
|
||||
var company = company_KuwbJuP.some(company_KuwbJuP_SomeFunc);
|
||||
var company = company_LJQDUtN.some(company_LJQDUtN_SomeFunc);
|
||||
|
||||
|
||||
// set this function logic
|
||||
if (company)
|
||||
{
|
||||
jQuery('#jform_country').closest('.control-group').show();
|
||||
if (jform_KuwbJuPTpY_required)
|
||||
if (jform_LJQDUtNAlQ_required)
|
||||
{
|
||||
updateFieldRequired('country',0);
|
||||
jQuery('#jform_country').prop('required','required');
|
||||
jQuery('#jform_country').attr('aria-required',true);
|
||||
jQuery('#jform_country').addClass('required');
|
||||
jform_KuwbJuPTpY_required = false;
|
||||
jform_LJQDUtNAlQ_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_country').closest('.control-group').hide();
|
||||
if (!jform_KuwbJuPTpY_required)
|
||||
if (!jform_LJQDUtNAlQ_required)
|
||||
{
|
||||
updateFieldRequired('country',1);
|
||||
jQuery('#jform_country').removeAttr('required');
|
||||
jQuery('#jform_country').removeAttr('aria-required');
|
||||
jQuery('#jform_country').removeClass('required');
|
||||
jform_KuwbJuPTpY_required = true;
|
||||
jform_LJQDUtNAlQ_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the KuwbJuP Some function
|
||||
function company_KuwbJuP_SomeFunc(company_KuwbJuP)
|
||||
// the LJQDUtN Some function
|
||||
function company_LJQDUtN_SomeFunc(company_LJQDUtN)
|
||||
{
|
||||
// set the function logic
|
||||
if (company_KuwbJuP == 0)
|
||||
if (company_LJQDUtN == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ class CostbenefitprojectionModelHealth_data extends JModelAdmin
|
||||
$form->setFieldAttribute('ordering', 'filter', 'unset');
|
||||
$form->setFieldAttribute('published', 'filter', 'unset');
|
||||
}
|
||||
// If this is a new item insure the greated by is set
|
||||
// If this is a new item insure the greated by is set.
|
||||
if (0 == $id)
|
||||
{
|
||||
// Set the created_by to this user
|
||||
@ -428,7 +428,7 @@ class CostbenefitprojectionModelHealth_data extends JModelAdmin
|
||||
{
|
||||
$table->created = $date->toSql();
|
||||
// set the user
|
||||
if ($table->created_by == 0)
|
||||
if ($table->created_by == 0 || empty($table->created_by))
|
||||
{
|
||||
$table->created_by = $user->id;
|
||||
}
|
||||
|
@ -151,7 +151,7 @@ class CostbenefitprojectionModelHelp_document extends JModelAdmin
|
||||
$form->setFieldAttribute('ordering', 'filter', 'unset');
|
||||
$form->setFieldAttribute('published', 'filter', 'unset');
|
||||
}
|
||||
// If this is a new item insure the greated by is set
|
||||
// If this is a new item insure the greated by is set.
|
||||
if (0 == $id)
|
||||
{
|
||||
// Set the created_by to this user
|
||||
@ -299,7 +299,7 @@ class CostbenefitprojectionModelHelp_document extends JModelAdmin
|
||||
{
|
||||
$table->created = $date->toSql();
|
||||
// set the user
|
||||
if ($table->created_by == 0)
|
||||
if ($table->created_by == 0 || empty($table->created_by))
|
||||
{
|
||||
$table->created_by = $user->id;
|
||||
}
|
||||
|
@ -151,7 +151,7 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin
|
||||
$form->setFieldAttribute('ordering', 'filter', 'unset');
|
||||
$form->setFieldAttribute('published', 'filter', 'unset');
|
||||
}
|
||||
// If this is a new item insure the greated by is set
|
||||
// If this is a new item insure the greated by is set.
|
||||
if (0 == $id)
|
||||
{
|
||||
// Set the created_by to this user
|
||||
@ -315,7 +315,7 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin
|
||||
{
|
||||
$table->created = $date->toSql();
|
||||
// set the user
|
||||
if ($table->created_by == 0)
|
||||
if ($table->created_by == 0 || empty($table->created_by))
|
||||
{
|
||||
$table->created_by = $user->id;
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin
|
||||
$form->setFieldAttribute('ordering', 'filter', 'unset');
|
||||
$form->setFieldAttribute('published', 'filter', 'unset');
|
||||
}
|
||||
// If this is a new item insure the greated by is set
|
||||
// If this is a new item insure the greated by is set.
|
||||
if (0 == $id)
|
||||
{
|
||||
// Set the created_by to this user
|
||||
@ -303,7 +303,7 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin
|
||||
{
|
||||
$table->created = $date->toSql();
|
||||
// set the user
|
||||
if ($table->created_by == 0)
|
||||
if ($table->created_by == 0 || empty($table->created_by))
|
||||
{
|
||||
$table->created_by = $user->id;
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ class CostbenefitprojectionModelService_provider extends JModelAdmin
|
||||
$item->tags->getTagIds($item->id, 'com_costbenefitprojection.service_provider');
|
||||
}
|
||||
}
|
||||
$this->service_providerfted = $item->id;
|
||||
$this->service_providerrdrr = $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 getWqkcompanies()
|
||||
public function getWhbcompanies()
|
||||
{
|
||||
// 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_providerfted global.
|
||||
$service_providerfted = $this->service_providerfted;
|
||||
if (is_numeric($service_providerfted ))
|
||||
// Filter by service_providerrdrr global.
|
||||
$service_providerrdrr = $this->service_providerrdrr;
|
||||
if (is_numeric($service_providerrdrr ))
|
||||
{
|
||||
$query->where('a.service_provider = ' . (int) $service_providerfted );
|
||||
$query->where('a.service_provider = ' . (int) $service_providerrdrr );
|
||||
}
|
||||
elseif (is_string($service_providerfted))
|
||||
elseif (is_string($service_providerrdrr))
|
||||
{
|
||||
$query->where('a.service_provider = ' . $db->quote($service_providerfted));
|
||||
$query->where('a.service_provider = ' . $db->quote($service_providerrdrr));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -211,9 +211,9 @@ class CostbenefitprojectionModelService_provider extends JModelAdmin
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
// convert department
|
||||
$item->department = $this->selectionTranslationWqkcompanies($item->department, 'department');
|
||||
$item->department = $this->selectionTranslationWhbcompanies($item->department, 'department');
|
||||
// convert per
|
||||
$item->per = $this->selectionTranslationWqkcompanies($item->per, 'per');
|
||||
$item->per = $this->selectionTranslationWhbcompanies($item->per, 'per');
|
||||
}
|
||||
}
|
||||
|
||||
@ -227,7 +227,7 @@ class CostbenefitprojectionModelService_provider extends JModelAdmin
|
||||
*
|
||||
* @return translatable string
|
||||
*/
|
||||
public function selectionTranslationWqkcompanies($value,$name)
|
||||
public function selectionTranslationWhbcompanies($value,$name)
|
||||
{
|
||||
// Array of department language strings
|
||||
if ($name == 'department')
|
||||
@ -304,7 +304,7 @@ class CostbenefitprojectionModelService_provider extends JModelAdmin
|
||||
$form->setFieldAttribute('ordering', 'filter', 'unset');
|
||||
$form->setFieldAttribute('published', 'filter', 'unset');
|
||||
}
|
||||
// If this is a new item insure the greated by is set
|
||||
// If this is a new item insure the greated by is set.
|
||||
if (0 == $id)
|
||||
{
|
||||
// Set the created_by to this user
|
||||
@ -461,7 +461,7 @@ class CostbenefitprojectionModelService_provider extends JModelAdmin
|
||||
{
|
||||
$table->created = $date->toSql();
|
||||
// set the user
|
||||
if ($table->created_by == 0)
|
||||
if ($table->created_by == 0 || empty($table->created_by))
|
||||
{
|
||||
$table->created_by = $user->id;
|
||||
}
|
||||
|
@ -141,33 +141,33 @@ $componentParams = JComponentHelper::getParams('com_costbenefitprojection');
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// #jform_department listeners for department_wOtXSDy function
|
||||
// #jform_department listeners for department_PMWNSmE function
|
||||
jQuery('#jform_department').on('keyup',function()
|
||||
{
|
||||
var department_wOtXSDy = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
wOtXSDy(department_wOtXSDy);
|
||||
var department_PMWNSmE = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
PMWNSmE(department_PMWNSmE);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_department',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var department_wOtXSDy = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
wOtXSDy(department_wOtXSDy);
|
||||
var department_PMWNSmE = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
PMWNSmE(department_PMWNSmE);
|
||||
|
||||
});
|
||||
|
||||
// #jform_department listeners for department_QfTgSnf function
|
||||
// #jform_department listeners for department_qzPeqNQ function
|
||||
jQuery('#jform_department').on('keyup',function()
|
||||
{
|
||||
var department_QfTgSnf = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
QfTgSnf(department_QfTgSnf);
|
||||
var department_qzPeqNQ = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
qzPeqNQ(department_qzPeqNQ);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_department',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var department_QfTgSnf = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
QfTgSnf(department_QfTgSnf);
|
||||
var department_qzPeqNQ = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
qzPeqNQ(department_qzPeqNQ);
|
||||
|
||||
});
|
||||
|
||||
|
@ -65,10 +65,10 @@ class CostbenefitprojectionViewCompany extends JViewLegacy
|
||||
}
|
||||
|
||||
// Get Linked view data
|
||||
$this->kmcscaling_factors = $this->get('Kmcscaling_factors');
|
||||
$this->hbvscaling_factors = $this->get('Hbvscaling_factors');
|
||||
|
||||
// Get Linked view data
|
||||
$this->fzxinterventions = $this->get('Fzxinterventions');
|
||||
$this->anuinterventions = $this->get('Anuinterventions');
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
|
@ -65,13 +65,13 @@ class CostbenefitprojectionViewCountry extends JViewLegacy
|
||||
}
|
||||
|
||||
// Get Linked view data
|
||||
$this->bmwinterventions = $this->get('Bmwinterventions');
|
||||
$this->owninterventions = $this->get('Owninterventions');
|
||||
|
||||
// Get Linked view data
|
||||
$this->igvservice_providers = $this->get('Igvservice_providers');
|
||||
$this->sjwservice_providers = $this->get('Sjwservice_providers');
|
||||
|
||||
// Get Linked view data
|
||||
$this->ottcompanies = $this->get('Ottcompanies');
|
||||
$this->nbccompanies = $this->get('Nbccompanies');
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
|
@ -96,93 +96,93 @@ $componentParams = JComponentHelper::getParams('com_costbenefitprojection');
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// #jform_location listeners for location_zJdFpwB function
|
||||
// #jform_location listeners for location_cMgRrgD function
|
||||
jQuery('#jform_location').on('keyup',function()
|
||||
{
|
||||
var location_zJdFpwB = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
zJdFpwB(location_zJdFpwB);
|
||||
var location_cMgRrgD = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
cMgRrgD(location_cMgRrgD);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_location',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var location_zJdFpwB = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
zJdFpwB(location_zJdFpwB);
|
||||
var location_cMgRrgD = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
cMgRrgD(location_cMgRrgD);
|
||||
|
||||
});
|
||||
|
||||
// #jform_location listeners for location_QLgZpKd function
|
||||
// #jform_location listeners for location_nhJbrdp function
|
||||
jQuery('#jform_location').on('keyup',function()
|
||||
{
|
||||
var location_QLgZpKd = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
QLgZpKd(location_QLgZpKd);
|
||||
var location_nhJbrdp = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
nhJbrdp(location_nhJbrdp);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_location',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var location_QLgZpKd = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
QLgZpKd(location_QLgZpKd);
|
||||
var location_nhJbrdp = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
nhJbrdp(location_nhJbrdp);
|
||||
|
||||
});
|
||||
|
||||
// #jform_type listeners for type_FpIPbne function
|
||||
// #jform_type listeners for type_nAUNRuR function
|
||||
jQuery('#jform_type').on('keyup',function()
|
||||
{
|
||||
var type_FpIPbne = jQuery("#jform_type").val();
|
||||
FpIPbne(type_FpIPbne);
|
||||
var type_nAUNRuR = jQuery("#jform_type").val();
|
||||
nAUNRuR(type_nAUNRuR);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_type',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var type_FpIPbne = jQuery("#jform_type").val();
|
||||
FpIPbne(type_FpIPbne);
|
||||
var type_nAUNRuR = jQuery("#jform_type").val();
|
||||
nAUNRuR(type_nAUNRuR);
|
||||
|
||||
});
|
||||
|
||||
// #jform_type listeners for type_fgOCQzC function
|
||||
// #jform_type listeners for type_AoScEjX function
|
||||
jQuery('#jform_type').on('keyup',function()
|
||||
{
|
||||
var type_fgOCQzC = jQuery("#jform_type").val();
|
||||
fgOCQzC(type_fgOCQzC);
|
||||
var type_AoScEjX = jQuery("#jform_type").val();
|
||||
AoScEjX(type_AoScEjX);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_type',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var type_fgOCQzC = jQuery("#jform_type").val();
|
||||
fgOCQzC(type_fgOCQzC);
|
||||
var type_AoScEjX = jQuery("#jform_type").val();
|
||||
AoScEjX(type_AoScEjX);
|
||||
|
||||
});
|
||||
|
||||
// #jform_type listeners for type_XzczrIM function
|
||||
// #jform_type listeners for type_FrqcCsF function
|
||||
jQuery('#jform_type').on('keyup',function()
|
||||
{
|
||||
var type_XzczrIM = jQuery("#jform_type").val();
|
||||
XzczrIM(type_XzczrIM);
|
||||
var type_FrqcCsF = jQuery("#jform_type").val();
|
||||
FrqcCsF(type_FrqcCsF);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_type',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var type_XzczrIM = jQuery("#jform_type").val();
|
||||
XzczrIM(type_XzczrIM);
|
||||
var type_FrqcCsF = jQuery("#jform_type").val();
|
||||
FrqcCsF(type_FrqcCsF);
|
||||
|
||||
});
|
||||
|
||||
// #jform_target listeners for target_BCMduNx function
|
||||
// #jform_target listeners for target_TguOThe function
|
||||
jQuery('#jform_target').on('keyup',function()
|
||||
{
|
||||
var target_BCMduNx = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
BCMduNx(target_BCMduNx);
|
||||
var target_TguOThe = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
TguOThe(target_TguOThe);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_target',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var target_BCMduNx = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
BCMduNx(target_BCMduNx);
|
||||
var target_TguOThe = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
TguOThe(target_TguOThe);
|
||||
|
||||
});
|
||||
|
||||
|
@ -103,48 +103,48 @@ $componentParams = JComponentHelper::getParams('com_costbenefitprojection');
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// #jform_type listeners for type_NAdDhyi function
|
||||
// #jform_type listeners for type_LZKQahR function
|
||||
jQuery('#jform_type').on('keyup',function()
|
||||
{
|
||||
var type_NAdDhyi = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
NAdDhyi(type_NAdDhyi);
|
||||
var type_LZKQahR = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
LZKQahR(type_LZKQahR);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_type',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var type_NAdDhyi = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
NAdDhyi(type_NAdDhyi);
|
||||
var type_LZKQahR = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
LZKQahR(type_LZKQahR);
|
||||
|
||||
});
|
||||
|
||||
// #jform_type listeners for type_sMxiLMq function
|
||||
// #jform_type listeners for type_WDFtkAe function
|
||||
jQuery('#jform_type').on('keyup',function()
|
||||
{
|
||||
var type_sMxiLMq = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
sMxiLMq(type_sMxiLMq);
|
||||
var type_WDFtkAe = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
WDFtkAe(type_WDFtkAe);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_type',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var type_sMxiLMq = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
sMxiLMq(type_sMxiLMq);
|
||||
var type_WDFtkAe = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
WDFtkAe(type_WDFtkAe);
|
||||
|
||||
});
|
||||
|
||||
// #jform_company listeners for company_heHZMbD function
|
||||
// #jform_company listeners for company_ihFJQrC function
|
||||
jQuery('#jform_company').on('keyup',function()
|
||||
{
|
||||
var company_heHZMbD = jQuery("#jform_company").val();
|
||||
heHZMbD(company_heHZMbD);
|
||||
var company_ihFJQrC = jQuery("#jform_company").val();
|
||||
ihFJQrC(company_ihFJQrC);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_company',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var company_heHZMbD = jQuery("#jform_company").val();
|
||||
heHZMbD(company_heHZMbD);
|
||||
var company_ihFJQrC = jQuery("#jform_company").val();
|
||||
ihFJQrC(company_ihFJQrC);
|
||||
|
||||
});
|
||||
|
||||
|
@ -88,18 +88,18 @@ $componentParams = JComponentHelper::getParams('com_costbenefitprojection');
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// #jform_company listeners for company_KuwbJuP function
|
||||
// #jform_company listeners for company_LJQDUtN function
|
||||
jQuery('#jform_company').on('keyup',function()
|
||||
{
|
||||
var company_KuwbJuP = jQuery("#jform_company").val();
|
||||
KuwbJuP(company_KuwbJuP);
|
||||
var company_LJQDUtN = jQuery("#jform_company").val();
|
||||
LJQDUtN(company_LJQDUtN);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_company',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var company_KuwbJuP = jQuery("#jform_company").val();
|
||||
KuwbJuP(company_KuwbJuP);
|
||||
var company_LJQDUtN = jQuery("#jform_company").val();
|
||||
LJQDUtN(company_LJQDUtN);
|
||||
|
||||
});
|
||||
|
||||
|
@ -65,7 +65,7 @@ class CostbenefitprojectionViewService_provider extends JViewLegacy
|
||||
}
|
||||
|
||||
// Get Linked view data
|
||||
$this->wqkcompanies = $this->get('Wqkcompanies');
|
||||
$this->whbcompanies = $this->get('Whbcompanies');
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
|
@ -22,7 +22,7 @@
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// set the defaults
|
||||
$items = $displayData->fzxinterventions;
|
||||
$items = $displayData->anuinterventions;
|
||||
$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->kmcscaling_factors;
|
||||
$items = $displayData->hbvscaling_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->companymbsd = $item->id;
|
||||
$this->companyeilg = $item->id;
|
||||
$this->companyihwb = $item->id;
|
||||
$this->companykzki = $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 getKmcscaling_factors()
|
||||
public function getHbvscaling_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 companymbsd global.
|
||||
$companymbsd = $this->companymbsd;
|
||||
if (is_numeric($companymbsd ))
|
||||
// Filter by companyihwb global.
|
||||
$companyihwb = $this->companyihwb;
|
||||
if (is_numeric($companyihwb ))
|
||||
{
|
||||
$query->where('a.company = ' . (int) $companymbsd );
|
||||
$query->where('a.company = ' . (int) $companyihwb );
|
||||
}
|
||||
elseif (is_string($companymbsd))
|
||||
elseif (is_string($companyihwb))
|
||||
{
|
||||
$query->where('a.company = ' . $db->quote($companymbsd));
|
||||
$query->where('a.company = ' . $db->quote($companyihwb));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -255,7 +255,7 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
public function getFzxinterventions()
|
||||
public function getAnuinterventions()
|
||||
{
|
||||
// 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 companyeilg global.
|
||||
$companyeilg = $this->companyeilg;
|
||||
if (is_numeric($companyeilg ))
|
||||
// Filter by companykzki global.
|
||||
$companykzki = $this->companykzki;
|
||||
if (is_numeric($companykzki ))
|
||||
{
|
||||
$query->where('a.company = ' . (int) $companyeilg );
|
||||
$query->where('a.company = ' . (int) $companykzki );
|
||||
}
|
||||
elseif (is_string($companyeilg))
|
||||
elseif (is_string($companykzki))
|
||||
{
|
||||
$query->where('a.company = ' . $db->quote($companyeilg));
|
||||
$query->where('a.company = ' . $db->quote($companykzki));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -351,7 +351,7 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
// convert type
|
||||
$item->type = $this->selectionTranslationFzxinterventions($item->type, 'type');
|
||||
$item->type = $this->selectionTranslationAnuinterventions($item->type, 'type');
|
||||
}
|
||||
}
|
||||
|
||||
@ -365,7 +365,7 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
|
||||
*
|
||||
* @return translatable string
|
||||
*/
|
||||
public function selectionTranslationFzxinterventions($value,$name)
|
||||
public function selectionTranslationAnuinterventions($value,$name)
|
||||
{
|
||||
// Array of type language strings
|
||||
if ($name == 'type')
|
||||
@ -429,7 +429,7 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
|
||||
$form->setFieldAttribute('ordering', 'filter', 'unset');
|
||||
$form->setFieldAttribute('published', 'filter', 'unset');
|
||||
}
|
||||
// If this is a new item insure the greated by is set
|
||||
// If this is a new item insure the greated by is set.
|
||||
if (0 == $id)
|
||||
{
|
||||
// Set the created_by to this user
|
||||
@ -767,7 +767,7 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
|
||||
{
|
||||
$table->created = $date->toSql();
|
||||
// set the user
|
||||
if ($table->created_by == 0)
|
||||
if ($table->created_by == 0 || empty($table->created_by))
|
||||
{
|
||||
$table->created_by = $user->id;
|
||||
}
|
||||
|
@ -17,178 +17,178 @@
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// Some Global Values
|
||||
jform_wOtXSDyUHv_required = false;
|
||||
jform_wOtXSDyltm_required = false;
|
||||
jform_wOtXSDyxVM_required = false;
|
||||
jform_wOtXSDyNqx_required = false;
|
||||
jform_wOtXSDyior_required = false;
|
||||
jform_wOtXSDymVK_required = false;
|
||||
jform_wOtXSDyyrS_required = false;
|
||||
jform_PMWNSmETkT_required = false;
|
||||
jform_PMWNSmEvwG_required = false;
|
||||
jform_PMWNSmEMOM_required = false;
|
||||
jform_PMWNSmEEfk_required = false;
|
||||
jform_PMWNSmEUYy_required = false;
|
||||
jform_PMWNSmEWiq_required = false;
|
||||
jform_PMWNSmEOgA_required = false;
|
||||
|
||||
// Initial Script
|
||||
jQuery(document).ready(function()
|
||||
{
|
||||
var department_wOtXSDy = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
wOtXSDy(department_wOtXSDy);
|
||||
var department_PMWNSmE = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
PMWNSmE(department_PMWNSmE);
|
||||
|
||||
var department_QfTgSnf = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
QfTgSnf(department_QfTgSnf);
|
||||
var department_qzPeqNQ = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
qzPeqNQ(department_qzPeqNQ);
|
||||
});
|
||||
|
||||
// the wOtXSDy function
|
||||
function wOtXSDy(department_wOtXSDy)
|
||||
// the PMWNSmE function
|
||||
function PMWNSmE(department_PMWNSmE)
|
||||
{
|
||||
// set the function logic
|
||||
if (department_wOtXSDy == 2)
|
||||
if (department_PMWNSmE == 2)
|
||||
{
|
||||
jQuery('#jform_causesrisks').closest('.control-group').show();
|
||||
if (jform_wOtXSDyUHv_required)
|
||||
if (jform_PMWNSmETkT_required)
|
||||
{
|
||||
updateFieldRequired('causesrisks',0);
|
||||
jQuery('#jform_causesrisks').prop('required','required');
|
||||
jQuery('#jform_causesrisks').attr('aria-required',true);
|
||||
jQuery('#jform_causesrisks').addClass('required');
|
||||
jform_wOtXSDyUHv_required = false;
|
||||
jform_PMWNSmETkT_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_wOtXSDyltm_required)
|
||||
if (jform_PMWNSmEvwG_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_wOtXSDyltm_required = false;
|
||||
jform_PMWNSmEvwG_required = false;
|
||||
}
|
||||
|
||||
jQuery('#jform_medical_turnovers_females').closest('.control-group').show();
|
||||
if (jform_wOtXSDyxVM_required)
|
||||
if (jform_PMWNSmEMOM_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_wOtXSDyxVM_required = false;
|
||||
jform_PMWNSmEMOM_required = false;
|
||||
}
|
||||
|
||||
jQuery('#jform_medical_turnovers_males').closest('.control-group').show();
|
||||
if (jform_wOtXSDyNqx_required)
|
||||
if (jform_PMWNSmEEfk_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_wOtXSDyNqx_required = false;
|
||||
jform_PMWNSmEEfk_required = false;
|
||||
}
|
||||
|
||||
jQuery('#jform_sick_leave_females').closest('.control-group').show();
|
||||
if (jform_wOtXSDyior_required)
|
||||
if (jform_PMWNSmEUYy_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_wOtXSDyior_required = false;
|
||||
jform_PMWNSmEUYy_required = false;
|
||||
}
|
||||
|
||||
jQuery('#jform_sick_leave_males').closest('.control-group').show();
|
||||
if (jform_wOtXSDymVK_required)
|
||||
if (jform_PMWNSmEWiq_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_wOtXSDymVK_required = false;
|
||||
jform_PMWNSmEWiq_required = false;
|
||||
}
|
||||
|
||||
jQuery('#jform_total_healthcare').closest('.control-group').show();
|
||||
if (jform_wOtXSDyyrS_required)
|
||||
if (jform_PMWNSmEOgA_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_wOtXSDyyrS_required = false;
|
||||
jform_PMWNSmEOgA_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_causesrisks').closest('.control-group').hide();
|
||||
if (!jform_wOtXSDyUHv_required)
|
||||
if (!jform_PMWNSmETkT_required)
|
||||
{
|
||||
updateFieldRequired('causesrisks',1);
|
||||
jQuery('#jform_causesrisks').removeAttr('required');
|
||||
jQuery('#jform_causesrisks').removeAttr('aria-required');
|
||||
jQuery('#jform_causesrisks').removeClass('required');
|
||||
jform_wOtXSDyUHv_required = true;
|
||||
jform_PMWNSmETkT_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_wOtXSDyltm_required)
|
||||
if (!jform_PMWNSmEvwG_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_wOtXSDyltm_required = true;
|
||||
jform_PMWNSmEvwG_required = true;
|
||||
}
|
||||
jQuery('#jform_medical_turnovers_females').closest('.control-group').hide();
|
||||
if (!jform_wOtXSDyxVM_required)
|
||||
if (!jform_PMWNSmEMOM_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_wOtXSDyxVM_required = true;
|
||||
jform_PMWNSmEMOM_required = true;
|
||||
}
|
||||
jQuery('#jform_medical_turnovers_males').closest('.control-group').hide();
|
||||
if (!jform_wOtXSDyNqx_required)
|
||||
if (!jform_PMWNSmEEfk_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_wOtXSDyNqx_required = true;
|
||||
jform_PMWNSmEEfk_required = true;
|
||||
}
|
||||
jQuery('#jform_sick_leave_females').closest('.control-group').hide();
|
||||
if (!jform_wOtXSDyior_required)
|
||||
if (!jform_PMWNSmEUYy_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_wOtXSDyior_required = true;
|
||||
jform_PMWNSmEUYy_required = true;
|
||||
}
|
||||
jQuery('#jform_sick_leave_males').closest('.control-group').hide();
|
||||
if (!jform_wOtXSDymVK_required)
|
||||
if (!jform_PMWNSmEWiq_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_wOtXSDymVK_required = true;
|
||||
jform_PMWNSmEWiq_required = true;
|
||||
}
|
||||
jQuery('#jform_total_healthcare').closest('.control-group').hide();
|
||||
if (!jform_wOtXSDyyrS_required)
|
||||
if (!jform_PMWNSmEOgA_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_wOtXSDyyrS_required = true;
|
||||
jform_PMWNSmEOgA_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the QfTgSnf function
|
||||
function QfTgSnf(department_QfTgSnf)
|
||||
// the qzPeqNQ function
|
||||
function qzPeqNQ(department_qzPeqNQ)
|
||||
{
|
||||
// set the function logic
|
||||
if (department_QfTgSnf == 1)
|
||||
if (department_qzPeqNQ == 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_NAdDhyizvd_required = false;
|
||||
jform_heHZMbDJNS_required = false;
|
||||
jform_LZKQahRoCu_required = false;
|
||||
jform_ihFJQrCtrT_required = false;
|
||||
|
||||
// Initial Script
|
||||
jQuery(document).ready(function()
|
||||
{
|
||||
var type_NAdDhyi = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
NAdDhyi(type_NAdDhyi);
|
||||
var type_LZKQahR = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
LZKQahR(type_LZKQahR);
|
||||
|
||||
var type_sMxiLMq = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
sMxiLMq(type_sMxiLMq);
|
||||
var type_WDFtkAe = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
WDFtkAe(type_WDFtkAe);
|
||||
|
||||
var company_heHZMbD = jQuery("#jform_company").val();
|
||||
heHZMbD(company_heHZMbD);
|
||||
var company_ihFJQrC = jQuery("#jform_company").val();
|
||||
ihFJQrC(company_ihFJQrC);
|
||||
});
|
||||
|
||||
// the NAdDhyi function
|
||||
function NAdDhyi(type_NAdDhyi)
|
||||
// the LZKQahR function
|
||||
function LZKQahR(type_LZKQahR)
|
||||
{
|
||||
// set the function logic
|
||||
if (type_NAdDhyi == 2)
|
||||
if (type_LZKQahR == 2)
|
||||
{
|
||||
jQuery('#jform_interventions').closest('.control-group').show();
|
||||
if (jform_NAdDhyizvd_required)
|
||||
if (jform_LZKQahRoCu_required)
|
||||
{
|
||||
updateFieldRequired('interventions',0);
|
||||
jQuery('#jform_interventions').prop('required','required');
|
||||
jQuery('#jform_interventions').attr('aria-required',true);
|
||||
jQuery('#jform_interventions').addClass('required');
|
||||
jform_NAdDhyizvd_required = false;
|
||||
jform_LZKQahRoCu_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_interventions').closest('.control-group').hide();
|
||||
if (!jform_NAdDhyizvd_required)
|
||||
if (!jform_LZKQahRoCu_required)
|
||||
{
|
||||
updateFieldRequired('interventions',1);
|
||||
jQuery('#jform_interventions').removeAttr('required');
|
||||
jQuery('#jform_interventions').removeAttr('aria-required');
|
||||
jQuery('#jform_interventions').removeClass('required');
|
||||
jform_NAdDhyizvd_required = true;
|
||||
jform_LZKQahRoCu_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the sMxiLMq function
|
||||
function sMxiLMq(type_sMxiLMq)
|
||||
// the WDFtkAe function
|
||||
function WDFtkAe(type_WDFtkAe)
|
||||
{
|
||||
// set the function logic
|
||||
if (type_sMxiLMq == 1)
|
||||
if (type_WDFtkAe == 1)
|
||||
{
|
||||
jQuery('#jform_intervention').closest('.control-group').show();
|
||||
}
|
||||
@ -78,55 +78,55 @@ function sMxiLMq(type_sMxiLMq)
|
||||
}
|
||||
}
|
||||
|
||||
// the heHZMbD function
|
||||
function heHZMbD(company_heHZMbD)
|
||||
// the ihFJQrC function
|
||||
function ihFJQrC(company_ihFJQrC)
|
||||
{
|
||||
if (isSet(company_heHZMbD) && company_heHZMbD.constructor !== Array)
|
||||
if (isSet(company_ihFJQrC) && company_ihFJQrC.constructor !== Array)
|
||||
{
|
||||
var temp_heHZMbD = company_heHZMbD;
|
||||
var company_heHZMbD = [];
|
||||
company_heHZMbD.push(temp_heHZMbD);
|
||||
var temp_ihFJQrC = company_ihFJQrC;
|
||||
var company_ihFJQrC = [];
|
||||
company_ihFJQrC.push(temp_ihFJQrC);
|
||||
}
|
||||
else if (!isSet(company_heHZMbD))
|
||||
else if (!isSet(company_ihFJQrC))
|
||||
{
|
||||
var company_heHZMbD = [];
|
||||
var company_ihFJQrC = [];
|
||||
}
|
||||
var company = company_heHZMbD.some(company_heHZMbD_SomeFunc);
|
||||
var company = company_ihFJQrC.some(company_ihFJQrC_SomeFunc);
|
||||
|
||||
|
||||
// set this function logic
|
||||
if (company)
|
||||
{
|
||||
jQuery('#jform_country').closest('.control-group').show();
|
||||
if (jform_heHZMbDJNS_required)
|
||||
if (jform_ihFJQrCtrT_required)
|
||||
{
|
||||
updateFieldRequired('country',0);
|
||||
jQuery('#jform_country').prop('required','required');
|
||||
jQuery('#jform_country').attr('aria-required',true);
|
||||
jQuery('#jform_country').addClass('required');
|
||||
jform_heHZMbDJNS_required = false;
|
||||
jform_ihFJQrCtrT_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_country').closest('.control-group').hide();
|
||||
if (!jform_heHZMbDJNS_required)
|
||||
if (!jform_ihFJQrCtrT_required)
|
||||
{
|
||||
updateFieldRequired('country',1);
|
||||
jQuery('#jform_country').removeAttr('required');
|
||||
jQuery('#jform_country').removeAttr('aria-required');
|
||||
jQuery('#jform_country').removeClass('required');
|
||||
jform_heHZMbDJNS_required = true;
|
||||
jform_ihFJQrCtrT_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the heHZMbD Some function
|
||||
function company_heHZMbD_SomeFunc(company_heHZMbD)
|
||||
// the ihFJQrC Some function
|
||||
function company_ihFJQrC_SomeFunc(company_ihFJQrC)
|
||||
{
|
||||
// set the function logic
|
||||
if (company_heHZMbD == 0)
|
||||
if (company_ihFJQrC == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -17,64 +17,64 @@
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// Some Global Values
|
||||
jform_KuwbJuPTpY_required = false;
|
||||
jform_LJQDUtNAlQ_required = false;
|
||||
|
||||
// Initial Script
|
||||
jQuery(document).ready(function()
|
||||
{
|
||||
var company_KuwbJuP = jQuery("#jform_company").val();
|
||||
KuwbJuP(company_KuwbJuP);
|
||||
var company_LJQDUtN = jQuery("#jform_company").val();
|
||||
LJQDUtN(company_LJQDUtN);
|
||||
});
|
||||
|
||||
// the KuwbJuP function
|
||||
function KuwbJuP(company_KuwbJuP)
|
||||
// the LJQDUtN function
|
||||
function LJQDUtN(company_LJQDUtN)
|
||||
{
|
||||
if (isSet(company_KuwbJuP) && company_KuwbJuP.constructor !== Array)
|
||||
if (isSet(company_LJQDUtN) && company_LJQDUtN.constructor !== Array)
|
||||
{
|
||||
var temp_KuwbJuP = company_KuwbJuP;
|
||||
var company_KuwbJuP = [];
|
||||
company_KuwbJuP.push(temp_KuwbJuP);
|
||||
var temp_LJQDUtN = company_LJQDUtN;
|
||||
var company_LJQDUtN = [];
|
||||
company_LJQDUtN.push(temp_LJQDUtN);
|
||||
}
|
||||
else if (!isSet(company_KuwbJuP))
|
||||
else if (!isSet(company_LJQDUtN))
|
||||
{
|
||||
var company_KuwbJuP = [];
|
||||
var company_LJQDUtN = [];
|
||||
}
|
||||
var company = company_KuwbJuP.some(company_KuwbJuP_SomeFunc);
|
||||
var company = company_LJQDUtN.some(company_LJQDUtN_SomeFunc);
|
||||
|
||||
|
||||
// set this function logic
|
||||
if (company)
|
||||
{
|
||||
jQuery('#jform_country').closest('.control-group').show();
|
||||
if (jform_KuwbJuPTpY_required)
|
||||
if (jform_LJQDUtNAlQ_required)
|
||||
{
|
||||
updateFieldRequired('country',0);
|
||||
jQuery('#jform_country').prop('required','required');
|
||||
jQuery('#jform_country').attr('aria-required',true);
|
||||
jQuery('#jform_country').addClass('required');
|
||||
jform_KuwbJuPTpY_required = false;
|
||||
jform_LJQDUtNAlQ_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_country').closest('.control-group').hide();
|
||||
if (!jform_KuwbJuPTpY_required)
|
||||
if (!jform_LJQDUtNAlQ_required)
|
||||
{
|
||||
updateFieldRequired('country',1);
|
||||
jQuery('#jform_country').removeAttr('required');
|
||||
jQuery('#jform_country').removeAttr('aria-required');
|
||||
jQuery('#jform_country').removeClass('required');
|
||||
jform_KuwbJuPTpY_required = true;
|
||||
jform_LJQDUtNAlQ_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the KuwbJuP Some function
|
||||
function company_KuwbJuP_SomeFunc(company_KuwbJuP)
|
||||
// the LJQDUtN Some function
|
||||
function company_LJQDUtN_SomeFunc(company_LJQDUtN)
|
||||
{
|
||||
// set the function logic
|
||||
if (company_KuwbJuP == 0)
|
||||
if (company_LJQDUtN == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -151,7 +151,7 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin
|
||||
$form->setFieldAttribute('ordering', 'filter', 'unset');
|
||||
$form->setFieldAttribute('published', 'filter', 'unset');
|
||||
}
|
||||
// If this is a new item insure the greated by is set
|
||||
// If this is a new item insure the greated by is set.
|
||||
if (0 == $id)
|
||||
{
|
||||
// Set the created_by to this user
|
||||
@ -315,7 +315,7 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin
|
||||
{
|
||||
$table->created = $date->toSql();
|
||||
// set the user
|
||||
if ($table->created_by == 0)
|
||||
if ($table->created_by == 0 || empty($table->created_by))
|
||||
{
|
||||
$table->created_by = $user->id;
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin
|
||||
$form->setFieldAttribute('ordering', 'filter', 'unset');
|
||||
$form->setFieldAttribute('published', 'filter', 'unset');
|
||||
}
|
||||
// If this is a new item insure the greated by is set
|
||||
// If this is a new item insure the greated by is set.
|
||||
if (0 == $id)
|
||||
{
|
||||
// Set the created_by to this user
|
||||
@ -303,7 +303,7 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin
|
||||
{
|
||||
$table->created = $date->toSql();
|
||||
// set the user
|
||||
if ($table->created_by == 0)
|
||||
if ($table->created_by == 0 || empty($table->created_by))
|
||||
{
|
||||
$table->created_by = $user->id;
|
||||
}
|
||||
|
@ -143,33 +143,33 @@ $componentParams = JComponentHelper::getParams('com_costbenefitprojection');
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// #jform_department listeners for department_wOtXSDy function
|
||||
// #jform_department listeners for department_PMWNSmE function
|
||||
jQuery('#jform_department').on('keyup',function()
|
||||
{
|
||||
var department_wOtXSDy = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
wOtXSDy(department_wOtXSDy);
|
||||
var department_PMWNSmE = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
PMWNSmE(department_PMWNSmE);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_department',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var department_wOtXSDy = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
wOtXSDy(department_wOtXSDy);
|
||||
var department_PMWNSmE = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
PMWNSmE(department_PMWNSmE);
|
||||
|
||||
});
|
||||
|
||||
// #jform_department listeners for department_QfTgSnf function
|
||||
// #jform_department listeners for department_qzPeqNQ function
|
||||
jQuery('#jform_department').on('keyup',function()
|
||||
{
|
||||
var department_QfTgSnf = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
QfTgSnf(department_QfTgSnf);
|
||||
var department_qzPeqNQ = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
qzPeqNQ(department_qzPeqNQ);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_department',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var department_QfTgSnf = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
QfTgSnf(department_QfTgSnf);
|
||||
var department_qzPeqNQ = jQuery("#jform_department input[type='radio']:checked").val();
|
||||
qzPeqNQ(department_qzPeqNQ);
|
||||
|
||||
});
|
||||
|
||||
|
@ -65,10 +65,10 @@ class CostbenefitprojectionViewCompany extends JViewLegacy
|
||||
}
|
||||
|
||||
// Get Linked view data
|
||||
$this->kmcscaling_factors = $this->get('Kmcscaling_factors');
|
||||
$this->hbvscaling_factors = $this->get('Hbvscaling_factors');
|
||||
|
||||
// Get Linked view data
|
||||
$this->fzxinterventions = $this->get('Fzxinterventions');
|
||||
$this->anuinterventions = $this->get('Anuinterventions');
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
|
@ -105,48 +105,48 @@ $componentParams = JComponentHelper::getParams('com_costbenefitprojection');
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// #jform_type listeners for type_NAdDhyi function
|
||||
// #jform_type listeners for type_LZKQahR function
|
||||
jQuery('#jform_type').on('keyup',function()
|
||||
{
|
||||
var type_NAdDhyi = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
NAdDhyi(type_NAdDhyi);
|
||||
var type_LZKQahR = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
LZKQahR(type_LZKQahR);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_type',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var type_NAdDhyi = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
NAdDhyi(type_NAdDhyi);
|
||||
var type_LZKQahR = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
LZKQahR(type_LZKQahR);
|
||||
|
||||
});
|
||||
|
||||
// #jform_type listeners for type_sMxiLMq function
|
||||
// #jform_type listeners for type_WDFtkAe function
|
||||
jQuery('#jform_type').on('keyup',function()
|
||||
{
|
||||
var type_sMxiLMq = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
sMxiLMq(type_sMxiLMq);
|
||||
var type_WDFtkAe = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
WDFtkAe(type_WDFtkAe);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_type',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var type_sMxiLMq = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
sMxiLMq(type_sMxiLMq);
|
||||
var type_WDFtkAe = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
WDFtkAe(type_WDFtkAe);
|
||||
|
||||
});
|
||||
|
||||
// #jform_company listeners for company_heHZMbD function
|
||||
// #jform_company listeners for company_ihFJQrC function
|
||||
jQuery('#jform_company').on('keyup',function()
|
||||
{
|
||||
var company_heHZMbD = jQuery("#jform_company").val();
|
||||
heHZMbD(company_heHZMbD);
|
||||
var company_ihFJQrC = jQuery("#jform_company").val();
|
||||
ihFJQrC(company_ihFJQrC);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_company',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var company_heHZMbD = jQuery("#jform_company").val();
|
||||
heHZMbD(company_heHZMbD);
|
||||
var company_ihFJQrC = jQuery("#jform_company").val();
|
||||
ihFJQrC(company_ihFJQrC);
|
||||
|
||||
});
|
||||
|
||||
|
@ -90,18 +90,18 @@ $componentParams = JComponentHelper::getParams('com_costbenefitprojection');
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// #jform_company listeners for company_KuwbJuP function
|
||||
// #jform_company listeners for company_LJQDUtN function
|
||||
jQuery('#jform_company').on('keyup',function()
|
||||
{
|
||||
var company_KuwbJuP = jQuery("#jform_company").val();
|
||||
KuwbJuP(company_KuwbJuP);
|
||||
var company_LJQDUtN = jQuery("#jform_company").val();
|
||||
LJQDUtN(company_LJQDUtN);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_company',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var company_KuwbJuP = jQuery("#jform_company").val();
|
||||
KuwbJuP(company_KuwbJuP);
|
||||
var company_LJQDUtN = jQuery("#jform_company").val();
|
||||
LJQDUtN(company_LJQDUtN);
|
||||
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user