Exemplo n.º 1
0
 /**
  * If this is an existing attribute, do not allow changing of the attributeName
  */
 protected function resolveElementInformationDuringFormLayoutRender(&$elementInformation)
 {
     parent::resolveElementInformationDuringFormLayoutRender($elementInformation);
     if (!empty($this->model->attributeName) && $elementInformation['attributeName'] != 'null' && $elementInformation['attributeName'] != null && $this->model->canUpdateAttributeProperty($elementInformation['attributeName']) == false) {
         $elementInformation['disabled'] = true;
     }
 }
 /**
  * Override to disabling probability attribute.
  */
 protected function resolveElementInformationDuringFormLayoutRender(&$elementInformation)
 {
     parent::resolveElementInformationDuringFormLayoutRender($elementInformation);
     $automaticMappingDisabled = OpportunitiesModule::isAutomaticProbabilityMappingDisabled();
     if ($automaticMappingDisabled === false) {
         if ($elementInformation['attributeName'] == 'probability') {
             $elementInformation['disabled'] = true;
         }
     }
 }