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

View file

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

131
po/es.po
View file

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

View file

@ -24,17 +24,23 @@
<input id="Name" type="text" placeholder="{{'Name'|translate}}" class="form-control" ng-model="$parent.myNickname"> <input id="Name" type="text" placeholder="{{'Name'|translate}}" class="form-control" ng-model="$parent.myNickname">
</div> </div>
<div> <div>
<label for="walletPassword"><span translate>Your Wallet Password</span> <label for="walletPassword">
<small translate data-options="disable_for_touch:true" class="has-tip text-gray" tooltip="doesn't need to be shared">Required</small> <span translate>Your Password</span>
</label> </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 <i>{{passwordStrength}}</i><br/><span
class='size-12'>Tip: Use lower and uppercase, numbers and class='size-12'>Tip: Use lower and uppercase, numbers and
symbols</span>" tooltip-trigger="focus" required tooltip-placement="top"> 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 line-sidebar-t">
<div class="text-left">
<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"> <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> <label for="network-name">Use test network</label>
</div> </div>

View file

@ -22,9 +22,12 @@
</label> </label>
<div class="row collapse"> <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" <input id="connectionId" type="text" class="small-9 columns"
placeholder="{{'Paste wallet secret here'|translate}}" name="connectionId" ng-model="connectionId" wallet-secret required> 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>
<div class="small-2 columns" ng-hide="showScanner || disableScanner"> <div class="small-2 columns" ng-hide="showScanner || disableScanner">
<a class="postfix button primary" ng-click="openScanner()"><i class="fi-camera">&nbsp;</i></a> <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" numbers and symbols</span>" tooltip-trigger="focus"
tooltip-placement="top" required> tooltip-placement="top" required>
<input type="password" <div class="pr line-sidebar-b">
placeholder="{{'Repeat password'|translate}}" <input type="password"
name="joinPasswordConfirm" placeholder="{{'Repeat password'|translate}}"
ng-model="joinPasswordConfirm" name="joinPasswordConfirm"
match="joinPassword" required> ng-model="joinPasswordConfirm"
<a class="expand small left" ng-click="hideAdv=!hideAdv"> 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">Show</span>
<span translate ng-hide="hideAdv">Hide</span> <span translate ng-hide="hideAdv">Hide</span>
<span translate>advanced options</span> <span translate>advanced options</span>