title = 'Create Pages';
$this->params['breadcrumbs'][] = ['label' => 'Docs', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
$cat = Yii::$app->request->get('cat', '');
?>
= FileUploadUI::widget([
'model' => $model,
'attribute' => 'file',
'url' => ['docsupload', 'id' => 0, 'cat'=>$cat],
'gallery' => false,
'fieldOptions' => [
'accept' => '*'
],
'clientOptions' => [
'limitConcurrentUploads' => 3,
'disableImageMetaDataLoad' => true
],
// ...
'clientEvents' => [
'fileuploaddone' => 'function(e, data) {
// console.log(e);
// console.log(data);
console.log(data.context);
console.log(data);
setTimeout(() => {
// $(data.context[0]).removeClass("show");
$(data.context[0]).css("display","none");
}, 4000);
e.preventDefault();
}',
'fileuploadfail' => 'function(e, data) {
// console.log(e);
// console.log(data);
e.preventDefault();
}',
'fileuploadchange' => 'function(e, data) {
// console.log(e);
// console.log(data);
setTimeout(() => {
$(".template-upload").removeClass("fade");
}, 500);
//e.preventDefault();
}',
'fileuploadstart' => 'function(e, data) {
$(".fileupload-progress").removeClass("fade");
e.preventDefault();
}',
],
]); ?>