Browse Source

[Administration] Communication > Email : champs texte évolué

feature/souke
Guillaume Bourgeois 9 months ago
parent
commit
03bd43360a
7 changed files with 52 additions and 24 deletions
  1. +1
    -1
      backend/controllers/CommunicateController.php
  2. +16
    -1
      backend/models/MailForm.php
  3. +12
    -6
      backend/views/communicate/email.php
  4. +2
    -6
      backend/views/producer/update.php
  5. +15
    -10
      backend/web/css/screen.css
  6. +5
    -0
      backend/web/sass/_adminlte.scss
  7. +1
    -0
      common/config/params.php

+ 1
- 1
backend/controllers/CommunicateController.php View File

$this->setFlash('error', $messageError); $this->setFlash('error', $messageError);
} }


return $this->redirect(['mail', 'idPointSale' => $idPointSale]);
return $this->redirect(['email', 'idPointSale' => $idPointSale]);
} }


$incomingDistributionsArray = $distributionModule->findDistributionsIncoming(); $incomingDistributionsArray = $distributionModule->findDistributionsIncoming();

+ 16
- 1
backend/models/MailForm.php View File

$messageAutoText = '' ; $messageAutoText = '' ;
$messageAutoHtml = '' ; $messageAutoHtml = '' ;

$messageAutoHtml .= ' <style type="text/css">
h1, h2, h3, h4, h5, h6 {
padding: 0px;
margin: 0px;
margin-bottom: 10px;
}
p {
margin: 0px;
padding: 0px;
margin-bottom: 5px;
}
</style>';

if($this->id_distribution) { if($this->id_distribution) {
$messageAutoText = ' $messageAutoText = '


' ; ' ;
$messageAutoHtml = '<br /><br />' ;
$messageAutoHtml .= '<br /><br />' ;
$distribution = Distribution::searchOne(['id' => $this->id_distribution]) ; $distribution = Distribution::searchOne(['id' => $this->id_distribution]) ;

+ 12
- 6
backend/views/communicate/email.php View File

?> ?>


<div id=""> <div id="">
<div class="col-md-6">
<div class="col-md-8">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<h3 class="panel-title">Envoyer un email</h3> <h3 class="panel-title">Envoyer un email</h3>
->hint("Sélectionnez une distribution pour ajouter automatiquement au message un lien vers la prise de commande de cette distribution"); ?> ->hint("Sélectionnez une distribution pour ajouter automatiquement au message un lien vers la prise de commande de cette distribution"); ?>
<?= $form->field($mailForm, 'integrate_product_list')->checkbox() ; ?> <?= $form->field($mailForm, 'integrate_product_list')->checkbox() ; ?>
<?= $form->field($mailForm, 'subject')->textInput() ; ?> <?= $form->field($mailForm, 'subject')->textInput() ; ?>
<?= $form->field($mailForm, 'message')->textarea(['rows' => '15']) ; ?>
<div class="form-group">
<?php //$form->field($mailForm, 'message')->textarea(['rows' => '15']) ; ?>
<?= $form->field($mailForm, 'message')->widget(letyii\tinymce\Tinymce::class, [
'configs' => [
'plugins' => Yii::$app->parameterBag->get('tinyMcePlugins'),
]
]); ?>

<div class="form-group form-buttons">
<?= Html::submitButton( 'Envoyer', ['class' => 'btn btn-primary']) ?> <?= Html::submitButton( 'Envoyer', ['class' => 'btn btn-primary']) ?>
</div> </div>
<?php ActiveForm::end(); ?> <?php ActiveForm::end(); ?>
</div> </div>
</div> </div>
</div> </div>
<div class="col-md-6">
<div class="col-md-4">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<h3 class="panel-title"> <h3 class="panel-title">
</h3> </h3>
</div> </div>
<div class="panel-body"> <div class="panel-body">
<?php if($idPointSaleActive): ?> <?php if($idPointSaleActive): ?>
<a class="btn btn-xs <?php if($usersPointSaleLink): ?>btn-primary<?php else: ?>btn-default<?php endif; ?>" href="<?= Yii::$app->urlManager->createUrl(['communicate/email','idPointSale' => $idPointSaleActive, 'idDistribution' => $idDistributionActive, 'usersPointSaleLink' => 1]); ?>">Liés au point de vente</a> <a class="btn btn-xs <?php if($usersPointSaleLink): ?>btn-primary<?php else: ?>btn-default<?php endif; ?>" href="<?= Yii::$app->urlManager->createUrl(['communicate/email','idPointSale' => $idPointSaleActive, 'idDistribution' => $idDistributionActive, 'usersPointSaleLink' => 1]); ?>">Liés au point de vente</a>
<a class="btn btn-xs <?php if($usersPointSaleHasOrder): ?>btn-primary<?php else: ?>btn-default<?php endif; ?>" href="<?= Yii::$app->urlManager->createUrl(['communicate/email','idPointSale' => $idPointSaleActive, 'idDistribution' => $idDistributionActive, 'usersPointSaleHasOrder' => 1]); ?>">Déjà commandés dans ce point de vente</a> <a class="btn btn-xs <?php if($usersPointSaleHasOrder): ?>btn-primary<?php else: ?>btn-default<?php endif; ?>" href="<?= Yii::$app->urlManager->createUrl(['communicate/email','idPointSale' => $idPointSaleActive, 'idDistribution' => $idDistributionActive, 'usersPointSaleHasOrder' => 1]); ?>">Déjà commandés dans ce point de vente</a>
<br /><br /> <br /><br />
<?php endif; ?> <?php endif; ?>
<?= implode(', ', $usersArray); ?> <?= implode(', ', $usersArray); ?>
</div> </div>
</div> </div>

+ 2
- 6
backend/views/producer/update.php View File

->hint('Affiché sur la page d\'accueil')*/ ?> ->hint('Affiché sur la page d\'accueil')*/ ?>


<?= $form->field($model, 'description')->widget(letyii\tinymce\Tinymce::class, [ <?= $form->field($model, 'description')->widget(letyii\tinymce\Tinymce::class, [
'options' => [
'id' => 'testid',
],
'configs' => [ // Read more: https://www.tiny.cloud/docs/tinymce/6/full-featured-open-source-demo/
//'plugins' => 'preview importcss searchreplace autolink autosave save directionality code visualblocks visualchars fullscreen image link media template codesample table charmap pagebreak nonbreaking anchor insertdatetime advlist lists wordcount help charmap quickbars emoticons accordion' ,
'plugins' => 'preview searchreplace autolink autosave save directionality code visualblocks visualchars fullscreen image link lists wordcount help' ,
'configs' => [
'plugins' => Yii::$app->parameterBag->get('tinyMcePlugins'),
] ]
])->hint('Affiché sur la page d\'accueil') ; ?> ])->hint('Affiché sur la page d\'accueil') ; ?>



+ 15
- 10
backend/web/css/screen.css View File

body.skin-black .content-wrapper .form-actions a, body.skin-black .content-wrapper .form-actions button { body.skin-black .content-wrapper .form-actions a, body.skin-black .content-wrapper .form-actions button {
margin-left: 10px; margin-left: 10px;
} }
/* line 325, ../sass/_adminlte.scss */
/* line 323, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .form-buttons {
margin-top: 25px;
text-align: right;
}
/* line 330, ../sass/_adminlte.scss */
body.skin-black .main-footer a { body.skin-black .main-footer a {
color: #F39C12; color: #F39C12;
} }
/* line 330, ../sass/_adminlte.scss */
/* line 335, ../sass/_adminlte.scss */
body.skin-black .gridview-pagesize { body.skin-black .gridview-pagesize {
float: right; float: right;
margin-bottom: 8px; margin-bottom: 8px;
} }
/* line 335, ../sass/_adminlte.scss */
/* line 340, ../sass/_adminlte.scss */
body.skin-black #yii-debug-toolbar { body.skin-black #yii-debug-toolbar {
bottom: 64px; bottom: 64px;
} }


/* line 340, ../sass/_adminlte.scss */
/* line 345, ../sass/_adminlte.scss */
body.login-page { body.login-page {
background: none; background: none;
background-color: white; background-color: white;
} }
/* line 344, ../sass/_adminlte.scss */
/* line 349, ../sass/_adminlte.scss */
body.login-page .login-box .login-logo { body.login-page .login-box .login-logo {
text-align: center; text-align: center;
font-family: 'highvoltageregular'; font-family: 'highvoltageregular';
} }
/* line 348, ../sass/_adminlte.scss */
/* line 353, ../sass/_adminlte.scss */
body.login-page .login-box .login-logo img { body.login-page .login-box .login-logo img {
width: 50px; width: 50px;
} }
/* line 353, ../sass/_adminlte.scss */
/* line 358, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body .btn-primary { body.login-page .login-box .login-box-body .btn-primary {
background-color: #F39C12; background-color: #F39C12;
border-color: #F39C12; border-color: #F39C12;
padding: 5px 10px; padding: 5px 10px;
} }
/* line 358, ../sass/_adminlte.scss */
/* line 363, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body .btn-primary:active { body.login-page .login-box .login-box-body .btn-primary:active {
background-color: #f4a62a; background-color: #f4a62a;
border-color: #F39C12; border-color: #F39C12;
} }
/* line 364, ../sass/_adminlte.scss */
/* line 369, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body a { body.login-page .login-box .login-box-body a {
color: #F39C12; color: #F39C12;
} }
/* line 366, ../sass/_adminlte.scss */
/* line 371, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body a:hover { body.login-page .login-box .login-box-body a:hover {
color: #f4a62a; color: #f4a62a;
} }

+ 5
- 0
backend/web/sass/_adminlte.scss View File

margin-left: 10px; margin-left: 10px;
} }
} }

.form-buttons {
margin-top: 25px;
text-align: right;
}
} }
.main-footer { .main-footer {

+ 1
- 0
common/config/params.php View File

'version' => '24.2.B', 'version' => '24.2.B',
'maintenanceMode' => false, 'maintenanceMode' => false,
'siteName' => 'Opendistrib', 'siteName' => 'Opendistrib',
'tinyMcePlugins' => 'preview searchreplace autolink autosave save directionality code visualblocks visualchars fullscreen image link lists wordcount help',
'adminEmail' => 'contact@opendistrib.net', 'adminEmail' => 'contact@opendistrib.net',
'supportEmail' => 'contact@opendistrib.net', 'supportEmail' => 'contact@opendistrib.net',
'user.passwordResetTokenExpire' => 3600, 'user.passwordResetTokenExpire' => 3600,

Loading…
Cancel
Save