本文整理汇总了PHP中kartik\helpers\Html::checkbox方法的典型用法代码示例。如果您正苦于以下问题:PHP Html::checkbox方法的具体用法?PHP Html::checkbox怎么用?PHP Html::checkbox使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kartik\helpers\Html
的用法示例。
在下文中一共展示了Html::checkbox方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<div class="col-md-10"><?php
echo Html::input('text', 'group-name', '', ['class' => 'form-control']);
?>
</div>
</div>
<div class="form-group">
<?php
echo Html::label(Yii::t('app', 'Require review'), 'group-require-review', ['class' => 'col-md-2 control-label']);
?>
<div class="col-md-10"><?php
echo Html::checkbox('group-require-review', false, ['class' => '']);
?>
</div>
</div>
<div class="form-group">
<?php
echo Html::label(Yii::t('app', 'Allow guest user to rate'), 'group-allow-guest', ['class' => 'col-md-2 control-label']);
?>
<div class="col-md-10"><?php
echo Html::checkbox('group-allow-guest', false, ['class' => '']);
?>
</div>
</div>
<?php
BackendWidget::end();
?>
</article>
</div>
</section>
<?php
echo Html::endForm();
示例2:
}
?>
<div class="form-group row">
<div class="col-md-12">
<fieldset>
<legend><?php
echo Yii::t('app', 'Settings');
?>
</legend>
<div class="form-group">
<div class='col-md-offset-2 col-md-10'>
<div class="checkbox">
<?php
echo Html::checkbox('Task[create_notification]', false, ['label' => 'Создать уведомление']);
?>
</div>
</div>
</div>
<?php
if ($importMode === true) {
?>
<?php
echo $form->field($model, 'createIfNotExists')->checkbox();
?>
<?php
}
?>
<?php
示例3:
<?php
use kartik\helpers\Html;
use yii\bootstrap\ActiveForm;
/* @var $this yii\web\View */
/* @var $form kartik\helpers\Html */
$form = Html::beginForm();
?>
<div class="modal fade" id="publish-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<?php
echo Html::panel(['heading' => '<i class="fa fa-cloud-upload"></i> Daten publizieren', 'headingTitle' => true, 'body' => Html::checkbox('sendNotification', false, ['label' => 'Benachrichtigung an die Benutzer senden?']), 'footer' => " " . Html::button('Abbrechen', ['class' => 'btn btn-default btn-sm', 'data-dismiss' => 'modal']) . " " . Html::button('Daten jetzt publizieren', ['class' => 'btn btn-info btn-sm', 'data-dismiss' => 'modal'])]);
?>
</div>
</div>
<?php
Html::endForm();
示例4: foreach
?>
</label>
<div class="col-md-10">
<div class="scrollable-options-list">
<?php
foreach ($property_values as $property_value) {
?>
<?php
$checked = false;
if (isset($optionGenerate['values'][$prop->id][$property_value['id']])) {
$checked = true;
}
?>
<?php
echo Html::checkbox('GeneratePropertyValue[' . $prop->id . '][' . $property_value['id'] . ']', $checked, ['label' => $property_value['name']]);
?>
<?php
}
?>
</div>
</div>
</div>
<?php
}
?>
<div class="clearfix"></div>
<?php
echo $footer;
?>
</div>
示例5:
</div>
<div class="form-group">
<?php
echo Html::label(Yii::t('app', 'Require review'), 'group-require-review', ['class' => 'col-md-2 control-label']);
?>
<div class="col-md-10"><?php
echo Html::checkbox('group-require-review', $group['require_review'], ['class' => '']);
?>
</div>
</div>
<div class="form-group">
<?php
echo Html::label(Yii::t('app', 'Allow guest user to rate'), 'group-allow-guest', ['class' => 'col-md-2 control-label']);
?>
<div class="col-md-10"><?php
echo Html::checkbox('group-allow-guest', $group['allow_guest'], ['class' => '']);
?>
</div>
</div>
<?php
BackendWidget::end();
?>
</article>
</div>
</section>
<?php
echo Html::endForm();
?>
<div class="rating-group-edit">
<?php
示例6:
use kartik\helpers\Html;
use kartik\icons\Icon;
$this->title = Yii::t('app', 'Update messages "{alias}"', ['alias' => $alias]);
$this->params['breadcrumbs'] = [['label' => Yii::t('app', 'I18n'), 'url' => '/backend/i18n'], $this->title];
?>
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<?php
echo Html::beginForm();
?>
<?php
BackendWidget::begin(['icon' => 'language', 'title' => $this->title, 'footer' => Html::submitButton(Icon::show('save') . Yii::t('app', 'Save'), ['class' => 'btn btn-primary'])]);
?>
<?php
echo \devgroup\jsoneditor\Jsoneditor::widget(['editorOptions' => ['modes' => ['tree']], 'name' => 'messages', 'options' => ['style' => 'height: 600px'], 'value' => $messages]);
?>
<div>
<?php
echo Html::checkbox('ksort', Yii::$app->request->cookies->getValue('sortMessages'), ['id' => 'ksort']);
?>
<?php
echo Html::label(Yii::t('app', 'Sort by source messages'), 'ksort');
?>
</div>
<?php
BackendWidget::end();
?>
<?php
echo Html::endForm();
?>
</div>