X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/23e016e908c554b4e87cda22b6f6164daed3a7d9..490226ad6d28cf9eff1fc78c7c69bef750321614:/app/views/export/start.js.erb diff --git a/app/views/export/start.js.erb b/app/views/export/start.js.erb index 1134d16d8..e433a498f 100644 --- a/app/views/export/start.js.erb +++ b/app/views/export/start.js.erb @@ -214,15 +214,15 @@ function validateControls() { } var max_scale = maxMapnikScale(); + var disabled = true; - if ($("#format_osm").prop("checked") && bounds.getWidth() * bounds.getHeight() > <%= MAX_REQUEST_AREA %>) { - $("#export_commit").prop("disabled", true); - } else if ($("#format_mapnik").prop("checked") && $("#mapnik_scale").val() < max_scale) { - $("#export_commit").prop("disabled", true); - } else { - $("#export_commit").prop("disabled", false); + if ($("#format_osm").prop("checked")) { + disabled = bounds.getWidth() * bounds.getHeight() > <%= MAX_REQUEST_AREA %>; + } else if ($("#format_mapnik").prop("checked")) { + disabled = $("#mapnik_scale").val() < max_scale; } + $("#export_commit").prop("disabled", disabled); $("#mapnik_max_scale").html(roundScale(max_scale)); }