1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00
invoiceninja/resources/views/accounts/template.blade.php

79 lines
3.1 KiB
PHP
Raw Normal View History

2015-09-17 21:01:06 +02:00
<div role="tabpanel" class="tab-pane {{ isset($active) && $active ? 'active' : '' }}" id="{{ $field }}">
2015-11-05 11:02:14 +01:00
<div class="panel-body" style="padding-bottom: 0px">
2015-09-17 21:01:06 +02:00
@if (isset($isReminder) && $isReminder)
<div class="row">
<div class="col-md-6">
2015-09-20 23:05:02 +02:00
{!! Former::checkbox('enable_' . $field)
->text(trans('texts.enable'))->label('') !!}
{!! Former::input('num_days_' . $field)
->label(trans('texts.num_days_reminder'))
->addClass('enable-' . $field) !!}
2015-09-17 21:01:06 +02:00
</div>
</div>
@endif
<div class="row">
<div class="col-md-6">
2015-11-04 22:52:12 +01:00
<div class="pull-right"><a href="#" onclick="return resetText('{{ 'subject' }}', '{{ $field }}')">{{ trans("texts.reset") }}</a></div>
2015-09-20 23:05:02 +02:00
{!! Former::text('email_subject_' . $field)
->label(trans('texts.subject'))
2015-12-02 14:26:06 +01:00
->appendIcon('question-sign')
->addGroupClass('email-subject')
2015-09-20 23:05:02 +02:00
->addClass('enable-' . $field) !!}
2015-09-17 21:01:06 +02:00
</div>
<div class="col-md-6">
<p>&nbsp;<p/>
<div id="{{ $field }}_subject_preview"></div>
</div>
</div>
<div class="row">
2015-11-04 22:52:12 +01:00
<br/>
2015-09-17 21:01:06 +02:00
<div class="col-md-6">
2015-11-04 22:52:12 +01:00
<div class="pull-right"><a href="#" onclick="return resetText('{{ 'template' }}', '{{ $field }}')">{{ trans("texts.reset") }}</a></div>
2015-09-20 23:05:02 +02:00
{!! Former::textarea('email_template_' . $field)
->label(trans('texts.body'))
2015-11-04 22:52:12 +01:00
->addClass('enable-' . $field)
->style('display:none') !!}
<div id="{{ $field }}Editor" class="form-control enable-{{ $field }}" style="min-height:160px">
</div>
2015-09-17 21:01:06 +02:00
</div>
<div class="col-md-6">
<p>&nbsp;<p/>
<div id="{{ $field }}_template_preview"></div>
</div>
</div>
2015-11-04 22:52:12 +01:00
<div class="row">
<div class="col-md-12">
<p>&nbsp;<p/>
@include('partials/quill_toolbar', ['name' => $field])
</div>
</div>
2015-09-17 21:01:06 +02:00
</div>
2015-11-04 22:52:12 +01:00
</div>
2015-12-02 14:26:06 +01:00
<script type="text/javascript">
$(function() {
var editor = new Quill('#{{ $field }}Editor', {
modules: {
'toolbar': { container: '#{{ $field }}Toolbar' },
'link-tooltip': true
},
theme: 'snow'
2015-11-04 22:52:12 +01:00
});
2015-12-02 14:26:06 +01:00
editor.setHTML($('#email_template_{{ $field }}').val());
editor.on('text-change', function(delta, source) {
if (source == 'api') {
return;
}
var html = editors['{{ $field }}'].getHTML();
$('#email_template_{{ $field }}').val(html);
refreshPreview();
NINJA.formIsChanged = true;
});
editors['{{ $field }}'] = editor;
});
$('.email-subject .input-group-addon').click(function() {
$('#templateHelpModal').modal('show');
});
</script>