本文整理汇总了PHP中ZurmoHtml::label方法的典型用法代码示例。如果您正苦于以下问题:PHP ZurmoHtml::label方法的具体用法?PHP ZurmoHtml::label怎么用?PHP ZurmoHtml::label使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ZurmoHtml
的用法示例。
在下文中一共展示了ZurmoHtml::label方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderLabel
protected function renderLabel()
{
if ($this->model === null) {
throw new NotImplementedException();
}
return ZurmoHtml::label(Zurmo::t('ZurmoModule', 'Who can read and write - Default'), false);
}
示例2: 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;
}
示例3: renderLabel
/**
* Always show attribute label without label tag.
*/
protected function renderLabel()
{
$label = $this->getFormattedAttributeLabel();
if ($this->form === null) {
return $label;
}
return ZurmoHtml::label($label, false);
}
示例4: renderLabel
protected function renderLabel()
{
$label = Zurmo::t('UsersModule', 'Select Outbound Settings');
if ($this->form === null) {
return $this->getFormattedAttributeLabel();
}
$content = ZurmoHtml::label($label, $this->getEditableInputId());
$content .= self::renderToolTipContent();
return $content;
}
示例5: 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;
}
示例6: 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);
}
示例7: renderLabel
/**
* Attribute will be missing on the model, so we need
* to override and specify our own
*/
protected function renderLabel()
{
return ZurmoHtml::label(Zurmo::t('DesignerModule', 'Field Type'), false);
}
示例8: renderHtmlContentArea
protected function renderHtmlContentArea()
{
$id = $this->getEditableInputId(static::HTML_CONTENT_INPUT_NAME);
$htmlOptions = array();
$htmlContent = $this->model->htmlContent;
$htmlOptions['id'] = $id;
$htmlOptions['name'] = $this->getEditableInputName(static::HTML_CONTENT_INPUT_NAME);
$cClipWidget = new CClipWidget();
$cClipWidget->beginClip("Redactor");
// Begin Not Coding Standard
$cClipWidget->widget('application.core.widgets.Redactor', array('htmlOptions' => $htmlOptions, 'content' => $htmlContent, 'paragraphy' => "false", 'fullpage' => "true", 'deniedTags' => "false", 'plugins' => CJSON::encode($this->resolvePlugins()), 'observeImages' => 'true', 'imageUpload' => ImageFileModelUtil::getUrlForActionUpload(), 'imageGetJson' => ImageFileModelUtil::getUrlForActionGetUploaded(), 'initCallback' => 'function(){
var contentHeight = $(".redactor_box iframe").contents().find("body").outerHeight();
$(".redactor_box iframe").height(contentHeight + 50);
}'));
// End Not Coding Standard
$cClipWidget->endClip();
$content = ZurmoHtml::label($this->renderHtmlContentAreaLabel(), $id);
$content .= $cClipWidget->getController()->clips['Redactor'];
return $content;
}
示例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;
}
示例10: resolveNonActiveFormFormattedLabel
protected function resolveNonActiveFormFormattedLabel($label)
{
if ($this->form === null) {
return $label;
}
return ZurmoHtml::label($label, false);
}
示例11: renderLabel
protected function renderLabel()
{
return ZurmoHtml::label(Yii::t('Default', 'Related to'), false);
}
示例12: renderHtmlContentArea
protected function renderHtmlContentArea()
{
$id = $this->getEditableInputId(static::HTML_CONTENT_INPUT_NAME);
$htmlOptions = array();
$htmlOptions['id'] = $id;
$htmlOptions['name'] = $this->getEditableInputName(static::HTML_CONTENT_INPUT_NAME);
$cClipWidget = new CClipWidget();
$cClipWidget->beginClip("Redactor");
$cClipWidget->widget('application.core.widgets.Redactor', array('htmlOptions' => $htmlOptions, 'content' => $this->model->htmlContent));
$cClipWidget->endClip();
$content = ZurmoHtml::label($this->renderHtmlContentAreaLabel(), $id);
$content .= $cClipWidget->getController()->clips['Redactor'];
$content .= $this->renderHtmlContentAreaError();
return $content;
}
示例13: renderLabel
protected function renderLabel()
{
return ZurmoHtml::label(Zurmo::t('Core', 'Related to'), false);
}
示例14: renderEventWebHookUrlOnForm
/**
* Render webhook url on form.
* @param CModel $model
* @param string $attribute
* @param string $width
* @return string
*/
public static function renderEventWebHookUrlOnForm($model, $attribute, $width = '')
{
$url = static::resolveUrl($model, $attribute);
$url = ZurmoHtml::tag('div', array('id' => 'eventWebhookUrl', 'style' => 'padding-top:5px;'), $url);
$label = ZurmoHtml::label(Zurmo::t('SendGridModule', 'Event Webhook Url'), 'eventWebhookUrl');
if (!empty($width)) {
$content = '<table class="form-fields"><tr><th width="' . $width . '">' . $label . '</th>' . '<td colspan="1">' . $url . '</td></tr></table>';
} else {
$content = '<table class="form-fields"><tr><th>' . $label . '</th></tr>' . '<tr><td style="padding-left:0px;padding-bottom:0px;">' . $url . '</td></tr></table>';
}
return ZurmoHtml::tag('div', array('class' => 'panel'), $content);
}