/** * Override to disabling probability attribute. */ protected function resolveElementInformationDuringFormLayoutRender(&$elementInformation) { parent::resolveElementInformationDuringFormLayoutRender($elementInformation); if ($elementInformation['attributeName'] == 'probability') { $elementInformation['disabled'] = true; } }
/** * Override to handle security/access resolution on specific elements. */ protected function resolveElementInformationDuringFormLayoutRender(&$elementInformation) { parent::resolveElementInformationDuringFormLayoutRender($elementInformation); if ($elementInformation['attributeName'] == 'modelClassName' && $this->model->type == EmailTemplate::TYPE_CONTACT) { $elementInformation['attributeName'] = null; $elementInformation['type'] = 'NoCellNull'; // Not Coding Standard } }
protected function resolveElementInformationDuringFormLayoutRender(&$elementInformation) { parent::resolveElementInformationDuringFormLayoutRender($elementInformation); $automaticDisable = CategoriesModule::isAutomaticCodeDisabled(); if ($automaticDisable === false) { if ($elementInformation['attributeName'] == 'code') { $elementInformation['disabled'] = true; } } }
/** * Override to disabling probability attribute. */ protected function resolveElementInformationDuringFormLayoutRender(&$elementInformation) { parent::resolveElementInformationDuringFormLayoutRender($elementInformation); $automaticMappingDisabled = ContractsModule::isAutomaticProbabilityMappingDisabled(); if ($automaticMappingDisabled === false) { if ($elementInformation['attributeName'] == 'probability') { $elementInformation['disabled'] = true; } } }
protected function resolveElementInformationDuringFormLayoutRender(&$elementInformation) { parent::resolveElementInformationDuringFormLayoutRender($elementInformation); if (preg_match('/edit/', $_SERVER['REQUEST_URI'])) { $edit_mode = 'true'; } else { $edit_mode = 'false'; } if ($elementInformation['attributeName'] == 'productcode' && $edit_mode == 'true') { $elementInformation['disabled'] = true; } }
/** * Override to make sell price attribute readonly. */ protected function resolveElementInformationDuringFormLayoutRender(&$elementInformation) { parent::resolveElementInformationDuringFormLayoutRender($elementInformation); if ($elementInformation['attributeName'] == 'sellPrice') { $sellPriceFormulaModel = $this->model->sellPriceFormula; $type = $sellPriceFormulaModel->type; if ($type != null) { if ($type != SellPriceFormula::TYPE_EDITABLE) { $elementInformation['htmlOptions']['readonly'] = 'readonly'; $elementInformation['htmlOptions']['class'] = 'disabled'; } } } }