@@ -379,6 +379,10 @@ $this->addBreadcrumb($this->getTitle()); | |||
<?= $form->field($model, 'option_check_by_default_prevent_user_credit') | |||
->dropDownList(Dropdown::noYesChoices()); ?> | |||
<?= $form->field($model, 'option_credit_description') | |||
->hint('Description affichée sur la page "Cagnotte" de la boutique') | |||
->textarea(); ?> | |||
<?php if($featureChecker->isEnabled(Feature::ALIAS_ONLINE_PAYMENT)): ?> | |||
<h4>Paiement en ligne</h4> | |||
<?php if($userModule->getAuthorizationChecker()->isGrantedAsAdministrator($userCurrent)): ?> |
@@ -0,0 +1,26 @@ | |||
<?php | |||
use yii\db\Migration; | |||
use yii\db\Schema; | |||
/** | |||
* Class m240530_080239_add_column_producer_option_credit_description | |||
*/ | |||
class m240530_080239_add_column_producer_option_credit_description extends Migration | |||
{ | |||
/** | |||
* {@inheritdoc} | |||
*/ | |||
public function safeUp() | |||
{ | |||
$this->addColumn('producer', 'option_credit_description', Schema::TYPE_TEXT); | |||
} | |||
/** | |||
* {@inheritdoc} | |||
*/ | |||
public function safeDown() | |||
{ | |||
$this->dropColumn('producer', 'option_credit_description'); | |||
} | |||
} |
@@ -259,7 +259,8 @@ class Producer extends ActiveRecordCommon | |||
'option_main_color', | |||
'option_newsletter_description', | |||
'option_leave_period_message_title', | |||
'option_leave_period_message' | |||
'option_leave_period_message', | |||
'option_credit_description', | |||
], | |||
'string' | |||
], | |||
@@ -540,6 +541,7 @@ class Producer extends ActiveRecordCommon | |||
'option_leave_period_message_display' => 'Afficher le message des congés', | |||
'option_leave_period_message_title' => 'Titre du message des congés', | |||
'option_leave_period_message' => 'Message des congés', | |||
'option_credit_description' => "Description Cagnotte", | |||
]; | |||
} | |||
@@ -39,8 +39,10 @@ | |||
use domain\Feature\Feature\Feature; | |||
use domain\Feature\Feature\FeatureModule; | |||
use domain\Payment\PaymentModule; | |||
use yii\grid\GridView; | |||
use domain\Producer\Producer\ProducerModule;use yii\grid\GridView; | |||
use yii\helpers\Html; | |||
$producerModule = ProducerModule::getInstance(); | |||
$paymentManager = PaymentModule::getInstance(); | |||
$featureChecker = FeatureModule::getInstance()->getChecker(); | |||
$producer = $this->context->getProducerCurrent(); | |||
@@ -56,9 +58,17 @@ if ($featureChecker->isEnabled(Feature::ALIAS_ONLINE_PAYMENT) && $this->context- | |||
] | |||
); | |||
} | |||
?> | |||
<?php | |||
$creditDescription = $producerModule->getSolver()->getConfig('option_credit_description'); | |||
if($creditDescription): ?> | |||
<div class="alert alert-info"> | |||
<i class="bi bi-info-circle"></i> | |||
<?= nl2br(Html::encode($creditDescription)); ?> | |||
</div> | |||
<?php endif; ?> | |||
<div class="table-responsive"> | |||
<?= GridView::widget([ | |||
'summary' => '', |
@@ -66,8 +66,8 @@ else { | |||
?> | |||
<div class="newsletter-index"> | |||
<div class="alert alert-dark"> | |||
<i class="bi bi-info"></i> | |||
<div class="alert alert-info"> | |||
<i class="bi bi-info-circle"></i> | |||
<?php if($producer->option_newsletter_description): ?> | |||
<?= nl2br(Html::encode($producer->option_newsletter_description)); ?> | |||
<?php else: ?> |