PluginProbe
Easy Invoice – Invoice Generator, PDF Quotes & Payments / 2.4.0
Easy Invoice – Invoice Generator, PDF Quotes & Payments v2.4.0
2.4.0 2.4.1 2.3.8 2.3.7 2.3.6 2.3.5 2.3.4 2.3.3 2.3.2 2.3.1 2.2.0 2.1.21 2.1.20 2.1.19 2.1.18 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.16 2.1.2 All 57 releases
← All changes | assets/js/confirmation-modal.js +28 -0 2.1.132.4.0 View file →
@@ -395,8 +395,36 @@
395 395 $('#easy-invoice-confirmation-modal').addClass('hidden');
396 396 },
397 397
398 398 /**
399 + * Send invoice or quote by email — uses easyInvoice.i18n when available.
400 + *
401 + * @param {'invoice'|'quote'} kind Document type
402 + * @param {Function} onConfirm Called when user confirms
403 + */
404 + confirmSendDocument: function(kind, onConfirm) {
405 + var i18n = (window.easyInvoice && window.easyInvoice.i18n) ? window.easyInvoice.i18n : {};
406 + var isQuote = kind === 'quote';
407 + var title = isQuote
408 + ? (i18n.confirm_send_quote_title || 'Send quote by email')
409 + : (i18n.confirm_send_invoice_title || 'Send invoice by email');
410 + var message = isQuote
411 + ? (i18n.confirm_send_quote_message || 'The quote will be emailed to the client using your template.')
412 + : (i18n.confirm_send_invoice_message || 'The invoice will be emailed to the client using your template.');
413 + var confirmText = i18n.confirm_send_confirm || i18n.send_invoice || 'Send';
414 + var cancelText = i18n.confirm_cancel || i18n.cancel || 'Cancel';
415 +
416 + this.show({
417 + title: title,
418 + message: message,
419 + confirmText: confirmText,
420 + cancelText: cancelText,
421 + confirmClass: 'bg-indigo-600 hover:bg-indigo-700',
422 + onConfirm: typeof onConfirm === 'function' ? onConfirm : function() {}
423 + });
424 + },
425 +
426 + /**
399 427 * Quick confirmation for common actions
400 428 *
401 429 * @param {string} action Action type (delete, trash, draft, etc.)
402 430 * @param {string} itemName Name of the item being acted upon