$userModule = $this->getUserModule(); | $userModule = $this->getUserModule(); | ||||
$distributionModule = $this->getDistributionModule(); | $distributionModule = $this->getDistributionModule(); | ||||
$mailForm = new MailForm(); | $mailForm = new MailForm(); | ||||
// Sujet et message par défaut | |||||
$mailForm->subject = $this->getProducerModule()->getSolver()->getConfig('option_communicate_email_default_subject'); | |||||
$mailForm->message = $this->getProducerModule()->getSolver()->getConfig('option_communicate_email_default_message'); | |||||
if ($idPointSale && !$usersPointSaleLink && !$usersPointSaleHasOrder) { | if ($idPointSale && !$usersPointSaleLink && !$usersPointSaleHasOrder) { | ||||
$usersPointSaleLink = 1; | $usersPointSaleLink = 1; |
<?= $form->field($model, 'option_leave_period_message_title')->textInput(); ?> | <?= $form->field($model, 'option_leave_period_message_title')->textInput(); ?> | ||||
<?= $form->field($model, 'option_leave_period_message')->textarea(); ?> | <?= $form->field($model, 'option_leave_period_message')->textarea(); ?> | ||||
<h4>Communication</h4> | |||||
<?= $form->field($model, 'option_newsletter_description') | |||||
->hint('Description affichée sur la page "Infolettre" de la boutique') | |||||
->textarea(); ?> | |||||
<h4>Groupes utilisateurs</h4> | <h4>Groupes utilisateurs</h4> | ||||
<?= $form->field($model, 'id_user_group_default') | <?= $form->field($model, 'id_user_group_default') | ||||
->dropDownList($userGroupModule->getRepository()->populateUserGroupDropdownList()); ?> | ->dropDownList($userGroupModule->getRepository()->populateUserGroupDropdownList()); ?> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div v-show="currentSection == 'communication'" class="panel panel-default"> | |||||
<div class="panel-body"> | |||||
<h4>Boutique</h4> | |||||
<?= $form->field($model, 'option_newsletter_description') | |||||
->hint('Description affichée sur la page "Infolettre" de la boutique') | |||||
->textarea(); ?> | |||||
<h4>Envoi d'emails</h4> | |||||
<?= $form->field($model, 'option_communicate_email_default_subject')->textInput(); ?> | |||||
<?= $form->field($model, 'option_communicate_email_default_message')->widget(letyii\tinymce\Tinymce::class, [ | |||||
'configs' => [ | |||||
'plugins' => Yii::$app->parameterBag->get('tinyMcePlugins'), | |||||
] | |||||
]); ?> | |||||
</div> | |||||
</div> | |||||
<div v-show="currentSection == 'credit-payment'" class="panel panel-default"> | <div v-show="currentSection == 'credit-payment'" class="panel panel-default"> | ||||
<div class="panel-body"> | <div class="panel-body"> | ||||
<h4>Cagnotte</h4> | <h4>Cagnotte</h4> |
nameDisplay: 'Abonnements', | nameDisplay: 'Abonnements', | ||||
isAdminSection: 0 | isAdminSection: 0 | ||||
}, | }, | ||||
{ | |||||
name: 'communication', | |||||
nameDisplay: 'Communication', | |||||
isAdminSection: 0 | |||||
}, | |||||
{ | { | ||||
name: 'tableau-bord', | name: 'tableau-bord', | ||||
nameDisplay: 'Tableau de bord', | nameDisplay: 'Tableau de bord', |
<?php | |||||
use yii\db\Migration; | |||||
use yii\db\Schema; | |||||
/** | |||||
* Class m240620_070618_add_columns_producer_communicate_email_defaults | |||||
*/ | |||||
class m240620_070618_add_columns_producer_communicate_email_defaults extends Migration | |||||
{ | |||||
/** | |||||
* {@inheritdoc} | |||||
*/ | |||||
public function safeUp() | |||||
{ | |||||
$this->addColumn('producer', 'option_communicate_email_default_subject', Schema::TYPE_STRING); | |||||
$this->addColumn('producer', 'option_communicate_email_default_message', Schema::TYPE_TEXT); | |||||
} | |||||
/** | |||||
* {@inheritdoc} | |||||
*/ | |||||
public function safeDown() | |||||
{ | |||||
$this->dropColumn('producer', 'option_communicate_email_default_subject'); | |||||
$this->dropColumn('producer', 'option_communicate_email_default_message'); | |||||
} | |||||
} |
'option_leave_period_message_title', | 'option_leave_period_message_title', | ||||
'option_leave_period_message', | 'option_leave_period_message', | ||||
'option_credit_description', | 'option_credit_description', | ||||
'sponsorship_code' | |||||
'sponsorship_code', | |||||
'option_communicate_email_default_subject', | |||||
'option_communicate_email_default_message', | |||||
], | ], | ||||
'string' | 'string' | ||||
], | ], | ||||
'option_leave_period_message' => 'Message des congés', | 'option_leave_period_message' => 'Message des congés', | ||||
'option_credit_description' => "Description Cagnotte", | 'option_credit_description' => "Description Cagnotte", | ||||
'sponsorship_sponsor_reward' => 'Récompense parrain', | 'sponsorship_sponsor_reward' => 'Récompense parrain', | ||||
'option_communicate_email_default_subject' => 'Sujet par défaut', | |||||
'option_communicate_email_default_message' => 'Message par défaut', | |||||
]; | ]; | ||||
} | } | ||||