'onclick' => '$("#acceptDiv").removeClass("d-none");']) ?>
</div>
<details <?= !empty($shiftTransfer->groups1) ? 'open' : '' ?> >
- <summary>Другие</summary>
- <div class="col-9">
+ <summary>Другие группы</summary>
+ <div class="col-12 mt-2">
<?php $hints1 = ProductsClass::getHints(); unset($hints1['other_items']); ?>
- <?= $form->field($shiftTransfer, 'groups1')->checkboxList($hints1, ['checked' => 1,
- 'onclick' => '$("#acceptDiv").removeClass("d-none");']) ?>
- </div>
- </details>
- </div>
- <div class="row">
- <div class="col-2">
- <?php $hints2 = [ProductsClass::HINT_AUTHOR => 'Авторский букет'] ?>
- <?= $form->field($shiftTransfer, 'groups2')->checkboxList($hints2, ['checked' => 1,
- 'onclick' => '$("#acceptDiv").removeClass("d-none");']) ?>
- </div>
- <details <?= !empty($shiftTransfer->groups1) ? 'open' : '' ?> >
- <summary>Другие</summary>
- <div class="col-9">
- <?php $hints1 = ProductsClass::getHints(); unset($hints1['author']); ?>
- <?= $form->field($shiftTransfer, 'groups1')->checkboxList($hints1, ['checked' => 1,
- 'onclick' => '$("#acceptDiv").removeClass("d-none");']) ?>
+ <?= $form->field($shiftTransfer, 'groups1')->label(false)->checkboxList($hints1, ['checked' => 1,
+ 'onclick' => '$("#acceptDiv").removeClass("d-none");',
+ 'itemOptions' => ['class' => 'form-check-input me-1'],
+ 'item' => function ($index, $label, $name, $checked, $value) {
+ return Html::tag('div',
+ Html::checkbox($name, $checked, [
+ 'value' => $value,
+ 'class' => 'form-check-input me-1'
+ ]) .
+ Html::label($label, null, ['class' => 'form-check-label me-1']),
+ ['class' => 'form-check-inline']
+ );
+ }]) ?>
</div>
</details>
</div>
+
<div id='acceptDiv' class="form-group d-none">
<?= Html::submitButton('Сформировать список по выбранным группам', ['class' => 'btn btn-secondary',
'name' => 'action', 'value' => 'applyGroups', 'onclick' => 'getMeOut = true;']) ?>