Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaomalover committed Sep 9, 2019
1 parent c7ca0ee commit 684264a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
1 change: 1 addition & 0 deletions protected/core/config/web.php
Expand Up @@ -77,6 +77,7 @@
'class' => 'core\modules\admin\gii\crud\Generator',
'templates' => [
'agent' => '@core/modules/admin/gii/crud/simple',
'default' => '@vendor/yiisoft/yii2-gii/src/generators/crud/default'
]
],
],
Expand Down
Expand Up @@ -22,7 +22,7 @@
<div class="<?= Inflector::camel2id(StringHelper::basename($generator->modelClass)) ?>-create">

<?= "<?= " ?>$this->render('_form', [
'model' => $model,
'model' => $model,
]) ?>

</div>
Expand Up @@ -19,7 +19,7 @@
$this->title = <?= $generator->generateString('Update {modelClass}: ', ['modelClass' => Inflector::camel2words(StringHelper::basename($generator->modelClass))]) ?> . $model-><?= $generator->getNameAttribute() ?>;
$this->params['breadcrumbs'][] = ['label' => <?= $generator->generateString(Inflector::pluralize(Inflector::camel2words(StringHelper::basename($generator->modelClass)))) ?>, 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model-><?= $generator->getNameAttribute() ?>, 'url' => ['view', <?= $urlParams ?>]];
$this->params['breadcrumbs'][] = <?= $generator->generateString('Update') ?>;
$this->params['breadcrumbs'][] = <?= $generator->generateCommonString('Update') ?>;
?>
<div class="<?= Inflector::camel2id(StringHelper::basename($generator->modelClass)) ?>-update">

Expand Down
8 changes: 2 additions & 6 deletions protected/core/modules/home/admin/views/contact/view.php
Expand Up @@ -6,7 +6,7 @@
/* @var $this yii\web\View */
/* @var $model core\modules\home\models\Contact */

$this->title = $model->name;
$this->title = Html::encode($model->name);
$this->params['breadcrumbs'][] = ['label' => Yii::t('HomeModule.base', 'Contacts'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
Expand All @@ -31,11 +31,7 @@
'company',
'mobile',
'email:email',
[
'attribute'=>'demand',
'value'=> Html::encode($model->demand),
'format' => 'html',
],
'demand:ntext',
'created_at:datetime',
[
'attribute'=>'status',
Expand Down

0 comments on commit 684264a

Please sign in to comment.