From 07317b981f146bdce08d9c5db54bb7b23233f23c Mon Sep 17 00:00:00 2001 From: Aditya Anand Date: Wed, 27 Jun 2018 23:02:37 -0700 Subject: [PATCH] hide message + USD when not available --- app/assets/v2/js/shared.js | 6 ++++++ app/dashboard/templates/submit_bounty.html | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/assets/v2/js/shared.js b/app/assets/v2/js/shared.js index 087b18c2820..cf3031587e7 100644 --- a/app/assets/v2/js/shared.js +++ b/app/assets/v2/js/shared.js @@ -808,10 +808,16 @@ var setUsdAmount = function(event) { var denomination = $('#token option:selected').text(); var estimate = getUSDEstimate(amount, denomination, function(estimate) { if (estimate['value']) { + $('#usd-amount-wrapper').css('visibility', 'visible'); + $('#usd_amount_text').css('visibility', 'visible'); + $('#usd_amount').val(estimate['value_unrounded']); $('#usd_amount_text').html(estimate['rate_text']); $('#usd_amount').removeAttr('disabled'); } else { + $('#usd-amount-wrapper').css('visibility', 'hidden'); + $('#usd_amount_text').css('visibility', 'hidden'); + $('#usd_amount_text').html(''); $('#usd_amount').prop('disabled', true); $('#usd_amount').val(''); diff --git a/app/dashboard/templates/submit_bounty.html b/app/dashboard/templates/submit_bounty.html index 9fbabb337b2..1115dd2d36d 100644 --- a/app/dashboard/templates/submit_bounty.html +++ b/app/dashboard/templates/submit_bounty.html @@ -165,7 +165,7 @@
{% trans "Pricing" %}
-
+