<?php
use yii\helpers\Url;
use yii\helpers\Html;
use common\models\User;
use yii\widgets\ActiveForm;
use qcbase\models\Department;
use home\assets\ModalAsset;
use yii\helpers\StringHelper;

/* @var $this yii\web\View */

$this->title = '选择用户';

$assetUrl = $this->getAssetManager()->getBundle(ModalAsset::className())->baseUrl;
$this->registerJsFile($assetUrl.'/js/link.select.js', ['depends' => ModalAsset::className()]);
?>
<style>
	.tab-pane{
		padding: 5px;
	}
	label {
		margin-right: 20px;
		font-weight: lighter;
	}
	.checkbox-user {
		position:relative;top:2px;
		left: -2px;
	}
</style>
<div class="modal-window" >

	<form method="post" action="" class="dialog-form" id="main-form">
        <div role="tabpanel" class="tab-pane">
        <label ><input type="checkbox"  class="checkbox-user checkbox-select-all" name="select_all"> <strong>全选</strong></label><br />
		<ul class="nav nav-tabs" role="tablist" id="myTab">
			<?php $i = 0; foreach ($models as $model) : ?>
			
            <label ><input type="checkbox"  class="checkbox-user" name="user[]" value="<?= $model['dept_id'] ?>" data-name="<?= $model['name'] ?>" /><?= $model['name'] ?></label>

            <?php $i++; endforeach; ?>
		</ul>
        </div>
	</form>


</div>