In Location Dialog don't show Online button for countries not configured

This commit is contained in:
Carlos Ruiz 2007-06-26 19:14:12 +00:00
parent b6c624eaec
commit 91047637b0
1 changed files with 12 additions and 4 deletions

View File

@ -233,10 +233,14 @@ public class VLocationDialog extends CDialog
} }
// disable online if this country doesn't have post code lookup // disable online if this country doesn't have post code lookup
if (m_location.getCountry().isPostcodeLookup()) if (m_location.getCountry().isPostcodeLookup()) {
fOnline.setEnabled(true); fOnline.setEnabled(true);
else fOnline.setVisible(true);
}
else {
fOnline.setEnabled(false); fOnline.setEnabled(false);
fOnline.setVisible(false);
}
fCountry.setSelectedItem(country); fCountry.setSelectedItem(country);
} }
@ -298,10 +302,14 @@ public class VLocationDialog extends CDialog
m_location.setCountry(c); m_location.setCountry(c);
// refresh online button for new country // refresh online button for new country
if (c.isPostcodeLookup()) if (c.isPostcodeLookup()) {
fOnline.setEnabled(true); fOnline.setEnabled(true);
else fOnline.setVisible(true);
}
else {
fOnline.setEnabled(false); fOnline.setEnabled(false);
fOnline.setVisible(false);
}
// update the region name if regions are enabled for this country // update the region name if regions are enabled for this country
if (c.isHasRegion()) if (c.isHasRegion())