diff --git a/htdocs/js/index.js b/htdocs/js/index.js index 8fe0556..2705482 100644 --- a/htdocs/js/index.js +++ b/htdocs/js/index.js @@ -53,10 +53,12 @@ setInnerText('ID_Renter_EstimatedUploadCost', currency); }, setAllowance: (allowance)=> { - setInnerText('ID_RenterSetFunds', allowance.Funds); - setInnerText('ID_RenterSetHosts', allowance.Hosts); - setInnerText('ID_RenterSetPeriod', allowance.Period); - setInnerText('ID_RenterSetRenewWindow', allowance.RenewWindowInBlocks); + if (document.getElementById('renter_settings_window').classList.contains('hidden-element')) { + setValue('ID_RenterSetFunds', allowance.Funds); + setValue('ID_RenterSetHosts', allowance.Hosts); + setValue('ID_RenterSetPeriod', allowance.Period); + setValue('ID_RenterSetRenewWindow', allowance.RenewWindowInBlocks); + } } }; })();