mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 10:54:41 -04:00
Clarify message for future recurring invoices
This commit is contained in:
parent
a5ce4bce95
commit
62aaa65aa4
@ -2517,6 +2517,7 @@ $LANG = array(
|
|||||||
'set_phone_for_two_factor' => 'Set your phone number to enable.',
|
'set_phone_for_two_factor' => 'Set your phone number to enable.',
|
||||||
'enabled_two_factor' => 'Successfully enabled Two-Factor Authentication',
|
'enabled_two_factor' => 'Successfully enabled Two-Factor Authentication',
|
||||||
'add_product' => 'Add Product',
|
'add_product' => 'Add Product',
|
||||||
|
'email_will_be_sent_on' => 'Note: the email will be sent on :date.',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -1303,21 +1303,29 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!isSaveValid()) {
|
if (!isSaveValid()) {
|
||||||
model.showClientForm();
|
model.showClientForm();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// warn invoice will be emailed when saving new recurring invoice
|
|
||||||
var text = '\n' + getSendToEmails();
|
var title = "{!! trans("texts.confirm_recurring_email_invoice") !!}";
|
||||||
|
var text = '\n' + getSendToEmails();
|
||||||
|
var startDate = moment($('#start_date').datepicker('getDate'));
|
||||||
|
|
||||||
|
// warn invoice will be emailed when saving new recurring invoice
|
||||||
if (model.invoice().start_date() == "{{ Utils::fromSqlDate(date('Y-m-d')) }}") {
|
if (model.invoice().start_date() == "{{ Utils::fromSqlDate(date('Y-m-d')) }}") {
|
||||||
text += '\n\n' + "{!! trans("texts.confirm_recurring_timing") !!}";
|
text += '\n\n' + "{!! trans("texts.confirm_recurring_timing") !!}";
|
||||||
|
// check if the start date is in the future
|
||||||
|
} else if (startDate.isAfter(moment(), 'day')) {
|
||||||
|
var message = "{!! trans("texts.email_will_be_sent_on") !!}";
|
||||||
|
text += '\n\n' + message.replace(':date', model.invoice().start_date());
|
||||||
}
|
}
|
||||||
var title = "{!! trans("texts.confirm_recurring_email_$entityType") !!}";
|
|
||||||
sweetConfirm(function() {
|
sweetConfirm(function() {
|
||||||
model.invoice().is_public(true);
|
model.invoice().is_public(true);
|
||||||
submitAction('');
|
submitAction('');
|
||||||
}, text, title);
|
}, text, title);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
model.invoice().is_public(true);
|
model.invoice().is_public(true);
|
||||||
onSaveClick();
|
onSaveClick();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user