mirror of
https://github.com/seigler/govobject-proposal
synced 2025-07-27 06:46:10 +00:00
enables new and edit buttons, hides steps in progress if new proposal clicked
This commit is contained in:
parent
10ef099643
commit
8b7fca6136
2 changed files with 14 additions and 2 deletions
|
@ -9,7 +9,9 @@ function setFormEditable(edit) {
|
|||
if (edit === true) {
|
||||
$('#btnPrepare').addClass('hidden');
|
||||
$('#btnEdit').removeClass('hidden');
|
||||
$('#btnEdit').removeAttr('disabled');
|
||||
$('#btnNew').removeClass('hidden');
|
||||
$('#btnNew').removeAttr('disabled');
|
||||
} else {
|
||||
$('#btnPrepare').removeClass('hidden');
|
||||
$('#btnEdit').addClass('hidden');
|
||||
|
@ -20,4 +22,4 @@ function setFormEditable(edit) {
|
|||
var copyToClipboard = function(id) {
|
||||
document.getElementById(id).select();
|
||||
document.execCommand('copy');
|
||||
};
|
||||
};
|
||||
|
|
|
@ -115,5 +115,15 @@ ProposalGenerator.prototype.resetProposal = function() {
|
|||
$('.createProposal input').each(function() {
|
||||
$(this).val('');
|
||||
});
|
||||
setFormEditable(true);
|
||||
$("#btnEdit").val('Edit Proposal');
|
||||
$("#btnNew").val('New Proposal');
|
||||
$("#btnPrepare").val('Create Proposal');
|
||||
setFormEditable(false);
|
||||
$('.walletCommands#walletCommandsHeader').addClass('hidden');
|
||||
$('.walletCommands#walletCommandsPrepare').addClass('hidden');
|
||||
$('.walletCommands#walletCommandsTx').addClass('hidden');
|
||||
$('.walletCommands#walletCommandsProgress').addClass('hidden');
|
||||
$('.walletCommands#walletCommandsSubmit').addClass('hidden');
|
||||
|
||||
this._mode = 'proposal';
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue