2015-12-15 21:25:12 +01:00
|
|
|
@extends('header')
|
|
|
|
|
2016-01-31 21:36:06 +01:00
|
|
|
@section('head')
|
|
|
|
@parent
|
|
|
|
|
2017-02-26 08:44:47 +01:00
|
|
|
<link href="{{ asset('css/quill.snow.css') }}" rel="stylesheet" type="text/css"/>
|
|
|
|
<script src="{{ asset('js/quill.min.js') }}" type="text/javascript"></script>
|
|
|
|
|
2016-01-31 21:36:06 +01:00
|
|
|
<style type="text/css">
|
|
|
|
.iframe_url {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
@stop
|
|
|
|
|
2016-09-06 13:54:53 +02:00
|
|
|
@section('content')
|
2015-12-15 21:25:12 +01:00
|
|
|
@parent
|
|
|
|
@include('accounts.nav', ['selected' => ACCOUNT_EMAIL_SETTINGS, 'advanced' => true])
|
|
|
|
|
2016-01-31 21:36:06 +01:00
|
|
|
{!! Former::open()->rules([
|
2017-01-06 14:24:53 +01:00
|
|
|
'bcc_email' => 'email',
|
2016-01-31 21:36:06 +01:00
|
|
|
])->addClass('warn-on-exit') !!}
|
2017-01-12 12:52:37 +01:00
|
|
|
|
2015-12-15 21:25:12 +01:00
|
|
|
{{ Former::populate($account) }}
|
|
|
|
{{ Former::populateField('pdf_email_attachment', intval($account->pdf_email_attachment)) }}
|
2016-03-24 00:20:08 +01:00
|
|
|
{{ Former::populateField('document_email_attachment', intval($account->document_email_attachment)) }}
|
2015-12-15 21:25:12 +01:00
|
|
|
{{ Former::populateField('enable_email_markup', intval($account->enable_email_markup)) }}
|
|
|
|
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h3 class="panel-title">{!! trans('texts.email_settings') !!}</h3>
|
|
|
|
</div>
|
|
|
|
<div class="panel-body form-padding-right">
|
2017-01-02 19:47:40 +01:00
|
|
|
|
|
|
|
{!! Former::checkbox('pdf_email_attachment')
|
|
|
|
->text(trans('texts.enable'))
|
2017-01-09 16:01:51 +01:00
|
|
|
->value(1)
|
2017-01-02 19:56:06 +01:00
|
|
|
->help( ! Utils::isNinja() ? (env('PHANTOMJS_BIN_PATH') ? 'phantomjs_local' : trans('texts.phantomjs_help', [
|
2017-01-02 19:47:40 +01:00
|
|
|
'link_phantom' => link_to('https://phantomjscloud.com/', 'phantomjscloud.com', ['target' => '_blank']),
|
|
|
|
'link_docs' => link_to('https://www.invoiceninja.com/self-host/#phantomjs', 'PhantomJS', ['target' => '_blank'])
|
2017-01-02 19:56:06 +01:00
|
|
|
])) : false) !!}
|
2017-01-02 19:47:40 +01:00
|
|
|
|
|
|
|
{!! Former::checkbox('document_email_attachment')
|
2017-01-09 16:01:51 +01:00
|
|
|
->text(trans('texts.enable'))
|
|
|
|
->value(1) !!}
|
2016-09-06 13:54:53 +02:00
|
|
|
|
2015-12-15 21:25:12 +01:00
|
|
|
|
2016-09-06 13:54:53 +02:00
|
|
|
|
2017-01-06 14:24:53 +01:00
|
|
|
{!! Former::text('bcc_email')->help('bcc_email_help') !!}
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-12-15 21:25:12 +01:00
|
|
|
{{-- Former::select('recurring_hour')->options($recurringHours) --}}
|
|
|
|
|
2015-12-23 12:49:49 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h3 class="panel-title">{!! trans('texts.email_design') !!}</h3>
|
|
|
|
</div>
|
|
|
|
<div class="panel-body form-padding-right">
|
2016-09-06 13:54:53 +02:00
|
|
|
|
2015-12-23 12:49:49 +01:00
|
|
|
{!! Former::select('email_design_id')
|
2015-12-29 18:49:40 +01:00
|
|
|
->appendIcon('question-sign')
|
|
|
|
->addGroupClass('email_design_id')
|
|
|
|
->addOption(trans('texts.plain'), EMAIL_DESIGN_PLAIN)
|
|
|
|
->addOption(trans('texts.light'), EMAIL_DESIGN_LIGHT)
|
|
|
|
->addOption(trans('texts.dark'), EMAIL_DESIGN_DARK)
|
2015-12-23 12:49:49 +01:00
|
|
|
->help(trans('texts.email_design_help')) !!}
|
|
|
|
|
2015-12-15 21:25:12 +01:00
|
|
|
|
2015-12-23 12:49:49 +01:00
|
|
|
|
2015-12-15 21:25:12 +01:00
|
|
|
@if (Utils::isNinja())
|
|
|
|
{!! Former::checkbox('enable_email_markup')
|
2016-09-06 13:54:53 +02:00
|
|
|
->text(trans('texts.enable') .
|
2015-12-15 21:25:12 +01:00
|
|
|
'<a href="'.EMAIL_MARKUP_URL.'" target="_blank" title="'.trans('texts.learn_more').'">' . Icon::create('question-sign') . '</a> ')
|
2017-01-09 16:01:51 +01:00
|
|
|
->help(trans('texts.enable_email_markup_help'))
|
|
|
|
->value(1) !!}
|
2015-12-15 21:25:12 +01:00
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2017-02-26 08:44:47 +01:00
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h3 class="panel-title">{!! trans('texts.signature') !!}</h3>
|
|
|
|
</div>
|
|
|
|
<div class="panel-body">
|
|
|
|
{!! Former::textarea('email_footer')->style('display:none')->raw() !!}
|
|
|
|
<div id="signatureEditor" class="form-control" style="min-height:160px" onclick="focusEditor()"></div>
|
|
|
|
@include('partials/quill_toolbar', ['name' => 'signature'])
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2016-04-19 04:35:18 +02:00
|
|
|
@if (Auth::user()->hasFeature(FEATURE_CUSTOM_EMAILS))
|
2015-12-15 21:25:12 +01:00
|
|
|
<center>
|
|
|
|
{!! Button::success(trans('texts.save'))->large()->submit()->appendIcon(Icon::create('floppy-disk')) !!}
|
|
|
|
</center>
|
|
|
|
@endif
|
|
|
|
|
2015-12-29 18:49:40 +01:00
|
|
|
<div class="modal fade" id="designHelpModal" tabindex="-1" role="dialog" aria-labelledby="designHelpModalLabel" aria-hidden="true">
|
|
|
|
<div class="modal-dialog" style="min-width:150px">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
|
|
<h4 class="modal-title" id="designHelpModalLabel">{{ trans('texts.email_designs') }}</h4>
|
|
|
|
</div>
|
|
|
|
|
2017-02-18 22:20:03 +01:00
|
|
|
<div class="container" style="width: 100%; padding-bottom: 0px !important">
|
|
|
|
<div class="panel panel-default" style="margin-bottom: 0px">
|
|
|
|
<div class="panel-body">
|
2015-12-29 18:49:40 +01:00
|
|
|
<div class="row" style="text-align:center">
|
|
|
|
<div class="col-md-4">
|
|
|
|
<h4>{{ trans('texts.plain') }}</h4><br/>
|
|
|
|
<img src="{{ asset('images/emails/plain.png') }}" class="img-responsive"/>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
|
|
|
<h4>{{ trans('texts.light') }}</h4><br/>
|
|
|
|
<img src="{{ asset('images/emails/light.png') }}" class="img-responsive"/>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
|
|
|
<h4>{{ trans('texts.dark') }}</h4><br/>
|
|
|
|
<img src="{{ asset('images/emails/dark.png') }}" class="img-responsive"/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-02-18 22:20:03 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2015-12-29 18:49:40 +01:00
|
|
|
|
2017-02-20 11:27:26 +01:00
|
|
|
<div class="modal-footer" style="margin-top: 2px">
|
2015-12-29 18:49:40 +01:00
|
|
|
<button type="button" class="btn btn-primary" data-dismiss="modal">{{ trans('texts.close') }}</button>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2015-12-15 21:25:12 +01:00
|
|
|
{!! Former::close() !!}
|
|
|
|
|
2017-02-07 08:10:20 +01:00
|
|
|
<script type="text/javascript">
|
|
|
|
|
2017-02-26 08:44:47 +01:00
|
|
|
var editor = false;
|
|
|
|
$(function() {
|
|
|
|
editor = new Quill('#signatureEditor', {
|
|
|
|
modules: {
|
|
|
|
'toolbar': { container: '#signatureToolbar' },
|
|
|
|
'link-tooltip': true
|
|
|
|
},
|
|
|
|
theme: 'snow'
|
|
|
|
});
|
|
|
|
editor.setHTML($('#email_footer').val());
|
|
|
|
editor.on('text-change', function(delta, source) {
|
|
|
|
if (source == 'api') {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
var html = editor.getHTML();
|
|
|
|
$('#email_footer').val(html);
|
|
|
|
NINJA.formIsChanged = true;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
function focusEditor() {
|
|
|
|
editor.focus();
|
|
|
|
}
|
|
|
|
|
2017-02-07 08:10:20 +01:00
|
|
|
$('.email_design_id .input-group-addon').click(function() {
|
|
|
|
$('#designHelpModal').modal('show');
|
|
|
|
});
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
2016-09-06 13:54:53 +02:00
|
|
|
@stop
|