Closed bahrammzm closed 7 years ago
I must load update section inside modal via renderAjax , But height and Full screen button not working in markdown editor
_form : <a href="<?= \yii\helpers\Url::to(['quote/update','id' => $model->id])?>" data-toggle="modal" data-target="#myModal<?=$model->id?>">edit</a>
<a href="<?= \yii\helpers\Url::to(['quote/update','id' => $model->id])?>" data-toggle="modal" data-target="#myModal<?=$model->id?>">edit</a>
`
</div>`
Quate controller :
public function actionUpdate($id) { $model = $this->findModel($id); if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['view', 'id' => $model->id]); } else { return $this->renderAjax('update', [ 'model' => $model, ]); } }
Quate _from :
<?php $form = ActiveForm::begin(); ?> =($model->isNewRecord ? 'اضافه کردن نقل قول' : 'ویرایش نقل قول')?> = $form->field($model, 'context')->widget(MarkdownEditor::className(),[ 'height' => 300, 'footerMessage' => '', 'showExport' => FALSE, 'showPreview' => FALSE ]); ?> </div> <div class="modal-footer"> <div class="form-group"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> <?= Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> </div> </div>
<?php $form = ActiveForm::begin(); ?>
</div> <div class="modal-footer"> <div class="form-group"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> <?= Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> </div> </div>
I must load update section inside modal via renderAjax , But height and Full screen button not working in markdown editor
_form :
<a href="<?= \yii\helpers\Url::to(['quote/update','id' => $model->id])?>" data-toggle="modal" data-target="#myModal<?=$model->id?>">edit</a>
`
Quate controller :
Quate _from :