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


PHP ZurmoHtml::checkBox方法代码示例

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


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

示例1: getCheckboxContent

 protected function getCheckboxContent($translatedLabel, $class)
 {
     $htmlOptions = array('onClick' => 'js:$(".' . $class . '").parentsUntil("li").parent().toggle();');
     $label = ZurmoHtml::label($translatedLabel, $translatedLabel, array('class' => 'label-for-marketing-list-widgets'));
     $content = ZurmoHtml::checkBox($translatedLabel, true, $htmlOptions) . $label;
     return $content;
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:7,代码来源:MarketingListsTogglePortletsLinkActionElement.php

示例2: renderHideOrShowContent

 protected function renderHideOrShowContent()
 {
     $name = MarketingDashboardIntroView::PANEL_ID . '-checkbox-id';
     $htmlOptions = array('id' => MarketingDashboardIntroView::PANEL_ID . '-checkbox-id');
     $checkBox = ZurmoHtml::checkBox($name, $this->resolveChecked(), $htmlOptions);
     return '<div class="screen-options"><h4>Screen Options</h4>' . $checkBox . Zurmo::t('MarketingModule', 'Show intro message') . '</div>';
 }
开发者ID:sandeep1027,项目名称:zurmo_,代码行数:7,代码来源:MarketingIntroLinkActionElement.php

示例3: getDynamicContent

 protected function getDynamicContent()
 {
     $name = $this->getPanelId() . '-checkbox-id';
     $ajaxOptions = array('type' => 'GET', 'url' => Yii::app()->createUrl('zurmo/default/toggleDismissIntroView', array('moduleName' => $this->getModuleName(), 'panelId' => $this->getPanelId())), 'success' => "function()\n                                       {\n                                           var checked = \$('#{$this->getPanelId()}-checkbox-id').attr('checked');\n                                           \$('#{$this->getPanelId()}').slideToggle();\n                                           \$('#{$this->getPanelId()}-checkbox-id').attr('checked', !checked);\n                                           if (checked)\n                                           {\n                                             \$('#{$this->getPanelId()}-checkbox-id').parent().removeClass('c_on');\n                                           }\n                                           else\n                                           {\n                                             \$('#{$this->getPanelId()}-checkbox-id').parent().addClass('c_on');\n                                           }\n                                       }\n            ");
     $htmlOptions = array('id' => $this->getPanelId() . '-checkbox-id', 'ajax' => $ajaxOptions);
     $checkBox = ZurmoHtml::checkBox($name, $this->getChecked(), $htmlOptions);
     return '<div class="screen-options"><h4>' . $this->getLabelForDynamicContent() . '</h4>' . $checkBox . Zurmo::t('ZurmoModule', 'Show intro message') . '</div>';
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:8,代码来源:IntroLinkActionElement.php

示例4: renderControlEditable

 /**
  * Render A standard text input.
  * @return The element's content as a string.
  */
 protected function renderControlEditable()
 {
     if ($this->getDisabledValue()) {
         $htmlOptions = array();
         $htmlOptions['id'] = $this->getEditableInputId();
         $htmlOptions['disabled'] = 'disabled';
         return ZurmoHtml::checkBox($this->getEditableInputName(), $this->model->{$this->attribute}, $htmlOptions);
     }
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:13,代码来源:TaskCheckListItemsListElement.php

示例5: renderCloseCheckBox

 public static function renderCloseCheckBox($checkboxId, $modelId, $completedValue)
 {
     $htmlOptions = array('class' => 'close-task-checkbox', 'onclick' => "closeOpenTaskByCheckBoxClick('" . $checkboxId . "', '" . $modelId . "')");
     if ($completedValue == true) {
         $htmlOptions['disabled'] = 'disabled';
         $htmlOptions['labelClass'] = 'disabled';
         Yii::app()->clientScript->registerScript('closeTaskCheckBoxScriptStartingState' . $checkboxId, "\n                    \$('#" . $checkboxId . "').parentsUntil('tr').parent().children().css('text-decoration', 'line-through');\n                ", CClientScript::POS_END);
     }
     return ZurmoHtml::checkBox($checkboxId, $completedValue, $htmlOptions);
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:10,代码来源:CloseTaskCheckBoxListViewColumnAdapter.php

示例6: render

 public function render()
 {
     if (!RightsUtil::canUserAccessModule('SocialItemsModule', Yii::app()->user->userModel)) {
         return parent::render();
     }
     $postToProfileContent = ZurmoHtml::tag('span', array(), Zurmo::t('ZurmoModule', 'Post to Profile'));
     $postToProfileContent .= static::renderHelpSpan();
     $postToProfileContent .= ZurmoHtml::checkBox('postToProfile', false);
     $content = parent::render();
     $content .= ZurmoHtml::tag('div', array('class' => 'post-to-profile clearfix'), $postToProfileContent);
     return $content;
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:12,代码来源:SaveAndPostNoteToProfileButtonActionElement.php

示例7: render

 /**
  * @return string
  */
 public function render()
 {
     $content = null;
     if ($this->hasRuntimeFilters()) {
         $htmlOptions = array('onClick' => 'js:$(".RuntimeFiltersForPortletView").toggle();');
         $label = ZurmoHtml::label(Zurmo::t('ReportsModule', 'Filters'), Zurmo::t('ReportsModule', 'Filters'), array('class' => 'label-for-report-widgets'));
         $content .= ZurmoHtml::checkBox(Zurmo::t('ReportsModule', 'Filters'), true, $htmlOptions) . $label;
     }
     if ($this->hasChart()) {
         $htmlOptions = array('onClick' => 'js:$(".ReportChartForPortletView").toggle();');
         $label = ZurmoHtml::label(Zurmo::t('ReportsModule', 'Chart'), Zurmo::t('ReportsModule', 'Chart'), array('class' => 'label-for-report-widgets'));
         $content .= ZurmoHtml::checkBox(Zurmo::t('ReportsModule', 'Chart'), true, $htmlOptions) . $label;
     }
     $htmlOptions = array('onClick' => 'js:$(".ReportResultsGridForPortletView").toggle();');
     $label = ZurmoHtml::label(Zurmo::t('ReportsModule', 'Grid'), Zurmo::t('ReportsModule', 'Grid'), array('class' => 'label-for-report-widgets'));
     $content .= ZurmoHtml::checkBox(Zurmo::t('ReportsModule', 'Grid'), true, $htmlOptions) . $label;
     $htmlOptions = array('onClick' => 'js:$(".ReportSQLForPortletView").toggle();');
     $label = ZurmoHtml::label(Zurmo::t('ReportsModule', 'SQL'), Zurmo::t('ReportsModule', 'SQL'), array('class' => 'label-for-report-widgets'));
     $content .= ZurmoHtml::checkBox(Zurmo::t('ReportsModule', 'SQL'), false, $htmlOptions) . $label;
     return ZurmoHtml::tag('div', $this->getHtmlOptions(), $content);
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:24,代码来源:ReportTogglePortletsLinkActionElement.php

示例8: renderActiveAttributesCheckBox

    protected function renderActiveAttributesCheckBox($elementIds, $elementInformation, $checked)
    {
        $checkBoxHtmlOptions = array();
        $checkBoxHtmlOptions['id'] = "MassEdit_" . $elementInformation['attributeName'];
        $enableInputsScript = "";
        $disableInputsScript = "";
        $disableTagCloudInputsScript = "";
        foreach ($elementIds as $id) {
            if ($elementInformation['type'] == 'DropDown' || $elementInformation['type'] == 'RadioDropDown') {
                $enableInputsScript .= "\$('#" . $id . "').removeAttr('disabled'); \n";
                $enableInputsScript .= "\$('#" . $id . "').prev().removeClass('disabled-select-element'); \n";
                $disableInputsScript .= "\$('#" . $id . "').attr('disabled', 'disabled'); \n";
                $disableInputsScript .= "\$('#" . $id . "').prev().addClass('disabled-select-element'); \n";
            } elseif ($elementInformation['type'] == 'TagCloud') {
                $enableInputsScript .= "\$('#token-input-" . $id . "').parent().parent().removeClass('disabled'); \n";
                $disableInputsScript .= "\$('#token-input-" . $id . "').parent().parent().addClass('disabled'); \n";
            } else {
                $enableInputsScript .= "\$('#" . $id . "').removeAttr('disabled'); \n";
                $enableInputsScript .= "if (\$('#" . $id . "').attr('type') != 'button')\n                    {\n                        if (\$('#" . $id . "').attr('href') != undefined)\n                        {\n                            \$('#" . $id . "').css('display', '');\n                        }\n                    }; \n";
                $disableInputsScript .= "\$('#" . $id . "').attr('disabled', 'disabled'); \n";
                $disableInputsScript .= "if (\$('#" . $id . "').attr('type') != 'button')\n                    {\n                        if (\$('#" . $id . "').attr('href') != undefined)\n                        {\n                            \$('#" . $id . "').css('display', 'none');\n                        }\n                        \$('#" . $id . "').val('');\n                    }; \n";
            }
        }
        $massEditScript = <<<END
\$('#{$checkBoxHtmlOptions['id']}').click(function()
    {
        if (this.checked)
        {
            {$enableInputsScript}
        }
        else
        {
            {$disableInputsScript}
        }
    }
);
END;
        Yii::app()->clientScript->registerScript($checkBoxHtmlOptions['id'], $massEditScript);
        return "<th>" . ZurmoHtml::checkBox("MassEdit[" . $elementInformation['attributeName'] . "]", $checked, $checkBoxHtmlOptions) . "</th>  \n";
    }
开发者ID:sandeep1027,项目名称:zurmo_,代码行数:40,代码来源:MassEditView.php

示例9: renderCheckListItemsContent

 /**
  * Renders check list
  * @return string
  */
 protected function renderCheckListItemsContent()
 {
     $content = null;
     $rows = 0;
     $data = array();
     foreach ($this->checkListItemsData as $checkListItem) {
         if ($checkListItem->completed == null || $checkListItem->completed == 0) {
             $checked = false;
         } else {
             $checked = true;
         }
         $checkboxLabel = ZurmoHtml::label($checkListItem->name, 'TaskCheckListItem_' . $checkListItem->id, array());
         $checkBox = ZurmoHtml::checkBox('TaskCheckListItem_' . $checkListItem->id, $checked, array('class' => 'checkListItem', 'value' => $checkListItem->id));
         $itemContent = ZurmoHtml::tag('div', array('class' => 'editable'), $checkBox . '<p>' . $checkboxLabel . '</p>');
         $itemContent .= $this->renderHiddenEditableTextField($checkListItem->id, $checkListItem->name);
         $itemContent .= $this->attachActionsToCheckListItem();
         $content .= ZurmoHtml::tag('li', array('class' => 'check-list-item clearfix', 'id' => 'SortedTaskCheckListItem_' . $checkListItem->id), $itemContent);
     }
     Yii::app()->clientScript->registerScriptFile(Yii::app()->getAssetManager()->publish(Yii::getPathOfAlias('application.modules.tasks.elements.assets')) . '/TaskUtils.js', CClientScript::POS_END);
     $this->registerCheckListItemsScript($checkListItem->id);
     return $content;
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:26,代码来源:TaskCheckListItemsForTaskView.php

示例10: renderCheckboxWithHiddenInput

 protected function renderCheckboxWithHiddenInput($label, $attribute, $renderHidden = false)
 {
     $checkboxLabelFor = $attribute;
     if ($renderHidden) {
         $attribute = $this->resolveCheckboxInputAttributeName($attribute);
         $checkboxLabelFor = ZurmoHtml::activeId($this->model, $attribute);
     }
     $checkboxLabelHtmlOptions = array();
     $checkboxLabel = ZurmoHtml::label($label, $checkboxLabelFor, $checkboxLabelHtmlOptions);
     $checkboxHtmlOptions = $this->resolveCheckBoxHtmlOptions($renderHidden);
     $content = null;
     if ($renderHidden) {
         $content .= $this->form->checkBox($this->model, $attribute, $checkboxHtmlOptions);
     } else {
         $content .= ZurmoHtml::checkBox($attribute, false, $checkboxHtmlOptions);
     }
     $content .= $checkboxLabel;
     return $content;
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:19,代码来源:BorderPositionElement.php

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

示例12: renderDataCellContent

 /**
  * Override to support adding the label wrapper on the checkbox
  * (non-PHPdoc)
  * @see CCheckBoxColumn::renderDataCellContent()
  */
 protected function renderDataCellContent($row, $data)
 {
     if ($this->value !== null) {
         $value = $this->evaluateExpression($this->value, array('data' => $data, 'row' => $row));
     } elseif ($this->name !== null) {
         $value = ZurmoHtml::value($data, $this->name);
     } else {
         $value = $this->grid->dataProvider->keys[$row];
     }
     $checked = false;
     if ($this->checked !== null) {
         $checked = $this->evaluateExpression($this->checked, array('data' => $data, 'row' => $row));
     }
     $options = $this->checkBoxHtmlOptions;
     $name = $options['name'];
     unset($options['name']);
     $options['value'] = $value;
     $options['id'] = $this->id . '_' . $row;
     echo ZurmoHtml::checkBox($name, $checked, $options);
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:25,代码来源:CheckBoxColumn.php

示例13: makeCalendarItemsList

 /**
  * Make calendar items list.
  * @param array $data
  * @param string $field
  * @param string $itemClass
  * @param string $type
  * @return string
  */
 public static function makeCalendarItemsList($data, $field, $itemClass, $type)
 {
     assert('is_array($data)');
     assert('is_string($field)');
     assert('is_string($itemClass)');
     assert('is_string($type)');
     $itemsContent = null;
     foreach ($data as $calendarArray) {
         $isChecked = false;
         if ($calendarArray[1] === true) {
             $isChecked = true;
         }
         $input = ZurmoHtml::checkBox($field, $isChecked, array('value' => $calendarArray[0]->id, 'class' => $itemClass));
         $color = ZurmoHtml::tag('span', array('class' => 'cal-color', 'style' => 'background:' . $calendarArray[0]->color), '');
         if ($type == 'saved') {
             $label = $calendarArray[0]->name;
             $options = self::getSavedCalendarOptions($calendarArray[0]->id);
             $subscriptionData = null;
         } else {
             $savedCalendar = $calendarArray[0]->savedcalendar;
             $label = $savedCalendar->name;
             $options = self::getSharedCalendarOptions($calendarArray[0]->id);
             $subscriptionData = CalendarUtil::getCalendarSubscriberData($calendarArray[0]->savedcalendar);
         }
         $label = ZurmoHtml::tag('strong', array('class' => 'cal-name'), $label);
         $itemsContent .= ZurmoHtml::tag('li', array(), $input . $color . $label . $subscriptionData . $options);
     }
     return ZurmoHtml::tag('ul', array('class' => 'calendars-list'), $itemsContent);
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:37,代码来源:CalendarUtil.php


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