@if (isset($isReminder) && $isReminder) {!! Former::populateField('enable_' . $field, intval($account->{'enable_' . $field})) !!} @if (floatval($fee = $account->account_email_settings->{"late_fee{$number}_amount"})) {!! Former::populateField('late_fee' . $number . '_amount', $fee) !!} @endif @if (floatval($fee = $account->account_email_settings->{"late_fee{$number}_percent"})) {!! Former::populateField('late_fee' . $number . '_percent', $fee) !!} @endif
@if ($field == 'reminder4') {!! Former::populateField('frequency_id_reminder4', $account->account_email_settings->frequency_id_reminder4) !!} {!! Former::plaintext('frequency') ->value( Former::select('frequency_id_reminder4') ->options(\App\Models\Frequency::selectOptions()) ->style('float:left;') ->raw() ) !!} @else {!! Former::plaintext('schedule') ->value( Former::input('num_days_' . $field) ->style('float:left;width:20%') ->raw() . Former::select('direction_' . $field) ->addOption(trans('texts.days_before'), REMINDER_DIRECTION_BEFORE) ->addOption(trans('texts.days_after'), REMINDER_DIRECTION_AFTER) ->style('float:left;width:40%') ->raw() . '' . Former::select('field_' . $field) ->addOption(trans('texts.field_due_date'), REMINDER_FIELD_DUE_DATE) ->addOption(trans('texts.field_invoice_date'), REMINDER_FIELD_INVOICE_DATE) ->style('float:left;width:40%') ->raw() ) !!} @endif
{!! Former::checkbox('enable_' . $field) ->text('enable') ->label('send_email') ->value(1) !!}
@if ($field != 'reminder4')
{!! Former::text('late_fee' . $number . '_amount') ->label('late_fee_amount') ->type('number') ->step('any') !!}
{!! Former::text('late_fee' . $number . '_percent') ->label('late_fee_percent') ->type('number') ->step('any') ->append('%') !!}
@endif

@endif
{!! Former::text('email_subject_' . $field) ->label(trans('texts.subject')) ->appendIcon('question-sign') ->addGroupClass('email-subject') !!}

 


{!! Former::textarea('email_template_' . $field) ->label(trans('texts.body')) ->style('display:none') !!}

 

 

{!! Button::normal(trans('texts.raw'))->withAttributes(['onclick' => 'showRaw("'.$field.'")'])->small() !!} {!! Button::primary(trans('texts.preview'))->withAttributes(['onclick' => 'serverPreview("'.$field.'")'])->small() !!}