Mails
This commit is contained in:
parent
68b9d1ff88
commit
b9c26d06d0
75 changed files with 2143 additions and 818 deletions
|
|
@ -120,6 +120,7 @@
|
|||
|
||||
|
||||
<div class="form-row">
|
||||
{{ Form::hidden('lead_title_id', $value->lead_title_id, array('id'=>'lead_title_id')) }}
|
||||
<div class="form-group col">
|
||||
<label for="subject" class="form-label">Betreff</label>
|
||||
{{ Form::text('subject', $value->subject, array('placeholder'=>$value->s_placeholder, 'id'=>'subject', 'class'=>'form-control', 'required')) }}
|
||||
|
|
@ -129,7 +130,9 @@
|
|||
<div class="form-group mb-1">
|
||||
<label class="form-label" for="message">Nachricht</label>
|
||||
@if($value->show === 'single' || $value->show === 'multi')
|
||||
<div class="float-right small">Vorlage unter: <a href="{{route('cms_content_all')}}">CMS->Inhalte->Allgemein</a> Slug:mailvorlage</div>
|
||||
@if(Auth::user()->isPermission('sua-st-et'))
|
||||
<div class="float-right small">Vorlage unter: <a href="{{route('admin_settings_email_template')}}">Einstellungen -> E-Mail Vorlagen</a></div>
|
||||
@endif
|
||||
@endif
|
||||
<div id="message-editor-toolbar">
|
||||
<span class="ql-formats">
|
||||
|
|
@ -156,12 +159,38 @@
|
|||
<span class="ql-formats">
|
||||
<button class="ql-clean"></button>
|
||||
</span>
|
||||
<span class="ql-formats">
|
||||
<select class="ql-placeholder">
|
||||
{!! \App\Services\Placeholder::getBookingOptions() !!}
|
||||
</select>
|
||||
</span>
|
||||
</div>
|
||||
<div id="message-editor" style="height: 400px">{!! $value->message !!}</div>
|
||||
{{ Form::textarea('message', $value->message, array('placeholder'=>$value->m_placeholder, 'id'=>'message-editor-fallback', 'class'=>'form-control d-none', 'rows'=>15)) }}
|
||||
</div>
|
||||
@if(isset($value->customers))
|
||||
<p>Platzhalter: #geehrte/r# #Anrede# #Titel# #Vorname# #Nachname# #Reiseland# #Programm# #Anreisedatum# #Abreisedatum# #Buchungsdatum# #Airline#</p>
|
||||
@if($value->show === 'single' || $value->show === 'multi')
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<button type="button" class="btn btn-sm btn-outline-next mt-1 mb-3 float-left" data-toggle="collapse" data-target="#collapseModalEmailTemplate" aria-expanded="false" aria-controls="collapseModalEmailTemplate"><i class="ion ion-ios-mail"></i> E-Mail Vorlage laden</button>
|
||||
</div>
|
||||
<div class="collapse col-12" id="collapseModalEmailTemplate">
|
||||
<hr class="mt-0">
|
||||
<div class="table-responsive" id="email_templates_table">
|
||||
<table id="datatables-email-templates" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{__('Betreff')}}</th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<hr class="mt-1">
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@if($value->show === 'single' || $value->show === 'reply')
|
||||
<div class="form-row">
|
||||
|
|
@ -199,7 +228,6 @@
|
|||
@if($value->show === 'single' && isset($value->booking))
|
||||
<button type="button" class="btn btn-sm btn-outline-primary mt-1 mb-2 float-right" data-toggle="collapse" data-target="#collapseModalBookingFiles" aria-expanded="false" aria-controls="collapseModalBookingFiles"><i class="fa fa-plus-circle"></i> Dateien aus Buchung</button>
|
||||
@endif
|
||||
|
||||
<h5>Datei Anhänge</h5>
|
||||
</div>
|
||||
@if($value->show === 'single' && isset($value->booking))
|
||||
|
|
@ -220,7 +248,7 @@
|
|||
<div class="text-muted small mail-att-size">{{$customer_file->formatBytes()}}</div>
|
||||
<div>
|
||||
<a href="{{$customer_file->getURL()}}" target="_blank" class="mail-att-show">Vorschau</a>
|
||||
{{-- <a href="javascript:void(0)" class="mail-att-delete">entfernen</a> --}}
|
||||
<a href="javascript:void(0)" data-url="{{route('customer_mail_ajax')}}" data-id="{{$customer_file->id}}" data-action="delete_mail_attachment" class="mail-att-delete">löschen</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -260,7 +288,7 @@
|
|||
<div class="text-muted small mail-att-size"> </div>
|
||||
<div>
|
||||
<a href="javascript:void(0)" target="_blank" class="mail-att-show">Vorschau</a>
|
||||
<a href="javascript:void(0)" class="mail-att-delete">entfernen</a>
|
||||
<a href="javascript:void(0)" class="mail-att-remove">entfernen</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -286,10 +314,9 @@
|
|||
|
||||
///'storage/file/{id}/{disk}
|
||||
template.find('.mail-att-show').attr('href', response.file_url);
|
||||
template.find('.mail-att-delete').on('click', function () {
|
||||
template.find('.mail-att-remove').on('click', function () {
|
||||
$(this).parents('.message-attachment').remove();
|
||||
});
|
||||
|
||||
$('#preview-mail-attachment').append(template);
|
||||
}
|
||||
|
||||
|
|
@ -314,10 +341,16 @@
|
|||
$('#message-editor,#message-editor-toolbar').remove();
|
||||
$('#message-editor-fallback').removeClass('d-none');
|
||||
} else {
|
||||
Quill.register('modules/placeholder', PlaceholderModule.default(Quill))
|
||||
//$('#message-editor-fallback').remove();
|
||||
var quill = new Quill('#message-editor', {
|
||||
modules: {
|
||||
toolbar: '#message-editor-toolbar'
|
||||
toolbar: '#message-editor-toolbar',
|
||||
placeholder: {
|
||||
placeholders: [
|
||||
{!! \App\Services\Placeholder::getBookingQuill() !!}
|
||||
]
|
||||
}
|
||||
},
|
||||
placeholder: '{{$value->m_placeholder}}',
|
||||
theme: 'snow'
|
||||
|
|
@ -350,6 +383,60 @@
|
|||
$( "#customer-mail-form" ).submit();
|
||||
});
|
||||
|
||||
$("#preview-mail-attachment .mail-att-delete").click(function(event) {
|
||||
_self = $(this);
|
||||
if(!confirm('Angang wirklick löschen?')){
|
||||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
ajax_object_action(event, $(this), function (data) {
|
||||
console.log(data);
|
||||
if(data.status === 'success'){
|
||||
_self.parents('.message-attachment').remove();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
var emailTempplateTable = $('#datatables-email-templates').DataTable({
|
||||
"processing": true,
|
||||
"serverSide": true,
|
||||
"searching": true,
|
||||
"autoWidth": false,
|
||||
ajax: {
|
||||
url: '{!! route( 'email_template_data_table' ) !!}',
|
||||
},
|
||||
"columns": [
|
||||
{ data: 'id', width: '8%', searchable: true },
|
||||
{ data: 'subject', name: 'subject', width: '', searchable: true },
|
||||
{ data: 'action', width: '8%', orderable: false, searchable: false},
|
||||
],
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 10,
|
||||
"orderSequence": ["desc", "asc"],
|
||||
"order": [[ 0, "desc" ]],
|
||||
"language": {
|
||||
"url": "/js/German.json"
|
||||
},
|
||||
"drawCallback": function( settings ) {
|
||||
$('#datatables-email-templates [rel="tooltip"]').tooltip({trigger: "hover"});
|
||||
$('#datatables-email-templates .email-template-action').on('click', function (event) {
|
||||
ajax_object_action(event, $(this), callback_email_template_data_table);
|
||||
});
|
||||
}
|
||||
});
|
||||
function callback_email_template_data_table(data) {
|
||||
if(data.status === 'success'){
|
||||
$('input#subject').val(data.response.subject + $('input#lead_title_id').val());
|
||||
$("input#message-editor-fallback").val(data.html);
|
||||
$('#message-editor .ql-editor').html(data.html)
|
||||
$('#collapseModalEmailTemplate').collapse('hide');
|
||||
}
|
||||
}
|
||||
|
||||
Dropzone.autoDiscover = false;
|
||||
$("#uploadAttachmentFile").dropzone({
|
||||
uploadMultiple: false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue