Fix for setting default HTML email template

This commit is contained in:
Hillel Coren 2016-05-06 15:05:28 +03:00
parent 5322e16a4c
commit 3ddad385a3

View File

@ -25,11 +25,16 @@
{!! Former::vertical_open()->addClass('warn-on-exit') !!} {!! Former::vertical_open()->addClass('warn-on-exit') !!}
{!! Former::populate($account) !!}
@foreach ([ENTITY_INVOICE, ENTITY_QUOTE, ENTITY_PAYMENT, REMINDER1, REMINDER2, REMINDER3] as $type) @foreach ([ENTITY_INVOICE, ENTITY_QUOTE, ENTITY_PAYMENT, REMINDER1, REMINDER2, REMINDER3] as $type)
@foreach (['subject', 'template'] as $field) @foreach (['subject', 'template'] as $field)
{!! Former::populateField("email_{$field}_{$type}", $templates[$type][$field]) !!} {{ Former::populateField("email_{$field}_{$type}", $templates[$type][$field]) }}
@endforeach
@endforeach
@foreach ([REMINDER1, REMINDER2, REMINDER3] as $type)
@foreach (['enable', 'num_days', 'direction', 'field'] as $field)
{{ Former::populateField("{$field}_{$type}", $account->{"{$field}_{$type}"}) }}
@endforeach @endforeach
@endforeach @endforeach