protected function renderSelectUserContent($disabled = null)
 {
     $params = $this->params;
     if ($disabled) {
         // ToDo: Code blow disable user select area, so we should probably extend UserNameIdElement for
         // this special purpose and fix issue in extending class
         //$params['disabled'] = $disabled;
     }
     $staticUserElement = new UserNameIdElement($this->model, 'userId', $this->form, $params);
     $staticUserElement->setIdAttributeId('value');
     $staticUserElement->setNameAttributeName('stringifiedModelForValue');
     $staticUserElement->editableTemplate = '<div class="value-data">{content}{error}</div>';
     return $staticUserElement->render();
 }
 protected function renderFormAttributesContent()
 {
     $formType = $this->model->getFormType();
     $params = array('inputPrefix' => $this->inputPrefixData);
     $content = null;
     if ($formType == WorkflowEmailMessageRecipientForm::TYPE_DYNAMIC_TRIGGERED_MODEL_USER) {
         $dynamicUserTypeElement = new DynamicUserTypeForEmailMessageRecipientStaticDropDownElement($this->model, 'dynamicUserType', $this->form, $params);
         $dynamicUserTypeElement->editableTemplate = '<div class="value-data">{content}{error}</div>';
         $content .= $dynamicUserTypeElement->render();
     } elseif ($formType == WorkflowEmailMessageRecipientForm::TYPE_DYNAMIC_TRIGGERED_MODEL_RELATION_USER) {
         $relationElement = new ModelRelationForEmailMessageRecipientStaticDropDownElement($this->model, 'relation', $this->form, $params);
         $relationElement->editableTemplate = '<div class="value-data">{content}{error}</div>';
         $dynamicUserTypeElement = new DynamicUserTypeForEmailMessageRecipientStaticDropDownElement($this->model, 'dynamicUserType', $this->form, $params);
         $dynamicUserTypeElement->editableTemplate = '<div class="value-data">{content}{error}</div>';
         $allRelatedDropdowns = Zurmo::t('WorkflowsModule', '<span>For all related</span> {relationsDropDown}', array('{relationsDropDown}' => $relationElement->render()));
         $allRelatedDropdowns .= $dynamicUserTypeElement->render();
         $content .= ZurmoHtml::tag('div', array('class' => 'all-related-field'), $allRelatedDropdowns);
     } elseif ($formType == WorkflowEmailMessageRecipientForm::TYPE_DYNAMIC_TRIGGERED_BY_USER || $formType == WorkflowEmailMessageRecipientForm::TYPE_DYNAMIC_TRIGGERED_MODEL) {
         //nothing to render
     } elseif ($formType == WorkflowEmailMessageRecipientForm::TYPE_DYNAMIC_TRIGGERED_MODEL_RELATION) {
         $relationElement = new ModelRelationForEmailMessageRecipientStaticDropDownElement($this->model, 'relation', $this->form, $params);
         $relationElement->editableTemplate = '<div class="value-data">{content}{error}</div>';
         $allRelatedDropdowns = Zurmo::t('WorkflowsModule', '<span>For all related</span> {relationsDropDown}', array('{relationsDropDown}' => $relationElement->render()));
         $content .= ZurmoHtml::tag('div', array('class' => 'all-related-field'), $allRelatedDropdowns);
     } elseif ($formType == WorkflowEmailMessageRecipientForm::TYPE_STATIC_ADDRESS) {
         $toNameElement = new TextElement($this->model, 'toName', $this->form, $params);
         $toNameElement->editableTemplate = '<div class="value-data"><span>{label}</span>{content}{error}</div>';
         $toAddressElement = new TextElement($this->model, 'toAddress', $this->form, $params);
         $toAddressElement->editableTemplate = '<div class="value-data"><span>{label}</span>{content}{error}</div>';
         $toNameAndAddressElements = null;
         $toNameAndAddressElements .= $toNameElement->render();
         $toNameAndAddressElements .= $toAddressElement->render();
         $content .= ZurmoHtml::tag('div', array('class' => 'static-address-field'), $toNameAndAddressElements);
     } elseif ($formType == WorkflowEmailMessageRecipientForm::TYPE_STATIC_GROUP) {
         $staticGroupElement = new AllGroupsStaticDropDownElement($this->model, 'groupId', $this->form, $params);
         $staticGroupElement->editableTemplate = '<div class="value-data">{content}{error}</div>';
         $content .= $staticGroupElement->render();
     } elseif ($formType == WorkflowEmailMessageRecipientForm::TYPE_STATIC_ROLE) {
         $staticRoleElement = new AllRolesStaticDropDownElement($this->model, 'roleId', $this->form, $params);
         $staticRoleElement->editableTemplate = '<div class="value-data">{content}{error}</div>';
         $content .= $staticRoleElement->render();
     } elseif ($formType == WorkflowEmailMessageRecipientForm::TYPE_STATIC_USER) {
         $staticUserElement = new UserNameIdElement($this->model, 'userId', $this->form, $params);
         $staticUserElement->setIdAttributeId('userId');
         $staticUserElement->setNameAttributeName('stringifiedModelForValue');
         $staticUserElement->editableTemplate = '<div class="value-data">{content}{error}</div>';
         $content .= $staticUserElement->render();
     } else {
         throw new NotSupportedException();
     }
     return $content;
 }