diff --git a/index.html b/index.html index a7f343f..01aaecf 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,7 @@ - govobject-proposal + Dash Governance Tools @@ -22,9 +22,11 @@ $('#start_epoch').datepicker(opts, 'getdate'); $('#end_epoch').datepicker(opts, 'getdate'); + /* $('#dataHex').click(function() { copyToClipboard($(this).attr('id')); }); + */ $('#prepareProposal').click(function() { copyToClipboard($(this).attr('id')); @@ -34,31 +36,38 @@ copyToClipboard($(this).attr('id')); }); - $('#formSubmit').click(function() { + var gov = ''; - var gov = new Bitcore.GovObject.Proposal(); + $('#btnPrepare').click(function() { + + gov = new Bitcore.GovObject.Proposal(); // proposal basic fields - gov.name = document.getElementById('name').value; - gov.url = document.getElementById('url').value; - gov.payment_address = document.getElementById('payment_address').value; - gov.payment_amount = parseFloat(document.getElementById('payment_amount').value); + gov.name = $('#name').val(); + gov.url = $('#url').val(); + gov.payment_address = $('#payment_address').val(); + gov.payment_amount = parseFloat($('#payment_amount').val()); // format dates for gobject serialization - gov.start_epoch = (new Date(document.getElementById('start_epoch').value) / 1000) || null; - gov.end_epoch = (new Date(document.getElementById('end_epoch').value) / 1000) || null; + gov.start_epoch = (new Date($('#start_epoch').val()) / 1000) || null; + gov.end_epoch = (new Date($('#end_epoch').val()) / 1000) || null; // hidden elements - gov.type = parseInt(document.getElementById('type').value); + gov.type = parseInt($('#type').val()); - document.getElementById('dataHex').innerHTML = gov.uncheckedSerialize(); + //document.getElementById('dataHex').innerHTML = gov.uncheckedSerialize(); - document.getElementById('prepareProposal').innerHTML = "gobject submit "+document.getElementById('parentHash').value+" "+document.getElementById('revision').value+" "+document.getElementById('time').value+" "+gov.uncheckedSerialize(); - - if (document.getElementById('feeTxid').value) { - document.getElementById('submitProposal').innerHTML = "gobject submit " + document.getElementById('parentHash').value + " " + document.getElementById('revision').value + " " + document.getElementById('time').value + " " + gov.uncheckedSerialize() + " " + document.getElementById('feeTxid').value; - } + var propCommand = "gobject submit "+$('#parentHash').val() + " " + $('#revision').val() +" " + $('#time').val() +" " + gov.uncheckedSerialize(); + $("textarea#prepareProposal").val(propCommand); + $('#feeTxid').on('input', function() { + if ($('#feeTxid').val().length > 0) { + var submitCommand = "gobject submit " + $('#parentHash').val() + " " + $('#revision').val() + " " + $('#time').val() + " " + gov.uncheckedSerialize() + " " + $('#feeTxid').val(); + $("textarea#submitProposal").val(submitCommand); + } else { + $("textarea#submitProposal").val(''); + } + }); }); }); @@ -80,47 +89,34 @@
-

Dash Governance Proposal Creation

+

Dash Budget Proposal Generator

+
Generate budget proposal commands you can copy/paste into your Dash wallet to prepare a budget proposal and submit it to the network.
+
+ +
+

Create a Proposal

+
Enter details for your proposal and click 'Create Proposal'. This will generate a command you can run in your local wallet to prepare the proposal at a cost of 0.33 Dash
-
-
- +
-
- - -
- -
- - -
-
-
- - -
- -
Create Proposal
- -
+
Create Proposal
- +
+
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ +
+ +
+

Wallet Commands

+
+ +
+ + + +
+ +
+ +
Paste this proposal command into your Dash wallet console to spend a Fee transaction of 0.33 DASH.
+ +
@@ -155,34 +190,27 @@
-
+
- - -
- - -
- - +
+ +
Paste the transaction ID returned by the wallet below to generate the final submit command.
+ +
-
+
-
+
-
- - -
+
-
- - -
- - +
+ +
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.
+ +