/**
  * @return string
  */
 protected function renderItemTemplate()
 {
     $attributeData = array();
     $attributeData['{attributeName}'] = '{id}';
     $attributeData['{isRequiredElement}'] = '{isRequiredElement}';
     $attributeData['{isHiddenElement}'] = '{isHiddenElement}';
     $attributeData['{attributeLabelElement}'] = '{attributeLabelElement}';
     $attributeData['{hideHiddenAttributeElementStyle}'] = '{hideHiddenAttributeElementStyle}';
     $attributeData['{renderHiddenAttributeElement}'] = '{renderHiddenAttributeElement}';
     $attributeData['{removePlacedAttributeLink}'] = '{removePlacedAttributeLink}';
     $content = ContactWebFormsUtil::getPlacedAttributeContent($attributeData);
     return $content;
 }
Exemplo n.º 2
0
 public function actionGetPlacedAttributeByName($attributeName, $attributeLabel)
 {
     $model = new ZurmoActiveForm(false);
     $webFormAttributeForm = new ContactWebFormAttributeForm();
     $webFormAttributeForm->label = $attributeLabel;
     $allAttributes = ContactWebFormsUtil::getAllAttributes();
     $attributeData = $allAttributes[$attributeName];
     $resolvedPlacedAttribute = ContactWebFormsUtil::resolvePlacedAttributeByName($webFormAttributeForm, $model, $attributeName, $attributeData);
     $content = ContactWebFormsUtil::getPlacedAttributeContent($resolvedPlacedAttribute);
     Yii::app()->getClientScript()->setToAjaxMode();
     Yii::app()->getClientScript()->render($content);
     echo $content;
 }