Ejemplo n.º 1
0
<?php 
/* echo common\widgets\jsoneditorcss\Upload::widget([
  'editorKey' => $mId . '-head',
  'fieldName' => 'root[common][image][content]'
  ]); */
?>


<?php 
echo $form->field($model, 'body')->textarea(['style' => 'display:none;'])->label(false);
?>

<div class="row">
    <div class="col-xs-12 col-sm-12 col-lg-12">
        <?php 
echo common\widgets\jsoneditor\JsonEditor::widget(['fieldId' => $mId . '-body', 'schemaUrl' => Yii::getAlias('@web/js/json-editor/schema/article.body.json')]);
?>
    </div>
</div>

<?php 
echo $form->field($model, 'thumbnail')->widget(\trntv\filekit\widget\Upload::className(), ['url' => ['/file-storage/upload'], 'maxFileSize' => 5000000]);
?>

<?php 
echo $form->field($model, 'attachments')->widget(\trntv\filekit\widget\Upload::className(), ['url' => ['/file-storage/upload'], 'sortable' => true, 'maxFileSize' => 10000000, 'maxNumberOfFiles' => 10]);
?>

<?php 
echo $form->field($model, 'domain')->dropDownList($domains, ['prompt' => '', 'multiple' => true]);
$js = '$("#' . $mId . '-domain").select2();';
Ejemplo n.º 2
0
<div class = "row">
    <div class = "col-xs-12 col-sm-12 col-lg-12">
        <?php 
echo common\widgets\jsoneditor\JsonEditor::widget(['fieldId' => $mId . '-before_body', 'schemaUrl' => Yii::getAlias('@apiUrl/file/schema/view?id=finance-before_body&language=' . Yii::$app->language . '&domain_id=' . \Yii::$app->user->identity->domain_id)]);
?>
    </div>
</div>

<?php 
echo $form->field($model, 'after_body')->textarea(['style' => 'display:none;'])->label(false);
?>

<div class = "row">
    <div class = "col-xs-12 col-sm-12 col-lg-12">
        <?php 
echo common\widgets\jsoneditor\JsonEditor::widget(['fieldId' => $mId . '-after_body', 'schemaUrl' => Yii::getAlias('@apiUrl/file/schema/view?id=finance-after_body&language=' . Yii::$app->language . '&domain_id=' . \Yii::$app->user->identity->domain_id)]);
?>
    </div>
</div>

<?php 
echo $form->field($model, 'status')->checkbox();
?>


<?php 
if (!empty(Yii::$app->request->queryParams['mid'])) {
    $mid = intval(Yii::$app->request->queryParams['mid']);
    echo $form->field($model, 'finance_id')->hiddenInput(['value' => $mid])->label(false);
}