Disable 'region' input when not applicable.

Was sending a null value which wasn't being handled correctly
by the VLocation validator.
This commit is contained in:
Brian Simpson
2014-01-15 19:30:21 -05:00
parent dd78c62417
commit 6072f9f515

View File

@@ -347,6 +347,7 @@ r.sponsored = {
$region.find('option').remove().end().hide()
$metro.find('option').remove().end().hide()
$region.prop('disabled', true)
$metro.prop('disabled', true)
if (_.has(this.regions, $country.val())) {
@@ -357,6 +358,7 @@ r.sponsored = {
$('<option/>', {value: code, selected: selected}).text(name).appendTo($region)
})
$region.prop('disabled', false)
$region.show()
}
},