当前位置: 首页>>代码示例>>PHP>>正文


PHP ZurmoHtml::dropDownList方法代码示例

本文整理汇总了PHP中ZurmoHtml::dropDownList方法的典型用法代码示例。如果您正苦于以下问题:PHP ZurmoHtml::dropDownList方法的具体用法?PHP ZurmoHtml::dropDownList怎么用?PHP ZurmoHtml::dropDownList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ZurmoHtml的用法示例。


在下文中一共展示了ZurmoHtml::dropDownList方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: renderControlEditable

 /**
  * Renders the editable dropdown content.
  * @return A string containing the element's content.
  */
 protected function renderControlEditable()
 {
     if (ArrayUtil::getArrayValue($this->params, 'defaultToBlank')) {
         return ZurmoHtml::dropDownList($this->getNameForSelectInput(), null, $this->getDropDownArray(), $this->resolveHtmlOptions());
     } else {
         return $this->form->dropDownList($this->model->{$this->attribute}->currency, 'id', $this->getDropDownArray(), $this->resolveHtmlOptions());
     }
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:12,代码来源:CurrencyIdForAModelsRelatedCurrencyValueDropDownElement.php

示例2: renderControlEditable

 protected function renderControlEditable()
 {
     $this->attribute = 'contactEmailTemplateNames';
     $dropDownArray = $this->getDropDownArray();
     $htmlOptions = $this->getEditableHtmlOptions();
     $name = $this->getEditableInputName();
     $this->registerScripts();
     return ZurmoHtml::dropDownList($name, null, $dropDownArray, $htmlOptions);
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:9,代码来源:ContactEmailTemplateNamesDropDownElement.php

示例3: renderEditableFirstValueContent

 protected function renderEditableFirstValueContent()
 {
     $content = parent::renderEditableFirstValueContent();
     $htmlOptions = array('id' => $this->getCurrencyIdForValueEditableInputId(), 'empty' => Zurmo::t('Core', '(None)'));
     $data = Yii::app()->currencyHelper->getActiveCurrenciesOrSelectedCurrenciesData((int) $this->model->currencyIdForValue);
     $content .= ZurmoHtml::dropDownList($this->getCurrencyIdForValueEditableInputName(), $this->model->currencyIdForValue, $data, $htmlOptions);
     $error = $this->form->error($this->model, 'currencyIdForValue', array('inputID' => $this->getCurrencyIdForValueEditableInputId()));
     return $content . $error;
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:9,代码来源:MixedCurrencyValueTypesElement.php

示例4: renderControlEditable

 /**
  * Renders the editable dropdown content.
  * @return A string containing the element's content.
  */
 protected function renderControlEditable()
 {
     $this->assertModelIsValid();
     $dropDownArray = UserStatusUtil::getStatusArray();
     $value = UserStatusUtil::getSelectedValueByUser($this->getUserModel());
     $htmlOptions = array('id' => $this->getEditableInputId('userStatus'));
     $content = ZurmoHtml::dropDownList($this->getEditableInputName('userStatus'), $value, $dropDownArray, $htmlOptions);
     $content = ZurmoHtml::tag('div', array('class' => 'beforeToolTip'), $content);
     $content .= self::renderTooltipContent();
     return $content;
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:15,代码来源:DerivedUserStatusElement.php

示例5: renderControlEditable

 /**
  * Renders the editable dropdown content.
  * @return A string containing the element's content.
  */
 protected function renderControlEditable()
 {
     $this->registerScripts();
     $dropDownArray = $this->getHelperDropDownArray();
     $inputId = $this->getIdForInput();
     $compareValue = PolicyIntegerAndStaticDropDownElement::HELPER_DROPDOWN_VALUE_YES;
     $htmlOptions = array('id' => $this->getIdForHelperInput(), 'onchange' => 'enableDisablePolicyTextField($(this).val(), \'' . $inputId . '\', \'' . $compareValue . '\');');
     $content = $this->getInheritedContent();
     $content .= ZurmoHtml::dropDownList($this->getNameForHelperInput(), $this->getHelperValue(), $dropDownArray, $htmlOptions);
     $htmlOptions = array('id' => $inputId, 'class' => $this->resolveInputClassDisabled());
     $content .= $this->form->textField($this->model, $this->attribute, $htmlOptions);
     return $content;
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:17,代码来源:PolicyIntegerAndStaticDropDownElement.php

示例6: renderControlEditable

 /**
  * Renders the editable dropdown content.
  * @return A string containing the element's content.
  */
 protected function renderControlEditable()
 {
     $dropDownArray = $this->getDropDownArray();
     $value = $this->model->{$this->attribute};
     $htmlOptions = array('id' => $this->getEditableInputId($this->attribute));
     $content = ZurmoHtml::dropDownList($this->getEditableInputName($this->attribute), $value, $dropDownArray, $htmlOptions);
     $toolTipContent = static::renderTooltipContent();
     if ($toolTipContent != null) {
         $content = ZurmoHtml::tag('div', array('class' => 'beforeToolTip'), $content);
         $content .= $toolTipContent;
     }
     return $content;
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:17,代码来源:SuperAdministratorToUseElement.php

示例7: renderBeforeTableContent

 protected function renderBeforeTableContent()
 {
     $dropDownContent = ZurmoHtml::dropDownList('attributeTypeName', null, $this->getValueTypeDropDownArray());
     $linkContent = static::renderConfigureLinkContent(null, 'attributeTypeNameButton');
     $url = Yii::app()->createUrl($this->moduleId . '/' . $this->controllerId . '/attributeEdit/', array('moduleClassName' => $this->moduleClassName));
     Yii::app()->clientScript->registerScript('attributeTypeCreateLink', "\n            \$('#attributeTypeNameButton').click( function()\n                {\n                    if (\$('#attributeTypeName').val() == '')\n                    {\n                        alert('" . CJavaScript::quote(Zurmo::t('DesignerModule', 'You must first select a field type')) . "');\n                    }\n                    else\n                    {\n                        window.location = '" . $url . "&attributeTypeName=' + \$('#attributeTypeName').val();\n                    }\n                }\n            );");
     DropDownUtil::registerScripts();
     $content = null;
     $content .= '<div class="add-custom-field">';
     $content .= '<h1>' . Zurmo::t('DesignerModule', 'Create Field') . '</h1>';
     $content .= '<div class="panel-buffer"><div>' . $dropDownContent . '</div>' . $linkContent . '</div>';
     $content .= '</div>';
     return $content;
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:14,代码来源:CustomAttributesCollectionView.php

示例8: renderSavedSearchList

 protected function renderSavedSearchList()
 {
     $savedSearches = SavedSearch::getByOwnerAndViewClassName(Yii::app()->user->userModel, get_class($this));
     $idOrName = static::getSavedSearchListDropDown();
     $htmlOptions = array('id' => $idOrName, 'empty' => Zurmo::t('ZurmoModule', 'Load a saved search'));
     if (count($savedSearches) == 0) {
         $htmlOptions['style'] = "display:none;";
         $htmlOptions['class'] = 'ignore-style';
         $idOrName = static::getSavedSearchListDropDown();
         $htmlOptions = array('id' => $idOrName, 'empty' => Zurmo::t('ZurmoModule', 'Load a saved search'));
         $content = ZurmoHtml::dropDownList($idOrName, $this->model->savedSearchId, self::resolveSavedSearchesToIdAndLabels($savedSearches), $htmlOptions);
         $this->renderSavedSearchDropDownOnChangeScript($idOrName, $this->model->loadSavedSearchUrl);
         return $content;
     }
     $content = ZurmoHtml::dropDownList($idOrName, $this->model->savedSearchId, self::resolveSavedSearchesToIdAndLabels($savedSearches), $htmlOptions);
     $this->renderSavedSearchDropDownOnChangeScript($idOrName, $this->model->loadSavedSearchUrl);
     return $content;
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:18,代码来源:SavedDynamicSearchView.php

示例9: renderSelectableGroupsContent

 protected function renderSelectableGroupsContent()
 {
     list($selectableAttributeName, $selectableRelationAttributeName) = $this->resolveSelectableAttributeNameAndRelatedAttributes();
     $htmlOptions = array('id' => $this->getEditableInputId($selectableAttributeName, $selectableRelationAttributeName), 'onclick' => 'document.getElementById("{bindId}").checked="checked";');
     $name = $this->getEditableInputName($selectableAttributeName, $selectableRelationAttributeName);
     $dropDownArray = static::getSelectableGroupsData();
     if ($dropDownArray == null) {
         return null;
     }
     return ZurmoHtml::dropDownList($name, $this->resolveSelectedGroup(), $dropDownArray, $htmlOptions);
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:11,代码来源:ExplicitReadWriteModelPermissionsElement.php

示例10: actionChangeActionTypeRelatedModel

 public function actionChangeActionTypeRelatedModel($moduleClassName, $type, $relation)
 {
     $content = ZurmoHtml::dropDownList(ActionsForWorkflowWizardView::ACTION_TYPE_RELATED_MODEL_RELATION_NAME, null, ActionsForWorkflowWizardView::resolveTypeRelatedModelRelationDataAndLabels($moduleClassName, $moduleClassName::getPrimaryModelName(), $type, $relation));
     echo $content;
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:5,代码来源:DefaultController.php

示例11: renderElementBar

 /**
  * @param boolean $renderedInForm
  * @param string $barType
  * @return A string containing the element's content.
  * @throws NotSupportedException
  */
 protected function renderElementBar($renderedInForm, $barType)
 {
     assert('$barType == "toolbar" || $barType == "secondToolbar"');
     $metadata = $this::getMetadata();
     $content = null;
     $first = true;
     $dropDownId = null;
     $dropDownItems = array();
     $dropDownItemHtmlOptions = array('prompt' => '');
     // we need this so we have a default one to select at the end of operation.
     if (isset($metadata['global'][$barType]) && is_array($metadata['global'][$barType]['elements'])) {
         foreach ($metadata['global'][$barType]['elements'] as $elementInformation) {
             $renderedContent = null;
             $this->resolveActionElementInformationDuringRender($elementInformation);
             array_walk($elementInformation, array($this, 'resolveEvaluateSubString'));
             $params = array_slice($elementInformation, 1);
             $elementClassName = $elementInformation['type'] . 'ActionElement';
             $element = new $elementClassName($this->controllerId, $this->moduleId, $this->modelId, $params);
             if (!$this->shouldRenderToolBarElement($element, $elementInformation)) {
                 continue;
             }
             if (!$renderedInForm && $element->isFormRequiredToUse()) {
                 throw new NotSupportedException();
             }
             $continueRendering = $this->resolveMassActionLinkActionElementDuringRender($elementClassName, $element, $dropDownItems, $dropDownItemHtmlOptions);
             if ($continueRendering) {
                 $renderedContent = $element->render();
             } else {
                 if (!$dropDownId) {
                     $dropDownId = $elementClassName::getDropdownId();
                 }
             }
             if (!$first && !empty($renderedContent)) {
                 // $content .= '&#160;|&#160;';
             }
             $first = false;
             $content .= $renderedContent;
         }
     }
     if (!empty($dropDownItems)) {
         $content .= ZurmoHtml::link('', '#', array('class' => 'mobile-actions'));
         $content .= ZurmoHtml::tag('div', array('class' => 'mobile-view-toolbar-container'), ZurmoHtml::dropDownList($dropDownId, '', $dropDownItems, $dropDownItemHtmlOptions));
     }
     return $content;
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:51,代码来源:MetadataView.php

示例12: renderAttributeDropDownContent

 protected function renderAttributeDropDownContent()
 {
     $name = $this->formModelClassName . '[' . DynamicSearchForm::DYNAMIC_NAME . '][' . $this->rowNumber . '][attributeIndexOrDerivedType]';
     $id = $this->formModelClassName . '_' . DynamicSearchForm::DYNAMIC_NAME . '_' . $this->rowNumber . '_attributeIndexOrDerivedType';
     $htmlOptions = array('id' => $id, 'class' => 'attribute-dropdown', 'empty' => Zurmo::t('ZurmoModule', 'Select a field'));
     Yii::app()->clientScript->registerScript('AttributeDropDown' . $id, $this->renderAttributeDropDownOnChangeScript($id, $this->getInputsDivId(), $this->ajaxOnChangeUrl));
     $content = ZurmoHtml::dropDownList($name, $this->selectedAttribute, $this->searchableAttributeIndicesAndDerivedTypes, $htmlOptions);
     Yii::app()->clientScript->registerScript('mappingExtraColumnRemoveLink', "\n            \$('.remove-extra-dynamic-search-row-link').unbind('click');\n            \$('.remove-extra-dynamic-search-row-link').bind('click', function()\n                {\n                    formId = \$(this).closest('form').attr('id');\n                    \$(this).parent().remove();\n                    rebuildDynamicSearchRowNumbersAndStructureInput(formId);\n                    resolveClearLinkPrefixLabelAndVisibility(formId);\n                }\n            );");
     return $content;
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:10,代码来源:DynamicSearchRowView.php

示例13: renderEditableValueTypeContent

 protected function renderEditableValueTypeContent()
 {
     return ZurmoHtml::dropDownList($this->getValueTypeEditableInputName(), $this->getValueType(), $this->getValueTypeDropDownArray(), $this->getEditableValueTypeHtmlOptions());
 }
开发者ID:sandeep1027,项目名称:zurmo_,代码行数:4,代码来源:MixedDateTypesElement.php

示例14: renderAttributeDropDownContent

 protected function renderAttributeDropDownContent($columnName, $columnType, $attributeIndexOrDerivedType, $ajaxOnChangeUrl)
 {
     assert('is_string($columnName)');
     assert('$columnType == "importColumn" || $columnType == "extraColumn"');
     assert('is_string($attributeIndexOrDerivedType) || $attributeIndexOrDerivedType == null');
     assert('is_string($ajaxOnChangeUrl)');
     $name = $this->mappingFormModelClassName . '[' . $columnName . '][attributeIndexOrDerivedType]';
     $id = $this->mappingFormModelClassName . '_' . $columnName . '_attributeIndexOrDerivedType';
     $htmlOptions = array('id' => $id, 'empty' => Zurmo::t('ImportModule', 'Do not map this field'));
     Yii::app()->clientScript->registerScript('AttributeDropDown' . $id, $this->renderAttributeDropDownOnChangeScript($id, $columnName, $columnType, $ajaxOnChangeUrl));
     if ($columnType == 'importColumn') {
         $mappableAttributeIndicesAndDerivedTypes = $this->mappableAttributeIndicesAndDerivedTypesForImportColumns;
     } else {
         $mappableAttributeIndicesAndDerivedTypes = $this->mappableAttributeIndicesAndDerivedTypesForExtraColumns;
     }
     $content = ZurmoHtml::dropDownList($name, $attributeIndexOrDerivedType, $mappableAttributeIndicesAndDerivedTypes, $htmlOptions);
     if ($columnType == 'extraColumn') {
         $content .= ZurmoHtml::link(Zurmo::t('ImportModule', 'Remove Field'), '#', array('class' => 'remove-extra-column-link z-link'));
         Yii::app()->clientScript->registerScript('mappingExtraColumnRemoveLink', "\n                \$('.remove-extra-column-link').click( function()\n                    {\n                        \$(this).parent().parent().remove();\n                    }\n                );");
     }
     return $content;
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:22,代码来源:MappingFormLayoutUtil.php

示例15: renderEditableSecondRangeContent

 protected function renderEditableSecondRangeContent()
 {
     $htmlOptions = array('empty' => Zurmo::t('Core', '(None)'), 'id' => $this->getSecondRangeEditableInputId());
     $label = $this->form->labelEx($this->model, 'secondRange', array('for' => $this->getSecondRangeEditableInputId()));
     $content = ZurmoHtml::dropDownList($this->getSecondRangeEditableInputName(), $this->model->secondRange, $this->model->getAvailableSecondRangeDataAndLabels(), $htmlOptions);
     $error = $this->form->error($this->model, 'secondRange', array('inputID' => $this->getSecondRangeEditableInputId()));
     return $label . $content . $error;
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:8,代码来源:MixedChartRangeAndSeriesElement.php


注:本文中的ZurmoHtml::dropDownList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。