<div class="form-group pull-right"> <?php echo Html::submitButton('<i class="glyphicon glyphicon-ok"></i> บันทึก', ['class' => 'btn btn-danger']); ?> <?php echo Html::resetButton('<i class="glyphicon glyphicon-remove"></i> ยกเลิก', ['class' => 'btn']); ?> </div> </div> </div> <br/> <div class="dashboard_box" style="padding-top: 15px;"> <div class="row"> <div class="col-sm-8"> <?php echo $form->field($model, 'cid')->dropDownList(app\models\TblSlidertype::makeDropDown(), ['style' => 'width:200px; max-width: 400px;']); ?> <?php echo $form->field($model, 'upload_files')->widget(FileInput::classname(), ['options' => ['multiple' => false], 'pluginOptions' => ['showUpload' => false, 'showPreview' => true, 'showCaption' => false, 'uploadClass' => 'btn btn-info', 'removeClass' => 'btn btn-danger', 'elCaptionText' => '#customCaption', 'initialPreview' => [Html::img("{$model->slider_Url}", ['class' => 'file-preview-image', 'alt' => '', 'title' => ''])]]]); echo "ขนาดภาพ Slide: 1,263*520 px<br/>ขนาดภาพ Event: 800*600px<br/><br/>"; //echo $form->field($model, 'target')->input('checkbox', ['style' => 'width: 400px;']); echo $form->field($model, 'id', ['options' => ['class' => 'sr-only']])->hiddenInput(); echo $form->field($model, 'langs', ['options' => ['class' => 'sr-only']])->hiddenInput(); ?> </div> <div class="col-sm-4"> <?php echo $form->field($model, 'title')->input('text'); ?> <?php
" data-dismiss="modal" class="btn btn-default">ปิด</a> </div> <?php ActiveForm::end(); Pjax::end(); Modal::end(); ?> <?php $form = ActiveForm::begin(['id' => 'menus-form', 'options' => ['class' => 'form-inline pull-right'], 'fieldConfig' => ['template' => "{label}{input} ", 'labelOptions' => ['class' => 'sr-only']]]); ?> <?php echo $form->field($model, 'langs')->dropDownList(\app\models\tblLangs::makeDropDown(), ['style' => 'width: 150px;', 'onchange' => 'form.submit();']); echo " "; echo $form->field($model, 'cid')->dropDownList(app\models\TblSlidertype::makeDropDown(), ['onchange' => 'form.submit();']); ?> <?php ActiveForm::end(); ?> </div> </div><br/> <?php Pjax::begin(); echo GridView::widget(['dataProvider' => $model->search(), 'columns' => [['class' => 'yii\\grid\\SerialColumn', 'headerOptions' => ['width' => '5%']], ['headerOptions' => ['width' => '60%'], 'header' => '', 'format' => 'raw', 'value' => function ($model) { return '<img src="' . $model->slider_Url . '" width="100%"/>'; }], ['headerOptions' => ['width' => '16%'], 'header' => 'การเชื่อมโยง', 'attribute' => 'link_Url'], ['headerOptions' => ['width' => '5%', 'style' => 'text-align:center;'], 'contentOptions' => ['align' => 'center'], 'class' => 'yii\\grid\\CMSColumn', 'template' => '{published}', 'header' => 'แสดง'], ['headerOptions' => ['width' => '7%', 'style' => 'text-align:center;'], 'contentOptions' => ['align' => 'center'], 'class' => 'yii\\grid\\CMSColumn', 'template' => '{up} {down}', 'header' => 'เรียง'], ['headerOptions' => ['width' => '7%', 'style' => 'text-align:center;'], 'contentOptions' => ['align' => 'center'], 'class' => 'yii\\grid\\ActionColumn', 'template' => '{update} {delete}', 'header' => 'แก้ไข']]]); Pjax::end(); ?>