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


PHP ZurmoHtml::textField方法代码示例

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


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

示例1: renderControlEditable

 /**
  * Render a hidden input, a text input with an auto-complete
  * event, and a select button. These three items together
  * form the Opportunity Editable Element
  * @return The element's content as a string.
  */
 protected function renderControlEditable()
 {
     $content = null;
     $content .= ZurmoHtml::textField('stageToProbabilityMapping_notUsed', null, array('id' => $this->getEditableInputId(), 'style' => "display:none;"));
     $fieldData = CustomFieldData::getByName('SalesStages');
     if ($fieldData->serializedData != null) {
         $values = unserialize($fieldData->serializedData);
         if (!is_array($values)) {
             $values = array();
         }
     } else {
         $values = array();
     }
     $stagesToProbabilities = OpportunitiesModule::getStageToProbabilityMappingData();
     foreach ($values as $value) {
         if (isset($stagesToProbabilities[$value])) {
             $probability = $stagesToProbabilities[$value];
         } else {
             $probability = 0;
         }
         $htmlOptions = array('name' => $this->getNameForInputField($value), 'value' => $probability);
         $element = $this->form->textField($this->model, $this->attribute, $htmlOptions);
         $element .= ZurmoHtml::tag('span', array(), $value);
         $content .= ZurmoHtml::tag('div', array('class' => 'has-lang-label'), $element);
     }
     return $content;
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:33,代码来源:StageToProbabilityMappingElement.php

示例2: run

 public function run()
 {
     $id = $this->getId();
     $this->htmlOptions['id'] = $id;
     if (isset($this->htmlOptions['disabled']) && $this->htmlOptions['disabled'] == 'disabled') {
         $tokenListClassSuffix = ' disabled';
     } else {
         $tokenListClassSuffix = '';
     }
     echo ZurmoHtml::textField($this->name, null, $this->htmlOptions);
     $javaScript = "\$(document).ready(function () { ";
     $javaScript .= "\$('#{$id}').tokenInput('{$this->sourceUrl}', { ";
     $javaScript .= "queryParam: 'term',";
     // Not Coding Standard
     if ($this->hintText != null) {
         $javaScript .= "hintText: '" . Yii::app()->format->text($this->hintText) . "',";
         // Not Coding Standard
     }
     if ($this->onAdd != null) {
         $javaScript .= "onAdd: " . $this->onAdd . ",";
         // Not Coding Standard
     }
     if ($this->onDelete != null) {
         $javaScript .= "onDelete: " . $this->onDelete . ",";
         // Not Coding Standard
     }
     if ($this->jsonEncodedIdsAndLabels != null) {
         $javaScript .= "prePopulate: " . $this->jsonEncodedIdsAndLabels . ",";
         // Not Coding Standard
     }
     $javaScript .= "preventDuplicates: 'true', classes: {tokenList: 'token-input-list" . $tokenListClassSuffix . "'}";
     $javaScript .= "});";
     $javaScript .= "});";
     Yii::app()->getClientScript()->registerScript(__CLASS__ . '#' . $id, $javaScript);
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:35,代码来源:MultiSelectAutoComplete.php

示例3: 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

示例4: run

 public function run()
 {
     // Begin Not Coding Standard
     $javaScript = "\n                \$(document).ready(function()\n                {\n                    \$('#{$this->inputId}').iris({\n                        change: {$this->change},\n                        palettes: {$this->palettes},\n                    });\n                }\n                );\n            ";
     // End Not Coding Standard
     Yii::app()->getClientScript()->registerScript(__CLASS__ . '#' . $this->id, $javaScript, CClientScript::POS_END);
     $this->resolveHtmlOptions();
     $inputField = ZurmoHtml::textField($this->inputName, $this->inputValue, $this->htmlOptions);
     $icon = ZurmoHtml::icon('icon-color-picker');
     echo ZurmoHtml::tag('div', array('class' => 'has-color-picker'), $inputField . $icon);
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:11,代码来源:ZurmoColorPicker.php

示例5: renderContent

 /**
  * Renders content for a calendar.
  * @return A string containing the element's content.
  */
 protected function renderContent()
 {
     $content = $this->renderViewToolBar();
     $cClipWidget = new CClipWidget();
     $cClipWidget->beginClip("Calendar");
     $cClipWidget->widget('ext.zurmoinc.framework.widgets.Calendar', array('language' => YiiToJqueryUIDatePickerLocalization::getLanguage(), 'htmlOptions' => array('id' => 'calendar' . $this->uniqueLayoutId, 'name' => 'calendar' . $this->uniqueLayoutId), 'options' => array('dateFormat' => YiiToJqueryUIDatePickerLocalization::resolveDateFormat(DateTimeUtil::getLocaleDateFormat()), 'onChangeMonthYear' => $this->getOnChangeMonthScript(), 'onSelect' => $this->getOnSelectScript(), 'altFormat' => 'yy-mm-dd', 'altField' => '#calendarSelectedDate' . $this->uniqueLayoutId), 'dayEvents' => $this->makeDayEvents()));
     $cClipWidget->endClip();
     $content .= $cClipWidget->getController()->clips['Calendar'];
     $content .= ZurmoHtml::textField('calendarSelectedDate' . $this->uniqueLayoutId, null, array('id' => 'calendarSelectedDate' . $this->uniqueLayoutId, 'style' => 'display:none;'));
     return $content;
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:15,代码来源:CalendarView.php

示例6: renderAddInputAndAddButton

 protected function renderAddInputAndAddButton()
 {
     $activeLanguagesData = $this->getActiveLanguagesData();
     $baseLanguage = $this->getBaseLanguage();
     $content = '<table id="picklist-values">';
     $content .= '<colgroup><col style="width:50%" />';
     $content .= '</colgroup>';
     $content .= '<tbody>';
     $content .= '<tr><td>';
     $content .= '<div class="has-lang-label">' . ZurmoHtml::textField($this->attribute . '_AddInput', '', array('size' => 50));
     $content .= static::renderLanguageLabelHtmlContent($activeLanguagesData[$baseLanguage]['name']);
     $content .= '</div>';
     $content .= '<div id="' . $this->attribute . '_AddInput_em_" class="errorMessage" style="display:none"></div>';
     $content .= '</td></tr>';
     $content .= '<tr><td>';
     $content .= ZurmoHtml::link(ZurmoHtml::wrapLabel(Zurmo::t('Core', 'Add Item')), '#', array('id' => $this->attribute . '_AddInputButton'));
     $content .= '</td></tr>';
     $content .= '</tbody>';
     $content .= '</table>';
     return $content;
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:21,代码来源:EditableDropDownCollectionElement.php

示例7: getPanelSettingsDisplay

 protected function getPanelSettingsDisplay($title, $detailViewOnly, $locked, $panelIdName)
 {
     assert('is_bool($locked) || $locked == null');
     $content = '<div class="panel-settings modal-settings" title="' . Zurmo::t('Core', 'Panel Settings') . '">';
     $content .= '<div class="wide form">';
     $content .= '<table>';
     $content .= TableUtil::getColGroupContent(1);
     $content .= '<tr>';
     $content .= '<th><label>' . Zurmo::t('Core', 'Panel Title') . '</label></th>';
     $content .= '<td>' . ZurmoHtml::textField('title_' . $panelIdName, $title, array('class' => 'panel-title settings-form-field')) . ZurmoHtml::hiddenField('locked_' . $panelIdName, $locked, array('class' => 'panel-title settings-form-field')) . '</td>';
     $content .= '</tr>';
     $content .= '<tr>';
     $content .= '<th><label>' . Zurmo::t('Core', 'Detail View Only') . '</label></th>';
     $content .= '<td>' . ZurmoHtml::checkBox('detailViewOnly_' . $panelIdName, $detailViewOnly, array('class' => 'panel-title settings-form-field')) . '</td>';
     $content .= '</tr>';
     $content .= '</table>';
     $content .= '<div class="view-toolbar-container clearfix"><div class="form-toolbar">';
     $content .= $this->renderSaveModalSettingsButton();
     $content .= '</div></div>';
     $content .= '</div>';
     $content .= '</div>';
     return $content;
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:23,代码来源:DesignerLayoutEditor.php

示例8: run

 /**
  * Run this widget.
  * This method registers necessary javascript and renders the needed HTML code.
  */
 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 ($this->hasModel()) {
         echo ZurmoHtml::activeTextField($this->model, $this->attribute, $this->htmlOptions);
     } else {
         echo ZurmoHtml::textField($name, $this->value, $this->htmlOptions);
     }
     $this->registerScriptForNowButton();
     if (!isset($this->options['currentText'])) {
         $this->options['currentText'] = ZurmoHtml::wrapLabel(Zurmo::t('TimepickerExtension', 'Now'));
     }
     if (!isset($this->options['closeText'])) {
         $this->options['closeText'] = ZurmoHtml::wrapLabel(Zurmo::t('TimepickerExtension', 'Done'));
     }
     $options = CJavaScript::encode($this->options);
     if ($this->timePickerOnly) {
         $js = "jQuery('#{$id}').timepicker({$options});";
     } else {
         $js = "jQuery('#{$id}').datetimepicker({$options});";
     }
     if (isset($this->language)) {
         $this->registerScriptFile($this->i18nScriptFile);
         if ($this->timePickerOnly) {
             $js = "jQuery('#{$id}').timepicker(jQuery.extend({showMonthAfterYear:false}, jQuery.datepicker.regional['{$this->language}'], {$options}));";
         } else {
             $js = "jQuery('#{$id}').datetimepicker(jQuery.extend({showMonthAfterYear:false}, jQuery.datepicker.regional['{$this->language}'], {$options}));";
         }
     }
     Yii::app()->getClientScript()->registerScript(__CLASS__ . '#' . $id, $js);
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:45,代码来源:EJuiDateTimePicker.php


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