本文整理汇总了PHP中TbHtml::checkBox方法的典型用法代码示例。如果您正苦于以下问题:PHP TbHtml::checkBox方法的具体用法?PHP TbHtml::checkBox怎么用?PHP TbHtml::checkBox使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TbHtml
的用法示例。
在下文中一共展示了TbHtml::checkBox方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
success:function(data) { $('#detallepractica').html(data).show();}
})
return false;
}",
),
),
'template' => '{view}',
),
),
));
?>
<div id="detallepractica" class=" oculto bordeada mt30" >
</div>
<?php
if ($modelnomenplan->search()->totalItemCount >0 && $controller=='osplan'){
echo "<div class='centrado mt30 '>";
//
echo TbHtml::checkBox('borrarnomenclador', '', array(
'label' => TbHtml::labelTb('Marcar para borrar el nomenclador', array('color' => TbHtml::LABEL_COLOR_INFO, 'style' => 'padding: 5px ; ')),'Marcar para borrar el nomenclador',
'style'=>'float:none;'
));
echo "</div>";
}
?>
示例2: array
<div class="bs-docs-example">
<?php
echo TbHtml::textArea('text', '', array('rows' => 3));
?>
</div>
<pre class="prettyprint linenums">
<?php echo TbHtml::textArea('text', '', array('rows' => 3)); ?></pre>
<h3>Checkboxes and radios</h3>
<h4>Default (stacked)</h4>
<div class="bs-docs-example">
<?php
echo TbHtml::checkBox('checkBox', '', array('label' => 'Option one is this and that—be sure to include why it\'s great'));
?>
<br>
<?php
echo TbHtml::radioButtonList('optionsRadios', '', array('option1' => 'Option one is this and that—be sure to include why it\'s great', 'option2' => 'Option two can be something else and selecting it will deselect option one'));
?>
</div>
<pre class="prettyprint linenums">
<?php echo TbHtml::checkBox('checkBox', '',
array('label' => 'Option one is this and that—be sure to include why it\'s great')); ?>
<?php echo TbHtml::radioButtonList('optionsRadios', '', array(
'option1' => 'Option one is this and that—be sure to include why it\'s great',
'option2' => 'Option two can be something else and selecting it will deselect option one',
)); ?></pre>
示例3: array
'options' => array(
'showAnim' => 'fold', // 'show' (the default), 'slideDown', 'fadeIn', 'fold'
'showButtonPanel' => false,
'changeYear' => true,
'changeMonth' => true,
'dateFormat' => 'dd/mm/yy',
),
)
);
echo "</div></div>";
?>
<div class="control-group">
<?php echo $form->dropDownList($model, 'iddocumentotipo', CHtml::listData(Documentotipo::model()->findAll(array('order' => 'nombre')), 'iddocumentotipo', 'abreviatura'), array('style' => 'margin-left:20px;width:70px;')); ?>
<?php
echo $form->labelEx($model, 'documentonro', $htmlOptions = array("class" => 'control-label '));
echo $form->textField($model, 'documentonro', array('size' => 10, 'maxlength' => 10, 'style' => 'margin-left:20px;'));
?>
</div>
<?php
echo "<div class='control-group' style='margin:27px 0 40px 180px;'>";
echo TbHtml::checkBox('borrarconyuge', false, array('label' => 'Eliminar datos cónyuge'));
echo "</div>";
echo "</fieldset>";
?>
示例4: array
//echo Chtml::hiddenField('altanomenclador',true);
?>
<div id="grillapracticas">
</div>
<div id="form2" class="mt30 oculto">
<?php
// echo TbHtml::labelTb('Seleccionar Prácticas', array('color' => TbHtml::LABEL_COLOR_WARNING, 'style' => 'margin:20px 0 20px ;font-size:13px;padding:5px;'));
echo TbHtml::checkBox('marcatodas', '', array(
'label' => TbHtml::labelTb('Seleccionar todas las Prácticas', array('color' => TbHtml::LABEL_COLOR_INFO, 'style' => 'font-size:13px;padding:7px;margin-left: -17px;',)),
'style'=>'float:right;margin-right:427px',
));
echo TbHtml::button('Borrar Selección', array('color' => TbHtml::BUTTON_COLOR_DANGER,
'onclick'=>'js:$("#marcatodas").prop("checked",false);$("#rango").empty();',
'style'=>'float:right;',
));
echo TbHtml::labelTb("Selecccionar rango de Prácticas",array('color' => TbHtml::LABEL_COLOR_INFO, 'style' => 'font-size:13px;padding:7px;margin: 36px 11px 0 2px ;'));
echo TbHtml::ajaxLink(TbHtml::icon(TbHtml::ICON_PLUS),
// $url
array('Practica/Selectrango'),
// array $ajaxoptions
array(
示例5: testCheckBox
public function testCheckBox()
{
$I = $this->codeGuy;
$html = TbHtml::checkBox('checkbox', false, array('class' => 'input', 'label' => 'Label text'));
$label = $I->createNode($html, 'label');
$I->seeNodeCssClass($label, 'checkbox');
$I->seeNodePattern($label, '/> Label text$/');
$input = $label->filter('input[type=checkbox]');
$I->seeNodeAttributes($input, array('class' => 'input', 'id' => 'checkbox', 'name' => 'checkbox', 'value' => '1'));
$I->dontSeeNodeAttribute($input, 'checked');
$html = TbHtml::checkBox('checkbox', true);
$input = $I->createNode($html, 'input[type=checkbox]');
$I->seeNodeAttribute($input, 'checked', 'checked');
}
示例6: uniqid
'color' => TbHtml::BUTTON_COLOR_INFO,
'size' => TbHtml::BUTTON_SIZE_MINI,
'data-toggle' => 'modal',
'data-target' => '#modalidad',
'style' => '',
'id' => 'open-modal-' . uniqid(),
)
);
echo "</div>";
// mostrar botones si es update
if ($accion=="update"){
echo "<div class='control-group'>";
echo "<div class='controls'>";
echo TbHtml::checkBox('borrar'.$modalidades[$i], false, array('label' => 'Eliminar archivo'));
echo TbHtml::button('Subir PDF', array('size' => TbHtml::BUTTON_SIZE_MINI, 'class' => 'subirpdf'));
echo "</div>";
echo "</div>";
echo "<div class='well well-small oculto subepdf'>";
echo TbHtml::closeButton();
echo $form->FileFieldControlGroup($model, $modalidades[$i]);
echo "</div>";
}
}
示例7: array
'success' => 'function(data){
$("#contratoimg-div").html(data);
$("#contratoimg").modal("show");}'
),
$htmlOptions= array(
'color' => TbHtml::BUTTON_COLOR_INFO,
'size' => TbHtml::BUTTON_SIZE_SMALL,
'data-toggle' => 'modal',
'data-target' => '#contratoimg',
'style' => 'margin-left:180px;margin-top:-18px;',
'id' => 'open-modal-' . uniqid(),
)
);
echo "<div class='control-group' style='margin:-22px 0 40px 320px;'>";
echo TbHtml::checkBox( 'borrararchivo', false, array('label' => 'Eliminar archivo de contrato'));
echo "</div>";
}
echo $form->fileFieldControlGroup($model, 'contratoimg');
?>
<?php echo $form->labelEx($model, 'vencimientodias', $htmlOptions = array("class" => 'control-label ')); ?>
示例8: 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');
示例9: testUncheckValueOptionForCheckboxesAndRadioInputs
public function testUncheckValueOptionForCheckboxesAndRadioInputs()
{
$I = $this->codeGuy;
$items = array(0);
$model = new Dummy();
$outputsWithHidden = array('checkbox' => TbHtml::checkBox('cb1', false, array('uncheckValue' => 1)), 'checkboxList' => TbHtml::checkBoxList('cb2', 0, $items, array('uncheckValue' => 1)), 'radio' => TbHtml::radioButton('rd1', false, array('uncheckValue' => 1)), 'radioList' => TbHtml::radioButtonList('rd2', 0, $items, array('uncheckValue' => 1)), 'activeCheckbox' => TbHtml::activeCheckBox($model, 'checkboxList'), 'activeCheckboxList' => TbHtml::activeCheckBoxList($model, 'checkboxList', $items), 'activeRadio' => TbHtml::activeRadioButton($model, 'radioList'), 'activeRadioList' => TbHtml::activeRadioButtonList($model, 'radioList', $items));
foreach ($outputsWithHidden as $output) {
$I->seeNodeChildren($I->createNode($output), array('input[type=hidden]'));
}
// comparing against null 'uncheckValue' option
$noHiddenOptions = array('uncheckValue' => null);
$outputsWithoutHidden = array('checkbox' => TbHtml::checkBox('cb1'), 'checkboxList' => TbHtml::checkBoxList('cb2', 0, $items), 'radio' => TbHtml::radioButton('rd1'), 'radioList' => TbHtml::radioButtonList('rd2', 0, $items), 'activeCheckbox' => TbHtml::activeCheckBox($model, 'checkboxList', $noHiddenOptions), 'activeCheckboxList' => TbHtml::activeCheckBoxList($model, 'checkboxList', $items, $noHiddenOptions), 'activeRadio' => TbHtml::activeRadioButton($model, 'radioList', $noHiddenOptions), 'activeRadioList' => TbHtml::activeRadioButtonList($model, 'radioList', $items, $noHiddenOptions));
foreach ($outputsWithoutHidden as $output) {
$I->dontSeeNodeChildren($I->createNode($output), array('input[type=hidden]'));
}
}