本文整理汇总了PHP中TbHtml::label方法的典型用法代码示例。如果您正苦于以下问题:PHP TbHtml::label方法的具体用法?PHP TbHtml::label怎么用?PHP TbHtml::label使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TbHtml
的用法示例。
在下文中一共展示了TbHtml::label方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
?>
<div class="page-header">
<h1>Forms</h1>
</div>
<h2>Default styles</h2>
<div class="bs-docs-example">
<?php
echo TbHtml::beginFormTb();
?>
<fieldset>
<legend>Legend</legend>
<?php
echo TbHtml::label('Label name', 'text');
?>
<?php
echo TbHtml::textField('text', '', array('placeholder' => 'Type something...'));
?>
<?php
echo TbHtml::checkBox('checkMeOut', false, array('label' => 'Check me out'));
?>
<?php
echo TbHtml::submitButton('Submit');
?>
</fieldset>
<?php
echo TbHtml::endForm();
?>
</div>
示例2: array
<div class="row-fluid">
<?php
//array que ir� receber os sados selecionados
$selected_category = array();
//para cada plataforma
foreach ($model->category as $cat) {
array_push($selected_category, $cat->id);
}
?>
<div>
<?php
echo TbHtml::label($model->getAttributeLabel('category'), 'Category');
?>
<p>
<div class="portlet-content">
<?php
echo TbHtml::CheckBoxList('Category', $selected_category, CHtml::listData(Category::model()->findAll(), 'id', 'name'), array('template' => '{input} {label}'));
?>
<?php
echo $form->error($model, 'category');
?>
</div>
</p>
<br/><br/>
</div>
示例3: array
<!--
<?php
//array que ir� receber as plataformas selecionadas
$selected_devices = array();
//para cada plataforma, insere os id_plataforma escolhidos no array
//var_dump($model->platforms);
foreach ($model->devices as $device) {
array_push($selected_devices, $device->ID);
}
?>
<br/><br/>
<div>
<?php
echo TbHtml::label($model->getAttributeLabel('devices'), 'Device');
?>
<div class="portlet-content" id="divprincipal">
<?php
echo TbHtml::CheckBoxList('Devices', $selected_devices, CHtml::listData(Device::model()->findAll(), 'ID', 'DESCRIPTION'), array('template' => '{input} {label}'));
?>
<?php
echo $form->error($model, 'device');
?>
</div>
</div>
-->
</br>
示例4: array
<!-- Message dialog info -->
<p class="alert alert-info">Fields with <span class="required">*</span> are required.</p>
<?php
echo $form->textFieldControlGroup($model, 'id_tenant', array('span' => 2, 'maxlength' => 4, 'readonly' => 'readonly', 'value' => $model->autonumber()));
?>
<?php
echo $form->textFieldControlGroup($model, 'tenant_name', array('span' => 3, 'maxlength' => 25));
?>
<?php
echo $form->textFieldControlGroup($model, 'pic', array('span' => 3, 'maxlength' => 45));
?>
<div class="control-group">
<?php
echo TbHtml::label('Phone <span class="required">*</span>', 'Phone', array('class' => 'control-label'));
?>
<div class="controls">
<?php
$this->widget('yiiwheels.widgets.maskinput.WhMaskInput', array('name' => 'Tenant[phone]', 'mask' => '999999999999', 'htmlOptions' => array('placeholder' => '')));
?>
<?php
echo $form->error($model, 'phone');
?>
</div>
</div>
<?php
echo $form->textAreaControlGroup($model, 'location', array('span' => 5, 'maxlength' => 30, 'rows' => 5));
?>
示例5: date
'showButtonPane' => true,
//'maxDate' => '0',
),
));*/
?>
</div>
</div>-->
<?php
echo TbHtml::textFieldControlGroup('receipt_date', date('Y-m-d'), array('label' => 'Receipt Date', 'readonly' => true));
?>
<div class="control-group">
<?php
echo TbHtml::label('Tenant', 'Tenant', array('class' => 'control-label'));
?>
<div class="controls">
<?php
$this->widget('yiiwheels.widgets.select2.WhSelect2', array('asDropDownList' => false, 'name' => 'tenant', 'pluginOptions' => array('width' => '90%', 'initSelection' => 'js:function(element,callback){}', 'ajax' => array('url' => $this->createUrl('/transaction/AddPoint/GetTenant'), 'dataType' => 'json', 'data' => "js:function(term,page) {\n return {q: term};\n }", 'results' => "js:function(data,page) {\n return {results: data};\n }"))));
?>
</div></div>
<?php
echo TbHtml::textFieldControlGroup('pointearned', '', array('label' => 'Point', 'readonly' => true));
?>
</div>
示例6: errorMsgBox
var start_date = $("#Voucher_start_date").val();
if (dateText < start_date){
errorMsgBox("End date must be greater than start date");
$(this).val("");
}
}')));
?>
<?php
echo $form->error($model, 'end_date');
?>
</div>
</div>
<div class="control-group">
<?php
echo TbHtml::label('Point Required <span class="required">*</span>', 'Point Required', array('class' => 'control-label'));
?>
<div class="controls">
<?php
$this->widget('yiiwheels.widgets.maskinput.WhMaskInput', array('name' => 'Voucher[point_required]', 'mask' => '11111', 'htmlOptions' => array('placeholder' => '')));
//echo $form->textFieldControlGroup($model,'point_required',array('span'=>2));
?>
<?php
echo $form->error($model, 'point_required');
?>
</div>
</div>
<?php
echo $form->fileFieldControlGroup($model, 'image', array('span' => 5, 'onchange' => 'Preview.previewImage(this)'));
?>
示例7: array
?>
</div>
</div>
<div class="control-group">
<?php
echo TbHtml::label('Telephone', 'lbltelephone', array('class' => 'control-label'));
?>
<div clas="controls">
<?php
echo TbHtml::label('-', 'telephone', array('class' => 'control-label', 'id' => 'phone'));
?>
</div>
</div>
<div class="control-group">
<?php
echo TbHtml::label('Location', 'lbllocation', array('class' => 'control-label'));
?>
<div clas="controls">
<?php
echo TbHtml::label('-', 'location', array('class' => 'control-label', 'id' => 'location'));
?>
</div>
</div>
<?php
echo TbHtml::endForm();
?>
</fieldset>
示例8: array
<?php
$this->breadcrumbs = array('Essays');
$this->menu = array(array('label' => CHtml::image(Yii::app()->theme->baseUrl . "/img/operaciones/list29.png") . 'Mis Essays', 'url' => array('index'), 'visible' => Yii::app()->user->checkAccess('Estudiante') && !Yii::app()->user->isSuperAdmin), array('label' => CHtml::image(Yii::app()->theme->baseUrl . "/img/operaciones/group.png") . 'Mis Estudiantes', 'url' => array('index'), 'visible' => Yii::app()->user->checkAccess('Tutor') || Yii::app()->user->checkAccess('College') || Yii::app()->user->isSuperAdmin), array('label' => CHtml::image(Yii::app()->theme->baseUrl . "/img/operaciones/speech59.png") . 'Chat', 'url' => '#'), array('label' => CHtml::image(Yii::app()->theme->baseUrl . "/img/operaciones/user.png") . 'Perfil', 'url' => '#', 'visible' => Yii::app()->user->checkAccess('Estudiante') && !Yii::app()->user->isSuperAdmin));
?>
<legend>Essay: <?php
echo $essay->title_essay;
?>
</legend>
<?php
echo TbHtml::beginFormTb(TbHtml::FORM_LAYOUT_INLINE);
?>
<?php
echo TbHtml::label('<b>Status Essay</b>', 'text');
?>
<?php
echo EssaysHasCrugeUser::model()->validarStatus($essay->status);
?>
<?php
if (Yii::app()->user->checkAccess('Tutor') || Yii::app()->user->checkAccess('College') || Yii::app()->user->isSuperAdmin) {
?>
<?php
echo "|";
?>
<?php
echo TbHtml::Button('Cambiar Status', array('name' => 'end', 'color' => TbHtml::BUTTON_COLOR_DANGER, 'size' => TbHtml::BUTTON_SIZE_MINI, 'onclick' => '$("#myModal").dialog("open"); return false;'));
?>
示例9: array
</div></div>
/* <div class="span6">
<div class="row-fluid">
<?php
//array que ir� receber os sados selecionados
$selected_category = array();
//para cada plataforma
foreach ($model->appUsers as $cat) {
array_push($selected_category, $cat->id);
}
?>
<div class="group-div">
<div>
<?php
echo TbHtml::label($model->getAttributeLabel('appUsers'), 'AppUsers');
?>
<p>
<div class="portlet-content">
<?php
echo TbHtml::CheckBoxList('AppUsers', $selected_category, CHtml::listData(AppUsers::model()->findAll(), 'id', 'name'), array('template' => '{input} {label}'));
?>
<?php
echo $form->error($model, 'appUsers');
?>
</div>
</p>
</div>
<?php
echo CHtml::link(CHtml::encode('Remove'), array('appUsers/delete', 'id' => $model->id), array('submit' => array('appUsers/delete', 'id' => $model->id), 'class' => 'delete btn btn-danger', 'confirm' => 'This will remove the image. Are you sure?'));
示例10: array
?>
<div class="form-inline" style="margin-bottom: 20px;">
<?php
echo CHtml::hiddenField('FileForm[' . $uniqueId . '][photos][' . $idx . '][photo_id]', $model->photo_id);
echo CHtml::hiddenField('FileForm[' . $uniqueId . '][photos][' . $idx . '][title]', $model->title);
echo CHtml::hiddenField('FileForm[' . $uniqueId . '][photos][' . $idx . '][filename]', $model->filename);
echo CHtml::hiddenField('FileForm[' . $uniqueId . '][photos][' . $idx . '][thumb_filename]', $model->thumb_filename);
echo CHtml::hiddenField('FileForm[' . $uniqueId . '][photos][' . $idx . '][mime_type]', $model->mime_type);
$sTitleMaxLength = 'Max length is ' . Yii::app()->params['lengthPhotoTitle'] . ' symbols';
$sDescMaxLength = 'Max length is ' . Yii::app()->params['lengthPhotoDescription'] . ' symbols';
echo TbHtml::textField('FileForm[' . $uniqueId . '][photos][' . $idx . '][description]', $model->description, array('class' => 'fl-l', 'span' => 6, 'style' => 'margin-left: 10px; margin-right: 10px;', 'placeholder' => Yii::t('main', 'photo description'), 'title' => $sDescMaxLength, 'alt' => $sDescMaxLength));
echo TbHtml::textField('FileForm[' . $uniqueId . '][photos][' . $idx . '][sort_order]', $model->sort_order, array('class' => 'fl-l ' . $radiobuttonClass, 'span' => 1, 'style' => 'margin-left: 10px', 'placeholder' => Yii::t('main', 'order num')));
if ($this->portfolioType == 1) {
echo '<div class="fl-l ml-10 mr-10 ' . $radiobuttonClass . '" style="margin-left: 10px; margin-right: 10px;">';
$istopID = 'FileForm_' . $uniqueId . '_' . $idx . '_is_top';
echo TbHtml::label(Yii::t('main', 'Main photo') . ' ', $istopID, array('class' => 'checkbox'));
echo CHtml::radioButton('FileForm[' . $uniqueId . '][is_top]', $model->is_top, array('id' => $istopID, 'value' => $idx, 'class' => "ml-10 mr-10 "));
echo '</div>';
}
?>
<button class="delete-uploaded btn ml-10 mr-10" type="button">
<i class="icon-trash"></i>
<span><?php
echo Yii::t('main', 'Delete');
?>
</span>
</button>
<br>
<?php
示例11: array
<?php
$status = $model->ConfiPVFuncionSta == 'ALTA';
$fid = $model->FuncionesId;
$eid = $model->EventoId;
$pid = $model->PuntosventaId;
$padre = $model->puntoventa->tipoid == 0;
$nombre = $model->puntoventa->PuntosventaNom;
echo CHtml::openTag('li', array('id' => "{$fid}-{$pid}", 'class' => 'nodo ', 'style' => 'border-top:1px dashed #888;'));
//LI NODO
if (isset($padre) and $padre) {
# Si tiene hijos muestra el boton de +
echo TbHtml::link(' ', array('funciones/verRama', 'EventoId' => $eid, 'FuncionesId' => $fid, 'PuntosventaId' => $pid), array('class' => 'nodo-toggle fa fa-plus-square', 'id' => "link-{$fid}-" . $pid, 'data-estado' => 'inicial', 'style' => 'margin:5px'));
}
echo TbHtml::checkBox("chk-{$fid}-{$pid}", $status, array('class' => 'CPVFSta', 'data-fid' => $fid, 'data-pid' => $pid));
echo TbHtml::label($nombre, "chk-{$fid}-{$pid}", array('style' => 'display:inline;width:100%'));
echo CHtml::openTag('div', array('
class' => 'fechas-cpf text-right', 'style' => 'width:100%;'));
echo TbHtml::textField("CPF_FecIni-{$fid}-{$pid}", $model->ConfiPVFuncionFecIni, array('data-fid' => $fid, 'data-pid' => $pid, 'class' => 'picker box1 CPVFFecIni', 'style' => 'font-size:10px;width:105px'));
echo TbHtml::link(' ', '#', array('class' => 'fa fa-calendar text-info ', 'title' => 'Fecha de inicio', 'onclick' => "\$('#CPF_FecIni-{$fid}-{$pid}').datetimepicker('show');return false;\n\t\t\t\t"));
echo " / ";
echo TbHtml::textField("CPF_FecFin-{$fid}-{$pid}", $model->ConfiPVFuncionFecFin, array('data-fid' => $fid, 'data-pid' => $pid, 'class' => 'picker box1 CPVFFecFin', 'style' => 'font-size:10px;width:105px'));
echo TbHtml::link(' ', '#', array('class' => 'fa fa-calendar text-warning', 'title' => 'Fecha Fin', 'onclick' => "\$('#CPF_FecFin-{$fid}-{$pid}').datetimepicker('show');return false;\n\t\t\t\t"));
echo CHtml::closeTag('div');
echo CHtml::closeTag('li');
示例12: array
<?php echo TbHtml::pageHeader('', 'User Account '); ?>
<fieldset>
<legend>Change Password</legend>
<?php echo TbHtml::beginFormTb()?>
<?php echo TbHtml::label('<b>New Password</b>','new_password');?>
<?php echo TbHtml::passwordField('new_password','',array('placeholder'=>'Enter new password here...')); ?>
<div class="form-actions">
<?php echo TbHtml::submitButton('Change',array(
'color'=>TbHtml::BUTTON_COLOR_SUCCESS,
'size'=>TbHtml::BUTTON_SIZE_DEFAULT,
)); ?>
</div>
<?php echo TbHtml::endForm();?>
</fieldset>
<?php $this->widget('zii.widgets.CDetailView',array(
'htmlOptions' => array(
'class' => 'table table-striped table-condensed table-hover',
),
'data'=>$model,
'attributes'=>array(
//'id',
'username',
'first_name',
'middle_name',
'last_name',
$model->is_mda?
示例13: array
<div class="control-group" style="margin-left:40%">
<?php
echo TbHtml::label('Start', 'Start', array('class' => 'control-label'));
?>
<div class="controls">
<?php
$this->widget('zii.widgets.jui.CJuiDatePicker', array('htmlOptions' => array('readonly' => 'readonly', 'style' => 'width:180px;float:left', 'name' => 'tglawal'), 'options' => array('dateFormat' => 'yy-mm-dd', 'yearRange' => '-2', 'changeYear' => true, 'changeMonth' => true, 'buttonImage' => './images/calendar.png', 'buttonImageOnly' => true, 'showOn' => 'button', 'showButtonPane' => true)));
?>
</div>
</div>
</div>
<div class="span-4" style="width:49%;margin-left:2px;">
<div class="control-group">
<?php
echo TbHtml::label('End', 'End', array('class' => 'control-label'));
?>
<div class="controls">
<?php
$this->widget('zii.widgets.jui.CJuiDatePicker', array('htmlOptions' => array('readonly' => 'readonly', 'style' => 'width:180px;float:left', 'name' => 'tglakhir'), 'options' => array('dateFormat' => 'yy-mm-dd', 'yearRange' => '-2', 'changeYear' => true, 'changeMonth' => true, 'buttonImage' => './images/calendar.png', 'buttonImageOnly' => true, 'showOn' => 'button', 'showButtonPane' => true)));
?>
</div>
</div>
</div>
<div style="clear:both"></div>
<div class="form-actions">
<div style="margin-left:35%">
<?php
echo TbHtml::submitButton('<i class="icon-fa-print icon-fa-large" style="margin-top:7px;"></i> Print', array('color' => TbHtml::BUTTON_COLOR_INVERSE, 'size' => TbHtml::BUTTON_SIZE_LARGE, 'id' => 'btncommand'));
echo " ";
示例14:
<fieldset>
<legend>Reset Password</legend>
<?php echo TbHtml::beginFormTb()?>
<?php echo TbHtml::label('<b>Email</b>','email');?>
<?php echo TbHtml::textField('email','',array('placeholder'=>'Enter your email here...','span'=>5)); ?>
<div class="form-actions">
<?php echo TbHtml::submitButton('Submit',array(
'color'=>TbHtml::BUTTON_COLOR_SUCCESS,
'size'=>TbHtml::BUTTON_SIZE_DEFAULT,
)); ?>
</div>
<?php echo TbHtml::endForm();?>
</fieldset>
示例15: array
</td>
<td><?php echo $form->textFieldControlGroup($model,'responsibility_center',array('maxlength'=>5000)); ?></td>
</tr>
<tr>
<td><?php echo $form->dropDownListControlGroup($model,'sectoral_council_id',
TbHtml::listData(EacLookup::model()->findAll('type=:type',array(':type'=> EacLookup::SECTORAL_COUNCIL)),"id","description"),
array(
'empty'=>'--select--'
)); ?>
</td>
<td><?php echo $form->dropDownListControlGroup($model,'implementation_status_id',TbHtml::listData(EacLookup::model()->findAll('type=:type',array(':type'=> EacLookup::IMPLEMENTATION_STATUS)),"id","description"),
array(
'empty'=>'--select--'
)); ?></td>
<td><?php echo TbHtml::label('Date To', 'dateTo'); ?>
<?php $this->widget('zii.widgets.jui.CJuiDatePicker', array(
'model'=>$model,
'attribute'=>'dateTo',
'options'=>array(
'showAnim'=>'fold',
'showOn'=>'both',//focus,button,both
'changeMonth'=>true,
'changeYear'=>true,
'yearRange'=>'-100:+0',//last hundred years
'buttonText'=>'Please select date',
'buttonImage'=>Yii::app()->request->baseUrl."/images/calendar.png",
'buttonImageOnly'=>true,
'dateFormat'=>'yy-mm-dd',
),
'htmlOptions'=>array(