<?php //$form->field($mailForm, 'message')->textarea(['rows' => '15']) ; ?> | <?php //$form->field($mailForm, 'message')->textarea(['rows' => '15']) ; ?> | ||||
<?= $form->field($mailForm, 'message')->widget(letyii\tinymce\Tinymce::class, [ | <?= $form->field($mailForm, 'message')->widget(letyii\tinymce\Tinymce::class, [ | ||||
'configs' => [ | 'configs' => [ | ||||
'plugins' => Yii::$app->parameterBag->get('tinyMcePlugins'), | |||||
] | |||||
'plugins' => Yii::$app->parameterBag->get('tinyMcePlugins') | |||||
], | |||||
]); ?> | ]); ?> | ||||
<div class="form-group form-buttons"> | <div class="form-group form-buttons"> | ||||
<?= Html::submitButton( 'Envoyer', ['class' => 'btn btn-primary']) ?> | <?= Html::submitButton( 'Envoyer', ['class' => 'btn btn-primary']) ?> | ||||
</div> | </div> |
.distribution-index #orders table .column-delivery-note { | .distribution-index #orders table .column-delivery-note { | ||||
display: none; | display: none; | ||||
} | } | ||||
/* line 173, ../sass/_responsive.scss */ | |||||
.communicate-email { | |||||
/*#mailform-message { | |||||
display: block !important; | |||||
height: 250px; | |||||
} | |||||
.tox-tinymce { | |||||
display: none; | |||||
}*/ | |||||
} | |||||
} | } |
opendistrib_point_sale_form(); | opendistrib_point_sale_form(); | ||||
opendistrib_check_all_checkboxes(); | opendistrib_check_all_checkboxes(); | ||||
opendistrib_dashboard_admin_statistics(); | opendistrib_dashboard_admin_statistics(); | ||||
opendistrib_tinymce_responsive(); | |||||
}); | }); | ||||
var UrlManager = { | var UrlManager = { | ||||
} | } | ||||
}; | }; | ||||
function opendistrib_tinymce_responsive() { | |||||
// tinymce.activeEditor.mode.set('readonly'); | |||||
//tinymce.activeEditor.hide(); | |||||
//tinymce.EditorManager.execCommand('mceRemoveEditor',true, 'textarea#mailform-message'); | |||||
//tinyMCE.init({readonly : 1}); | |||||
//tinymce.activeEditor.getBody().setAttribute('contenteditable', false); | |||||
//tinyMCE.get('mailform-message').getBody().setAttribute('contenteditable', false); | |||||
} | |||||
function opendistrib_dashboard_admin_statistics() { | function opendistrib_dashboard_admin_statistics() { | ||||
var selector = '#dashboard-admin-statistics-html'; | var selector = '#dashboard-admin-statistics-html'; | ||||
if($(selector).length) { | if($(selector).length) { |
} | } | ||||
} | } | ||||
} | } | ||||
.communicate-email { | |||||
// désactivation de tinymce sur mobile car copier/coller impossible | |||||
/*#mailform-message { | |||||
display: block !important; | |||||
height: 250px; | |||||
} | |||||
.tox-tinymce { | |||||
display: none; | |||||
}*/ | |||||
} | |||||
} | } |
return $str; | return $str; | ||||
} | } | ||||
public function getLocalityWithAddressTooltip(PointSale $pointSale): string | |||||
{ | |||||
$html = ''; | |||||
if($pointSale->address && strlen($pointSale->address) > 0) { | |||||
$html .= '<span data-toggle="tooltip" data-placement="bottom" title="'.Html::encode($pointSale->address).'">'.Html::encode($pointSale->locality).'</span>'; | |||||
} | |||||
else { | |||||
$html .= Html::encode($pointSale->locality); | |||||
} | |||||
return $html; | |||||
} | |||||
public function isPublic(PointSale $pointSale): bool | public function isPublic(PointSale $pointSale): bool | ||||
{ | { | ||||
if($pointSale->restricted_access || ($pointSale->code && strlen($pointSale->code))) { | if($pointSale->restricted_access || ($pointSale->code && strlen($pointSale->code))) { |
<?php if($order->pointSale->is_bread_box && $order->pointSale->bread_box_code): ?> | <?php if($order->pointSale->is_bread_box && $order->pointSale->bread_box_code): ?> | ||||
(Code : <strong><?= $order->pointSale->bread_box_code; ?></strong>) | (Code : <strong><?= $order->pointSale->bread_box_code; ?></strong>) | ||||
<?php endif; ?> | <?php endif; ?> | ||||
<br /> <span class="locality">à <?= Html::encode($order->pointSale->locality) ?></span><?php endif; ?> | |||||
<span class="locality">à <?= $pointSaleModule->getSolver()->getLocalityWithAddressTooltip($order->pointSale) ?></span> | |||||
<?php endif; ?> | |||||
<?php endif; ?> | <?php endif; ?> | ||||
</li> | </li> | ||||
<?php | <?php |
use common\helpers\Price; | use common\helpers\Price; | ||||
use domain\Distribution\Distribution\DistributionModule; | use domain\Distribution\Distribution\DistributionModule; | ||||
use domain\Distribution\PointSaleDistribution\PointSaleDistribution; | use domain\Distribution\PointSaleDistribution\PointSaleDistribution; | ||||
use domain\PointSale\PointSale\PointSaleModule; | |||||
use domain\Producer\Producer\Producer; | use domain\Producer\Producer\Producer; | ||||
use domain\Producer\Producer\ProducerModule; | use domain\Producer\Producer\ProducerModule; | ||||
use domain\Product\Product\ProductModule; | use domain\Product\Product\ProductModule; | ||||
$productModule = ProductModule::getInstance(); | $productModule = ProductModule::getInstance(); | ||||
$producerModule = ProducerModule::getInstance(); | $producerModule = ProducerModule::getInstance(); | ||||
$distributionModule = DistributionModule::getInstance(); | $distributionModule = DistributionModule::getInstance(); | ||||
$pointSaleModule = PointSaleModule::getInstance(); | |||||
$producer = $this->context->getProducerCurrent(); | $producer = $this->context->getProducerCurrent(); | ||||
'attribute' => 'name', | 'attribute' => 'name', | ||||
'format' => 'raw', | 'format' => 'raw', | ||||
'contentOptions' => ['class' => 'name'], | 'contentOptions' => ['class' => 'name'], | ||||
'value' => function ($model) { | |||||
'value' => function ($model) use ($pointSaleModule) { | |||||
$html = '<span class="the-name">' . Html::encode($model->name) . '</span>'; | $html = '<span class="the-name">' . Html::encode($model->name) . '</span>'; | ||||
if (strlen($model->locality)) { | if (strlen($model->locality)) { | ||||
$html .= '<br />à ' . Html::encode($model->locality); | |||||
$html .= '<br />à ' . $pointSaleModule->getSolver()->getLocalityWithAddressTooltip($model); | |||||
} | } | ||||
return $html; | return $html; | ||||
} | } |