Merge pull request #1371 from matiaspando/error/informPasswordNotMatching

Error/inform password not matching
This commit is contained in:
Gustavo Maximiliano Cortez 2014-09-15 11:06:16 -03:00
commit d4ec48aadd
5 changed files with 119 additions and 76 deletions

View file

@ -7,7 +7,7 @@ angular.module('copayApp.controllers').controller('JoinController',
$scope.loading = false;
$scope.isMobile = !!window.cordova;
// QR code Scanner
// QR code Scanner
var cameraInput;
var video;
var canvas;
@ -15,14 +15,13 @@ angular.module('copayApp.controllers').controller('JoinController',
var context;
var localMediaStream;
$scope.hideAdv=true;
$scope.hideAdv = true;
navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia;
if (!window.cordova && !navigator.getUserMedia)
$scope.disableScanner =1;
if (!window.cordova && !navigator.getUserMedia)
$scope.disableScanner = 1;
var _scan = function(evt) {
if (localMediaStream) {

View file

@ -6,17 +6,16 @@ var bignum = bitcore.Bignum;
var preconditions = require('preconditions').singleton();
angular.module('copayApp.directives')
.directive('validAddress', ['$rootScope', function($rootScope) {
.directive('validAddress', ['$rootScope',
function($rootScope) {
return {
require: 'ngModel',
link: function(scope, elem, attrs, ctrl) {
var validator = function(value) {
// If we're setting the domain, ignore the change.
if ($rootScope.merchant
&& $rootScope.merchant.domain
&& value === $rootScope.merchant.domain) {
if ($rootScope.merchant && $rootScope.merchant.domain && value === $rootScope.merchant.domain) {
ctrl.$setValidity('validAddress', true);
return value;
}
@ -27,6 +26,7 @@ angular.module('copayApp.directives')
return value;
}
// Bip21 uri
if (/^bitcoin:/.test(value)) {
var uri = new bitcore.BIP21(value);
@ -41,11 +41,13 @@ angular.module('copayApp.directives')
return value;
};
ctrl.$parsers.unshift(validator);
ctrl.$formatters.unshift(validator);
}
};
}])
}
])
.directive('enoughAmount', ['$rootScope',
function($rootScope) {
var w = $rootScope.wallet;

131
po/es.po
View file

@ -9,7 +9,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.6.8\n"
"X-Generator: Poedit 1.6.9\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: views/create.html
@ -17,8 +17,9 @@ msgid "(*) The limits are imposed by the bitcoin network."
msgstr "(*) Los límites son impuestos por la red de bitcoin."
#: views/more.html
#, fuzzy
msgid ""
"ALL Transactions Proposals will be discarted. This need to be done on "
"ALL Transactions Proposals will be discarted. This needs to be done on "
"<b>ALL<b> peers of a wallet, to prevent the old proposals to be resynced "
"again.\n"
" </b></b>"
@ -52,7 +53,7 @@ msgstr "Libreta de Direcciones"
msgid "Addresses"
msgstr "Direcciones"
#: views/settings.html
#: views/more.html
msgid "Alternative Currency"
msgstr "Moneda Alternativa"
@ -93,9 +94,9 @@ msgstr "Balance"
msgid "Balance locked in pending transaction proposals"
msgstr "Balance bloqueado en las propuestas de transacción pendientes"
#: views/settings.html
msgid "Bitcoin Network"
msgstr "Red Bitcoin"
#: views/send.html
msgid "Bitcoin address"
msgstr "Dirección bitcoin"
#: views/includes/transaction.html
msgid "Broadcast Transaction"
@ -113,11 +114,16 @@ msgstr "Cancelar"
msgid "Certificate:"
msgstr "Certificado:"
#: views/create.html
#, fuzzy
msgid "Choose a password"
msgstr "Escribe tu contraseña"
#: views/import.html
msgid "Choose backup file from your computer"
msgstr "Seleccione el archivo backup de su computadora"
#: views/create.html views/join.html
#: views/join.html
msgid "Choose your password"
msgstr "Escribe tu contraseña"
@ -161,6 +167,12 @@ msgstr "Crear nuevo monedero"
msgid "Create {{requiredCopayers}}-of-{{totalCopayers}} wallet"
msgstr "Crea monedero {{requiredCopayers}}-de-{{totalCopayers}}"
#: views/copayers.html
msgid "Creating and storing a backup will allow you to recover wallet funds"
msgstr ""
"Crear y guardar una copia de seguridad le permitirá recuperar el dinero de "
"su monedero"
#: views/create.html
msgid "Creating wallet..."
msgstr "Creando monedero..."
@ -181,10 +193,6 @@ msgstr "Eliminar"
msgid "Delete Wallet"
msgstr "Borrar Monedero"
#: views/copayers.html
msgid "Delete wallet"
msgstr "Borrar monedero"
#: views/copayers.html
msgid "Download Backup"
msgstr "Descargar Copia de Seguridad"
@ -193,10 +201,6 @@ msgstr "Descargar Copia de Seguridad"
msgid "Download File"
msgstr "Descargar Archivo"
#: views/copayers.html
msgid "Download seed backup"
msgstr "Descargar copia de seguridad"
#: views/send.html
msgid "Empty. Create an alias for your addresses"
msgstr "Vacío. Crea una etiqueta para tus direcciones"
@ -213,8 +217,8 @@ msgstr "Tasa"
msgid "Get QR code"
msgstr "Obtener código QR"
#: views/copayers.html views/create.html views/import.html views/join.html
#: views/more.html views/transactions.html
#: views/create.html views/import.html views/join.html views/more.html
#: views/transactions.html
msgid "Hide"
msgstr "Ocultar"
@ -243,12 +247,9 @@ msgid "Including fee of"
msgstr "Incluye tasa de"
#: views/settings.html
msgid "Insight API server"
msgstr "Servidor API Insight"
#: views/settings.html
#, fuzzy
msgid ""
"Insight API server is open-source software. You can run your own instance, "
"Insight API server is open-source software. You can run your own instances, "
"check <a href=\"http://insight.is\" target=\"_blank\">Insight API Homepage</"
"a>"
msgstr ""
@ -256,6 +257,11 @@ msgstr ""
"propia instancia en <a href=\"http://insight.is\" target=\"_blank\">Insight "
"API Homepage</a>"
#: views/settings.html
#, fuzzy
msgid "Insight API servers"
msgstr "Servidor API Insight"
#: views/send.html
msgid "Insufficient funds"
msgstr "Fondos insuficientes"
@ -316,16 +322,6 @@ msgstr "Nombre"
msgid "Network Error. Attempting to reconnect..."
msgstr "Error de Red. Intentando reconectar..."
#: views/settings.html
msgid ""
"Network has been fixed to <strong>{{networkName}}</strong> in this setup. "
"See <a href=\"https://copay.io\">copay.io</a> for options to use Copay on "
"both livenet and testnet."
msgstr ""
"La red fue fijada a <strong>{{networkName}}</strong> para esta "
"configuración. Ver <a href=\"https://copay.io\">copay.io</a> para más "
"opciones de uso de Copay en livenet y testnet."
#: views/copayers.html
msgid "New Wallet Created"
msgstr "Nuevo Monedero Creado"
@ -389,6 +385,10 @@ msgstr "Página no encontrada"
msgid "Password"
msgstr "Contraseña"
#: views/create.html views/join.html
msgid "Passwords must match"
msgstr "Las contraseñas deben coincidir"
#: views/join.html
msgid "Paste wallet secret here"
msgstr "Pegar código secreto del monedero aquí"
@ -398,8 +398,9 @@ msgid "Payment Expiration:"
msgstr "Vencimiento de Pago:"
#: views/more.html
#, fuzzy
msgid ""
"Pending Transactions Proposals will be discarted. This need to be done on "
"Pending Transactions Proposals will be discarted. This needs to be done on "
"<b>ALL<b> peers of a wallet, to prevent the old proposals to be resynced "
"again.\n"
" </b></b>"
@ -409,10 +410,6 @@ msgstr ""
"prevenir que viejas propuestas sean re sincronizadas de nuevo.\n"
" </b></b>"
#: views/settings.html
msgid "Port"
msgstr "Puerto"
#: views/uri-payment.html
msgid "Preparing payment..."
msgstr "Preparando pago..."
@ -457,11 +454,11 @@ msgstr "Rechazar"
msgid "Repeat password"
msgstr "Repite la contraseña"
#: views/create.html views/import.html views/join.html
#: views/import.html views/join.html
msgid "Required"
msgstr "Requerido"
#: views/settings.html
#: views/more.html views/settings.html
msgid "Save"
msgstr "Guardar"
@ -513,8 +510,8 @@ msgstr "Configuración"
msgid "Share this secret with your other copayers"
msgstr "Compartir el código secreto con tus otros compañeros"
#: views/copayers.html views/create.html views/import.html views/join.html
#: views/more.html views/transactions.html
#: views/create.html views/import.html views/join.html views/more.html
#: views/transactions.html
msgid "Show"
msgstr "Mostrar"
@ -530,6 +527,10 @@ msgstr "Ver menos"
msgid "Sign"
msgstr "Firmar"
#: views/copayers.html
msgid "Skip Backup"
msgstr "Saltear Copia de Seguridad"
#: views/import.html
msgid "Skip public keys from peers"
msgstr "Ignorar claves pública de los compañeros"
@ -559,8 +560,8 @@ msgstr ""
"sincronización de direcciones a los demás compañeros conectados."
#: views/send.html
msgid "To address"
msgstr "Dirección"
msgid "To:"
msgstr "Para:"
#: views/transactions.html
msgid "Total"
@ -582,10 +583,6 @@ msgstr "Propuestas de Transacción"
msgid "Transaction finally rejected"
msgstr "Transacción rechazada"
#: views/settings.html
msgid "Use SSL"
msgstr "Usar SSL"
#: views/send.html
msgid "Use all funds"
msgstr "Todos los fondos"
@ -622,7 +619,7 @@ msgstr "Código Secreto del Monedero"
msgid "Wallet Secret is not valid!"
msgstr "¡El código secreto no es válido!"
#: views/settings.html
#: views/more.html
msgid "Wallet Unit"
msgstr "Unidad del monedero"
@ -635,8 +632,9 @@ msgid "Warning!"
msgstr "¡Advertencia!"
#: views/create.html
msgid "Your Wallet Password"
msgstr "Contraseña de tu Monedero"
#, fuzzy
msgid "Your Password"
msgstr "Tu contraseña"
#: views/more.html
msgid ""
@ -662,8 +660,7 @@ msgstr "Tu contraseña"
msgid "Your wallet password"
msgstr "Contraseña de tu monedero"
#: views/copayers.html views/create.html views/import.html views/join.html
#: views/more.html
#: views/create.html views/import.html views/join.html views/more.html
msgid "advanced options"
msgstr "opciones avanzadas"
@ -676,7 +673,8 @@ msgid "first seen at"
msgstr "Visto el"
#: views/transactions.html
msgid "mined at"
#, fuzzy
msgid "mined"
msgstr "Minado el"
#: views/send.html
@ -719,6 +717,33 @@ msgstr "deben unirse"
msgid "{{tx.missingSignatures}} signatures missing"
msgstr "Faltan {{tx.missingSignatures}} firmas"
#~ msgid "Bitcoin Network"
#~ msgstr "Red Bitcoin"
#~ msgid "Delete wallet"
#~ msgstr "Borrar monedero"
#~ msgid "Download seed backup"
#~ msgstr "Descargar copia de seguridad"
#~ msgid ""
#~ "Network has been fixed to <strong>{{networkName}}</strong> in this setup. "
#~ "See <a href=\"https://copay.io\">copay.io</a> for options to use Copay on "
#~ "both livenet and testnet."
#~ msgstr ""
#~ "La red fue fijada a <strong>{{networkName}}</strong> para esta "
#~ "configuración. Ver <a href=\"https://copay.io\">copay.io</a> para más "
#~ "opciones de uso de Copay en livenet y testnet."
#~ msgid "Port"
#~ msgstr "Puerto"
#~ msgid "Use SSL"
#~ msgstr "Usar SSL"
#~ msgid "Your Wallet Password"
#~ msgstr "Contraseña de tu Monedero"
#~ msgid "Send"
#~ msgstr "Enviar"

View file

@ -24,17 +24,23 @@
<input id="Name" type="text" placeholder="{{'Name'|translate}}" class="form-control" ng-model="$parent.myNickname">
</div>
<div>
<label for="walletPassword"><span translate>Your Wallet Password</span>
<small translate data-options="disable_for_touch:true" class="has-tip text-gray" tooltip="doesn't need to be shared">Required</small>
<label for="walletPassword">
<span translate>Your Password</span>
</label>
<input id="walletPassword" type="password" placeholder="{{'Choose your password'|translate}}" class="form-control" ng-model="$parent.walletPassword" name="walletPassword" check-strength="passwordStrength" tooltip-html-unsafe="Password strength:
<input id="walletPassword" type="password" placeholder="{{'Choose a password'|translate}}" class="form-control" ng-model="$parent.walletPassword" name="walletPassword" check-strength="passwordStrength" tooltip-html-unsafe="Password strength:
<i>{{passwordStrength}}</i><br/><span
class='size-12'>Tip: Use lower and uppercase, numbers and
symbols</span>" tooltip-trigger="focus" required tooltip-placement="top">
<div class="pr">
<input type="password" placeholder="{{'Repeat password'|translate}}" name="walletPasswordConfirm" ng-model="walletPasswordConfirm" match="walletPassword" required>
<small class="icon-input" ng-show="setupForm.walletPasswordConfirm.$dirty && setupForm.$invalid"><i class="fi-x"></i></small>
<p class="m15b text-gray size-12" ng-show="setupForm.walletPasswordConfirm.$dirty && setupForm.$invalid">
<i class="fi-x m5r"></i>
{{'Passwords must match'|translate}}
</p>
</div>
<input type="password" placeholder="{{'Repeat password'|translate}}" name="walletPasswordConfirm" ng-model="walletPasswordConfirm" match="walletPassword" required>
<div class="text-left">
<div class="text-left line-sidebar-t">
<input id="network-name" type="checkbox" ng-model="networkName" ng-true-value="testnet" ng-false-value="livenet" class="form-control" ng-click="changeNetwork()" ng-checked="networkName == 'testnet' ? true : false">
<label for="network-name">Use test network</label>
</div>

View file

@ -22,9 +22,12 @@
</label>
<div class="row collapse">
<div class="large-10 medium-10 small-10 columns">
<div class="large-10 medium-10 small-10 columns pr">
<input id="connectionId" type="text" class="small-9 columns"
placeholder="{{'Paste wallet secret here'|translate}}" name="connectionId" ng-model="connectionId" wallet-secret required>
<small class="icon-input" ng-show="joinForm.connectionId.$invalid && !joinForm.connectionId.$pristine"><i class="fi-x"></i></small>
<small class="icon-input" ng-show="joinForm.connectionId.$valid
&& !joinForm.connectionId.$pristine"><i class="fi-check"></i></small>
</div>
<div class="small-2 columns" ng-hide="showScanner || disableScanner">
<a class="postfix button primary" ng-click="openScanner()"><i class="fi-camera">&nbsp;</i></a>
@ -64,12 +67,20 @@
numbers and symbols</span>" tooltip-trigger="focus"
tooltip-placement="top" required>
<input type="password"
placeholder="{{'Repeat password'|translate}}"
name="joinPasswordConfirm"
ng-model="joinPasswordConfirm"
match="joinPassword" required>
<a class="expand small left" ng-click="hideAdv=!hideAdv">
<div class="pr line-sidebar-b">
<input type="password"
placeholder="{{'Repeat password'|translate}}"
name="joinPasswordConfirm"
ng-model="joinPasswordConfirm"
match="joinPassword" required>
<small class="icon-input" ng-show="joinForm.joinPasswordConfirm.$dirty && joinForm.joinPasswordConfirm.$invalid"><i class="fi-x"></i></small>
<p class="m15b text-gray size-12" ng-show="joinForm.joinPasswordConfirm.$dirty && joinForm.joinPasswordConfirm.$invalid">
<i class="fi-x m5r"></i>
{{'Passwords must match'|translate}}
</p>
</div>
<a class="expand small" ng-click="hideAdv=!hideAdv">
<span translate ng-hide="!hideAdv">Show</span>
<span translate ng-hide="hideAdv">Hide</span>
<span translate>advanced options</span>