Skip to content

Commit

Permalink
Merge pull request gitcoinco#1570 from thelostone-mc/new
Browse files Browse the repository at this point in the history
hide message + USD when not available
  • Loading branch information
thelostone-mc authored Jun 28, 2018
2 parents 5cb7d79 + 07317b9 commit 169c2af
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions app/assets/v2/js/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -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('');
Expand Down
2 changes: 1 addition & 1 deletion app/dashboard/templates/submit_bounty.html
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ <h5 class="font-subheader">{% trans "Pricing" %}</h5>
<label class="form__label" for="amount">{% trans "Amount" %}</label>
<input name='amount' id='amount' class="form__input" type="number" value="{{amount|default:'0.001'}}" step="0.001" min="0.001"/>
</div>
<div class="form__amount-wrapper">
<div class="form__amount-wrapper" id="usd-amount-wrapper">
<label class="form__label" for="usd_amount">{% trans "USD" %}</label>
<input name='usd_amount' id='usd_amount' class="form__input" type="text" min="0.00"/>
</div>
Expand Down

0 comments on commit 169c2af

Please sign in to comment.