$converter = new CommonMarkConverter();
$mail = new DeferredDownload();
- //$mail->setUser($this->user);
+ $mail->to($this->user->email);
$mail->subject($subject);
$mail->html($converter->convertToHtml($body));
Mail::send($mail);
$reseller = User::where('id', $quote->reseller)->first();
$resselerLocale = $reseller->locale;
$user = User::where('id', $quote->user)->first();
- //$this->to($reseller->email);
$this->to($reseller->email);
$this->bcc('tech@fluidbook.com');
$this->subject('[Fluidbook Workshop] ' . __('Demande de devis', [], $resselerLocale));
}
}
}
+
+.btn-swal-context {
+ margin: 0 15px;
+ box-shadow: none !important;
+}
+
+.swal2-icon.swal2-info {
+ border-color: #9ec400 !important;
+ color: #9ec400 !important;
+}
if (action.target === undefined) {
action.target = '_self';
}
- action.disabled =(key == disabledOption);
+ action.disabled = (key == disabledOption);
action.isHtmlName = true;
}
actions[key] = action;
if (confirm === null || confirm === undefined) {
return ok();
}
- swal({
+ const swalWithBootstrapButtons = Swal.mixin({
+ customClass: {
+ confirmButton: 'btn btn-swal-context bg-success',
+ cancelButton: 'btn btn-swal-context bg-secondary'
+ },
+ buttonsStyling: false
+ })
+ swalWithBootstrapButtons.fire({
title: confirm.title,
text: replaceVariables(confirm.text, actions[key].label),
icon: "info",
- buttons: {
- cancel: {
- text: confirm.cancel,
- value: null,
- visible: true,
- className: "bg-secondary",
- closeModal: true,
- },
- delete: {
- text: confirm.confirm,
- value: true,
- visible: true,
- className: "bg-success",
- }
- },
- }).then((value) => {
- if (value) {
+ showCancelButton: true,
+ confirmButtonText: confirm.confirm,
+ cancelButtonText: confirm.cancel,
+ reverseButtons: true,
+ }).then((result) => {
+ if (result.isConfirmed) {
ok();
+ } else {
+
}
});
}
}
+ $confirm=[
+ 'title'=>'',
+ 'text'=>__('En téléchargeant la publication, vous confirmez que vous l\'avez testé et validé. Elle vous sera donc facturée selon les conditions stipulées dans votre contrat.'),
+ 'confirm'=>__('Confirmer'),
+ 'cancel'=>__('Annuler')
+ ];
+
@endphp
@if($entry->allowsDownload())
+
<a class="btn btn-sm btn-link" href="#"
data-toggle="tooltip"
+ @if($entry->status==1 && !can('fluidbook-publication:admin'))
+ data-context-confirm="{{json_encode($confirm)}}"
+ @endif
title="{{__('Télécharger la publication')}}"
data-context-actions="{{json_encode($actions)}}"
data-context-route="{{$crud->route}}/$id/download/$action"