paypro: more cleaning up of form.

This commit is contained in:
Christopher Jeffrey 2014-08-01 20:00:14 -07:00 committed by Manuel Araoz
commit 4dd725aa48
2 changed files with 12 additions and 1 deletions

View file

@ -65,6 +65,10 @@ angular.module('copayApp.controllers').controller('SendController',
var txp = w.txProposals.txps[ntxid];
var merchantData = txp.merchant;
var amt = angular.element(document.querySelector('input#amount'));
var sendto = angular.element(document
.querySelector('div.send-note > p[ng-class]:first-of-type'));
var tamount = angular.element(document
.querySelector('div.send-note > p[ng-class]:nth-of-type(2)'));
var submit = angular.element(document.querySelector('button[type=submit]'));
var sendall = angular.element(document.querySelector('[title="Send all funds"]'));
if (w.isShared()) {
@ -81,6 +85,8 @@ angular.module('copayApp.controllers').controller('SendController',
$scope.loadTxs();
if (merchantData) {
amt.attr('disabled', false);
sendto.html(sendto.html().replace(/<br><b>Server:.*$/, ''));
tamount.html('');
submit.attr('disabled', true);
sendall.attr('class', sendall.attr('class').replace(' hidden', ''));
}
@ -103,6 +109,8 @@ angular.module('copayApp.controllers').controller('SendController',
$scope.loadTxs();
if (merchantData) {
amt.attr('disabled', false);
sendto.html(sendto.html().replace(/<br><b>Server:.*$/, ''));
tamount.html('');
submit.attr('disabled', true);
sendall.attr('class', sendall.attr('class').replace(' hidden', ''));
}