Skip to content
Snippets Groups Projects
Commit bcf11c40 authored by yogeshwar's avatar yogeshwar
Browse files

E-All PickList Dependency

parent 7088e480
No related branches found
No related tags found
No related merge requests found
......@@ -87,7 +87,7 @@
{foreach key=TARGET_VALUE item=TRANSLATED_TARGET_VALUE from=$TARGET_PICKLIST_VALUES}
<tr>
{foreach key=SOURCE_PICKLIST_VALUE item=TRANSLATED_SOURCE_PICKLIST_VALUE from=$SOURCE_PICKLIST_VALUES}
{assign var=targetValues value=$MAPPED_TARGET_PICKLIST_VALUES[$SAFEHTML_SOURCE_PICKLIST_VALUES[$SOURCE_PICKLIST_VALUE]]}
{assign var=targetValues value=(isset($MAPPED_TARGET_PICKLIST_VALUES[$SAFEHTML_SOURCE_PICKLIST_VALUES[$SOURCE_PICKLIST_VALUE]])) ? $MAPPED_TARGET_PICKLIST_VALUES[$SAFEHTML_SOURCE_PICKLIST_VALUES[$SOURCE_PICKLIST_VALUE]] : ''}
{assign var=IS_SELECTED value=false}
{if empty($targetValues) || in_array($TARGET_VALUE, $targetValues)}
{assign var=IS_SELECTED value=true}
......
......@@ -84,8 +84,8 @@ class Vtiger_DependencyPicklist {
$targetValues = $mapping['targetvalues'];
$serializedTargetValues = Zend_Json::encode($targetValues);
$optionalsourcefield = $mapping['optionalsourcefield'];
$optionalsourcevalues = $mapping['optionalsourcevalues'];
$optionalsourcefield = isset($mapping['optionalsourcefield']) ? $mapping['optionalsourcefield'] : '';
$optionalsourcevalues = isset($mapping['optionalsourcevalues']) ? $mapping['optionalsourcevalues'] : '';
if(!empty($optionalsourcefield)) {
$criteria = array();
......@@ -170,7 +170,7 @@ class Vtiger_DependencyPicklist {
$targetValues = decode_html($adb->query_result($result, $i, 'targetvalues'));
$unserializedTargetValues = Zend_Json::decode(html_entity_decode($targetValues));
$criteria = decode_html($adb->query_result($result, $i, 'criteria'));
$unserializedCriteria = Zend_Json::decode(html_entity_decode($criteria));
$unserializedCriteria = isset($criteria) ? Zend_Json::decode(html_entity_decode($criteria)) : '';
if(!empty($unserializedCriteria) && $unserializedCriteria['fieldname'] != null) {
$conditionValue = array(
......
......@@ -21,6 +21,7 @@ class Settings_PickListDependency_Index_Action extends Settings_Vtiger_Basic_Act
$moduleModel = Vtiger_Module_Model::getInstance($module);
$sourceField = $request->get('sourcefield');
$targetField = $request->get('targetfield');
$message='';
$result = Vtiger_DependencyPicklist::checkCyclicDependency($module, $sourceField, $targetField);
if($result) {
$currentSourceField = Vtiger_DependencyPicklist::getPicklistSourceField($module, $sourceField, $targetField);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment