Answer the question
In order to leave comments, you need to log in
How to make full display of text in a table?
Good day. There is a table in which logins and passwords are displayed. With logins, everything is fine, but with passwords, not so much. There was a problem when one of the passwords became similar to something like this "MB *)@/<3EXD4F" only without the number 3, otherwise everything works wrong here too. The table is Kartik and is created like this:
echo grid\GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => $gridColumns,
'containerOptions' => ['style' => 'overflow: auto;'], // only set when $responsive = false
'headerRowOptions' => ['class' => 'kartik-sheet-style'],
'filterRowOptions' => ['class' => 'kartik-sheet-style'],
'pjax' => true, // pjax is set to always true for this demo
'persistResize' => false,
'export' => [
'fontAwesome' => true
],
]);
[
'class' => 'kartik\grid\EditableColumn',
'label' => 'Password',
'attribute' => 'passwordLog',//statusLiveId
'value'=>function($model,$key,$index,$column){
return '<div style="max-width: 400px;word-wrap: break-word;">'.$model[$column->attribute].'</div>';
},
'readonly' => function ($model, $key, $index, $widget) {
if (isset($model['password'])) {
return (!$model['password']); // do not allow editing of inactive records
} else {
return false;
}
},
'editableOptions' => [
'name' => 'password',//statusLiveId
'header' => 'Password',
'inputType' => \kartik\editable\Editable::INPUT_TEXT,
'size' => 'md',
],
'hAlign' => 'left',
'vAlign' => 'middle',
'width' => '400px',
'format'=>'raw',
'pageSummary' => true
],
Answer the question
In order to leave comments, you need to log in
1. Why show passwords? What is this innovation?
2. www.php.net/manual/ru/function.quotemeta.php
3. www.yiiframework.com/doc-2.0/yii-helpers-basehtml....
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question