mein-sterntours/resources/views/settings/email_template/modal.blade.php
Kevin Adametz b9c26d06d0 Mails
2020-05-06 15:52:59 +02:00

95 lines
4.4 KiB
PHP
Executable file
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{!! Form::open([ 'url' => route('admin_settings_email_template_update'), 'method' => 'post', 'class' => 'modal-content' ]) !!}
{{ Form::hidden('id', $value->id) }}
<div class="modal-header">
<h5 class="modal-title">E-Mail Vorlagen <span class="font-weight-light">anlegen/bearbeiten</span></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="form-row">
<div class="form-group col">
<label for="subject" class="form-label">Betreff*</label>
{{ Form::text('subject', $value->subject, array('class'=>'form-control', 'required'=>true)) }}
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label class="form-label" for="message">Nachricht</label>
<div id="message-editor-toolbar">
<span class="ql-formats">
<button class="ql-bold"></button>
<button class="ql-italic"></button>
<button class="ql-underline"></button>
<button class="ql-strike"></button>
</span>
<span class="ql-formats">
<button class="ql-header" value="1"></button>
<button class="ql-header" value="2"></button>
<button class="ql-blockquote"></button>
<button class="ql-code-block"></button>
</span>
<span class="ql-formats">
<button class="ql-list" value="ordered"></button>
<button class="ql-list" value="bullet"></button>
<button class="ql-indent" value="-1"></button>
<button class="ql-indent" value="+1"></button>
</span>
<span class="ql-formats">
<select class="ql-align"></select>
</span>
<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'=>'', 'id'=>'message-editor-fallback', 'class'=>'form-control d-none', 'rows'=>15)) }}
</div>
</div>
<div class="form-group">
<label class="custom-control custom-checkbox m-0">
{{ Form::checkbox('active', 1, $value->active, array('class'=>'custom-control-input')) }}
<span class="custom-control-label">{{__('sichtbar')}}</span>
</label>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
<button type="submit" class="btn btn-primary submit-button-form">{{__('save')}}</button>
</div>
{!! Form::close() !!}
<script>
$( document ).ready(function() {
if (!window.Quill) {
$('#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',
placeholder: {
placeholders: [
{!! \App\Services\Placeholder::getBookingQuill() !!}
]
}
},
placeholder: '',
theme: 'snow'
});
//quill.clipboard.dangerouslyPasteHTML('<span class="ql-placeholder-content" data-id="foo" data-label="foo"></span>')
}
$(".submit-button-form").click(function(event) {
$("#message-editor-fallback").val($('#message-editor .ql-editor').html());
$( "#customer-mail-form" ).submit();
});
});
</script>