@@ -88,6 +88,9 @@ class CommunicateController extends BackendController | |||
$userModule = $this->getUserModule(); | |||
$distributionModule = $this->getDistributionModule(); | |||
$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) { | |||
$usersPointSaleLink = 1; |
@@ -153,11 +153,6 @@ $this->addBreadcrumb($this->getTitle()); | |||
<?= $form->field($model, 'option_leave_period_message_title')->textInput(); ?> | |||
<?= $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> | |||
<?= $form->field($model, 'id_user_group_default') | |||
->dropDownList($userGroupModule->getRepository()->populateUserGroupDropdownList()); ?> | |||
@@ -356,6 +351,22 @@ $this->addBreadcrumb($this->getTitle()); | |||
</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 class="panel-body"> | |||
<h4>Cagnotte</h4> |
@@ -73,6 +73,11 @@ if($(selector).length) { | |||
nameDisplay: 'Abonnements', | |||
isAdminSection: 0 | |||
}, | |||
{ | |||
name: 'communication', | |||
nameDisplay: 'Communication', | |||
isAdminSection: 0 | |||
}, | |||
{ | |||
name: 'tableau-bord', | |||
nameDisplay: 'Tableau de bord', |
@@ -0,0 +1,28 @@ | |||
<?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'); | |||
} | |||
} |
@@ -262,7 +262,9 @@ class Producer extends ActiveRecordCommon | |||
'option_leave_period_message_title', | |||
'option_leave_period_message', | |||
'option_credit_description', | |||
'sponsorship_code' | |||
'sponsorship_code', | |||
'option_communicate_email_default_subject', | |||
'option_communicate_email_default_message', | |||
], | |||
'string' | |||
], | |||
@@ -548,6 +550,8 @@ class Producer extends ActiveRecordCommon | |||
'option_leave_period_message' => 'Message des congés', | |||
'option_credit_description' => "Description Cagnotte", | |||
'sponsorship_sponsor_reward' => 'Récompense parrain', | |||
'option_communicate_email_default_subject' => 'Sujet par défaut', | |||
'option_communicate_email_default_message' => 'Message par défaut', | |||
]; | |||
} | |||