Skip to content

Commit

Permalink
Disable publish button if create is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
axic committed Mar 15, 2017
1 parent e6ab0dc commit 8f63001
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions assets/css/universal-dapp.css
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,12 @@
padding: 0.25em;
}

.udapp button:disabled {
cursor: not-allowed;
background-color: white;
border-color: lightgray;
}

.udapp .atAddress {
background-color: #B1EAC5;
border-color: #B1EAC5;
Expand Down
3 changes: 3 additions & 0 deletions src/universal-dapp.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@ UniversalDApp.prototype.getCreateInterface = function ($container, contract) {
$createButton.text('Create')
$createButton.attr('disabled', 'disabled')
$createButton.attr('title', 'This contract does not implement all functions and thus cannot be created.')

$publishButton.attr('disabled', 'disabled')
$publishButton.attr('title', 'This contract does not implement all functions and thus cannot be published.')
}

return $createInterface
Expand Down

0 comments on commit 8f63001

Please sign in to comment.