function content_56854396b279a($_smarty_tpl) { ?> <div class="row-fluid conditionRow marginBottom10px"><span class="span4"><select class="<?php if (empty($_smarty_tpl->tpl_vars['NOCHOSEN']->value)) { ?> chzn-select<?php } ?> row-fluid" name="columnname"><option value="none"><?php echo vtranslate('LBL_SELECT_FIELD', $_smarty_tpl->tpl_vars['MODULE']->value); ?> </option><?php $_smarty_tpl->tpl_vars['BLOCK_FIELDS'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['BLOCK_FIELDS']->_loop = false; $_smarty_tpl->tpl_vars['BLOCK_LABEL'] = new Smarty_Variable(); $_from = $_smarty_tpl->tpl_vars['RECORD_STRUCTURE']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['BLOCK_FIELDS']->key => $_smarty_tpl->tpl_vars['BLOCK_FIELDS']->value) { $_smarty_tpl->tpl_vars['BLOCK_FIELDS']->_loop = true; $_smarty_tpl->tpl_vars['BLOCK_LABEL']->value = $_smarty_tpl->tpl_vars['BLOCK_FIELDS']->key; ?> <optgroup label='<?php echo vtranslate($_smarty_tpl->tpl_vars['BLOCK_LABEL']->value, $_smarty_tpl->tpl_vars['SOURCE_MODULE']->value); ?> '><?php $_smarty_tpl->tpl_vars['FIELD_MODEL'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['FIELD_MODEL']->_loop = false; $_smarty_tpl->tpl_vars['FIELD_NAME'] = new Smarty_Variable(); $_from = $_smarty_tpl->tpl_vars['BLOCK_FIELDS']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['FIELD_MODEL']->key => $_smarty_tpl->tpl_vars['FIELD_MODEL']->value) { $_smarty_tpl->tpl_vars['FIELD_MODEL']->_loop = true; $_smarty_tpl->tpl_vars['FIELD_NAME']->value = $_smarty_tpl->tpl_vars['FIELD_MODEL']->key; $_smarty_tpl->tpl_vars['FIELD_INFO'] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getFieldInfo(), null, 0); $_smarty_tpl->tpl_vars['MODULE_MODEL'] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getModule(), null, 0); $_smarty_tpl->tpl_vars["SPECIAL_VALIDATOR"] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getValidator(), null, 0); if (!empty($_smarty_tpl->tpl_vars['COLUMNNAME_API']->value)) { $_smarty_tpl->tpl_vars['columnNameApi'] = new Smarty_variable($_smarty_tpl->tpl_vars['COLUMNNAME_API']->value, null, 0); } else { $_smarty_tpl->tpl_vars['columnNameApi'] = new Smarty_variable('getCustomViewColumnName', null, 0); } ?> <option value="<?php $_tmp1 = $_smarty_tpl->tpl_vars['columnNameApi']->value; echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->{$_tmp1}(); ?> " data-fieldtype="<?php echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getFieldType(); ?> " data-field-name="<?php echo $_smarty_tpl->tpl_vars['FIELD_NAME']->value; ?> "<?php $_tmp2 = $_smarty_tpl->tpl_vars['columnNameApi']->value; if (decode_html($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->{$_tmp2}()) == decode_html($_smarty_tpl->tpl_vars['CONDITION_INFO']->value['columnname'])) { $_smarty_tpl->tpl_vars['FIELD_TYPE'] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getFieldType(), null, 0); $_smarty_tpl->tpl_vars['SELECTED_FIELD_MODEL'] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value, null, 0); if ($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getFieldDataType() == 'reference') { $_smarty_tpl->tpl_vars['FIELD_TYPE'] = new Smarty_variable('V', null, 0); } $_smarty_tpl->createLocalArrayVariable('FIELD_INFO', null, 0); $_smarty_tpl->tpl_vars['FIELD_INFO']->value['value'] = decode_html($_smarty_tpl->tpl_vars['CONDITION_INFO']->value['value']); ?> selected="selected"<?php } if ($_smarty_tpl->tpl_vars['MODULE_MODEL']->value->get('name') == 'Calendar' && $_smarty_tpl->tpl_vars['FIELD_NAME']->value == 'recurringtype') { $_smarty_tpl->tpl_vars['PICKLIST_VALUES'] = new Smarty_variable(Calendar_Field_Model::getReccurencePicklistValues(), null, 0); $_smarty_tpl->createLocalArrayVariable('FIELD_INFO', null, 0); $_smarty_tpl->tpl_vars['FIELD_INFO']->value['picklistvalues'] = $_smarty_tpl->tpl_vars['PICKLIST_VALUES']->value; } if ($_smarty_tpl->tpl_vars['MODULE_MODEL']->value->get('name') == 'Calendar' && $_smarty_tpl->tpl_vars['FIELD_NAME']->value == 'activitytype') { $_smarty_tpl->createLocalArrayVariable('FIELD_INFO', null, 0); $_smarty_tpl->tpl_vars['FIELD_INFO']->value['picklistvalues']['Task'] = vtranslate('Task', 'Calendar'); } if ($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getFieldDataType() == 'reference') { $_smarty_tpl->tpl_vars['referenceList'] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getWebserviceFieldObject()->getReferenceList(), null, 0); if (is_array($_smarty_tpl->tpl_vars['referenceList']->value) && in_array('Users', $_smarty_tpl->tpl_vars['referenceList']->value)) { $_smarty_tpl->tpl_vars['USERSLIST'] = new Smarty_variable(array(), null, 0); $_smarty_tpl->tpl_vars['CURRENT_USER_MODEL'] = new Smarty_variable(Users_Record_Model::getCurrentUserModel(), null, 0); $_smarty_tpl->tpl_vars['ACCESSIBLE_USERS'] = new Smarty_variable($_smarty_tpl->tpl_vars['CURRENT_USER_MODEL']->value->getAccessibleUsers(), null, 0); $_smarty_tpl->tpl_vars['USER_NAME'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['USER_NAME']->_loop = false; $_from = $_smarty_tpl->tpl_vars['ACCESSIBLE_USERS']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['USER_NAME']->key => $_smarty_tpl->tpl_vars['USER_NAME']->value) { $_smarty_tpl->tpl_vars['USER_NAME']->_loop = true; $_smarty_tpl->createLocalArrayVariable('USERSLIST', null, 0); $_smarty_tpl->tpl_vars['USERSLIST']->value[$_smarty_tpl->tpl_vars['USER_NAME']->value] = $_smarty_tpl->tpl_vars['USER_NAME']->value; } $_smarty_tpl->createLocalArrayVariable('FIELD_INFO', null, 0); $_smarty_tpl->tpl_vars['FIELD_INFO']->value['picklistvalues'] = $_smarty_tpl->tpl_vars['USERSLIST']->value; $_smarty_tpl->createLocalArrayVariable('FIELD_INFO', null, 0); $_smarty_tpl->tpl_vars['FIELD_INFO']->value['type'] = 'picklist'; } } ?> data-fieldinfo='<?php echo Vtiger_Util_Helper::toSafeHTML(ZEND_JSON::encode($_smarty_tpl->tpl_vars['FIELD_INFO']->value)); ?> '<?php if (!empty($_smarty_tpl->tpl_vars['SPECIAL_VALIDATOR']->value)) { ?> data-validator='<?php echo Zend_Json::encode($_smarty_tpl->tpl_vars['SPECIAL_VALIDATOR']->value); ?> '<?php } ?> ><?php if ($_smarty_tpl->tpl_vars['SOURCE_MODULE']->value != $_smarty_tpl->tpl_vars['MODULE_MODEL']->value->get('name')) { ?> (<?php echo vtranslate($_smarty_tpl->tpl_vars['MODULE_MODEL']->value->get('name'), $_smarty_tpl->tpl_vars['MODULE_MODEL']->value->get('name')); ?> ) <?php echo vtranslate($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('label'), $_smarty_tpl->tpl_vars['MODULE_MODEL']->value->get('name')); } else { echo vtranslate($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('label'), $_smarty_tpl->tpl_vars['SOURCE_MODULE']->value); } ?> </option><?php } ?> </optgroup><?php } $_smarty_tpl->tpl_vars['BLOCK_FIELDS'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['BLOCK_FIELDS']->_loop = false; $_smarty_tpl->tpl_vars['BLOCK_LABEL'] = new Smarty_Variable(); $_from = $_smarty_tpl->tpl_vars['EVENT_RECORD_STRUCTURE']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['BLOCK_FIELDS']->key => $_smarty_tpl->tpl_vars['BLOCK_FIELDS']->value) { $_smarty_tpl->tpl_vars['BLOCK_FIELDS']->_loop = true; $_smarty_tpl->tpl_vars['BLOCK_LABEL']->value = $_smarty_tpl->tpl_vars['BLOCK_FIELDS']->key; ?> <optgroup label='<?php echo vtranslate($_smarty_tpl->tpl_vars['BLOCK_LABEL']->value, 'Events'); ?> '><?php $_smarty_tpl->tpl_vars['FIELD_MODEL'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['FIELD_MODEL']->_loop = false; $_smarty_tpl->tpl_vars['FIELD_NAME'] = new Smarty_Variable(); $_from = $_smarty_tpl->tpl_vars['BLOCK_FIELDS']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['FIELD_MODEL']->key => $_smarty_tpl->tpl_vars['FIELD_MODEL']->value) { $_smarty_tpl->tpl_vars['FIELD_MODEL']->_loop = true; $_smarty_tpl->tpl_vars['FIELD_NAME']->value = $_smarty_tpl->tpl_vars['FIELD_MODEL']->key; $_smarty_tpl->tpl_vars['FIELD_INFO'] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getFieldInfo(), null, 0); $_smarty_tpl->tpl_vars['MODULE_MODEL'] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getModule(), null, 0); if (!empty($_smarty_tpl->tpl_vars['COLUMNNAME_API']->value)) { $_smarty_tpl->tpl_vars['columnNameApi'] = new Smarty_variable($_smarty_tpl->tpl_vars['COLUMNNAME_API']->value, null, 0); } else { $_smarty_tpl->tpl_vars['columnNameApi'] = new Smarty_variable('getCustomViewColumnName', null, 0); } ?> <option value="<?php $_tmp3 = $_smarty_tpl->tpl_vars['columnNameApi']->value; echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->{$_tmp3}(); ?> " data-fieldtype="<?php echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getFieldType(); ?> " data-field-name="<?php echo $_smarty_tpl->tpl_vars['FIELD_NAME']->value; ?> "<?php $_tmp4 = $_smarty_tpl->tpl_vars['columnNameApi']->value; if (decode_html($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->{$_tmp4}()) == $_smarty_tpl->tpl_vars['CONDITION_INFO']->value['columnname']) { $_smarty_tpl->tpl_vars['FIELD_TYPE'] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getFieldType(), null, 0); $_smarty_tpl->tpl_vars['SELECTED_FIELD_MODEL'] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value, null, 0); if ($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getFieldDataType() == 'reference') { $_smarty_tpl->tpl_vars['FIELD_TYPE'] = new Smarty_variable('V', null, 0); } $_smarty_tpl->createLocalArrayVariable('FIELD_INFO', null, 0); $_smarty_tpl->tpl_vars['FIELD_INFO']->value['value'] = decode_html($_smarty_tpl->tpl_vars['CONDITION_INFO']->value['value']); ?> selected="selected"<?php } if ($_smarty_tpl->tpl_vars['MODULE_MODEL']->value->get('name') == 'Calendar' && $_smarty_tpl->tpl_vars['FIELD_NAME']->value == 'recurringtype') { $_smarty_tpl->tpl_vars['PICKLIST_VALUES'] = new Smarty_variable(Calendar_Field_Model::getReccurencePicklistValues(), null, 0); $_smarty_tpl->createLocalArrayVariable('FIELD_INFO', null, 0); $_smarty_tpl->tpl_vars['FIELD_INFO']->value['picklistvalues'] = $_smarty_tpl->tpl_vars['PICKLIST_VALUES']->value; } if ($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getFieldDataType() == 'reference') { $_smarty_tpl->tpl_vars['referenceList'] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getWebserviceFieldObject()->getReferenceList(), null, 0); if (is_array($_smarty_tpl->tpl_vars['referenceList']->value) && in_array('Users', $_smarty_tpl->tpl_vars['referenceList']->value)) { $_smarty_tpl->tpl_vars['USERSLIST'] = new Smarty_variable(array(), null, 0); $_smarty_tpl->tpl_vars['CURRENT_USER_MODEL'] = new Smarty_variable(Users_Record_Model::getCurrentUserModel(), null, 0); $_smarty_tpl->tpl_vars['ACCESSIBLE_USERS'] = new Smarty_variable($_smarty_tpl->tpl_vars['CURRENT_USER_MODEL']->value->getAccessibleUsers(), null, 0); $_smarty_tpl->tpl_vars['USER_NAME'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['USER_NAME']->_loop = false; $_from = $_smarty_tpl->tpl_vars['ACCESSIBLE_USERS']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['USER_NAME']->key => $_smarty_tpl->tpl_vars['USER_NAME']->value) { $_smarty_tpl->tpl_vars['USER_NAME']->_loop = true; $_smarty_tpl->createLocalArrayVariable('USERSLIST', null, 0); $_smarty_tpl->tpl_vars['USERSLIST']->value[$_smarty_tpl->tpl_vars['USER_NAME']->value] = $_smarty_tpl->tpl_vars['USER_NAME']->value; } $_smarty_tpl->createLocalArrayVariable('FIELD_INFO', null, 0); $_smarty_tpl->tpl_vars['FIELD_INFO']->value['picklistvalues'] = $_smarty_tpl->tpl_vars['USERSLIST']->value; $_smarty_tpl->createLocalArrayVariable('FIELD_INFO', null, 0); $_smarty_tpl->tpl_vars['FIELD_INFO']->value['type'] = 'picklist'; } } ?> data-fieldinfo='<?php echo Vtiger_Util_Helper::toSafeHTML(ZEND_JSON::encode($_smarty_tpl->tpl_vars['FIELD_INFO']->value)); ?> ' ><?php if ($_smarty_tpl->tpl_vars['SOURCE_MODULE']->value != $_smarty_tpl->tpl_vars['MODULE_MODEL']->value->get('name')) { ?> (<?php echo vtranslate($_smarty_tpl->tpl_vars['MODULE_MODEL']->value->get('name'), $_smarty_tpl->tpl_vars['MODULE_MODEL']->value->get('name')); ?> ) <?php echo vtranslate($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('label'), $_smarty_tpl->tpl_vars['MODULE_MODEL']->value->get('name')); } else { echo vtranslate($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('label'), $_smarty_tpl->tpl_vars['SOURCE_MODULE']->value); } ?> </option><?php } ?> </optgroup><?php } ?> </select></span><span class="span3"><select class="<?php if (empty($_smarty_tpl->tpl_vars['NOCHOSEN']->value)) { ?> chzn-select<?php } ?> row-fluid" name="comparator"><option value="none"><?php echo vtranslate('LBL_NONE', $_smarty_tpl->tpl_vars['MODULE']->value); ?> </option><?php $_smarty_tpl->tpl_vars['ADVANCE_FILTER_OPTIONS'] = new Smarty_variable($_smarty_tpl->tpl_vars['ADVANCED_FILTER_OPTIONS_BY_TYPE']->value[$_smarty_tpl->tpl_vars['FIELD_TYPE']->value], null, 0); if ($_smarty_tpl->tpl_vars['FIELD_TYPE']->value == 'D' || $_smarty_tpl->tpl_vars['FIELD_TYPE']->value == 'DT') { $_smarty_tpl->tpl_vars['DATE_FILTER_CONDITIONS'] = new Smarty_variable(array_keys($_smarty_tpl->tpl_vars['DATE_FILTERS']->value), null, 0); $_smarty_tpl->tpl_vars['ADVANCE_FILTER_OPTIONS'] = new Smarty_variable(array_merge($_smarty_tpl->tpl_vars['ADVANCE_FILTER_OPTIONS']->value, $_smarty_tpl->tpl_vars['DATE_FILTER_CONDITIONS']->value), null, 0); } $_smarty_tpl->tpl_vars['ADVANCE_FILTER_OPTION'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['ADVANCE_FILTER_OPTION']->_loop = false; $_from = $_smarty_tpl->tpl_vars['ADVANCE_FILTER_OPTIONS']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['ADVANCE_FILTER_OPTION']->key => $_smarty_tpl->tpl_vars['ADVANCE_FILTER_OPTION']->value) { $_smarty_tpl->tpl_vars['ADVANCE_FILTER_OPTION']->_loop = true; ?> <option value="<?php echo $_smarty_tpl->tpl_vars['ADVANCE_FILTER_OPTION']->value; ?> "<?php if ($_smarty_tpl->tpl_vars['ADVANCE_FILTER_OPTION']->value == $_smarty_tpl->tpl_vars['CONDITION_INFO']->value['comparator']) { ?> selected<?php } ?> ><?php echo vtranslate($_smarty_tpl->tpl_vars['ADVANCED_FILTER_OPTIONS']->value[$_smarty_tpl->tpl_vars['ADVANCE_FILTER_OPTION']->value]); ?> </option><?php } ?> </select></span><span class="span4 fieldUiHolder"><input name="<?php if ($_smarty_tpl->tpl_vars['SELECTED_FIELD_MODEL']->value) { echo $_smarty_tpl->tpl_vars['SELECTED_FIELD_MODEL']->value->get('name'); } ?> " data-value="value" class="row-fluid" type="text" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['CONDITION_INFO']->value['value'], ENT_QUOTES, 'UTF-8', true); ?> " /></span><span class="hide"><!-- TODO : see if you need to respect CONDITION_INFO condition or / and --><?php if (empty($_smarty_tpl->tpl_vars['CONDITION']->value)) { $_smarty_tpl->tpl_vars['CONDITION'] = new Smarty_variable("and", null, 0); } ?> <input type="hidden" name="column_condition" value="<?php echo $_smarty_tpl->tpl_vars['CONDITION']->value; ?> " /></span><span class="span1"><i class="deleteCondition icon-trash alignMiddle" title="<?php echo vtranslate('LBL_DELETE', $_smarty_tpl->tpl_vars['MODULE']->value); ?> "></i></span></div><?php }
function content_54d3d27a4619a($_smarty_tpl) { ?> <div class="row-fluid conditionRow marginBottom10px"><span class="span4"><select class="<?php if (empty($_smarty_tpl->tpl_vars['NOCHOSEN']->value)) { ?> chzn-select<?php } ?> row-fluid" name="columnname" data-placeholder="<?php echo vtranslate('LBL_SELECT_FIELD', $_smarty_tpl->tpl_vars['QUALIFIED_MODULE']->value); ?> "><option value="none"></option><?php $_smarty_tpl->tpl_vars['BLOCK_FIELDS'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['BLOCK_FIELDS']->_loop = false; $_smarty_tpl->tpl_vars['BLOCK_LABEL'] = new Smarty_Variable(); $_from = $_smarty_tpl->tpl_vars['RECORD_STRUCTURE']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['BLOCK_FIELDS']->key => $_smarty_tpl->tpl_vars['BLOCK_FIELDS']->value) { $_smarty_tpl->tpl_vars['BLOCK_FIELDS']->_loop = true; $_smarty_tpl->tpl_vars['BLOCK_LABEL']->value = $_smarty_tpl->tpl_vars['BLOCK_FIELDS']->key; ?> <optgroup label='<?php echo vtranslate($_smarty_tpl->tpl_vars['BLOCK_LABEL']->value, $_smarty_tpl->tpl_vars['SELECTED_MODULE_NAME']->value); ?> '><?php $_smarty_tpl->tpl_vars['FIELD_MODEL'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['FIELD_MODEL']->_loop = false; $_smarty_tpl->tpl_vars['FIELD_NAME'] = new Smarty_Variable(); $_from = $_smarty_tpl->tpl_vars['BLOCK_FIELDS']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['FIELD_MODEL']->key => $_smarty_tpl->tpl_vars['FIELD_MODEL']->value) { $_smarty_tpl->tpl_vars['FIELD_MODEL']->_loop = true; $_smarty_tpl->tpl_vars['FIELD_NAME']->value = $_smarty_tpl->tpl_vars['FIELD_MODEL']->key; $_smarty_tpl->tpl_vars['FIELD_INFO'] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getFieldInfo(), null, 0); $_smarty_tpl->tpl_vars['MODULE_MODEL'] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getModule(), null, 0); if (!empty($_smarty_tpl->tpl_vars['COLUMNNAME_API']->value)) { $_smarty_tpl->tpl_vars['columnNameApi'] = new Smarty_variable($_smarty_tpl->tpl_vars['COLUMNNAME_API']->value, null, 0); } else { $_smarty_tpl->tpl_vars['columnNameApi'] = new Smarty_variable('getCustomViewColumnName', null, 0); } ?> <option value="<?php $_tmp1 = $_smarty_tpl->tpl_vars['columnNameApi']->value; echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->{$_tmp1}(); ?> " data-fieldtype="<?php echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getFieldType(); ?> " data-field-name="<?php echo $_smarty_tpl->tpl_vars['FIELD_NAME']->value; ?> "<?php $_tmp2 = $_smarty_tpl->tpl_vars['columnNameApi']->value; if (decode_html($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->{$_tmp2}()) == $_smarty_tpl->tpl_vars['CONDITION_INFO']->value['columnname']) { $_smarty_tpl->tpl_vars['FIELD_TYPE'] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getFieldDataType(), null, 0); $_smarty_tpl->tpl_vars['SELECTED_FIELD_MODEL'] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value, null, 0); $_smarty_tpl->createLocalArrayVariable('FIELD_INFO', null, 0); $_smarty_tpl->tpl_vars['FIELD_INFO']->value['value'] = decode_html($_smarty_tpl->tpl_vars['CONDITION_INFO']->value['value']); ?> selected="selected"<?php } if ($_smarty_tpl->tpl_vars['MODULE_MODEL']->value->get('name') == 'Events' && $_smarty_tpl->tpl_vars['FIELD_NAME']->value == 'recurringtype') { $_smarty_tpl->tpl_vars['PICKLIST_VALUES'] = new Smarty_variable(Calendar_Field_Model::getReccurencePicklistValues(), null, 0); $_smarty_tpl->createLocalArrayVariable('FIELD_INFO', null, 0); $_smarty_tpl->tpl_vars['FIELD_INFO']->value['picklistvalues'] = $_smarty_tpl->tpl_vars['PICKLIST_VALUES']->value; } ?> data-fieldinfo='<?php echo Vtiger_Util_Helper::toSafeHTML(ZEND_JSON::encode($_smarty_tpl->tpl_vars['FIELD_INFO']->value)); ?> ' ><?php if ($_smarty_tpl->tpl_vars['SELECTED_MODULE_NAME']->value != $_smarty_tpl->tpl_vars['MODULE_MODEL']->value->get('name')) { ?> (<?php echo vtranslate($_smarty_tpl->tpl_vars['MODULE_MODEL']->value->get('name'), $_smarty_tpl->tpl_vars['MODULE_MODEL']->value->get('name')); ?> ) <?php echo vtranslate($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('label'), $_smarty_tpl->tpl_vars['MODULE_MODEL']->value->get('name')); } else { echo vtranslate($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('label'), $_smarty_tpl->tpl_vars['SELECTED_MODULE_NAME']->value); } ?> </option><?php } ?> </optgroup><?php } ?> </select></span><span class="span3"><select class="<?php if (empty($_smarty_tpl->tpl_vars['NOCHOSEN']->value)) { ?> chzn-select<?php } ?> row-fluid" name="comparator"><option value="none"><?php echo vtranslate('LBL_NONE', $_smarty_tpl->tpl_vars['MODULE']->value); ?> </option><?php $_smarty_tpl->tpl_vars['ADVANCE_FILTER_OPTIONS'] = new Smarty_variable($_smarty_tpl->tpl_vars['ADVANCED_FILTER_OPTIONS_BY_TYPE']->value[$_smarty_tpl->tpl_vars['FIELD_TYPE']->value], null, 0); $_smarty_tpl->tpl_vars['ADVANCE_FILTER_OPTION'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['ADVANCE_FILTER_OPTION']->_loop = false; $_from = $_smarty_tpl->tpl_vars['ADVANCE_FILTER_OPTIONS']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['ADVANCE_FILTER_OPTION']->key => $_smarty_tpl->tpl_vars['ADVANCE_FILTER_OPTION']->value) { $_smarty_tpl->tpl_vars['ADVANCE_FILTER_OPTION']->_loop = true; ?> <option value="<?php echo $_smarty_tpl->tpl_vars['ADVANCE_FILTER_OPTION']->value; ?> "<?php if ($_smarty_tpl->tpl_vars['ADVANCE_FILTER_OPTION']->value == $_smarty_tpl->tpl_vars['CONDITION_INFO']->value['comparator']) { ?> selected<?php } ?> ><?php echo vtranslate($_smarty_tpl->tpl_vars['ADVANCED_FILTER_OPTIONS']->value[$_smarty_tpl->tpl_vars['ADVANCE_FILTER_OPTION']->value]); ?> </option><?php } ?> </select></span><span class="span4 fieldUiHolder"><input name="<?php if ($_smarty_tpl->tpl_vars['SELECTED_FIELD_MODEL']->value) { echo $_smarty_tpl->tpl_vars['SELECTED_FIELD_MODEL']->value->get('name'); } ?> " data-value="value" class="row-fluid" type="text" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['CONDITION_INFO']->value['value'], ENT_QUOTES, 'UTF-8', true); ?> " /></span><span class="hide"><!-- TODO : see if you need to respect CONDITION_INFO condition or / and --><?php if (empty($_smarty_tpl->tpl_vars['CONDITION']->value)) { $_smarty_tpl->tpl_vars['CONDITION'] = new Smarty_variable("and", null, 0); } ?> <input type="hidden" name="column_condition" value="<?php echo $_smarty_tpl->tpl_vars['CONDITION']->value; ?> " /></span><span class="span1"><i class="deleteCondition icon-trash alignMiddle" title="<?php echo vtranslate('LBL_DELETE', $_smarty_tpl->tpl_vars['MODULE']->value); ?> "></i></span></div><?php }