public function run() { echo $this->form->field($this->model, $this->attr)->widget(FileInput::classname(), ['options' => ['accept' => ''], 'pluginOptions' => ['showPreview' => false, 'showCaption' => true, 'showRemove' => true, 'showUpload' => false]]); if ($this->model->getAttribute($this->attr) !== null) { echo '<div class="file-upload-update"><label class="col-sm-2"> </label>' . Html::a($this->model->getAttribute($this->attr), ['/uploads/' . $this->model->getAttribute($this->attr)]) . '</div>'; } }
public function init() { echo Html::activeHiddenInput($this->model, $this->attribute, $this->options); echo Html::error($this->model, $this->attribute, $this->options); $id = Html::getInputId($this->model, $this->attribute); echo FileInput::widget(['name' => 'file', 'options' => ['accept' => 'image/*', 'multiple' => false], 'pluginEvents' => ['fileuploaded' => 'function(event, data, previewId, index) { $("#' . $id . '").val(data.response.url); }'], 'pluginOptions' => ['initialPreview' => $this->model->{$this->attribute} ? [Html::img($this->model->{$this->attribute}, ['class' => 'file-preview-image'])] : false, 'maxFileCount' => 1, 'minFileCount' => 1, 'previewFileType' => 'image', 'multiple' => false, 'showPreview' => true, 'showUploadedThumbs' => false, 'uploadUrl' => \yii\helpers\Url::to(['/system/image/upload'])]]); parent::init(); }
public function init() { if (!empty($this->model->gallery)) { $gallery = explode(',', $this->model->gallery); foreach ($gallery as $image) { $this->pluginOptions['initialPreview'][] = Html::img(LetHelper::getFileUploaded($image), ['class' => 'file-preview-image']); $this->pluginOptions['initialPreviewConfig'][] = ['caption' => end(explode('/', $image)), 'url' => Url::to(['/common/upload/remove', 'id' => Yii::$app->request->get('id'), 'key' => $image, 'model' => get_class($this->model)]), 'key' => $image]; } } $this->model->gallery = $this->model->gallery; parent::init(); }
public function run() { if (isset($this->modelId) && isset($this->model) && !$this->model->isNewRecord) { /** @var $fileModel File*/ $fileModel = \Yii::createObject(File::className()); $form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]); $files = $fileModel->find()->where(['model' => get_class($this->model), 'model_id' => $this->modelId])->all(); $initialPreview = $initialPreviewConfig = []; foreach ($files as $file) { $initialPreview[] = "<img src='" . \Yii::$app->params['imageDomain'] . '/' . $file->url . "' class='file-preview-image'>"; $initialPreviewConfig[] = ['caption' => $file->name, 'url' => Url::to(['/system/widgets/file-upload/delete', 'id' => $file->file_id])]; } echo $form->field($fileModel, 'files[]')->widget(FileInput::classname(), ['options' => ['multiple' => true], 'pluginOptions' => ['initialPreview' => $initialPreview, 'initialPreviewConfig' => $initialPreviewConfig, 'overwriteInitial' => false, 'uploadUrl' => Url::to(['/system/widgets/file-upload/upload']), 'uploadExtraData' => ['model' => get_class($this->model), 'modelId' => $this->modelId], 'maxFileCount' => 10, 'allowedFileExtensions' => ['jpg', 'gif', 'png']]]); $form::end(); } }
public function run() { if ($imageUrl = $this->model->getFileUrl($this->attribute)) { ?> <div class="file-input"> <div class="file-preview"> <div class="file-preview-thumbnails"> <div class="file-preview-frame"> <?php echo Html::img($imageUrl, ['class' => 'file-preview-image', 'alt' => \Yii::t('gromver.platform', 'File not found.')]); ?> </div> </div> <div class="clearfix"></div> </div> </div> <?php } if ($imageUrl == null) { // to show FileInput only for new upload echo KartikFileInput::widget(['model' => $this->model, 'attribute' => $this->attribute, 'options' => $this->options, 'pluginOptions' => $this->pluginOptions]); } else { FileInputAsset::register($this->getView()); ?> <div class="file-input"> <div class="input-group"> <div class="form-control file-caption "> <span class="glyphicon glyphicon-file"></span> <span class="file-caption-name"><?php echo $this->model->getFileName($this->attribute); ?> </span> </div> <div class="input-group-btn"> <?php echo Html::a('Remove Image', [$this->deleteAction, 'pk' => $this->model->getPrimaryKey(), 'attribute' => $this->attribute], ['class' => 'btn btn-danger', 'data-method' => 'post']); ?> </div> </div> </div> <?php } }
/* @var $model \common\modulse\article\models\Article */ /* @var $form yii\widgets\ActiveForm */ ?> <div class="article-form"> <?php $form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]); ?> <?php echo $form->field($model, 'title')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'image')->widget(FileInput::classname(), ['pluginOptions' => ['allowedFileExtensions' => ['jpg', 'gif', 'png'], 'language' => 'de', 'showCaption' => false, 'showRemove' => false, 'showUpload' => false, 'browseClass' => 'btn btn-primary btn-block', 'browseIcon' => '<i class="glyphicon glyphicon-camera"></i> ', 'browseLabel' => 'Select Image', 'initialPreview' => [$model->getImageTag('thumb')]], 'options' => ['accept' => 'image/*']]); ?> <?php echo $form->field($model, 'content')->widget('common\\widgets\\Redactor'); ?> <?php echo $form->field($model, 'status')->widget(CheckboxX::classname(['initInputType' => CheckboxX::INPUT_CHECKBOX]), ['pluginOptions' => ['threeState' => false]]); ?> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? Yii::t('Article', 'Create') : Yii::t('Article', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div>
<?php $usr = User::find()->all(); $usrs = ArrayHelper::map($usr, function ($model) { return $model->_id->{'$id'}; }, 'username'); echo $form->field($model, 'share_to')->label('Share To')->widget(Select2::classname(), ['data' => $usrs, 'options' => ['placeholder' => 'Select User', 'id' => 'file_id'], 'pluginOptions' => ['allowClear' => true]]); ?> </div> </div> <div class="row"> <div class="col-md-8"> <!--?= $form->field($model, 'file')->fileInput() ?--> <?php echo $form->field($model, 'file')->widget(FileInput::classname(), ['options' => ['accept' => 'file/*'], 'pluginOptions' => ['previewFileType' => 'image', 'showUpload' => false]]); ?> </div> <?php $model->status = 1; ?> <?php echo $form->field($model, 'status')->hiddenInput()->label(false); ?> </div> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div>
<?php use yii\helpers\Html; use kartik\widgets\ActiveForm; use kartik\widgets\ActiveField; use yii\helpers\ArrayHelper; use kartik\widgets\FileInput; $message = ''; ?> <div class="wrapper headline" style=""> <label class="head"> <span class="badge">2</span> <i class="fa fa-image fa-lg"></i> <?php echo Yii::t('app', 'Avatar'); ?> </label> <i class="fa fa-chevron-right chevron"></i> </div> <div class="wrapper body notshown fadeIn animated" style="border-top:none;"> <?php echo $this->render('../_hint.php', ['message' => $message]); ?> <?php echo $form->field($model, 'user_avatar')->widget(FileInput::classname(), ['options' => ['multiple' => false, 'accept' => 'image/*'], 'pluginOptions' => ['previewFileType' => 'any', 'showCaption' => false, 'showUpload' => false, 'browseClass' => 'btn btn-info shadow', 'browseIcon' => '<i class="glyphicon glyphicon-camera"></i> ', 'browseLabel' => Yii::t('app', 'Izaberite profilnu sliku'), 'removeLabel' => Yii::t('app', 'Izbaci'), 'resizeImage' => true, 'maxImageWidth' => 200, 'maxImageHeight' => 200, 'resizePreference' => 'width']]); echo $this->render('_submitButton.php'); ?> </div>
echo $form->field($model, 'notifications')->checkbox(); ?> <div class = 'form-group field-old_avatar'> <div class = "row"> <div class="col-xs-12"> <label class="control-label" for="old_avatar">Ваш аватар</label> </div> </div> <?php echo Html::img($model->fileUrl, ['id' => 'old_avatar', 'width' => 100]); ?> </div> <?php echo $form->field($model, 'avatar')->widget(FileInput::className(), ['options' => ['accept' => 'image/*'], 'pluginOptions' => ['showRemove' => false, 'showUpload' => false]]); ?> <h3>Смена пароля</h3> <?php echo $form->field($model, 'password', ['options' => ['class' => 'form-group has-feedback']])->passwordInput(['placeholder' => 'Новый пароль'])->label(false); ?> <?php echo $form->field($model, 'password_repeat', ['options' => ['class' => 'form-group has-feedback']])->passwordInput(['placeholder' => 'Повторите пароль'])->label(false); ?> <div class="form-group"> <?php echo Html::submitButton('Сохранить', ['class' => 'btn btn-primary', 'name' => 'contact-button']);
<?php use yii\helpers\Html; use yii\helpers\Url; use yii\widgets\ActiveForm; use kartik\widgets\FileInput; $this->title = Yii::t('app', 'Загрузка'); ?> <div class="container"> <div class="col-md-6"> <?php $form = ActiveForm::begin(['class' => 'form-horisontal', 'options' => ['enctype' => 'multipart/form-data']]); ?> <?php echo $form->field($model, 'file')->widget(FileInput::classname(), ['options' => ['multiple' => false, 'accept' => 'image/*'], 'pluginOptions' => ['showPreview' => true, 'showCaption' => true, 'showRemove' => false, 'showUpload' => false]]); ?> <?php echo $form->field($model, 'name'); ?> <?php echo $form->field($model, 'tags'); ?> <div class="form-group"> <div class="col-lg-offset-1 col-lg-11"> <?php echo Html::submitButton(\Yii::t('app', 'Загрузить'), ['class' => 'btn btn-primary', 'name' => 'login-button']); ?>
?> <?php echo $form->field($model, 'last_staff')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'risk_status')->widget(Select2::classname(), ['data' => ArrayHelper::map(Status::find()->all(), 'STATUS_ID', 'STATUS_NAME'), 'options' => ['placeholder' => 'เลือกสถานะของรายการ ...'], 'pluginOptions' => ['allowClear' => true]]); ?> </div> <div class="form-group field-upload_files"> <label class="control-label" for="upload_files[]"> ภาพถ่าย </label> <div> <?php echo FileInput::widget(['name' => 'upload_ajax[]', 'options' => ['multiple' => true, 'accept' => 'image/*'], 'pluginOptions' => ['overwriteInitial' => false, 'initialPreviewShowDelete' => true, 'initialPreview' => $initialPreview, 'initialPreviewConfig' => $initialPreviewConfig, 'uploadUrl' => Url::to(['/priskhead/upload-ajax']), 'uploadExtraData' => ['ref' => $model->ref], 'maxFileCount' => 100]]); ?> </div> </div> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => ($model->isNewRecord ? 'btn btn-success' : 'btn btn-primary') . ' btn-lg btn-block']); ?> </div> <?php ActiveForm::end(); ?> </div>
<?php echo Html::hiddenInput('sliderId', $slider->id); ?> <?php if ($slider->hasErrors()) { //it is necessary to see all the errors for all the files. @todo Show growl message echo '<pre>'; print_r($slider->getErrors()); echo '</pre>'; } ?> <?php echo FileInput::widget(['id' => 'file-upload', 'name' => 'ImageUploadForm[images][]', 'options' => ['multiple' => true, 'style' => 'margin-bottom: 30px'], 'pluginOptions' => ['previewFileType' => 'any', 'mainClass' => 'input-group-lg', 'uploadUrl' => Url::to(['/sliders/images/upload']), 'maxFileCount' => 100, 'overwriteInitial' => false, 'uploadAsync' => false, 'dropZoneTitle' => Yii::t('app', 'Drag & drop files here ...'), 'fileActionSettings' => ['uploadClass' => 'hide', 'removeTitle' => Yii::t('app', 'Remove file'), 'uploadTitle' => Yii::t('app', 'Upload file'), 'indicatorNewTitle' => Yii::t('app', 'Not uploaded yet'), 'indicatorSuccessTitle' => Yii::t('app', 'Uploaded'), 'indicatorErrorTitle' => Yii::t('app', 'Upload Error'), 'indicatorLoadingTitle' => Yii::t('app', 'Uploading ...')], 'browseLabel' => Yii::t('app', 'Browse'), 'removeLabel' => Yii::t('app', 'Remove'), 'removeTitle' => Yii::t('app', 'Remove selected files'), 'uploadLabel' => Yii::t('app', 'Upload'), 'uploadTitle' => Yii::t('app', 'Upload selected files'), 'cancelLabel' => Yii::t('app', 'Cancel')]]); ?> <?php ActiveForm::end(); ?> <?php // Title ?> <h1> <?php echo $this->title; ?> <?php // Buttons
<?php use yii\helpers\Html; use yii\helpers\ArrayHelper; use yii\helpers\Url; use kartik\widgets\ActiveForm; use kartik\builder\Form; use kartik\datecontrol\DateControl; use kartik\widgets\FileInput; use kartik\builder\TabularForm; /** * @var yii\web\View $this * @var common\models\SliderImage $model * @var yii\widgets\ActiveForm $form */ ?> <div class="slider-image-form"> <?php $form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'options' => ['enctype' => 'multipart/form-data']]); echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'attributes' => ['publish_flag' => ['type' => Form::INPUT_CHECKBOX, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Опубликовано...']], 'slider' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Слайдер...']], 'href' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Ссылка...', 'maxlength' => 255]], 'body' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => \vova07\imperavi\Widget::className(), 'options' => ['settings' => ['toolbarFixed' => false, 'minHeight' => 100]]], 'menu_image' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\FileInput::className(), 'options' => ['pluginOptions' => ['accept' => 'image/*', 'allowedFileExtensions' => ['jpg', 'gif', 'png'], 'showRemove' => false, 'showUpload' => false, 'initialPreview' => $model->getUploadUrl('menu_image') ? Html::img($model->getUploadUrl('menu_image'), ['class' => 'file-preview-image']) : false, 'maxFileCount' => 1]]], 'href_enabled_flag' => ['type' => Form::INPUT_CHECKBOX, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Показывать кнопку перейти...']], 'created_date' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => DateControl::classname(), 'options' => ['type' => DateControl::FORMAT_DATE]], 'iframe_href' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Ссылка на iframе(если указан изображения игнорируются)...', 'maxlength' => 255]], 'banner_image' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\FileInput::className(), 'options' => ['pluginOptions' => ['accept' => 'image/*', 'allowedFileExtensions' => ['jpg', 'gif', 'png'], 'showRemove' => false, 'showUpload' => false, 'initialPreview' => $model->getUploadUrl('banner_image') ? Html::img($model->getUploadUrl('banner_image'), ['class' => 'file-preview-image']) : false, 'maxFileCount' => 1]]], 'banner_phone_image' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\FileInput::className(), 'options' => ['pluginOptions' => ['accept' => 'image/*', 'allowedFileExtensions' => ['jpg', 'gif', 'png'], 'showRemove' => false, 'showUpload' => false, 'initialPreview' => $model->getUploadUrl('banner_phone_image') ? Html::img($model->getUploadUrl('banner_phone_image'), ['class' => 'file-preview-image']) : false, 'maxFileCount' => 1]]], 'banner_tablet_image' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\FileInput::className(), 'options' => ['pluginOptions' => ['accept' => 'image/*', 'allowedFileExtensions' => ['jpg', 'gif', 'png'], 'showRemove' => false, 'showUpload' => false, 'initialPreview' => $model->getUploadUrl('banner_tablet_image') ? Html::img($model->getUploadUrl('banner_tablet_image'), ['class' => 'file-preview-image']) : false, 'maxFileCount' => 1]]]]]); echo Html::button(Yii::t('app', 'Cancel'), ['class' => 'btn btn-default', 'style' => 'margin-right: 20px', 'onclick' => 'window.location = "' . Url::to(['index']) . '"']); echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Save'), ['class' => 'btn btn-primary', 'style' => 'margin-right: 10px', 'name' => 'goto', 'value' => 'list']); echo Html::submitButton(Yii::t('app', 'Apply'), ['class' => 'btn btn-primary', 'style' => 'margin-right: 0px']); ActiveForm::end(); ?> </div>
use kartik\widgets\FileInput; use kartik\icons\Icon; use kartik\popover\PopoverX; use kartik\password\PasswordInput; /** * @var yii\web\View $this * @var common\models\Osusuarios $model */ $this->title = $model->usu_nombre; $this->params['breadcrumbs'][] = ['label' => Yii::t('admin', 'Osusuarios'), 'url' => ['index']]; $this->params['breadcrumbs'][] = $model->usu_nomusu; ?> <div class="osusuarios-view"> <!--<div class="page-header"> <h1><?php echo Html::encode($this->title); ?> </h1> </div>--> <?php echo DetailView::widget(['model' => $model, 'condensed' => false, 'hover' => true, 'mode' => Yii::$app->request->get('edit') == 't' ? DetailView::MODE_EDIT : DetailView::MODE_VIEW, 'panel' => ['heading' => $this->title, 'type' => DetailView::TYPE_INFO], 'formOptions' => ['options' => ['enctype' => 'multipart/form-data']], 'attributes' => [['attribute' => 'uploadedFile', 'format' => 'raw', 'value' => $model->usu_type ? '<a href="#" class="thumbnail"> <img src="data:' . $model->usu_type . ';base64,' . base64_encode($model->usu_foto) . '" alt="" class=""> </a>' : '<a href="#" class="thumbnail"> <img src="' . Yii::$app->params['assetUrl'] . 'images/noavatar_man.png" alt="" class=""> </a>', 'type' => DetailView::INPUT_WIDGET, 'widgetOptions' => ['class' => FileInput::classname(), 'pluginOptions' => ['showCaption' => false, 'showRemove' => false, 'showUpload' => false, 'browseClass' => 'btn btn-primary btn-block', 'browseIcon' => '<i class="glyphicon glyphicon-camera"></i> ', 'browseLabel' => Yii::t('admin', 'Select Photo')], 'options' => ['accept' => 'image/*']]], 'usu_nomusu', 'usu_nombre', ['attribute' => 'usu_feccre', 'format' => ['datetime', isset(Yii::$app->modules['datecontrol']['displaySettings']['datetime']) ? Yii::$app->modules['datecontrol']['displaySettings']['datetime'] : 'd-m-Y H:i:s A'], 'type' => DetailView::INPUT_WIDGET, 'displayOnly' => true, 'widgetOptions' => ['class' => DateControl::classname(), 'type' => DateControl::FORMAT_DATETIME]], ['attribute' => 'usu_ulting', 'format' => ['datetime', isset(Yii::$app->modules['datecontrol']['displaySettings']['datetime']) ? Yii::$app->modules['datecontrol']['displaySettings']['datetime'] : 'd-m-Y H:i:s A'], 'type' => DetailView::INPUT_WIDGET, 'displayOnly' => true, 'widgetOptions' => ['class' => DateControl::classname(), 'type' => DateControl::FORMAT_DATETIME]], ['attribute' => 'usu_activo', 'format' => 'raw', 'value' => $model->usu_activo ? '<span class="label label-success">Activo</span>' : '<span class="label label-danger">Inactivo</span>', 'type' => DetailView::INPUT_SWITCH], ['attribute' => 'usu_ultemp', 'displayOnly' => true]], 'deleteOptions' => ['url' => ['delete', 'id' => $model->usu_id], 'data' => ['confirm' => Yii::t('app', 'Are you sure you want to delete this item?'), 'method' => 'post']], 'enableEditMode' => true, 'buttons' => [['label' => Icon::show('key'), 'title' => Yii::t('admin', 'Change Password'), 'html' => PopoverX::widget(['header' => '<i class="glyphicon glyphicon-lock"></i> ' . Yii::t('admin', 'Change Password'), 'placement' => PopoverX::ALIGN_BOTTOM_RIGHT, 'size' => PopoverX::SIZE_LARGE, 'footer' => Html::submitButton(Yii::t('admin', 'Enviar'), ['class' => 'btn btn-sm btn-primary']), 'content' => '<label class="control-label">' . Yii::t('admin', 'Password') . '</label>' . PasswordInput::widget(['model' => $model, 'attribute' => 'passwd']), 'toggleButton' => ['label' => Icon::show('key'), 'class' => 'btn btn-xs btn-info', 'data-toggle' => 'tooltip', 'data-original-title' => Yii::t('admin', 'Change Password')]])]]]); ?> </div>
$initialPreview[] = $_preview . Html::hiddenInput($model->formName() . '[' . $property_key . '][]', $file); $initialPreviewConfig[] = ['caption' => $file, 'url' => $urlDelete, 'key' => $property_key, 'extra' => ['value' => $file]]; } $modelArrayMode = $model->setArrayMode(false); // @TODO: maybe it's a good to replace fileuploaded with fileloaded (and this part of code for it) // $_js = <<< 'JSCODE' // function(event, file, previewId, index, reader) { // var name = file.name; // var hi = $('<input type="hidden" name="%s" />').val(name); // $('div.file-preview-frame[title="'+name+'"]').append(hi); // } //JSCODE; ?> <div class="file_input_preview"> <?php echo $form->field($model, $prop)->widget(\kartik\widgets\FileInput::classname(), ['options' => ['multiple' => $multiple], 'pluginOptions' => ['uploadUrl' => $urlUpload, 'multiple' => $multiple, 'initialPreview' => $initialPreview, 'initialPreviewConfig' => $initialPreviewConfig, 'initialPreviewShowDelete' => true, 'maxFileCount' => $multiple ? 0 : 1, 'showPreview' => true, 'showCaption' => true, 'showRemove' => true, 'showUpload' => true, 'overwriteInitial' => false, 'uploadAsync' => true, 'layoutTemplates' => $layoutTemplates, 'allowedPreviewTypes' => ['image']], 'pluginEvents' => ['fileuploaded' => 'function(event, data, previewId, index) { var name = data.files[index]["name"]; try { jQuery(".file-thumbnail-footer input[value=\\"" + name + "\\"]") .last() .attr("name", event.target.name) .val(data.response[name]["fileName"]); } catch ($e) {} }']]); ?> </div> <?php $model->setArrayMode($modelArrayMode); ?> <style>
<h4 class="panel-title"> <a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#collapseSix" aria-expanded="false" aria-controls="collapseSix"> Documenten </a> </h4> </div> <div id="collapseSix" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingSix"> <div class="panel-body"> <div class="panel panel-warning"> <div class="panel-heading"> <h3 class="panel-title">Upload documenten</h3> </div> <div class="panel-body"> <?php echo $form->field($user, 'documentfile')->widget(FileInput::classname(), ['pluginOptions' => ['showPreview' => false, 'showCaption' => true, 'showRemove' => true, 'showUpload' => true, 'allowedFileExtensions' => ['pdf']]]); ?> </div> </div> </div> </div> </div> <!--END tariefReizen ------------------------------------------> </div>
<div> <?php $path = !empty(Yii::$app->params['uploaddir']) ? Yii::$app->params['uploaddir'] : Yii::getAlias("@app/files/"); if (file_exists($path . 'users/' . $model->id . '.jpg')) { echo Html::img(Url::to(['site/download', 'file' => 'users/' . $model->id . '.jpg', 'preview' => true]), ['class' => 'img-rounded']); } else { $AdminLTEAsset = hscstudio\adminlte\assets\AdminLTEAsset::register($this); $defaultPhoto = $AdminLTEAsset->baseUrl . '/img/user2-160x160.jpg'; echo Html::img($defaultPhoto, ['class' => 'img-rounded']); } ?> <hr> </div> <label class="control-label" for="user-gender">Photo</label> <?php echo \kartik\widgets\FileInput::widget(['name' => 'photo', 'options' => ['accept' => 'image/*'], 'pluginOptions' => ['previewFileType' => 'image', 'uploadLabel' => 'Upload', 'showUpload' => false]]); ?> </div> </div> </div> </div> <div class="row"> </div>
<div class="test-form"> <?php $form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'options' => ['enctype' => 'multipart/form-data']]); ?> <div class="row"> <div class="col-md-6"> <?php $plugins = ["options" => ["accept" => "image/*"]]; if ($model->image) { $plugins = ["options" => ["accept" => "image/*"], "pluginOptions" => ["initialPreview" => [kartik\helpers\Html::img($model->thumbnailTrue, ["class" => "file-preview-image"])]]]; } echo $form->field($model, "image")->widget(FileInput::classname(), $plugins); ?> </div> <div class="col-md-6"> <?php echo $form->field($model, 'name')->textInput(['maxlength' => true]); echo $form->field($model, "description")->widget(CKEditor::className(), ["editorOptions" => ["preset" => "full", "inline" => false]]); ?> </div> </div> <div class="row"> <div class="col-md-10 col-md-offset-1">
/** * @param null $options * @param null $pluginOptions * * @return string * @throws \Exception */ public function getItem($options = null, $pluginOptions = null) { switch ($this->type) { case self::TYPE_TEXT: return Html::input('text', 'Setting[' . $this->code . ']', $this->value, $options != null ? $options : ['placeholder' => $this->getName(), 'class' => 'form-control']); case self::TYPE_EMAIL: return Html::input('email', 'Setting[' . $this->code . ']', $this->value, $options != null ? $options : ['placeholder' => $this->getName(), 'class' => 'form-control']); case self::TYPE_NUMBER: return Html::input('number', 'Setting[' . $this->code . ']', $this->value, $options != null ? $options : ['placeholder' => $this->getName(), 'class' => 'form-control']); case self::TYPE_TEXTAREA: return Html::textarea('Setting[' . $this->code . ']', $this->value, $options != null ? $options : ['placeholder' => $this->getName(), 'class' => 'form-control']); case self::TYPE_COLOR: return ColorInput::widget(['value' => $this->value, 'name' => 'Setting[' . $this->code . ']', 'options' => $options != null ? $options : ['class' => 'form-control']]); case self::TYPE_DATE: return DatePicker::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $this->value, 'options' => $options != null ? $options : ['class' => 'form-control'], 'pluginOptions' => $pluginOptions != null ? $pluginOptions : ['format' => 'yyyy-mm-dd', 'todayHighlight' => true]]); case self::TYPE_TIME: return TimePicker::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $this->value, 'options' => $options != null ? $options : ['class' => 'form-control'], 'pluginOptions' => $pluginOptions != null ? $pluginOptions : ['minuteStep' => 1, 'showSeconds' => true, 'showMeridian' => false]]); case self::TYPE_DATETIME: return DateTimePicker::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $this->value, 'options' => $options != null ? $options : ['class' => 'form-control'], 'pluginOptions' => ['format' => 'yyyy-mm-dd H:i:s', 'todayHighlight' => true]]); case self::TYPE_PASSWORD: return PasswordInput::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $this->value, 'options' => $options != null ? $options : ['class' => 'form-control'], 'pluginOptions' => $pluginOptions != null ? $pluginOptions : ['showMeter' => true, 'toggleMask' => false]]); case self::TYPE_ROXYMCE: return RoxyMceWidget::widget(['id' => 'Setting_' . $this->code, 'name' => 'Setting[' . $this->code . ']', 'value' => $this->value, 'action' => Url::to(['roxymce/default']), 'options' => $options != null ? $options : ['title' => $this->getName()], 'clientOptions' => $pluginOptions != null ? $pluginOptions : []]); case self::TYPE_SELECT: return Select2::widget(['value' => $this->value, 'name' => 'Setting[' . $this->code . ']', 'data' => $this->getStoreRange(), 'options' => $options != null ? $options : ['class' => 'form-control'], 'pluginOptions' => ['allowClear' => true]]); case self::TYPE_MULTI_SELECT: $options['multiple'] = true; if (!isset($options['class'])) { $options['class'] = 'form-control'; } return Select2::widget(['name' => 'Setting[' . $this->code . ']', 'value' => explode(",", $this->value), 'data' => $this->getStoreRange(), 'options' => $options, 'pluginOptions' => ['allowClear' => true]]); case self::TYPE_FILE_PATH: $value = Yii::getAlias($this->store_dir) . DIRECTORY_SEPARATOR . $this->value; return FileInput::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $value, 'options' => $options != null ? $options : ['class' => 'form-control', 'multiple' => false], 'pluginOptions' => $pluginOptions != null ? $pluginOptions : ['previewFileType' => 'any', 'showRemove' => false, 'showUpload' => false, 'initialPreview' => !$this->isNewRecord ? [$this->value] : []]]); case self::TYPE_FILE_URL: $value = $this->store_url . '/' . $this->value; return FileInput::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $value, 'options' => $options != null ? $options : ['class' => 'form-control'], 'pluginOptions' => $pluginOptions != null ? $pluginOptions : ['previewFileType' => 'any', 'showRemove' => false, 'showUpload' => false, 'initialPreviewAsData' => true, 'initialPreviewFileType' => self::fileType(pathinfo($this->value, PATHINFO_EXTENSION)), 'initialPreview' => !$this->isNewRecord ? $value : [], 'initialCaption' => $this->value]]); case self::TYPE_PERCENT: return RangeInput::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $this->value, 'html5Options' => ['min' => 0, 'max' => 100, 'step' => 1], 'options' => $options != null ? $options : ['class' => 'form-control'], 'addon' => ['append' => ['content' => '%']]]); case self::TYPE_SWITCH: $selector = explode(',', $this->store_range); if (count($selector) != 2) { throw new ErrorException(Yii::t('setting', 'Switch Field should have store with 2 value, and negative is first. Example: no,yes'), 500); } return Html::hiddenInput('Setting[' . $this->code . ']', $selector[0]) . SwitchInput::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $selector[1], 'containerOptions' => ['class' => 'nv-switch-container'], 'options' => $options != null ? $options : [], 'pluginOptions' => $pluginOptions != null ? $pluginOptions : ['state' => $this->value == $selector[1], 'size' => 'small', 'offText' => ucfirst($selector[0]), 'onText' => ucfirst($selector[1])]]); case self::TYPE_CHECKBOX: $random = rand(1000, 9999); return Html::checkboxList('Setting[' . $this->code . ']', explode(",", $this->value), $this->getStoreRange(), $options != null ? $options : ['class' => 'nv-checkbox-list checkbox', 'item' => function ($index, $label, $name, $checked, $value) use($random) { $html = Html::beginTag('div'); $html .= Html::checkbox($name, $checked, ['id' => 'Setting_checkbox_' . $label . '_' . $index . '_' . $random, 'value' => $value]); $html .= Html::label($label, 'Setting_checkbox_' . $label . '_' . $index . '_' . $random); $html .= Html::endTag('div'); return $html; }]); case self::TYPE_RADIO: $random = rand(1000, 9999); return Html::radioList('Setting[' . $this->code . ']', $this->value, $this->getStoreRange(), $options != null ? $options : ['class' => 'nv-checkbox-list radio', 'item' => function ($index, $label, $name, $checked, $value) use($random) { $html = Html::beginTag('div'); $html .= Html::radio($name, $checked, ['id' => 'Setting_radio_' . $label . '_' . $index . '_' . $random, 'value' => $value]); $html .= Html::label($label, 'Setting_radio_' . $label . '_' . $index . '_' . $random); $html .= Html::endTag('div'); return $html; }]); case self::TYPE_SEPARATOR: return '<hr>'; default: return Html::input('text', 'Setting[' . $this->code . ']', $this->value, $options != null ? $options : ['placeholder' => $this->getName(), 'class' => 'form-control']); } }
</div> <div class="row"> <div class="col-md-12"> <?php /* <?= $form->field($model, 'photos[]')->fileInput(['multiple' => true]) ?> <div class="well"> <?= $model->getPhotosViewer(); ?> </div> */ ?> <label class="control-label" for="photos[]"> อัลบั้มรูปภาพ </label> <?php echo FileInput::widget(['name' => 'photos[]', 'pluginOptions' => ['showCaption' => false, 'showRemove' => false, 'showUpload' => false, 'browseClass' => 'btn btn-default btn-block', 'browseIcon' => '<i class="glyphicon glyphicon-camera"></i> ', 'browseLabel' => 'เลือกรูปภาพ', 'initialPreview' => $initialPreviewPhotos, 'initialPreviewConfig' => $initialPreviewPhotosConfig, 'uploadUrl' => Url::to(['/uploads/photos']), 'uploadExtraData' => ['ref' => $model->ref]], 'options' => ['multiple' => true, 'accept' => 'image/*']]); ?> </div> </div> <div class="form-group"> <?php echo $form->field($model, 'ref')->hiddenInput(['maxlength' => 50])->label(false); ?> <?php echo Html::submitButton($model->isNewRecord ? 'บันทึกข้อมูล' : 'แก้ไขข้อมูล', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> <?php echo Html::a('Cancel', ['article/index'], ['class' => 'btn btn-default']); ?>
<?php $form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]); ?> <div class="box-body"> <div class="row"> <div class="col-md-4"> <div class="form-group"> <?php if ($model->getImage()) { foreach ($model->getImage() as $image) { echo Html::img("/storages/" . $image->getFullPath(), ['class' => 'img-thumbnail', 'width' => 90, 'height' => 90]); } } // your fileinput widget for single file upload echo $form->field($model, 'thumbnail[]')->widget(FileInput::classname(), ['options' => ['accept' => 'image/*', 'multiple' => true], 'pluginOptions' => ['allowedFileExtensions' => ['jpg', 'gif', 'png'], 'previewFileType' => 'any']]); ?> </div> </div> <div class="col-md-8"> <div class="form-group"> <?php echo $form->field($model, 'title')->textInput(['maxlength' => 255]); ?> </div> <div class="row"> <div class="form-group col-md-6"> <?php echo $form->field($model, 'category_id')->dropDownList(ArrayHelper::map(Category::find()->notParent()->all(), 'id', 'title'), ['prompt' => Yii::t('view', 'Select A Category')]); ?> </div>
<div class="row"> <div class="col-lg-12"> <div class="ibox float-e-margins"> <div class="ibox-title"> <h5><?php echo Yii::t('common', 'Information'); ?> </h5> </div> <div class="ibox-content"> <?php $form = ActiveForm::begin(['id' => 'formDefault', 'layout' => 'horizontal', 'options' => ['enctype' => 'multipart/form-data'], 'fieldConfig' => ['horizontalCssClasses' => ['label' => 'col-sm-2', 'wrapper' => 'col-sm-10', 'error' => 'help-block m-b-none', 'hint' => '']]]); // Image $imageConfig = ['options' => ['accept' => 'uploads/*'], 'pluginOptions' => ['previewFileType' => 'image', 'showCaption' => FALSE, 'showRemove' => FALSE, 'showUpload' => FALSE, 'browseClass' => 'btn btn-primary btn-block', 'browseIcon' => '<i class="glyphicon glyphicon-camera"></i> ', 'browseLabel' => 'Select Photo', 'removeClass' => 'btn btn-danger', 'removeLabel' => "Delete", 'removeIcon' => '<i class="glyphicon glyphicon-trash"></i>', 'allowedFileExtensions' => ['jpg', 'gif', 'png', 'jpeg']]]; if (!empty($model->image)) { $imageConfig['pluginOptions']['initialPreview'] = [Html::img(LetHelper::getFileUploaded($model->image), ['class' => 'file-preview-image'])]; } // END Image $tabs = [['label' => Yii::t('common', 'General information'), 'content' => $form->field($model, 'name')->textInput() . $form->field($model, 'class')->textInput() . $form->field($model, 'skin')->textInput() . $form->field($model, 'image')->widget(FileInput::classname(), $imageConfig) . $form->field($model, 'content')->widget(letyii\tinymce\Tinymce::className(), ['options' => ['style' => 'height: 400px;'], 'configs' => ['plugins' => 'moxiemanager advlist autolink lists link image charmap print preview hr anchor pagebreak ' . 'searchreplace wordcount visualblocks visualchars code fullscreen ' . 'insertdatetime media nonbreaking save table contextmenu directionality ' . 'emoticons template paste textcolor colorpicker textpattern', 'toolbar1' => 'insertfile undo redo | styleselect | fontselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image', 'toolbar2' => 'print preview media | forecolor backcolor emoticons', 'moxiemanager_image_settings' => ['moxiemanager_title' => 'Images', 'moxiemanager_extensions' => 'jpg,png,gif', 'moxiemanager_rootpath' => '/uploads/editor', 'moxiemanager_view' => 'thumbs'], 'external_plugins' => ['moxiemanager' => Url::base() . '/plugins/moxiemanager/plugin.min.js'], 'entity_encoding' => 'raw', 'force_p_newlines' => true, 'force_br_newlines' => false, 'auto_cleanup_word' => false, 'relative_urls' => true, 'convert_urls' => false, 'remove_script_host' => true, 'verify_html' => false, 'forced_root_block' => false, 'content_css' => 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css', 'templates' => Url::to(['template'])]]) . $form->field($model, 'description')->textarea() . $form->field($model, 'promotion')->widget(SwitchInput::className(['type' => SwitchInput::RADIO])) . $form->field($model, 'status')->widget(SwitchInput::className(['type' => SwitchInput::RADIO])), 'active' => true], ['label' => 'Seo', 'content' => $form->field($model, 'slug')->textInput() . $form->field($model, 'slug_prefix')->textInput() . $form->field($model, 'seo_url')->textInput() . $form->field($model, 'seo_title')->textInput() . $form->field($model, 'seo_desc')->textInput(), $form->field($model, 'seo_keyword')->textInput()]]; echo Html::hiddenInput('save_type', 'save'); echo yii\bootstrap\Tabs::widget(['items' => $tabs]); ActiveForm::end(); ?> </div> </div> </div> </div> </div>
<div id="image" class="tab-pane fade"> <p class="bg-info"> <?php echo Yii::t('articles', 'Allowed Extensions'); ?> : <?php echo $imagetype; ?> </p> <div class="col-lg-6"> <?php echo $form->field($model, 'image')->widget(FileInput::classname(), ['options' => ['accept' => 'image/' . $imagetype], 'pluginOptions' => ['previewFileType' => 'image', 'showUpload' => false, 'browseLabel' => Yii::t('articles', 'Browse …')]]); ?> <?php if (isset($model->image) && !empty($model->image)) { ?> <div class="thumbnail"> <img alt="200x200" class="img-thumbnail" data-src="holder.js/300x250" style="width: 300px;" src="<?php echo $model->getImageUrl(); ?> "> <div class="caption"> <p></p> <p>
echo $dropped; ?> fragen doppelt</h3> <?php } ?> <div class="upload-field"> <?php $form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]); //important ?> <div class="form-group"> <label for="">Für Sprache</label> <?php echo Html::dropDownList('lang', null, \app\helpers\InputHelper::getDropdownOptions('app\\models\\Language', 'l_id', 'name', true), ['class' => 'form-control']); ?> </div> <?php echo FileInput::widget(['name' => 'filename', 'options' => ['multiple' => false], 'pluginOptions' => ['showPreview' => false, 'showCaption' => true, 'showRemove' => true, 'showUpload' => false]]); ?> <br/> <input type="submit" class="btn btn-primary" value="Upload"/> </div> <?php ActiveForm::end(); ?> </div>
<div class="col-sm-8 col-xs-6 media-library-window-items"> <h4>Библиотека медиафайлов</h4> <?php $field_id = uniqid("field"); $options = ['name' => 'files', 'id' => $field_id, 'options' => ['multiple' => true], 'pluginOptions' => ['uploadAsync' => true, "previewFileType" => "image", 'id' => uniqid("field"), "showClose" => false, "showPreview" => false, "showCaption" => false, "showUpload" => false, "browseClass" => "btn btn-primary btn-sm", "browseLabel" => "Добавить файлы", "layoutTemplates" => ["footer" => "", "main2" => '{browse}'], "overwriteInitial" => true, "uploadExtraData" => ['name' => 'files'], "removeClass" => "btn btn-danger btn-sm", "removeLabel" => "", "removeIcon" => "<i class=\"fa fa-trash\"></i>", "previewSettings" => ["image" => ["width" => "auto", "height" => "50px"]], 'uploadUrl' => \yii\helpers\Url::toRoute(['/media/default/upload']), "allowedPreviewTypes" => ['image'], "dropZoneEnabled" => false], 'pluginEvents' => ['filebatchselected' => "function(event, files) {\n \$.fancybox.showLoading();\n \$('#" . $field_id . "').fileinput('upload');\n }", "filebatchuploadcomplete" => "function(event, files, extra) {\n \$.fancybox.hideLoading();\n \$.pjax.reload('#window-media-items', {push:false, pushState: false, url : '/backend/media/default/wysiwyg-window'});\n }"]]; echo \kartik\widgets\FileInput::widget($options); ?> <br> <?php \yii\widgets\Pjax::begin(['id' => 'window-media-items', 'enablePushState' => false]); ?> <?php echo \yii\widgets\ListView::widget(['layout' => "<div class='clearfix'>{items}</div>\n{pager}", 'dataProvider' => $dataProvider, 'pager' => ['options' => ['class' => 'pagination pagination-sm'], 'maxButtonCount' => 3], 'itemOptions' => ['class' => 'media-item col-lg-1 col-md-2 col-sm-2 col-xs-6', 'data-url' => \yii\helpers\Url::toRoute(['window'])], 'itemView' => function ($model, $key, $index, $widget) { $image = false; if (lenarx\media\models\Media::isImage($model->mime_type)) { $image = true; } $model->data = $model->data ? unserialize($model->data) : []; $filesize = lenarx\media\helpers\MediaLib::filesize_formatted($model->data['size']); return $this->render('media-item', ['model' => $model, 'image' => $image, 'filesize' => $filesize]); }]); ?> <?php \yii\widgets\Pjax::end(); ?> </div> <div class="col-sm-4 col-xs-6 media-library-insert"> <div class="media-insert hide"> <div class="block info"> <h4>Параметры файла</h4> <p class="filename">Weddell-Sea-Antarctica.jpg</p>
?> </div> </div> <div class="panel panel-danger"> <div class="panel-heading">แนบหลักฐานให้ครบถ้วน และถูกต้องตามรายการ</div> <div class="penel-body well"> <p><i class="glyphicon glyphicon-send"></i> ภาพถ่ายหนังสือเดินทางของผู้ขับรถ <i class="glyphicon glyphicon-send"></i>ภาพถ่ายใบอนุญาตขับรถตามลักษณะที่ขออนุญาต</p> <div class="row"> </div><span class="label label-danger">กรุณาตั้งชื่อไฟล์ ตามชนิดเอกสาร</span> <?php echo PopoverX::widget(['header' => 'การตั้งชื่อเอกสาร', 'type' => PopoverX::TYPE_INFO, 'placement' => PopoverX::ALIGN_TOP, 'size' => PopoverX::SIZE_LARGE, 'content' => Html::img('images/sampledoc.gif'), 'toggleButton' => ['label' => 'คลิก เพื่อดูตัวอย่าง', 'class' => 'label label-primary']]); ?> <?php echo $form->field($model2, 'docs[]')->widget(FileInput::classname(), ['options' => ['multiple' => true], 'pluginOptions' => ['initialPreview' => $model2->initialPreview($model2->docs, 'docs', 'file'), 'initialPreviewConfig' => $model2->initialPreview($model2->docs, 'docs', 'config'), 'allowedFileExtensions' => ['pdf', 'jpg', 'png', 'docx', 'xls', 'xlsx'], 'showPreview' => true, 'showCaption' => true, 'showRemove' => true, 'showUpload' => true, 'overwriteInitial' => false]])->label(false); ?> </div> </div> <div class="form-group"> <?php echo Html::submitButton($model2->isNewRecord ? '<i class="fa fa-plus"></i> เพิ่มข้อมูลคนขับ' : 'Update', ['class' => $model2->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div> <?php ActiveForm::end(); ?> </div> </div>
?> <?php echo $form->field($model, 'description')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'phone')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'email')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'gambar')->widget(FileInput::classname(), ['options' => ['accept' => 'image/*'], 'pluginOptions' => ['allowedFileExtensions' => ['jpg', 'gif', 'png']]]); ?> <!--$form->field($model, 'image')->fileInput() ?>--> <?php echo $form->field($model, 'itemType')->widget(Select2::classname(), ['data' => $datastatik, 'options' => ['placeholder' => 'pilih ...'], 'pluginOptions' => ['allowClear' => true]]); ?> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div>
use yii\helpers\Url; $this->title = Yii::t('app', 'Cargar archivo DPA'); $this->params['breadcrumbs'][] = $this->title; ?> <div class="divipola-index"> <h1><?php echo Html::encode($this->title); ?> </h1> <div class="row"> <div class="col-md-6"> <?php echo '<label class="control-label">Subir archivo en formato separado por comas (.csv)</label><br>'; echo FileInput::widget(['name' => 'attachment', 'options' => ['accept' => 'text/csv', 'multiple' => false], 'pluginOptions' => ['uploadUrl' => Url::to(['divipola/file-upload'])]]); ?> </div> <div class="col-md-6 instructions"> <h1>Requisitos</h1> <ol> <li>Sólo se permite subir archivos en formato CSV (separados por comas)</li> <li>Puede usar el botón seleccionar o arrastrar el archivo al área designada</li> <li>Asegúrese de guardar el archivo como "archivo separado por comas *.csv"</li> <li>Los registros cuyo codigo de Departamento y Municipio existan se omitirán de la carga</li> <li>El archivo a subir debe tener los siguientes campos (columnas) en este estricto orden:</li> <ul> <li> <code>Codigo de Departamento</code> </li> <li>
<h1>Parsing Excel test</h1> </div> <div class="test-form"> <div class="test-form"> <?php $form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'options' => ['enctype' => 'multipart/form-data']]); ?> <div class="row"> <div class="col-md-10"> <?php echo $form->field($model, 'fileori')->widget(FileInput::classname(), ['options' => ['accept' => '.xls']]); ?> </div> </div> <div class="row"> <div class="col-md-10 col-md-offset-1"> <?php echo Html::submitButton('Upload ', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div> </div> <div class="notifications" style="display: none">Please wait, while loading.... <img src="/abc/web/img/loadingAnimation.gif"></div>
<div class=""> <?php $this->beginBlock('main'); ?> <p> <input type="tel" hidden /> <!-- disable chrome autofill --> <?php echo $form->field($model, 'password')->passwordInput(['maxlength' => true, 'autocomplete' => "off"]); ?> <?php echo $form->field($model, 'name')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'photo_url')->widget(\kartik\widgets\FileInput::className(), ['options' => ['accept' => 'image/*'], 'pluginOptions' => ['allowedFileExtensions' => ['jpg', 'png', 'jpeg', 'gif', 'bmp'], 'maxFileSize' => 250]]); ?> <?php if ($model->photo_url != null) { ?> <div class="form-group"> <div class="col-sm-6 col-sm-offset-3"> <?php echo Html::img(["uploads/" . $model->photo_url], ["width" => "150px"]); ?> </div> </div> <?php } ?> </p>