2017 © Pedro Peláez
 

yii2-extension yii2-icheck

Yii2 ICheck

image

drexlerux/yii2-icheck

Yii2 ICheck

  • Thursday, September 7, 2017
  • by drexlerux
  • Repository
  • 0 Watchers
  • 0 Stars
  • 13 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 8 % Grown

The README.md

Drexlerux - Yii2 ICheck

Description:

Check Boxes to verification customize and radio buttons.

DEMO


Setup:, (*1)


php composer.phar require "drexlerux/yii2-icheck" "*"

or, (*2)

composer require drexlerux/yii2-icheck

or add to composer.json, (*3)

"drexlerux/yii2-icheck": "*"

### How to implement:

use drexlerux\ui\ICheck;


STYLE_MIMIMAL (colors for STYLE_MIMIMAL - minimal (the black), red, green, blue, aero, grey, orange, yellow, pink, purple)

= $form->field($model, 'checkbox', ['template' => '{label} {input}'])->widget(ICheck::className(), [ 'type' => ICheck::TYPE_CHECBOX, 'style' => ICheck::STYLE_MIMIMAL, 'color' => 'green' // Color theme ]) ?> = $form->field($model, 'checkbox2')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_CHECBOX_LIST, 'style' => ICheck::STYLE_MIMIMAL, 'items' => [1 => 'Item 1', 2 => 'Item 2', 3 => 'Item 3'] 'color' => 'minimal', // Color theme 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return '
'; } ]]) ?> = $form->field($model, 'checkbox3')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_CHECBOX_LIST, 'style' => ICheck::STYLE_MIMIMAL, 'items' => [1 => 'Item 1', 2 => 'Item 2', 3 => 'Item 3'] 'color' => 'red', // Color theme 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return ''; } ]]) ?>
= $form->field($model, 'radio')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_RADIO, 'style' => ICheck::STYLE_MIMIMAL, 'color' => 'green' // Color theme ]) ?> = $form->field($model, 'radio2')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_RADIO_LIST, 'style' => ICheck::STYLE_MIMIMAL, 'items' => [1 => 'Item 1', 2 => 'Item 2', 3 => 'Item 3'] 'color' => 'purple', // Color theme 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return '
'; } ]]) ?> = $form->field($model, 'radio3')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_RADIO_LIST, 'style' => ICheck::STYLE_MIMIMAL, 'items' => [1 => 'Item 1', 2 => 'Item 2', 3 => 'Item 3'] 'color' => 'blue', // Color theme 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return ''; } ]]) ?>

STYLE_SQUARE (Colors for STYLE_SQUARE - square (the black), red, green, blue, aero, grey, orange, yellow, pink, purple)

= $form->field($model, 'checkbox4', ['template' => '{label} {input}'])->widget(ICheck::className(), [ 'type' => ICheck::TYPE_CHECBOX, 'style' => ICheck::STYLE_SQUARE, 'color' => 'square' // Color theme ]) ?> = $form->field($model, 'checkbox5')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_CHECBOX_LIST, 'style' => ICheck::STYLE_SQUARE, 'items' => [1 => 'Item 1', 2 => 'Item 2', 3 => 'Item 3'] 'color' => 'green', // Color theme 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return ''; } ]]) ?> = $form->field($model, 'checkbox6')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_CHECBOX_LIST, 'style' => ICheck::STYLE_SQUARE, 'items' => [1 => 'Item 1', 2 => 'Item 2', 3 => 'Item 3'] 'color' => 'red', // Color theme 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return '
'; } ]]) ?>
= $form->field($model, 'radio4')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_RADIO, 'style' => ICheck::STYLE_SQUARE, 'color' => 'blue' // Color theme ]) ?> = $form->field($model, 'radio5')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_RADIO_LIST, 'style' => ICheck::STYLE_SQUARE, 'items' => [1 => 'Item 1', 2 => 'Item 2', 3 => 'Item 3'] 'color' => 'yellow', // Color theme 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return '
'; } ]]) ?> = $form->field($model, 'radio6')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_RADIO_LIST, 'style' => ICheck::STYLE_SQUARE, 'items' => [1 => 'Item 1', 2 => 'Item 2', 3 => 'Item 3'] 'color' => 'aero', // Color theme 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return ''; } ]]) ?>

STYLE_FLAT (Colors for STYLE_SQUARE - flat (the black), red, green, blue, aero, grey, orange, yellow, pink, purple)

= $form->field($model, 'checkbox7', ['template' => '{label} {input}'])->widget(ICheck::className(), [ 'type' => ICheck::TYPE_CHECBOX, 'style' => ICheck::STYLE_FLAT, 'color' => 'flat' // Color theme ]) ?> = $form->field($model, 'checkbox8')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_CHECBOX_LIST, 'style' => ICheck::STYLE_FLAT, 'items' => [1 => 'Item 1', 2 => 'Item 2', 3 => 'Item 3'] 'color' => 'green', // Color theme 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return ''; } ]]) ?> = $form->field($model, 'checkbox9')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_CHECBOX_LIST, 'style' => ICheck::STYLE_FLAT, 'items' => [1 => 'Item 1', 2 => 'Item 2', 3 => 'Item 3'] 'color' => 'red', // Color theme 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return '
'; } ]]) ?>
= $form->field($model, 'radio7')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_RADIO, 'style' => ICheck::STYLE_FLAT, 'color' => 'blue' // Color theme ]) ?> = $form->field($model, 'radio8')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_RADIO_LIST, 'style' => ICheck::STYLE_FLAT, 'items' => [1 => 'Item 1', 2 => 'Item 2', 3 => 'Item 3'] 'color' => 'yellow', // Color theme 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return '
'; } ]]) ?> = $form->field($model, 'radio9')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_RADIO_LIST, 'style' => ICheck::STYLE_FLAT, 'items' => [1 => 'Item 1', 2 => 'Item 2', 3 => 'Item 3'] 'color' => 'aero', // Color theme 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return ''; } ]]) ?>

STYLE_LINE (Colors for STYLE_LINE - line (the black), red, green, blue, aero, grey, orange, yellow, pink, purple)

= $form->field($model, 'checkbox10')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_CHECBOX_LIST, 'style' => ICheck::STYLE_LINE, 'items' => [1 => 'Вася'], 'color' => 'yellow', // Color theme 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return ''; }, ]]) ?> = $form->field($model, 'checkbox11')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_CHECBOX_LIST, 'style' => ICheck::STYLE_LINE, 'items' => [1 => 'Item 1', 2 => 'Item 2', 3 => 'Item 3'] 'color' => 'red', // Color theme 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return ''; }, ]]) ?>
= $form->field($model, 'radio10')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_RADIO_LIST, 'style' => ICheck::STYLE_LINE, 'items' => [1 => 'Item 1', 2 => 'Item 2', 3 => 'Item 3'] 'color' => 'pink', // Color theme 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return ''; }, ]]) ?>

STYLE_POLARIS

= $form->field($model, 'checkbox12', ['template' => '{label} {input}'])->widget(ICheck::className(), [ 'type' => ICheck::TYPE_CHECBOX, 'style' => ICheck::STYLE_POLARIS, ]) ?> = $form->field($model, 'checkbox13')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_CHECBOX_LIST, 'style' => ICheck::STYLE_POLARIS, 'items' => [1 => 'Item 1', 2 => 'Item 2', 3 => 'Item 3'] 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return ''; } ]]) ?> = $form->field($model, 'checkbox14')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_CHECBOX_LIST, 'style' => ICheck::STYLE_POLARIS, 'items' => [1 => 'Item 1', 2 => 'Item 2', 3 => 'Item 3'] 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return '
'; } ]]) ?>
= $form->field($model, 'radio11')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_RADIO, 'style' => ICheck::STYLE_POLARIS, ]) ?> = $form->field($model, 'radio12')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_RADIO_LIST, 'style' => ICheck::STYLE_POLARIS, 'items' => [1 => 'Item 1', 2 => 'Item 2', 3 => 'Item 3'] 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return '
'; } ]]) ?> = $form->field($model, 'radio13')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_RADIO_LIST, 'style' => ICheck::STYLE_POLARIS, 'items' => [1 => 'Item 1', 2 => 'Item 2', 3 => 'Item 3'] 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return ''; } ]]) ?>

STYLE_FUTURICO

= $form->field($model, 'checkbox15', ['template' => '{label} {input}'])->widget(ICheck::className(), [ 'type' => ICheck::TYPE_CHECBOX, 'style' => ICheck::STYLE_FUTURICO, ]) ?> = $form->field($model, 'checkbox16')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_CHECBOX_LIST, 'style' => ICheck::STYLE_FUTURICO, 'items' => [1 => 'Item 1', 2 => 'Item 2', 3 => 'Item 3'] 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return ''; } ]]) ?> = $form->field($model, 'checkbox17')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_CHECBOX_LIST, 'style' => ICheck::STYLE_FUTURICO, 'items' => [1 => 'Item 1', 2 => 'Item 2', 3 => 'Item 3'] 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return '
'; } ]]) ?>
= $form->field($model, 'radio14')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_RADIO, 'style' => ICheck::STYLE_FUTURICO, ]) ?> = $form->field($model, 'radio15')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_RADIO_LIST, 'style' => ICheck::STYLE_FUTURICO, 'items' => [1 => 'Item 1', 2 => 'Item 2', 3 => 'Item 3'] 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return '
'; } ]]) ?> = $form->field($model, 'radio16')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_RADIO_LIST, 'style' => ICheck::STYLE_FUTURICO, 'items' => [1 => 'Item 1', 2 => 'Item 2', 3 => 'Item 3'] 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return ''; } ]]) ?>

License:

### MIT

The Versions

07/09 2017

dev-master

9999999-dev

Yii2 ICheck

  Sources   Download

MIT

The Requires

 

by Avatar drexlerux

yii2 icheck phpnt

07/09 2017

v1.0.1

1.0.1.0

Yii2 ICheck

  Sources   Download

MIT

The Requires

 

by Avatar drexlerux

yii2 icheck phpnt