blob: 48073593a668158c9eee5360c48162dd47182401 (
plain)
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
|
function pkg_changed () {
var form = document.OrderPkgForm;
var discountnum = form.discountnum;
if ( form.pkgpart.selectedIndex > 0 ) {
form.submitButton.disabled = false;
if ( discountnum ) {
if ( form.pkgpart.options[form.pkgpart.selectedIndex].getAttribute('data-can_discount') == 1 ) {
form.discountnum.disabled = false;
discountnum_changed(form.discountnum);
} else {
form.discountnum.disabled = true;
discountnum_changed(form.discountnum);
}
}
if ( form.pkgpart.options[form.pkgpart.selectedIndex].getAttribute('data-can_start_date') == 1 ) {
form.start_date_text.disabled = false;
form.start_date.style.backgroundColor = '#ffffff';
form.start_date_button.style.display = '';
form.start_date_button_disabled.style.display = 'none';
form.invoice_terms.disabled = true;
} else {
form.start_date_text.disabled = true;
form.start_date.style.backgroundColor = '#dddddd';
form.start_date_button.style.display = 'none';
form.start_date_button_disabled.style.display = '';
}
} else {
form.submitButton.disabled = true;
if ( discountnum ) { form.discountnum.disabled = true; }
discountnum_changed(form.discountnum);
}
}
function standardize_new_location() {
var form = document.OrderPkgForm;
var loc = form.locationnum;
if (loc.type == 'select-one' && loc.options[loc.selectedIndex].value == -1){
standardize_locations();
} else {
form.submit();
}
}
|