@@ -56,7 +56,12 @@ $accessoryModule = $this->getAccessoryModule(); | |||
<?php endif; ?> | |||
<?= $form->field($model, 'id_product_category')->dropDownList($productCategoryModule->populateProductCategoriesDropdownList()); ?> | |||
<?= $form->field($model, 'description')->textInput(['maxlength' => 255]) ?> | |||
<?= $form->field($model, 'recipe')->textarea()->label('Description longue') ?> | |||
<?= $form->field($model, 'recipe')->label('Description longue') | |||
->widget(letyii\tinymce\Tinymce::class, [ | |||
'configs' => [ | |||
'plugins' => Yii::$app->parameterBag->get('tinyMcePlugins') | |||
], | |||
]); ?> | |||
<?= $form->field($model, 'unit') | |||
->dropDownList(ArrayHelper::map(Product::$unitsArray, 'unit', 'wording')) | |||
->label('Unité (pièce, poids ou volume)'); ?> |
@@ -363,8 +363,7 @@ $this->setMeta('description', $producerModule->getSeoGenerator()->generateMetaDe | |||
<div class="description-long" v-if="product.recipe.length"> | |||
<a href="javascript:void(0);" class="show-more-link">En savoir | |||
plus</a> | |||
<div class="content"> | |||
{{ product.recipe }} | |||
<div class="content" v-html="product.recipe"> | |||
</div> | |||
</div> | |||
</td> |
@@ -88,7 +88,7 @@ $this->setMeta('description', $producerModule->getSeoGenerator()->generateMetaDe | |||
$html .= '<div class="description">' . Html::encode($model->description).'</div>'; | |||
} | |||
if (strlen($model->recipe)) { | |||
$html .= '<div class="description-long"><a href="javascript:void(0);" class="show-more-link">En savoir plus</a><div class="content">' . nl2br(Html::encode($model->recipe)).'</div></div>'; | |||
$html .= '<div class="description-long"><a href="javascript:void(0);" class="show-more-link">En savoir plus</a><div class="content">' . $model->recipe .'</div></div>'; | |||
} | |||
return $html; | |||
} |