Avoid javascript error if edit popup is read-only

This commit is contained in:
Nathan Gray 2011-06-02 20:05:40 +00:00
parent 3bbc6a6962
commit 7e05b0dff2

View File

@ -145,6 +145,7 @@ function setOptions(options_str)
function show_custom_country(selectbox)
{
if(!selectbox) return;
custom_field_name = selectbox.name.replace("countrycode", "countryname");
custom_field = document.getElementById(custom_field_name);
if(custom_field && selectbox.value == "-custom-") {