PluginProbe
Easy Invoice – Invoice Generator, PDF Quotes & Payments / 2.4.2
Easy Invoice – Invoice Generator, PDF Quotes & Payments v2.4.2
2.4.3 2.4.4 2.4.2 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 All 60 releases
← All changes | templates/admin/partials/confirm-helper.php +8 -3 2.3.2 → 2.4.2 View file →
@@ -40,17 +40,22 @@
40 40
41 41 function proceed() {
42 42 btn.dataset.eiConfirmed = '1';
43 43 var form = btn.closest ? btn.closest('form') : null;
44 - if (form) {
44 + var isSubmit = btn.tagName === 'BUTTON' ? (btn.type || 'submit') === 'submit' : (btn.tagName === 'INPUT' && btn.type === 'submit');
45 + if (btn.tagName === 'A' && btn.href) {
46 + // A link inside a form (a row action in a bulk-action table)
47 + // still just follows its href.
48 + window.location.href = btn.href;
49 + } else if (form && isSubmit) {
45 50 if (typeof form.requestSubmit === 'function') {
46 51 form.requestSubmit(btn);
47 52 } else {
48 53 form.submit();
49 54 }
50 - } else if (btn.href) {
51 - window.location.href = btn.href;
52 55 } else {
56 + // type="button" and similar: re-fire the click; the marker
57 + // above lets the element's own handler run this time.
53 58 btn.click();
54 59 }
55 60 }
56 61