$model->formName(),
'enableAjaxValidation' => true,
'validationUrl' => Url::to(['role', 'id' => $id]),
'fieldConfig' => [
'template' => "
{label}
{input}\n{hint}\n{error}
",
]
]);
?>
= $form->field($model, 'role_ids')->widget(\kartik\select2\Select2::class, [
'data' => $model->roles,
'options' => [
'placeholder' => '选择授权角色',
'multiple' => true
],
'pluginOptions' => [
'tags' => true,
'tokenSeparators' => [',', ' '],
'maximumInputLength' => 20
],
]);?>
= Html::modelBaseCss(); ?>