mirror of
https://github.com/seigler/govobject-proposal
synced 2025-07-27 06:46:10 +00:00
adds css proposalBlock style to rest of steps, raises validation errors on step 2 while inputting txID
This commit is contained in:
parent
d5e40ae61e
commit
7f8528a14b
3 changed files with 68 additions and 55 deletions
|
@ -36,7 +36,6 @@ i.fa {
|
||||||
}
|
}
|
||||||
|
|
||||||
.proposalBlock {
|
.proposalBlock {
|
||||||
/*margin-top: 6%;*/
|
|
||||||
padding: 7%;
|
padding: 7%;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
box-shadow: 0px 17px 24px 0px rgba(0, 0, 0, 0.16);
|
box-shadow: 0px 17px 24px 0px rgba(0, 0, 0, 0.16);
|
||||||
|
|
118
index.html
118
index.html
|
@ -121,9 +121,19 @@
|
||||||
|
|
||||||
// check if tx exists in insight
|
// check if tx exists in insight
|
||||||
txListener.getTx(function(err, res) {
|
txListener.getTx(function(err, res) {
|
||||||
if(err) console.log(err);
|
if(err) {
|
||||||
|
console.log("Error:", err);
|
||||||
|
if(err == 404) {
|
||||||
|
$('#feeTxid').addClass('validationError');
|
||||||
|
$('#feeTxid').val('Transaction ID not found');
|
||||||
|
} else if (err == 400) {
|
||||||
|
$('#feeTxid').addClass('validationError');
|
||||||
|
$('#feeTxid').val('Please paste a valid transaction ID');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
if(res) {
|
if(res) {
|
||||||
console.log(res);
|
console.log("Response:", res);
|
||||||
|
|
||||||
// transaction exists, proceed to step three
|
// transaction exists, proceed to step three
|
||||||
document.getElementById('step_three').click();
|
document.getElementById('step_three').click();
|
||||||
|
@ -327,71 +337,75 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="step2" class="tab-pane fade">
|
<div id="step2" class="tab-pane fade">
|
||||||
<div class="row walletCommands hidden" id="walletCommandsHeader">
|
<div class="proposalBlock">
|
||||||
<div class="col-xs-12">
|
<div class="row walletCommands hidden" id="walletCommandsHeader">
|
||||||
<h2>Wallet Commands</h2>
|
<div class="col-xs-12">
|
||||||
</div>
|
<h2>Wallet Commands</h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row walletCommands hidden" id="walletCommandsPrepare">
|
||||||
|
|
||||||
|
<div class="col-xs-12">
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="prepareProposal">Prepare-Proposal Command:</label>
|
||||||
|
<div>Paste this proposal command into your Dash wallet console to spend a Fee transaction of 0.33 DASH.</div>
|
||||||
|
<textarea readonly class="form-control" id="prepareProposal" rows="4" placeholder=""></textarea>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row walletCommands hidden" id="walletCommandsTx">
|
||||||
|
|
||||||
|
<div class="col-xs-12">
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="feeTxid">Fee Transaction ID:</label>
|
||||||
|
<div>Paste the transaction ID returned by the wallet below to generate the final submit command.</div>
|
||||||
|
<input type="text" class="form-control" id="feeTxid" value="" placeholder="<fee-txid>">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row walletCommands hidden" id="walletCommandsPrepare">
|
|
||||||
|
|
||||||
<div class="col-xs-12">
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="prepareProposal">Prepare-Proposal Command:</label>
|
|
||||||
<div>Paste this proposal command into your Dash wallet console to spend a Fee transaction of 0.33 DASH.</div>
|
|
||||||
<textarea readonly class="form-control" id="prepareProposal" rows="4" placeholder=""></textarea>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row walletCommands hidden" id="walletCommandsTx">
|
|
||||||
|
|
||||||
<div class="col-xs-12">
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="feeTxid">Fee Transaction ID:</label>
|
|
||||||
<div>Paste the transaction ID returned by the wallet below to generate the final submit command.</div>
|
|
||||||
<input type="text" class="form-control" id="feeTxid" value="" placeholder="<fee-txid>">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div id="step3" class="tab-pane fade">
|
<div id="step3" class="tab-pane fade">
|
||||||
|
<div class="proposalBlock">
|
||||||
|
<div class="row walletCommands hidden" id="walletCommandsProgress">
|
||||||
|
|
||||||
<div class="row walletCommands hidden" id="walletCommandsProgress">
|
<div class="col-xs-12">
|
||||||
|
|
||||||
<div class="col-xs-12">
|
<div class="form-group">
|
||||||
|
<label for="feeTxid">Fee Transaction Progress:</label>
|
||||||
|
<div id="progresstxt">We'll wait for 6 confirmations. Waiting for new blocks to confirm...</div>
|
||||||
|
<div id="progressbar"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
</div>
|
||||||
<label for="feeTxid">Fee Transaction Progress:</label>
|
|
||||||
<div id="progresstxt">We'll wait for 6 confirmations. Waiting for new blocks to confirm...</div>
|
|
||||||
<div id="progressbar"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="step4" class="tab-pane fade">
|
<div id="step4" class="tab-pane fade">
|
||||||
<div class="row walletCommands hidden" id="walletCommandsSubmit">
|
<div class="proposalBlock">
|
||||||
|
<div class="row walletCommands hidden" id="walletCommandsSubmit">
|
||||||
|
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="submitProposal">Submit Proposal Command:</label>
|
<label for="submitProposal">Submit Proposal Command:</label>
|
||||||
<div>Paste the Fee TX id to generate the proposal submit command. This is the final step and can be completed after 6 confirmations on the fee tx.</div>
|
<div>Paste the Fee TX id to generate the proposal submit command. This is the final step and can be completed after 6 confirmations on the fee tx.</div>
|
||||||
<textarea readonly class="form-control" id="submitProposal" rows="4" placeholder=""></textarea>
|
<textarea readonly class="form-control" id="submitProposal" rows="4" placeholder=""></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -45,7 +45,6 @@ TXListener.prototype.getTx = function(cb) {
|
||||||
format: "json"
|
format: "json"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
console.log(opts);
|
|
||||||
|
|
||||||
this._fetch(opts, cb);
|
this._fetch(opts, cb);
|
||||||
};
|
};
|
||||||
|
@ -80,7 +79,8 @@ TXListener.prototype._fetch = function(opts,cb) {
|
||||||
cb(null, data);
|
cb(null, data);
|
||||||
},
|
},
|
||||||
error: function (jqXHR, status, error) {
|
error: function (jqXHR, status, error) {
|
||||||
var err = eval("(" + jqXHR.responseText + ")");
|
var err = jqXHR.status;
|
||||||
|
//var err = eval("(" + jqXHR.responseText + ")");
|
||||||
cb(err, null);
|
cb(err, null);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue