Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- use yii\helpers\Html;
- use yii\helpers\Url;
- use yii\widgets\ActiveForm;
- use kartik\file\FileInput;
- /* @var $this yii\web\View */
- /* @var $model common\models\Slider */
- /* @var $form yii\widgets\ActiveForm */
- ?>
- <div class="slider-form">
- <?php $form = ActiveForm::begin(); ?>
- <?= $form->field($model, 'name_slider')->textInput(['maxlength' => true]) ?>
- <h3>Image Slider</h3>
- <?= FileInput::widget([
- 'name' => 'image_slider',
- 'options'=>[
- 'multiple'=>true
- ],
- 'pluginOptions' => [
- 'uploadUrl' => Url::to(['/web/images/slider/']),
- 'uploadExtraData' => [
- 'album_id' => 20,
- 'cat_id' => 'Nature'
- ],
- 'maxFileCount' => 1
- ]
- ]); ?>
- <h3>Image Discount</h3>
- <?= FileInput::widget([
- 'name' => 'image_diskon',
- 'options'=>[
- 'multiple'=>true
- ],
- 'pluginOptions' => [
- 'uploadUrl' => Url::to(['/web/images/slider/']),
- 'uploadExtraData' => [
- 'album_id' => 20,
- 'cat_id' => 'Nature'
- ],
- 'maxFileCount' => 1
- ]
- ]); ?>
- <div class="form-group">
- <?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
- </div>
- <?php ActiveForm::end(); ?>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement