K
K
KevinSmash2019-05-07 13:36:02
Yii
KevinSmash, 2019-05-07 13:36:02

Why is katrik-editable displayed incorrectly?

Hello, I set editable to change the value of individual lines, but instead of the line being displayed as usual, the following value was inserted:

<div id="w1-cont" class="kv-editable"><button type="button" id="w1-targ" class="kv-editable-value kv-editable-link" data-toggle="popover-x" data-placement="right" data-target="#w1-popover"><em>(не задано)</em></button> <div id="w1-popover" class="kv-editable-popover skip-export has-footer popover popover-x popover-default popover-md" role="dialog"> <div class="arrow"></div><div class="popover-header popover-title"> <button type="button" class="close" data-dismiss="popover-x" aria-hidden="true">&times;</button> <i class="glyphicon glyphicon-edit"></i> Редактировать Тэг </div> <div class="popover-body popover-content"> <div class="kv-editable-content"><form id="w2" class="kv-editable-form" action="/admin/clients" method="post"> <input type="hidden" name="_csrf-backend" value="cHpYM0dPR2EhEhxRPih2FjsCYQJ0IR8AHy0gcQwmJhEWCCJLf34CMQ=="><input type="hidden" name="hasEditable" value="0"> <div class="kv-editable-parent form-group"><input type="text" id="w1" class="form-control kv-editable-input" name="teg" value="" placeholder="Введите тэг..."></div> </form></div> </div> <div class="popover-footer"> <div class="kv-editable-loading" style="display:none">&nbsp;</div><button type="button" class="btn btn-sm btn-default kv-editable-reset" title="Сбросить"><i class="glyphicon glyphicon-ban-circle"></i></button><button type="button" class="btn btn-sm btn-primary kv-editable-submit" title="Применить"><i class="glyphicon glyphicon-save"></i></button> </div> </div></div>

My view:
[
                'label' => 'Тэг',
                'value' => function ($model, $key, $value) {
                    return Editable::widget([
                        'model' => $model,
                        'name'=>'teg',
                        'asPopover' => true,
                        'value' => $model->teg,
                        'header' => 'Тэг',
                        'size'=>'md',
                        'options' => ['class'=>'form-control', 'placeholder'=>'Введите тэг...']
                    ]);
                },
],

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
zooks, 2017-04-14
@zooks

Complex shapes are added via SVG. Then in styles you set it as background and position it wherever you want.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question