This repository has been archived by the owner on Mar 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
send-to-addition.html
49 lines (42 loc) · 1.59 KB
/
send-to-addition.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!--
SENDY INVOICING - SEND-TO-ADDITION
The contents of this file should be pasted into send-to.php. Look for the
section around lines 158-161 that look like this:
php if(paid()):
<form action="php echo get_app_info('path')...
php else:
<form action="php echo get_app_info('path')...
The contents of this file should appear immediately after the form and
before the php endif;.
-->
<script>
/*global $*/
// CHECK CURRENT INVOICING SELECTION
function checkInvoicing() {
'use strict';
$.ajax({
url: '<?php echo get_app_info("path")?>/includes/Sendy-Invoicing/check-invoicing.php',
type: 'POST',
cache: false,
data: 'i=<?php echo $_GET["i"];?>',
success: function(result) {
if (result == 1) {
$('#pay-form, #schedule-form').attr('action', '<?php echo get_app_info("path")?>/includes/Sendy-Invoicing/invoicing.php');
}
}
});
}
checkInvoicing();
$(document).ready(function() {
'use strict';
// Remove duplicate total_recipients2 inputs
$('input[name="total_recipients2"]:first').addClass('preserve');
$('input[name="total_recipients2"]').not('.preserve').remove();
// Place initial value into total_recipients2
$('input[name="total_recipients2"]').val($('#recipients').text());
// Update total_recipients2 value whenever #recipients changes
$('#recipients').on('DOMSubtreeModified', function() {
$('input[name="total_recipients2"]').val($('#recipients').text());
});
});
</script>