<?= $form->field($model, 'option_check_by_default_prevent_user_credit') | <?= $form->field($model, 'option_check_by_default_prevent_user_credit') | ||||
->dropDownList(Dropdown::noYesChoices()); ?> | ->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)): ?> | <?php if($featureChecker->isEnabled(Feature::ALIAS_ONLINE_PAYMENT)): ?> | ||||
<h4>Paiement en ligne</h4> | <h4>Paiement en ligne</h4> | ||||
<?php if($userModule->getAuthorizationChecker()->isGrantedAsAdministrator($userCurrent)): ?> | <?php if($userModule->getAuthorizationChecker()->isGrantedAsAdministrator($userCurrent)): ?> |
<?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'); | |||||
} | |||||
} |
'option_main_color', | 'option_main_color', | ||||
'option_newsletter_description', | 'option_newsletter_description', | ||||
'option_leave_period_message_title', | 'option_leave_period_message_title', | ||||
'option_leave_period_message' | |||||
'option_leave_period_message', | |||||
'option_credit_description', | |||||
], | ], | ||||
'string' | 'string' | ||||
], | ], | ||||
'option_leave_period_message_display' => 'Afficher le message des congés', | '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_title' => 'Titre du message des congés', | ||||
'option_leave_period_message' => 'Message des congés', | 'option_leave_period_message' => 'Message des congés', | ||||
'option_credit_description' => "Description Cagnotte", | |||||
]; | ]; | ||||
} | } | ||||
use domain\Feature\Feature\Feature; | use domain\Feature\Feature\Feature; | ||||
use domain\Feature\Feature\FeatureModule; | use domain\Feature\Feature\FeatureModule; | ||||
use domain\Payment\PaymentModule; | 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(); | $paymentManager = PaymentModule::getInstance(); | ||||
$featureChecker = FeatureModule::getInstance()->getChecker(); | $featureChecker = FeatureModule::getInstance()->getChecker(); | ||||
$producer = $this->context->getProducerCurrent(); | $producer = $this->context->getProducerCurrent(); | ||||
] | ] | ||||
); | ); | ||||
} | } | ||||
?> | ?> | ||||
<?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"> | <div class="table-responsive"> | ||||
<?= GridView::widget([ | <?= GridView::widget([ | ||||
'summary' => '', | 'summary' => '', |
?> | ?> | ||||
<div class="newsletter-index"> | <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): ?> | <?php if($producer->option_newsletter_description): ?> | ||||
<?= nl2br(Html::encode($producer->option_newsletter_description)); ?> | <?= nl2br(Html::encode($producer->option_newsletter_description)); ?> | ||||
<?php else: ?> | <?php else: ?> |