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


PHP ZurmoHtml::hiddenField方法代码示例

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


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

示例1: run

 /**
  * Run this widget.
  * This method registers necessary javascript and renders the needed HTML code.
  */
 public function run()
 {
     $id = $this->getId();
     if (isset($this->htmlOptions['id'])) {
         $id = $this->htmlOptions['id'];
     } else {
         $this->htmlOptions['id'] = $id;
     }
     if (empty($this->options)) {
         $options = '';
     } else {
         $options = CJavaScript::encode($this->options);
     }
     if ($this->baseInputNameForSortableCollection != null) {
         echo ZurmoHtml::hiddenField($this->baseInputNameForSortableCollection);
     }
     Yii::app()->getClientScript()->registerScript(__CLASS__ . '#' . $id, "jQuery('#{$id}').sortable({$options});");
     echo ZurmoHtml::openTag($this->tagName, $this->htmlOptions) . "\n";
     if (empty($this->items) && $this->showEmptyList) {
         echo '<li></li>' . "\n";
     }
     foreach ($this->items as $id => $data) {
         echo strtr($this->itemTemplate, array_merge(array('{id}' => $id), $data)) . "\n";
     }
     echo ZurmoHtml::closeTag($this->tagName);
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:30,代码来源:JuiSortable.php

示例2: renderAfterFormLayout

 protected function renderAfterFormLayout($form)
 {
     $element = new SortableContactWebFormAttributesElement($this->model, 'serializedData', $form);
     $content = $element->render();
     $content .= ZurmoHtml::hiddenField('getPlacedAttributeAction', Yii::app()->createUrl('contactWebForms/default/getPlacedAttributeByName'));
     return $content;
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:7,代码来源:ContactWebFormEditAndDetailsView.php

示例3: renderAttributeIndexOrDerivedType

 /**
  * @return string
  */
 protected function renderAttributeIndexOrDerivedType()
 {
     $hiddenInputName = Element::resolveInputNamePrefixIntoString(array_merge($this->inputPrefixData, array('attributeIndexOrDerivedType')));
     $hiddenInputId = Element::resolveInputIdPrefixIntoString(array_merge($this->inputPrefixData, array('attributeIndexOrDerivedType')));
     $idInputHtmlOptions = array('id' => $hiddenInputId);
     return ZurmoHtml::hiddenField($hiddenInputName, $this->model->getAttributeIndexOrDerivedType(), $idInputHtmlOptions);
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:10,代码来源:RuntimeReportAttributeToElementAdapter.php

示例4: renderRightSideContent

 /**
  * @return string
  */
 protected function renderRightSideContent()
 {
     $hiddenInputId = get_class($this->model) . '_displayAttributes';
     $hiddenInputName = get_class($this->model) . '[displayAttributes]';
     $idInputHtmlOptions = array('id' => $hiddenInputId);
     $content = ZurmoHtml::hiddenField($hiddenInputName, null, $idInputHtmlOptions);
     $content .= $this->form->error($this->model, 'displayAttributes', array('inputID' => $hiddenInputId));
     $content .= parent::renderRightSideContent();
     return $content;
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:13,代码来源:DisplayAttributesForReportWizardView.php

示例5: run

 /**
  * This function overrides the run method from CJuiDatePicker and fixes the jQuery issue for the Datepicker showing
  * wrong language in the portlet views popup.
  */
 public function run()
 {
     list($name, $id) = $this->resolveNameID();
     if (isset($this->htmlOptions['id'])) {
         $id = $this->htmlOptions['id'];
     } else {
         $this->htmlOptions['id'] = $id;
     }
     if (isset($this->htmlOptions['name'])) {
         $name = $this->htmlOptions['name'];
     } else {
         $this->htmlOptions['name'] = $name;
     }
     if (!isset($this->options['currentText'])) {
         $this->options['currentText'] = ZurmoHtml::wrapLabel(Zurmo::t('Core', 'Now'));
     }
     if (!isset($this->options['closeText'])) {
         $this->options['closeText'] = ZurmoHtml::wrapLabel(Zurmo::t('Core', 'Done'));
     }
     if ($this->flat === false) {
         if ($this->hasModel()) {
             echo ZurmoHtml::activeTextField($this->model, $this->attribute, $this->htmlOptions);
         } else {
             echo ZurmoHtml::textField($name, $this->value, $this->htmlOptions);
         }
     } else {
         if ($this->hasModel()) {
             echo ZurmoHtml::activeHiddenField($this->model, $this->attribute, $this->htmlOptions);
             $attribute = $this->attribute;
             $this->options['defaultDate'] = $this->model->{$attribute};
         } else {
             echo ZurmoHtml::hiddenField($name, $this->value, $this->htmlOptions);
             $this->options['defaultDate'] = $this->value;
         }
         if (!isset($this->options['onSelect'])) {
             $this->options['onSelect'] = "js:function( selectedDate ) { jQuery('#{$id}').val(selectedDate);}";
             // Not Coding Standard
         }
         $id = $this->htmlOptions['id'] = $this->htmlOptions['id'] . '_container';
         $this->htmlOptions['name'] = $this->htmlOptions['name'] . '_container';
         echo ZurmoHtml::tag('div', $this->htmlOptions, '');
     }
     $options = CJavaScript::encode($this->options);
     $js = "jQuery('#{$id}').datepicker({$options});";
     if ($this->language != '' && $this->language != 'en') {
         $this->registerScriptFile($this->i18nScriptFile);
         $js = "jQuery(function(){jQuery('#{$id}').datepicker(jQuery.extend({showMonthAfterYear:false}, jQuery.datepicker.regional['{$this->language}'], {$options}));})";
     }
     $cs = Yii::app()->getClientScript();
     if (isset($this->defaultOptions)) {
         $this->registerScriptFile($this->i18nScriptFile);
         $cs->registerScript(__CLASS__, $this->defaultOptions !== null ? 'jQuery.datepicker.setDefaults(' . CJavaScript::encode($this->defaultOptions) . ');' : '');
     }
     $cs->registerScript(__CLASS__ . '#' . $id, $js);
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:59,代码来源:JuiDatePicker.php

示例6: resolveItemsAndContent

 /**
  * @return array
  */
 protected function resolveItemsAndContent()
 {
     $items = array();
     $inputName = Element::resolveInputNamePrefixIntoString(array('SavedWorkflow', 'savedWorkflowIds'));
     foreach ($this->savedWorkflows as $workflow) {
         $content = '<div class="dynamic-row">';
         $content .= ZurmoHtml::hiddenField($inputName . '[]', $workflow->id);
         $content .= strval($workflow);
         $content .= '</div>';
         $items[] = array('content' => $content);
     }
     return $items;
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:16,代码来源:WorkflowManageOrderListView.php

示例7: renderSelectLink

 protected function renderSelectLink()
 {
     if (!$this->shouldRenderSelectLink) {
         return null;
     }
     $cs = Yii::app()->getClientScript();
     $cs->registerCoreScript('bbq');
     $cs->registerScriptFile(Yii::app()->getAssetManager()->publish(Yii::getPathOfAlias('application.core.elements.assets')) . '/Modal.js', CClientScript::POS_END);
     $this->registerSelectLinkScripts();
     $content = ZurmoHtml::openTag('div', array('class' => 'has-model-select'));
     $content .= ZurmoHtml::hiddenField($this->getIdForHiddenSelectLinkField());
     $content .= ZurmoHtml::ajaxLink('<span class="model-select-icon"></span>', Yii::app()->createUrl($this->getSourceUrlForSelectLink(), $this->getSelectLinkUrlParams()), $this->resolveAjaxOptionsForSelectingModel(), array('id' => $this->getWidgetId() . '-select-link'));
     $content .= ZurmoHtml::closeTag('div');
     return $content;
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:15,代码来源:AutoCompleteTextElement.php

示例8: renderControlEditable

 protected function renderControlEditable()
 {
     $cs = Yii::app()->getClientScript();
     $cs->registerCoreScript('bbq');
     $cs->registerScriptFile(Yii::app()->getAssetManager()->publish(Yii::getPathOfAlias('application.core.elements.assets')) . '/Modal.js', CClientScript::POS_END);
     $this->renderQtipForPreviewImage();
     $applyScript = null;
     if ($this->getApplyLinkId() != null) {
         $applyScript = "\$('#{$this->getApplyLinkId()}').click();";
     }
     $cs->registerScript(get_class($this), "\n                        function replaceImageSummary(id, value)\n                        {\n                            \$('#' + id).html(value);\n                            {$applyScript}\n                        };\n                    ");
     $content = ZurmoHtml::tag('div', array('id' => $this->getIdForPreviewDiv()), $this->renderImageDetails());
     $content .= $this->registerScriptsForEditAndSelectLinks();
     $value = $this->image == null ? null : $this->image->id;
     $content .= ZurmoHtml::hiddenField($this->getEditableInputName(), $value);
     return $content;
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:17,代码来源:ImageElement.php

示例9: renderControlEditable

 /**
  * Renders the setting as a links. Also adds hidden variable to form to ensure form can get serialized
  * during an ajax call.
  * @return A string containing the element's content.
  */
 protected function renderControlEditable()
 {
     assert('$this->model instanceof MarketingOverallMetricsForm');
     $hiddenInputName = 'marketingMetricsGroupByNotUsedName';
     $hiddenInput = ZurmoHtml::hiddenField($hiddenInputName);
     $content = '';
     foreach ($this->getValuesAndLabels() as $value => $label) {
         $class = $this->form->getId() . 'marketingMetricsGroupByLink';
         if ($this->model->{$this->attribute} == $value) {
             $class .= ' active';
         }
         $content .= ZurmoHtml::link($label, '#', array('data-value' => $value, 'class' => $class));
     }
     $content = ZurmoHtml::tag('div', array('class' => 'pills'), $content);
     $content = $hiddenInput . $content;
     return $content;
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:22,代码来源:MarketingMetricsGroupByRadioElement.php

示例10: renderColumnTypeContent

 protected function renderColumnTypeContent($columnName, $columnType, $attributeIndexOrDerivedType)
 {
     assert('is_string($columnName)');
     assert('$columnType == "importColumn" || $columnType == "extraColumn"');
     $idInputHtmlOptions = array('id' => $this->mappingFormModelClassName . '_' . $columnName . '_type');
     $hiddenInputName = $this->mappingFormModelClassName . '[' . $columnName . '][type]';
     return ZurmoHtml::hiddenField($hiddenInputName, $columnType, $idInputHtmlOptions);
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:8,代码来源:MappingFormLayoutUtil.php

示例11: renderContent

 /**
  * Renders content for a list view. Utilizes a CActiveDataprovider
  * and a CGridView widget.
  * and form layout.
  * @return A string containing the element's content.
  */
 protected function renderContent()
 {
     $cClipWidget = new CClipWidget();
     $cClipWidget->beginClip("ListView");
     $cClipWidget->widget($this->getGridViewWidgetPath(), $this->getCGridViewParams());
     $cClipWidget->endClip();
     $content = null;
     if ($this->renderViewToolBarDuringRenderContent) {
         $content .= $this->renderViewToolBar();
     }
     $content .= $cClipWidget->getController()->clips['ListView'] . "\n";
     if ($this->getRowsAreSelectable()) {
         $content .= ZurmoHtml::hiddenField($this->gridId . $this->gridIdSuffix . '-selectedIds', implode(",", $this->selectedIds)) . "\n";
         // Not Coding Standard
     }
     $this->renderScripts();
     return $content;
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:24,代码来源:ListView.php

示例12: renderAfterFormLayout

 protected function renderAfterFormLayout($form)
 {
     $content = "<div id='reCaptcha'></div>";
     $content .= ZurmoHtml::hiddenField('captchaHash');
     $content .= ZurmoHtml::hiddenField('reCaptchaPublicKey', ZurmoConfigurationUtil::getByModuleName('ZurmoModule', 'reCaptchaPublicKey'));
     $content .= ZurmoHtml::hiddenField($this->hashIndexHiddenField, md5('ContactWebFormEntry' . time()));
     $content .= ZurmoHtml::hiddenField(ZurmoHttpRequest::EXTERNAL_REQUEST_TOKEN, ZURMO_TOKEN);
     $content .= ZurmoHtml::hiddenField(self::GOOGLE_WEB_TRACKING_ID_FIELD);
     return $content;
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:10,代码来源:ContactExternalEditAndDetailsView.php

示例13: renderAddExtraColumnContent

 /**
  * @param int $columnCount
  * @return string
  */
 protected function renderAddExtraColumnContent($columnCount)
 {
     assert('is_int($columnCount)');
     $idInputHtmlOptions = array('id' => 'columnCounter');
     $hiddenInputName = 'columnCounter';
     $ajaxOnChangeUrl = Yii::app()->createUrl("import/default/mappingAddExtraMappingRow", array('id' => $this->model->id));
     $content = ZurmoHtml::hiddenField($hiddenInputName, $columnCount, $idInputHtmlOptions);
     // Begin Not Coding Standard
     $aContent = ZurmoHtml::wrapLink(Zurmo::t('ImportModule', 'Add Field'));
     $content .= ZurmoHtml::ajaxLink($aContent, $ajaxOnChangeUrl, array('type' => 'GET', 'data' => 'js:\'columnCount=\' + $(\'#columnCounter\').val()', 'complete' => 'js:function(){$("#addExtraColumnButton").removeClass("loading");
                                                                      $("#addExtraColumnButton").removeClass("loading-ajax-submit");}', 'success' => 'js:function(data){
                                         $(\'#columnCounter\').val(parseInt($(\'#columnCounter\').val()) + 1)
                                         $(\'#addExtraColumnButton\').parent().parent().prev().after(data);
                                       }'), array('id' => 'addExtraColumnButton', 'class' => 'attachLoading z-button', 'onclick' => 'js:if ($(this).hasClass("loading")) {return false;}
                                                     $(this).addClass("loading").addClass("loading-ajax-submit");
                                                     $(this).makeOrRemoveLoadingSpinner(true, "#" + $(this).attr("id"));'));
     // End Not Coding Standard
     return $content;
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:23,代码来源:ImportWizardMappingView.php

示例14: renderTypeContent

 /**
  * @return A|string
  */
 protected function renderTypeContent()
 {
     $typeValuesAndLabels = $this->model->getTypeValuesAndLabels($this->isCreatingNewModel(), $this->isAttributeRequired);
     if (count($typeValuesAndLabels) > 1) {
         $params = array('inputPrefix' => $this->inputPrefixData, 'typeValuesAndLabels' => $typeValuesAndLabels);
         $typeElement = new WorkflowActionAttributeTypeStaticDropDownElement($this->model, 'type', $this->form, $params);
         $typeElement->editableTemplate = '{content}{error}';
         return $typeElement->render();
     } else {
         $label = reset($typeValuesAndLabels);
         $name = Element::resolveInputNamePrefixIntoString($this->inputPrefixData) . '[type]';
         $id = Element::resolveInputIdPrefixIntoString($this->inputPrefixData) . 'type';
         $htmlOptions = array('id' => $id);
         $content = ZurmoHtml::tag('span', array(), $label);
         $content .= ZurmoHtml::hiddenField($name, key($typeValuesAndLabels), $htmlOptions);
         return $content;
     }
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:21,代码来源:WorkflowActionAttributeToElementAdapter.php

示例15: renderHiddenOperator

 /**
  * Builds hidden operator input. Used in the event there is only one operator available. No reason to show
  * that in the user interface
  * @return string
  */
 protected function renderHiddenOperator()
 {
     if ($this->model->hasAvailableOperatorsType() && count($this->model->getOperatorValuesAndLabels()) == 1) {
         $hiddenInputName = Element::resolveInputNamePrefixIntoString(array_merge($this->inputPrefixData, array('operator')));
         $hiddenInputId = Element::resolveInputIdPrefixIntoString(array_merge($this->inputPrefixData, array('operator')));
         $idInputHtmlOptions = array('id' => $hiddenInputId);
         $valuesAndLabels = $this->model->getOperatorValuesAndLabels();
         return ZurmoHtml::hiddenField($hiddenInputName, key($valuesAndLabels), $idInputHtmlOptions);
     }
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:15,代码来源:ReportAttributeToElementAdapter.php


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