Your IP : 216.73.216.79


Current Path : /var/www/html/learn/backend/modules/learning/views/learning-chapter/
Upload File :
Current File : /var/www/html/learn/backend/modules/learning/views/learning-chapter/_formpdf.php

<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\helpers\ArrayHelper;
use kartik\file\FileInput;

$this->registerCssFile('@web/plugins/summernote/summernote.min.css');
$this->registerJsFile('@web/plugins/summernote/summernote.min.js', ['depends' => [\yii\web\JqueryAsset::className()]]);
$this->registerJs("$('.summernote').summernote({height: 300});");
$this->registerCss(".note-editor{border:1px solid #e5e6e7 !important}");
?>
<div class="wrapper wrapper-content animated fadeInRight" style="padding: 20px 10px 20px;">
    <div class="ibox float-e-margins">
        <div class="ibox-content">
            <?php $form = ActiveForm::begin(); ?>
            <div class="row">
                <div class="col-sm-6"><?= $form->field($model, 'chapter_title')->textInput(['maxlength' => true]) ?></div>
                <div class="col-sm-3">
                    <?=
                    $form->field($model, 'chapter_status')->dropdownList(
                            ArrayHelper::map(
                                    (new \yii\db\Query())->select(['code', 'descr_en'])
                                            ->from('ref')
                                            ->where(['=', 'cat', 'LEARNING_STATUS'])
                                            ->orderBy(['descr_en' => SORT_ASC])
                                            ->all(), 'code', 'descr_en'), ['prompt' => '-- Please choose --',
                        'maxlength' => true,])
                    ?>
                </div>
                <div class="col-sm-3"><?= $form->field($model, 'chapter_time')->textInput(['maxlength' => true]) ?></div>
            </div>
            <p>Please upload PDF for the chapter content</p>
            <?= $form->field($model, 'chapter_content')->widget(FileInput::classname()); ?>
            <?= $form->field($model, 'chapter_info')->textarea(['class' => 'summernote']) ?>
            <div class="form-group">
                <?= Html::a(Yii::t('app', 'Back'), ['index', 'main_id' => $model->main_id], ['class' => 'btn btn-primary']) ?>
                <?= Html::submitButton(Yii::t('app', 'Save'), ['class' => 'btn btn-success']) ?>
            </div>
            <?php ActiveForm::end(); ?>
        </div>
    </div> 
</div>