mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Support editing reminders when they're not automatically sent
This commit is contained in:
parent
7f18b121ee
commit
a33b088a93
@ -841,12 +841,9 @@ class AccountController extends BaseController
|
|||||||
foreach ([REMINDER1, REMINDER2, REMINDER3] as $type) {
|
foreach ([REMINDER1, REMINDER2, REMINDER3] as $type) {
|
||||||
$enableField = "enable_{$type}";
|
$enableField = "enable_{$type}";
|
||||||
$account->$enableField = Input::get($enableField) ? true : false;
|
$account->$enableField = Input::get($enableField) ? true : false;
|
||||||
|
$account->{"num_days_{$type}"} = Input::get("num_days_{$type}");
|
||||||
if ($account->$enableField) {
|
$account->{"field_{$type}"} = Input::get("field_{$type}");
|
||||||
$account->{"num_days_{$type}"} = Input::get("num_days_{$type}");
|
$account->{"direction_{$type}"} = Input::get("field_{$type}") == REMINDER_FIELD_INVOICE_DATE ? REMINDER_DIRECTION_AFTER : Input::get("direction_{$type}");
|
||||||
$account->{"field_{$type}"} = Input::get("field_{$type}");
|
|
||||||
$account->{"direction_{$type}"} = Input::get("field_{$type}") == REMINDER_FIELD_INVOICE_DATE ? REMINDER_DIRECTION_AFTER : Input::get("direction_{$type}");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$account->save();
|
$account->save();
|
||||||
|
@ -864,8 +864,8 @@ $LANG = array(
|
|||||||
'created_invoices' => 'Successfully created :count invoice(s)',
|
'created_invoices' => 'Successfully created :count invoice(s)',
|
||||||
'next_invoice_number' => 'The next invoice number is :number.',
|
'next_invoice_number' => 'The next invoice number is :number.',
|
||||||
'next_quote_number' => 'The next quote number is :number.',
|
'next_quote_number' => 'The next quote number is :number.',
|
||||||
'days_before' => 'days before',
|
'days_before' => 'days before the',
|
||||||
'days_after' => 'days after',
|
'days_after' => 'days after the',
|
||||||
'field_due_date' => 'due date',
|
'field_due_date' => 'due date',
|
||||||
'field_invoice_date' => 'invoice date',
|
'field_invoice_date' => 'invoice date',
|
||||||
'schedule' => 'Schedule',
|
'schedule' => 'Schedule',
|
||||||
@ -2346,6 +2346,7 @@ $LANG = array(
|
|||||||
'statement_date' => 'Statement Date',
|
'statement_date' => 'Statement Date',
|
||||||
'inactivity_logout' => 'Due to inactivity, you have been automatically logged out.',
|
'inactivity_logout' => 'Due to inactivity, you have been automatically logged out.',
|
||||||
'mark_active' => 'Mark Active',
|
'mark_active' => 'Mark Active',
|
||||||
|
'send_automatically' => 'Send Automatically',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -4,13 +4,14 @@
|
|||||||
|
|
||||||
{!! Former::populateField('enable_' . $field, intval($account->{'enable_' . $field})) !!}
|
{!! Former::populateField('enable_' . $field, intval($account->{'enable_' . $field})) !!}
|
||||||
|
|
||||||
<div class="row" style="padding-bottom:20px">
|
<div class="row well" style="padding-bottom:20px">
|
||||||
<div class="col-md-6">
|
<div class="col-md-4" style="padding-top:10px">
|
||||||
{!! Former::checkbox('enable_' . $field)
|
{!! Former::checkbox('enable_' . $field)
|
||||||
->text(trans('texts.enable'))->label('')
|
->text(trans('texts.send_automatically'))->label('')
|
||||||
->value(1) !!}
|
->value(1) !!}
|
||||||
|
</div>
|
||||||
{!! Former::plaintext('schedule')
|
<div class="col-md-8">
|
||||||
|
{!! Former::plaintext('')
|
||||||
->value(
|
->value(
|
||||||
Former::input('num_days_' . $field)
|
Former::input('num_days_' . $field)
|
||||||
->addClass('enable-' . $field)
|
->addClass('enable-' . $field)
|
||||||
@ -39,8 +40,7 @@
|
|||||||
{!! Former::text('email_subject_' . $field)
|
{!! Former::text('email_subject_' . $field)
|
||||||
->label(trans('texts.subject'))
|
->label(trans('texts.subject'))
|
||||||
->appendIcon('question-sign')
|
->appendIcon('question-sign')
|
||||||
->addGroupClass('email-subject')
|
->addGroupClass('email-subject') !!}
|
||||||
->addClass('enable-' . $field) !!}
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<p> <p/>
|
<p> <p/>
|
||||||
@ -53,9 +53,8 @@
|
|||||||
<div class="pull-right"><a href="#" onclick="return resetText('{{ 'template' }}', '{{ $field }}')">{{ trans("texts.reset") }}</a></div>
|
<div class="pull-right"><a href="#" onclick="return resetText('{{ 'template' }}', '{{ $field }}')">{{ trans("texts.reset") }}</a></div>
|
||||||
{!! Former::textarea('email_template_' . $field)
|
{!! Former::textarea('email_template_' . $field)
|
||||||
->label(trans('texts.body'))
|
->label(trans('texts.body'))
|
||||||
->addClass('enable-' . $field)
|
|
||||||
->style('display:none') !!}
|
->style('display:none') !!}
|
||||||
<div id="{{ $field }}Editor" class="form-control enable-{{ $field }}" style="min-height:160px">
|
<div id="{{ $field }}Editor" class="form-control" style="min-height:160px">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
@ -68,7 +67,7 @@
|
|||||||
<div class="col-md-9 show-when-ready" style="display:none">
|
<div class="col-md-9 show-when-ready" style="display:none">
|
||||||
@include('partials/quill_toolbar', ['name' => $field])
|
@include('partials/quill_toolbar', ['name' => $field])
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3 pull-right" style="padding-top:10px">
|
<div class="col-md-3 pull-right" style="padding-top:10px;text-align:right">
|
||||||
{!! Button::normal(trans('texts.raw'))->withAttributes(['onclick' => 'showRaw("'.$field.'")'])->small() !!}
|
{!! Button::normal(trans('texts.raw'))->withAttributes(['onclick' => 'showRaw("'.$field.'")'])->small() !!}
|
||||||
{!! Button::primary(trans('texts.preview'))->withAttributes(['onclick' => 'serverPreview("'.$field.'")'])->small() !!}
|
{!! Button::primary(trans('texts.preview'))->withAttributes(['onclick' => 'serverPreview("'.$field.'")'])->small() !!}
|
||||||
</div>
|
</div>
|
||||||
|
@ -245,7 +245,6 @@
|
|||||||
function enableReminder(id) {
|
function enableReminder(id) {
|
||||||
var checked = $('#enable_reminder' + id).is(':checked');
|
var checked = $('#enable_reminder' + id).is(':checked');
|
||||||
$('.enable-reminder' + id).attr('disabled', !checked)
|
$('.enable-reminder' + id).attr('disabled', !checked)
|
||||||
editors['reminder' + id].editor.enable(checked);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function setDirectionShown(field) {
|
function setDirectionShown(field) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user