get rid of kartik select2
This commit is contained in:
@ -45,6 +45,7 @@
|
|||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.5",
|
"php": ">=5.5",
|
||||||
|
"2amigos/yii2-selectize-widget": "~1.0",
|
||||||
"yiisoft/yii2-authclient": "^2.1.0",
|
"yiisoft/yii2-authclient": "^2.1.0",
|
||||||
"yiisoft/yii2-bootstrap": "^2.0.0",
|
"yiisoft/yii2-bootstrap": "^2.0.0",
|
||||||
"yiisoft/yii2-swiftmailer": "^2.0.0"
|
"yiisoft/yii2-swiftmailer": "^2.0.0"
|
||||||
|
|||||||
270
composer.lock
generated
270
composer.lock
generated
@ -4,9 +4,75 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"hash": "88e8824630e7466efedefd323b81afed",
|
"hash": "c5d975a6e617b48ce160709adc44e2e8",
|
||||||
"content-hash": "065b2b08b05326b7cb954620ef25473d",
|
"content-hash": "7fdd28c9923beb31bca84e428ae41146",
|
||||||
"packages": [
|
"packages": [
|
||||||
|
{
|
||||||
|
"name": "2amigos/yii2-selectize-widget",
|
||||||
|
"version": "1.0.2",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/2amigos/yii2-selectize-widget.git",
|
||||||
|
"reference": "1000cf8703cf8b3eed61359c8a3922cfeb71df6e"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/2amigos/yii2-selectize-widget/zipball/1000cf8703cf8b3eed61359c8a3922cfeb71df6e",
|
||||||
|
"reference": "1000cf8703cf8b3eed61359c8a3922cfeb71df6e",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"bower-asset/selectize": "~0.12.0",
|
||||||
|
"yiisoft/yii2": "~2.0.0",
|
||||||
|
"yiisoft/yii2-bootstrap": "~2.0.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "~4.0"
|
||||||
|
},
|
||||||
|
"type": "yii2-extension",
|
||||||
|
"extra": {
|
||||||
|
"asset-installer-paths": {
|
||||||
|
"npm-asset-library": "vendor/npm",
|
||||||
|
"bower-asset-library": "vendor/bower"
|
||||||
|
},
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "1.0-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"dosamigos\\selectize\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"BSD-3-Clause"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "2amigOS! Consulting Group",
|
||||||
|
"email": "hola@2amigos.us",
|
||||||
|
"homepage": "http://2amigos.us",
|
||||||
|
"role": "Developer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Alexander Kochetov",
|
||||||
|
"email": "creocoder@gmail.com",
|
||||||
|
"role": "Developer"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "The selectize.js widget for the Yii framework",
|
||||||
|
"homepage": "https://github.com/2amigos/yii2-selectize-widget",
|
||||||
|
"keywords": [
|
||||||
|
"2amigos",
|
||||||
|
"selectize",
|
||||||
|
"widget",
|
||||||
|
"yii",
|
||||||
|
"yii 2",
|
||||||
|
"yii2"
|
||||||
|
],
|
||||||
|
"time": "2016-09-10 19:27:58"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "bower-asset/bootstrap",
|
"name": "bower-asset/bootstrap",
|
||||||
"version": "v3.3.7",
|
"version": "v3.3.7",
|
||||||
@ -133,6 +199,44 @@
|
|||||||
"plugins"
|
"plugins"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "bower-asset/microplugin",
|
||||||
|
"version": "v0.0.3",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/brianreavis/microplugin.js.git",
|
||||||
|
"reference": "d8671e6cc769938648f8735610534427cdeeaf67"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/brianreavis/microplugin.js/zipball/d8671e6cc769938648f8735610534427cdeeaf67",
|
||||||
|
"reference": "d8671e6cc769938648f8735610534427cdeeaf67",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"type": "bower-asset-library",
|
||||||
|
"extra": {
|
||||||
|
"bower-asset-main": [
|
||||||
|
"src/microplugin.js"
|
||||||
|
],
|
||||||
|
"bower-asset-ignore": [
|
||||||
|
"Makefile",
|
||||||
|
"test",
|
||||||
|
".travis.yml",
|
||||||
|
".npmignore.yml"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"license": [
|
||||||
|
"Apache License, Version 2.0"
|
||||||
|
],
|
||||||
|
"description": "A lightweight plugin / dependency system for javascript libraries.",
|
||||||
|
"keywords": [
|
||||||
|
"architecture",
|
||||||
|
"dependencies",
|
||||||
|
"extensibility",
|
||||||
|
"plugins",
|
||||||
|
"require"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "bower-asset/punycode",
|
"name": "bower-asset/punycode",
|
||||||
"version": "v1.3.2",
|
"version": "v1.3.2",
|
||||||
@ -161,6 +265,110 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "bower-asset/selectize",
|
||||||
|
"version": "v0.12.4",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/selectize/selectize.js.git",
|
||||||
|
"reference": "47e048662d865c4f1ea3b2337de5e06e92fd9530"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/selectize/selectize.js/zipball/47e048662d865c4f1ea3b2337de5e06e92fd9530",
|
||||||
|
"reference": "47e048662d865c4f1ea3b2337de5e06e92fd9530",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"bower-asset/jquery": ">=1.7.0",
|
||||||
|
"bower-asset/microplugin": "dev-0.0.x|0.0.x",
|
||||||
|
"bower-asset/sifter": "dev-0.5.x|0.5.x"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"bower-asset/bootstrap-2": "~2",
|
||||||
|
"bower-asset/bootstrap-3.2": "3.2"
|
||||||
|
},
|
||||||
|
"type": "bower-asset-library",
|
||||||
|
"extra": {
|
||||||
|
"bower-asset-main": [
|
||||||
|
"dist/css/selectize.css",
|
||||||
|
"dist/js/selectize.js"
|
||||||
|
],
|
||||||
|
"bower-asset-ignore": [
|
||||||
|
"Makefile",
|
||||||
|
"Gruntfile.js",
|
||||||
|
"examples",
|
||||||
|
"node_modules",
|
||||||
|
"bower_components",
|
||||||
|
"docs",
|
||||||
|
"src",
|
||||||
|
"test",
|
||||||
|
".travis.yml",
|
||||||
|
"testem.json",
|
||||||
|
"selectize.jquery.json",
|
||||||
|
"*.sh",
|
||||||
|
"package.json"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"license": [
|
||||||
|
"Apache License, Version 2.0"
|
||||||
|
],
|
||||||
|
"description": "Selectize is a jQuery-based custom <select> UI control. Useful for tagging, contact lists, country selectors, etc.",
|
||||||
|
"keywords": [
|
||||||
|
"autocomplete",
|
||||||
|
"control",
|
||||||
|
"form",
|
||||||
|
"input",
|
||||||
|
"select",
|
||||||
|
"tag",
|
||||||
|
"tagging",
|
||||||
|
"ui"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "bower-asset/sifter",
|
||||||
|
"version": "v0.5.2",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/brianreavis/sifter.js.git",
|
||||||
|
"reference": "4ba7422542bf188c1fdb4bbc341fc4fcc1ff0680"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/brianreavis/sifter.js/zipball/4ba7422542bf188c1fdb4bbc341fc4fcc1ff0680",
|
||||||
|
"reference": "4ba7422542bf188c1fdb4bbc341fc4fcc1ff0680",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"type": "bower-asset-library",
|
||||||
|
"extra": {
|
||||||
|
"bower-asset-main": [
|
||||||
|
"sifter.js"
|
||||||
|
],
|
||||||
|
"bower-asset-ignore": [
|
||||||
|
"Makefile",
|
||||||
|
"test",
|
||||||
|
"lib",
|
||||||
|
"bin",
|
||||||
|
"benchmark",
|
||||||
|
"node_modules",
|
||||||
|
".travis.yml"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"license": [
|
||||||
|
"Apache License, Version 2.0"
|
||||||
|
],
|
||||||
|
"description": "A library for textually searching arrays and hashes of objects by property (or multiple properties). Designed specifically for autocomplete.",
|
||||||
|
"keywords": [
|
||||||
|
"autocomplete",
|
||||||
|
"data",
|
||||||
|
"filter",
|
||||||
|
"match",
|
||||||
|
"results",
|
||||||
|
"search",
|
||||||
|
"sift",
|
||||||
|
"sort"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "bower-asset/yii2-pjax",
|
"name": "bower-asset/yii2-pjax",
|
||||||
"version": "v2.0.6",
|
"version": "v2.0.6",
|
||||||
@ -195,35 +403,6 @@
|
|||||||
"MIT"
|
"MIT"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "cebe/assetfree-yii2",
|
|
||||||
"version": "2.0.10",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/cebe/assetfree-yii2.git",
|
|
||||||
"reference": "38a6f1d6c70f2e4b5a666384f791812fb0b1cd82"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/cebe/assetfree-yii2/zipball/38a6f1d6c70f2e4b5a666384f791812fb0b1cd82",
|
|
||||||
"reference": "38a6f1d6c70f2e4b5a666384f791812fb0b1cd82",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": ">=5.4.0",
|
|
||||||
"yiisoft/yii2": "2.0.10"
|
|
||||||
},
|
|
||||||
"provide": {
|
|
||||||
"bower-asset/jquery": "*",
|
|
||||||
"bower-asset/jquery.inputmask": "*",
|
|
||||||
"bower-asset/punycode": "*",
|
|
||||||
"bower-asset/yii2-pjax": "*"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"description": "A meta package that allows you to install yii2 without composer-asset-plugin.",
|
|
||||||
"time": "2016-12-01 09:06:12"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "cebe/markdown",
|
"name": "cebe/markdown",
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
@ -781,6 +960,35 @@
|
|||||||
],
|
],
|
||||||
"time": "2016-10-30 11:50:56"
|
"time": "2016-10-30 11:50:56"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "cebe/assetfree-yii2",
|
||||||
|
"version": "2.0.10",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/cebe/assetfree-yii2.git",
|
||||||
|
"reference": "38a6f1d6c70f2e4b5a666384f791812fb0b1cd82"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/cebe/assetfree-yii2/zipball/38a6f1d6c70f2e4b5a666384f791812fb0b1cd82",
|
||||||
|
"reference": "38a6f1d6c70f2e4b5a666384f791812fb0b1cd82",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.4.0",
|
||||||
|
"yiisoft/yii2": "2.0.10"
|
||||||
|
},
|
||||||
|
"provide": {
|
||||||
|
"bower-asset/jquery": "*",
|
||||||
|
"bower-asset/jquery.inputmask": "*",
|
||||||
|
"bower-asset/punycode": "*",
|
||||||
|
"bower-asset/yii2-pjax": "*"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"description": "A meta package that allows you to install yii2 without composer-asset-plugin.",
|
||||||
|
"time": "2016-12-01 09:06:12"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "codeception/codeception",
|
"name": "codeception/codeception",
|
||||||
"version": "2.2.7",
|
"version": "2.2.7",
|
||||||
|
|||||||
@ -9,16 +9,16 @@
|
|||||||
* the LICENSE file that was distributed with this source code.
|
* the LICENSE file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use dosamigos\selectize\SelectizeDropDownList;
|
||||||
|
use yii\helpers\Html;
|
||||||
|
use yii\widgets\ActiveForm;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var yii\web\View
|
* @var $this yii\web\View
|
||||||
* @var $model \Da\User\Model\Permission
|
* @var $model Da\User\Model\Permission
|
||||||
* @var $unassignedItems string[]
|
* @var $unassignedItems string[]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use kartik\select2\Select2;
|
|
||||||
use yii\widgets\ActiveForm;
|
|
||||||
use yii\helpers\Html;
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php $form = ActiveForm::begin([
|
<?php $form = ActiveForm::begin([
|
||||||
@ -32,8 +32,8 @@ use yii\helpers\Html;
|
|||||||
|
|
||||||
<?= $form->field($model, 'rule') ?>
|
<?= $form->field($model, 'rule') ?>
|
||||||
|
|
||||||
<?= $form->field($model, 'children')->widget(Select2::className(), [
|
<?= $form->field($model, 'children')->widget(SelectizeDropDownList::class, [
|
||||||
'data' => $unassignedItems,
|
'items' => $unassignedItems,
|
||||||
'options' => [
|
'options' => [
|
||||||
'id' => 'children',
|
'id' => 'children',
|
||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
|
|||||||
@ -10,11 +10,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var yii\web\View
|
* @var $this yii\web\View
|
||||||
* @var $model \Da\User\Model\Role
|
* @var $model \Da\User\Model\Role
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Da\User\Helper\AuthHelper;
|
use Da\User\Helper\AuthHelper;
|
||||||
use kartik\select2\Select2;
|
use dosamigos\selectize\SelectizeDropDownList;
|
||||||
use yii\helpers\Html;
|
use yii\helpers\Html;
|
||||||
use yii\widgets\ActiveForm;
|
use yii\widgets\ActiveForm;
|
||||||
|
|
||||||
@ -34,16 +35,13 @@ $unassignedItems = Yii::$container->get(AuthHelper::class)->getUnassignedItems($
|
|||||||
|
|
||||||
<?= $form->field($model, 'rule') ?>
|
<?= $form->field($model, 'rule') ?>
|
||||||
|
|
||||||
<?= $form->field($model, 'children')->widget(
|
<?= $form->field($model, 'children')->widget(SelectizeDropDownList::class, [
|
||||||
Select2::className(),
|
'items' => $unassignedItems,
|
||||||
[
|
'options' => [
|
||||||
'data' => $unassignedItems,
|
'id' => 'children',
|
||||||
'options' => [
|
'multiple' => true,
|
||||||
'id' => 'children',
|
],
|
||||||
'multiple' => true,
|
]) ?>
|
||||||
],
|
|
||||||
]
|
|
||||||
) ?>
|
|
||||||
|
|
||||||
<?= Html::submitButton(Yii::t('user', 'Save'), ['class' => 'btn btn-success btn-block']) ?>
|
<?= Html::submitButton(Yii::t('user', 'Save'), ['class' => 'btn btn-success btn-block']) ?>
|
||||||
|
|
||||||
|
|||||||
@ -9,13 +9,14 @@
|
|||||||
* the LICENSE file that was distributed with this source code.
|
* the LICENSE file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use kartik\select2\Select2;
|
use dosamigos\selectize\SelectizeDropDownList;
|
||||||
use yii\bootstrap\Alert;
|
use yii\bootstrap\Alert;
|
||||||
use yii\helpers\Html;
|
use yii\helpers\Html;
|
||||||
use yii\widgets\ActiveForm;
|
use yii\widgets\ActiveForm;
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* @var $model \Da\User\Model\Assignment
|
* @var $this yii\web\View
|
||||||
|
* @var $model Da\User\Model\Assignment
|
||||||
* @var $availableItems string[]
|
* @var $availableItems string[]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -39,10 +40,10 @@ use yii\widgets\ActiveForm;
|
|||||||
|
|
||||||
<?= Html::activeHiddenInput($model, 'user_id') ?>
|
<?= Html::activeHiddenInput($model, 'user_id') ?>
|
||||||
|
|
||||||
<?= $form->field($model, 'items')->widget(Select2::className(), [
|
<?= $form->field($model, 'items')->widget(SelectizeDropDownList::class, [
|
||||||
'data' => $availableItems,
|
'items' => $availableItems,
|
||||||
'options' => [
|
'options' => [
|
||||||
'id' => 'items',
|
'id' => 'children',
|
||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
],
|
],
|
||||||
]) ?>
|
]) ?>
|
||||||
@ -50,4 +51,3 @@ use yii\widgets\ActiveForm;
|
|||||||
<?= Html::submitButton(Yii::t('user', 'Update assignments'), ['class' => 'btn btn-success btn-block']) ?>
|
<?= Html::submitButton(Yii::t('user', 'Update assignments'), ['class' => 'btn btn-success btn-block']) ?>
|
||||||
|
|
||||||
<?php ActiveForm::end() ?>
|
<?php ActiveForm::end() ?>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user