Skip to content

Commit 5b00901

Browse files
committed
Use defaultValue instead of "" so that if the form is populated
(such as when editing an existing submission), the javascript doesn't empty out the submitter data because the box isn't checked. - Legacy-Id: 681
1 parent f94c7ad commit 5b00901

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

ietf/templates/ipr/js.html

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
document.form1.subm_address1.value = document.form1.hold_address1.value;
1616
document.form1.subm_address2.value = document.form1.hold_address2.value;
1717
} else {
18-
document.form1.subm_name.value = "";
19-
document.form1.subm_title.value = "";
20-
document.form1.subm_department.value = "";
21-
document.form1.subm_telephone.value = "";
22-
document.form1.subm_fax.value = "";
23-
document.form1.subm_email.value = "";
24-
document.form1.subm_address1.value = "";
25-
document.form1.subm_address2.value = "";
18+
document.form1.subm_name.value = document.form1.subm_name.defaultValue;
19+
document.form1.subm_title.value = document.form1.subm_title.defaultValue;
20+
document.form1.subm_department.value = document.form1.subm_department.defaultValue;
21+
document.form1.subm_telephone.value = document.form1.subm_telephone.defaultValue;
22+
document.form1.subm_fax.value = document.form1.subm_fax.defaultValue;
23+
document.form1.subm_email.value = document.form1.subm_email.defaultValue;
24+
document.form1.subm_address1.value = document.form1.subm_address1.defaultValue;
25+
document.form1.subm_address2.value = document.form1.subm_address2.defaultValue;
2626
}
2727
} else if (src == 'ietf') {
2828
checked = document.form1.ietf_contact_is_submitter.checked;
@@ -38,14 +38,14 @@
3838
document.form1.subm_address1.value = document.form1.ietf_address1.value;
3939
document.form1.subm_address2.value = document.form1.ietf_address2.value;
4040
} else {
41-
document.form1.subm_name.value = "";
42-
document.form1.subm_title.value = "";
43-
document.form1.subm_department.value = "";
44-
document.form1.subm_telephone.value = "";
45-
document.form1.subm_fax.value = "";
46-
document.form1.subm_email.value = "";
47-
document.form1.subm_address1.value = "";
48-
document.form1.subm_address2.value = "";
41+
document.form1.subm_name.value = document.form1.subm_name.defaultValue;
42+
document.form1.subm_title.value = document.form1.subm_title.defaultValue;
43+
document.form1.subm_department.value = document.form1.subm_department.defaultValue;
44+
document.form1.subm_telephone.value = document.form1.subm_telephone.defaultValue;
45+
document.form1.subm_fax.value = document.form1.subm_fax.defaultValue;
46+
document.form1.subm_email.value = document.form1.subm_email.defaultValue;
47+
document.form1.subm_address1.value = document.form1.subm_address1.defaultValue;
48+
document.form1.subm_address2.value = document.form1.subm_address2.defaultValue;
4949
}
5050
}
5151
document.form1.subm_name.disabled = checked;

0 commit comments

Comments
 (0)