Verified Commit 3259b92e authored by Aleksandr Gumroian's avatar Aleksandr Gumroian
Browse files

Make DownloadButton unclickable when input is wrong

When a user writes non-valid value into the address/host field,
"Download" button should not be clickable.
parent fc02e9dc
Pipeline #94144 passed with stage
in 3 minutes and 9 seconds
/*
* Copyright (C) 2019 CZ.NIC z.s.p.o. (http://www.nic.cz/)
* Copyright (C) 2019-2022 CZ.NIC z.s.p.o. (https://www.nic.cz/)
*
* This is free software, licensed under the GNU General Public License v3.
* See /LICENSE for more information.
......@@ -128,6 +128,9 @@ function Actions({ client, address, onRevoke, disabled }) {
className={`btn-primary btn-sm ${
downloadDisabled ? "disabled" : ""
}`.trim()}
onClick={
downloadDisabled ? (event) => event.preventDefault() : null
}
>
{_("Download")}
</DownloadButton>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment