From 5f6c7ba4cd0dc143415f0396ce12f7f27d0303b2 Mon Sep 17 00:00:00 2001 From: Otto Zaiser <zaisero@nic.ar> Date: Fri, 11 Oct 2019 13:47:49 -0300 Subject: [PATCH] Testeando --- web/dist/js/vendor/ballot.js | 11 ++++++----- web/dist/nueva/index.html | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/web/dist/js/vendor/ballot.js b/web/dist/js/vendor/ballot.js index 5d8789f..a3fcc96 100644 --- a/web/dist/js/vendor/ballot.js +++ b/web/dist/js/vendor/ballot.js @@ -103,7 +103,7 @@ async function page_loaded() { error = 'El plugin no puede detectar directamente desde un archivo. El documento necesita estar en un servidor.'; else { // Non-dapp browsers... - //window.alert("Non-Ethereum browser detected. Consider using MetaMask."); + //alertar("Non-Ethereum browser detected. Consider using MetaMask."); error = 'No se detectó un browser Ethereum. Por favor, <a href="https://metamask.io/" target="_blank">instalá MetaMask</a>.'; } if (error) { @@ -220,11 +220,11 @@ function api_version() { function setup_existing_contract(abi, addr) { if (api_version() == 0) { var MyContract = window.web3.eth.contract(abiNew); - console.log(MyContract); + console.log("Mi contrato: ", MyContract); contract = MyContract.at(mainaddr[netid]); return contract; } - window.alert('Do not know how to deal with contracts at this API version (' + window.web3.version.api + ').'); + alertar('Do not know how to deal with contracts at this API version (' + window.web3.version.api + ').'); return; } @@ -235,7 +235,7 @@ function setup_existing_instance(abi, addr) { contract = MyContract.at(addr); return contract; } - window.alert('Do not know how to deal with contracts at this API version (' + window.web3.version.api + ').'); + alertar('Do not know how to deal with contracts at this API version (' + window.web3.version.api + ').'); return; } @@ -418,6 +418,7 @@ async function nueva_votacion(arguments, proposals, voters) { alertarLoading('Creando un nuevo contrato de votación.'); var contract = setup_existing_contract(abiNew, mainaddr[netid]); + console.log("Contrato: ",contract); if (!contract) return; @@ -745,7 +746,7 @@ function access_accounts() { // Acccounts now exposed, or the error gets caught accExposed = 1; } catch (error) { - // window.alert( + // alertar( // "Access to your ethereum account was denied. The reason " + // "given with was \"" + // error + diff --git a/web/dist/nueva/index.html b/web/dist/nueva/index.html index da7ef61..9bf10b7 100644 --- a/web/dist/nueva/index.html +++ b/web/dist/nueva/index.html @@ -41,7 +41,7 @@ <div class="row"> <div class="form-group form-group-lg col-sm-12"> <label for="_title" class="form-required">TÃtulo de la votación</label> - <input class="form-control" type="text" id="_title" name="_title" value="" size="40" + <input class="form-control" type="text" id="_title" name="_title" value="Quien es mejor" size="40" required="required" aria-required="true"> </div> </div> -- GitLab