protected function renderAfterFormLayout($form)
 {
     parent::renderAfterFormLayout($form);
     $automaticMappingDisabled = ContractsModule::isAutomaticProbabilityMappingDisabled();
     if ($automaticMappingDisabled === false) {
         $this->registerStageToProbabilityMappingScript($form);
     }
 }
 protected function shouldDisplayCell($detailViewOnly)
 {
     // TODO: @Shoaibi: Low: change this to constant after refactoring and port to parent.
     if ($detailViewOnly == 2) {
         return $this->renderType != 'Details';
         // this if would only be true for contactEmailTemplateNamesDropDown.
     }
     return parent::shouldDisplayCell($detailViewOnly);
 }
 protected function resolveElementInformationDuringFormLayoutRender(&$elementInformation)
 {
     parent::resolveElementInformationDuringFormLayoutRender($elementInformation);
     $automaticDisable = CategoriesModule::isAutomaticCodeDisabled();
     if ($automaticDisable === false) {
         if ($elementInformation['attributeName'] == 'code') {
             $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';
             }
         }
     }
 }
 protected function renderAfterFormLayout($form)
 {
     parent::renderAfterFormLayout($form);
     $this->registerStageToProbabilityMappingScript($form);
 }
 /**
  * @param ZurmoActiveForm $form
  * @return string|void
  */
 protected function renderRightSideFormLayoutForEdit($form)
 {
     assert('$form instanceof ZurmoActiveForm');
     $content = parent::renderRightSideFormLayoutForEdit($form);
     return $content;
 }
 protected function renderContent()
 {
     $this->registerCopyAddressFromAccountScript();
     return parent::renderContent();
 }
 /**
  * @return string
  */
 protected function renderAfterFormLayout($form)
 {
     $content = parent::renderAfterFormLayout($form);
     return $content . $this->renderFiltersContent($form);
 }
 protected function renderAfterFormLayout($form)
 {
     parent::renderAfterFormLayout($form);
     Yii::app()->clientScript->registerScriptFile(Yii::app()->getAssetManager()->publish(Yii::getPathOfAlias('application.modules.productTemplates.elements.assets')) . '/ProductTemplateUtils.js', CClientScript::POS_END);
 }
 protected function renderAfterFormLayoutForDetailsContent($form = null)
 {
     return $this->renderHtmlAndTextContentElement($this->model, null, $form) . parent::renderAfterFormLayout($form);
 }
 protected function renderContent()
 {
     $this->registerCopyLaborCostAndBurdonCostFromDepartmentReferenceScript();
     return parent::renderContent();
 }
 protected function renderAfterFormLayout($form)
 {
     $content = parent::renderAfterFormLayout($form);
     $this->registerSetMeetingEndDateTimeScript($form);
     return $content;
 }