<?php echo $form->field($model, 'post_meta_id')->widget(Select2::classname(), ['data' => \common\models\PostMeta::topicCategory(), 'options' => ['placeholder' => '选择一个分类'], 'pluginOptions' => ['allowClear' => true, 'height' => '343%']]); ?> <?php echo $this->render('@frontend/views/partials/markdwon_help'); ?> <div class="form-group" id="editor"> <?php echo $form->field($model, 'content')->widget('trntv\\aceeditor\\AceEditor', ['id' => 'markdown', 'mode' => 'markdown', 'containerOptions' => ['style' => 'width: 100%; min-height: 350px'], 'theme' => 'github']); ?> </div> <?php echo SelectizeTextInput::widget(['name' => 'Topic[tags]', 'value' => $model->tags, 'loadUrl' => ['/post-tag/index'], 'clientOptions' => ['placeholder' => '标签(可选)', 'allowEmptyOption' => false, 'delimiter' => ',', 'valueField' => 'name', 'labelField' => 'name', 'searchField' => 'name', 'maxItems' => 5, 'plugins' => ['remove_button'], 'persist' => false, 'create' => true]]); ?> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? '创建话题' : '修改话题', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> <div class="pull-right"> <?php echo Html::a('排版说明', ['/site/markdown'], ['target' => '_blank']); ?> </div> </div> <div id="md-preview" class="pt10">
?> <?php echo $form->field($model, 'sumber')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'schedule_date')->widget(DateTimePicker::className(), ['language' => 'en', 'size' => 'ms', 'template' => '{input}', 'pickButtonIcon' => 'glyphicon glyphicon-time', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-m-dd hh:ii', 'todayBtn' => true]]); ?> <?php echo Html::activeLabel($model, 'tag'); ?> <?php echo SelectizeTextInput::widget(['model' => $model->tag, 'name' => 'Artikel[tag]', 'id' => 'artikel-tag', 'value' => $model->isNewRecord ? '' : $model->tag, 'clientOptions' => ['plugins' => ['remove_button'], 'delimiter' => ',', 'persist' => false, 'create' => 'function(input){ return { value : input, text : input } }']]); ?> <?php echo $form->field($model, 'status', ['template' => "{label}{input}\n{hint}\n{error}"])->dropDownList(Artikel::getStatus(), ['prompt' => '-- Pilih --']); ?> <?php // $form->field($model, 'video')->textarea(['rows' => 6]) ?> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?>