send form
This commit is contained in:
parent
237a707719
commit
22a533377b
4 changed files with 259 additions and 228 deletions
|
|
@ -77,7 +77,7 @@
|
||||||
<span translate> <strong class="size-16">Network Error</strong>.<br> Attempting to reconnect..</span>
|
<span translate> <strong class="size-16">Network Error</strong>.<br> Attempting to reconnect..</span>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<div ng-controller="SidebarController" ng-show="$root.iden && !$root.hideNavigation">
|
<div ng-controller="SidebarController" ng-show="$root.iden && !$root.hideNavigation && !$root.wpInputFocused">
|
||||||
<nav class="tab-bar">
|
<nav class="tab-bar">
|
||||||
<section class="left-small">
|
<section class="left-small">
|
||||||
<a class="left-off-canvas-toggle menu-icon" ><span></span></a>
|
<a class="left-off-canvas-toggle menu-icon" ><span></span></a>
|
||||||
|
|
@ -98,8 +98,7 @@
|
||||||
<div ng-include="'views/includes/sidebar-mobile.html'"></div>
|
<div ng-include="'views/includes/sidebar-mobile.html'"></div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<div
|
<div ng-if="$root.iden"
|
||||||
ng-if="$root.iden"
|
|
||||||
ng-include="'views/includes/sidebar.html'"
|
ng-include="'views/includes/sidebar.html'"
|
||||||
role='navigation'
|
role='navigation'
|
||||||
class="sidebar"></div>
|
class="sidebar"></div>
|
||||||
|
|
@ -116,10 +115,10 @@
|
||||||
class="head show-for-large-up"
|
class="head show-for-large-up"
|
||||||
ng-include="'views/includes/head.html'"
|
ng-include="'views/includes/head.html'"
|
||||||
ng-if="$root.iden"
|
ng-if="$root.iden"
|
||||||
ng-class="{'dni':$root.hideNavigation}"
|
ng-class="{'dni':$root.hideNavigation || $root.wpInputFocused}"
|
||||||
></div>
|
></div>
|
||||||
|
|
||||||
<section ng-class="{'main':$root.iden && !$root.starting && !$root.hideNavigation}" ng-view></section>
|
<section ng-class="{'main':$root.iden && !$root.starting && !$root.hideNavigation && !$root.wpInputFocused}" ng-view></section>
|
||||||
|
|
||||||
<a class="exit-off-canvas"></a>
|
<a class="exit-off-canvas"></a>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,222 +1,224 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('CreateProfileController', function ($scope, $rootScope, $location, $timeout, $window, notification, pluginManager, identityService, pinService, isMobile, isCordova, configService, go) {
|
angular.module('copayApp.controllers').controller('CreateProfileController', function($scope, $rootScope, $location, $timeout, $window, notification, pluginManager, identityService, pinService, isMobile, isCordova, configService, go) {
|
||||||
|
|
||||||
var _credentials, _firstpin;
|
var _credentials, _firstpin;
|
||||||
|
|
||||||
$scope.init = function () {
|
$scope.init = function() {
|
||||||
|
|
||||||
if ($rootScope.wallet)
|
if ($rootScope.wallet)
|
||||||
go.walletHome();
|
go.walletHome();
|
||||||
|
|
||||||
$scope.isMobile = isMobile.any();
|
$scope.isMobile = isMobile.any();
|
||||||
$scope.isWindowsPhoneApp = isMobile.Windows() && isCordova;
|
$scope.isWindowsPhoneApp = isMobile.Windows() && isCordova;
|
||||||
|
$scope.hideForWP = 0;
|
||||||
|
|
||||||
|
|
||||||
|
$scope.createStep = 'storage';
|
||||||
|
$scope.useLocalstorage = false;
|
||||||
|
$scope.minPasswordStrength = _.isUndefined(config.minPasswordStrength) ?
|
||||||
|
4 : config.minPasswordStrength;
|
||||||
|
|
||||||
|
//TODO
|
||||||
|
$scope.minPasswordStrength = 1;
|
||||||
|
|
||||||
|
pinService.makePinInput($scope, 'newpin', function(newValue) {
|
||||||
|
_firstpin = newValue;
|
||||||
|
$scope.hideForWP = 0;
|
||||||
|
$scope.askForPin = 2;
|
||||||
|
$timeout(function() {
|
||||||
|
$scope.$digest();
|
||||||
|
}, 1);
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
pinService.makePinInput($scope, 'repeatpin', function(newValue) {
|
||||||
|
if (newValue === _firstpin) {
|
||||||
|
_firstpin = null;
|
||||||
|
$scope.createPin(newValue);
|
||||||
|
} else {
|
||||||
|
$scope.askForPin = 1;
|
||||||
$scope.hideForWP = 0;
|
$scope.hideForWP = 0;
|
||||||
|
$scope.passwordStrength = null;
|
||||||
|
|
||||||
|
_firstpin = null;
|
||||||
|
|
||||||
|
$scope.setPinForm.newpin.$setViewValue('');
|
||||||
|
$scope.setPinForm.newpin.$render();
|
||||||
|
$scope.setPinForm.repeatpin.$setViewValue('');
|
||||||
|
$scope.setPinForm.repeatpin.$render();
|
||||||
|
$scope.setPinForm.$setPristine();
|
||||||
|
|
||||||
|
$scope.error = 'Entered PINs were not equal. Try again';
|
||||||
|
$timeout(function() {
|
||||||
|
$scope.$digest();
|
||||||
|
}, 1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
$scope.formFocus = function() {
|
||||||
|
if (!$scope.isWindowsPhoneApp) return
|
||||||
|
$scope.hideForWP = true;
|
||||||
|
$timeout(function() {
|
||||||
|
$scope.$digest();
|
||||||
|
}, 1);
|
||||||
|
};
|
||||||
|
|
||||||
|
$scope.createPin = function(pin) {
|
||||||
|
preconditions.checkArgument(pin);
|
||||||
|
preconditions.checkState($rootScope.iden);
|
||||||
|
preconditions.checkState(_credentials && _credentials.email);
|
||||||
|
$rootScope.starting = true;
|
||||||
|
|
||||||
|
// hide Keyboard after submit form
|
||||||
|
$window.document.querySelector('#repeatpin').blur();
|
||||||
|
|
||||||
|
$timeout(function() {
|
||||||
|
pinService.save(pin, _credentials.email, _credentials.password, function(err) {
|
||||||
|
_credentials.password = '';
|
||||||
|
_credentials = null;
|
||||||
|
$scope.askForPin = 0;
|
||||||
|
$rootScope.hasPin = true;
|
||||||
|
$rootScope.starting = null;
|
||||||
|
$scope.createDefaultWallet();
|
||||||
|
});
|
||||||
|
}, 100);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
$scope.createStep = 'storage';
|
$scope.setStep = function(step) {
|
||||||
$scope.useLocalstorage = false;
|
$scope.error = null;
|
||||||
$scope.minPasswordStrength = _.isUndefined(config.minPasswordStrength) ?
|
$scope.createStep = step;
|
||||||
4 : config.minPasswordStrength;
|
$scope.hideForWP = false;
|
||||||
|
$timeout(function() {
|
||||||
|
$scope.$digest();
|
||||||
|
}, 1);
|
||||||
|
};
|
||||||
|
|
||||||
pinService.makePinInput($scope, 'newpin', function (newValue) {
|
$scope.selectStorage = function(storage) {
|
||||||
_firstpin = newValue;
|
$scope.useLocalstorage = storage == 'local';
|
||||||
$scope.hideForWP = 0;
|
$scope.hideForWP = false;
|
||||||
$scope.askForPin = 2;
|
$timeout(function() {
|
||||||
$timeout(function () {
|
$scope.$digest();
|
||||||
$scope.$digest();
|
}, 1);
|
||||||
}, 1);
|
};
|
||||||
|
|
||||||
|
$scope.goToEmail = function() {
|
||||||
|
$scope.createStep = 'email';
|
||||||
|
$scope.useEmail = !$scope.useLocalstorage;
|
||||||
|
};
|
||||||
|
|
||||||
});
|
$scope.setEmailOrUsername = function(form) {
|
||||||
|
$scope.userOrEmail = $scope.useLocalstorage ? form.username.$modelValue : form.email.$modelValue;
|
||||||
|
preconditions.checkState($scope.userOrEmail);
|
||||||
|
|
||||||
pinService.makePinInput($scope, 'repeatpin', function (newValue) {
|
$scope.error = null;
|
||||||
if (newValue === _firstpin) {
|
$scope.hideForWP = false;
|
||||||
_firstpin = null;
|
$scope.createStep = 'pass';
|
||||||
$scope.createPin(newValue);
|
$timeout(function() {
|
||||||
} else {
|
$scope.$digest();
|
||||||
$scope.askForPin = 1;
|
}, 1);
|
||||||
$scope.hideForWP = 0;
|
};
|
||||||
$scope.passwordStrength = null;
|
|
||||||
|
|
||||||
_firstpin = null;
|
/* Last step. Will emit after creation so the UX gets updated */
|
||||||
|
$scope.createDefaultWallet = function() {
|
||||||
|
$rootScope.hideNavigation = false;
|
||||||
|
identityService.createDefaultWallet(function(err) {
|
||||||
|
$scope.askForPin = 0;
|
||||||
|
|
||||||
$scope.setPinForm.newpin.$setViewValue('');
|
if (err) {
|
||||||
$scope.setPinForm.newpin.$render();
|
var msg = err.toString();
|
||||||
$scope.setPinForm.repeatpin.$setViewValue('');
|
$scope.error = msg;
|
||||||
$scope.setPinForm.repeatpin.$render();
|
} else {
|
||||||
$scope.setPinForm.$setPristine();
|
if (!$scope.useLocalstorage) {
|
||||||
|
$rootScope.pleaseConfirmEmail = true;
|
||||||
$scope.error = 'Entered PINs were not equal. Try again';
|
|
||||||
$timeout(function () {
|
|
||||||
$scope.$digest();
|
|
||||||
}, 1);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
$scope.formFocus = function () {
|
|
||||||
if ($scope.isWindowsPhoneApp) {
|
|
||||||
$scope.hideForWP = true;
|
|
||||||
$timeout(function () {
|
|
||||||
$scope.$digest();
|
|
||||||
}, 1);
|
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
$scope.createPin = function (pin) {
|
|
||||||
preconditions.checkArgument(pin);
|
|
||||||
preconditions.checkState($rootScope.iden);
|
|
||||||
preconditions.checkState(_credentials && _credentials.email);
|
|
||||||
$rootScope.starting = true;
|
|
||||||
|
|
||||||
// hide Keyboard after submit form
|
});
|
||||||
$window.document.querySelector('#repeatpin').blur();
|
};
|
||||||
|
|
||||||
$timeout(function () {
|
$scope._doCreateProfile = function(emailOrUsername, password, cb) {
|
||||||
pinService.save(pin, _credentials.email, _credentials.password, function (err) {
|
preconditions.checkArgument(_.isString(emailOrUsername));
|
||||||
_credentials.password = '';
|
preconditions.checkArgument(_.isString(password));
|
||||||
_credentials = null;
|
|
||||||
$scope.askForPin = 0;
|
|
||||||
$rootScope.hasPin = true;
|
|
||||||
$rootScope.starting = null;
|
|
||||||
$scope.createDefaultWallet();
|
|
||||||
});
|
|
||||||
}, 100);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
$rootScope.hideNavigation = false;
|
||||||
|
$rootScope.starting = true;
|
||||||
|
|
||||||
$scope.setStep = function (step) {
|
identityService.create(emailOrUsername, password, function(err) {
|
||||||
$scope.error = null;
|
$rootScope.starting = null;
|
||||||
$scope.createStep = step;
|
$scope.error = null;
|
||||||
$scope.hideForWP = false;
|
if (err) {
|
||||||
$timeout(function () {
|
var msg = err.toString();
|
||||||
$scope.$digest();
|
if (msg.indexOf('EEXIST') >= 0 || msg.indexOf('BADC') >= 0) {
|
||||||
}, 1);
|
msg = 'This profile already exists'
|
||||||
};
|
$scope.createStep = 'email';
|
||||||
|
|
||||||
$scope.selectStorage = function (storage) {
|
|
||||||
$scope.useLocalstorage = storage == 'local';
|
|
||||||
$scope.hideForWP = false;
|
|
||||||
$timeout(function () {
|
|
||||||
$scope.$digest();
|
|
||||||
}, 1);
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.goToEmail = function () {
|
|
||||||
$scope.createStep = 'email';
|
|
||||||
$scope.useEmail = !$scope.useLocalstorage;
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.setEmailOrUsername = function (form) {
|
|
||||||
$scope.userOrEmail = $scope.useLocalstorage ? form.username.$modelValue : form.email.$modelValue;
|
|
||||||
preconditions.checkState($scope.userOrEmail);
|
|
||||||
|
|
||||||
$scope.error = null;
|
|
||||||
$scope.hideForWP = false;
|
|
||||||
$scope.createStep = 'pass';
|
|
||||||
$timeout(function () {
|
|
||||||
$scope.$digest();
|
|
||||||
}, 1);
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Last step. Will emit after creation so the UX gets updated */
|
|
||||||
$scope.createDefaultWallet = function () {
|
|
||||||
$rootScope.hideNavigation = false;
|
|
||||||
identityService.createDefaultWallet(function (err) {
|
|
||||||
$scope.askForPin = 0;
|
|
||||||
|
|
||||||
if (err) {
|
|
||||||
var msg = err.toString();
|
|
||||||
$scope.error = msg;
|
|
||||||
} else {
|
|
||||||
if (!$scope.useLocalstorage) {
|
|
||||||
$rootScope.pleaseConfirmEmail = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope._doCreateProfile = function (emailOrUsername, password, cb) {
|
|
||||||
preconditions.checkArgument(_.isString(emailOrUsername));
|
|
||||||
preconditions.checkArgument(_.isString(password));
|
|
||||||
|
|
||||||
$rootScope.hideNavigation = false;
|
|
||||||
$rootScope.starting = true;
|
|
||||||
|
|
||||||
identityService.create(emailOrUsername, password, function (err) {
|
|
||||||
$rootScope.starting = null;
|
|
||||||
$scope.error = null;
|
|
||||||
if (err) {
|
|
||||||
var msg = err.toString();
|
|
||||||
if (msg.indexOf('EEXIST') >= 0 || msg.indexOf('BADC') >= 0) {
|
|
||||||
msg = 'This profile already exists'
|
|
||||||
$scope.createStep = 'email';
|
|
||||||
}
|
|
||||||
if (msg.indexOf('EMAILERROR') >= 0) {
|
|
||||||
msg = 'Could not send verification email. Please check your email address.';
|
|
||||||
$scope.createStep = 'email';
|
|
||||||
}
|
|
||||||
$scope.error = msg;
|
|
||||||
$scope.passwordStrength = null;
|
|
||||||
} else {
|
|
||||||
// mobile
|
|
||||||
if ($scope.isMobile) {
|
|
||||||
_credentials = {
|
|
||||||
email: emailOrUsername,
|
|
||||||
password: password,
|
|
||||||
};
|
|
||||||
$scope.askForPin = 1;
|
|
||||||
$scope.hideForWP = 0;
|
|
||||||
|
|
||||||
$rootScope.hideNavigation = true;
|
|
||||||
$timeout(function () {
|
|
||||||
$rootScope.$digest();
|
|
||||||
}, 1);
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
$scope.createDefaultWallet();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return cb();
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
$scope.saveSettings = function (cb) {
|
|
||||||
var plugins = config.plugins;
|
|
||||||
|
|
||||||
plugins.EncryptedLocalStorage = false;
|
|
||||||
plugins.EncryptedInsightStorage = false;
|
|
||||||
|
|
||||||
var pluginName = $scope.useLocalstorage ? 'EncryptedLocalStorage' : 'EncryptedInsightStorage';
|
|
||||||
plugins[pluginName] = true;
|
|
||||||
|
|
||||||
configService.set({
|
|
||||||
plugins: plugins
|
|
||||||
}, cb);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
$scope.createProfile = function (form) {
|
|
||||||
if (form && form.$invalid) {
|
|
||||||
$scope.error = 'Please enter the required fields';
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
if (msg.indexOf('EMAILERROR') >= 0) {
|
||||||
|
msg = 'Could not send verification email. Please check your email address.';
|
||||||
|
$scope.createStep = 'email';
|
||||||
|
}
|
||||||
|
$scope.error = msg;
|
||||||
|
$scope.passwordStrength = null;
|
||||||
|
} else {
|
||||||
|
// mobile
|
||||||
|
if ($scope.isMobile) {
|
||||||
|
_credentials = {
|
||||||
|
email: emailOrUsername,
|
||||||
|
password: password,
|
||||||
|
};
|
||||||
|
$scope.askForPin = 1;
|
||||||
|
$scope.hideForWP = 0;
|
||||||
|
|
||||||
$scope.saveSettings(function (err) {
|
$rootScope.hideNavigation = true;
|
||||||
preconditions.checkState(!err, err);
|
$timeout(function() {
|
||||||
|
$rootScope.$digest();
|
||||||
|
}, 1);
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
$scope.createDefaultWallet();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return cb();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
$scope._doCreateProfile($scope.userOrEmail, form.password.$modelValue, function (err) {
|
|
||||||
$timeout(function () {
|
$scope.saveSettings = function(cb) {
|
||||||
form.password.$setViewValue('');
|
var plugins = config.plugins;
|
||||||
form.password.$render();
|
|
||||||
form.repeatpassword.$setViewValue('');
|
plugins.EncryptedLocalStorage = false;
|
||||||
form.repeatpassword.$render();
|
plugins.EncryptedInsightStorage = false;
|
||||||
form.$setPristine();
|
|
||||||
}, 1);
|
var pluginName = $scope.useLocalstorage ? 'EncryptedLocalStorage' : 'EncryptedInsightStorage';
|
||||||
});
|
plugins[pluginName] = true;
|
||||||
});
|
|
||||||
};
|
configService.set({
|
||||||
|
plugins: plugins
|
||||||
|
}, cb);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
$scope.createProfile = function(form) {
|
||||||
|
if (form && form.$invalid) {
|
||||||
|
$scope.error = 'Please enter the required fields';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$scope.saveSettings(function(err) {
|
||||||
|
preconditions.checkState(!err, err);
|
||||||
|
|
||||||
|
$scope._doCreateProfile($scope.userOrEmail, form.password.$modelValue, function(err) {
|
||||||
|
$timeout(function() {
|
||||||
|
form.password.$setViewValue('');
|
||||||
|
form.password.$render();
|
||||||
|
form.repeatpassword.$setViewValue('');
|
||||||
|
form.repeatpassword.$render();
|
||||||
|
form.$setPristine();
|
||||||
|
}, 1);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,16 @@ angular.module('copayApp.controllers').controller('SendController',
|
||||||
|
|
||||||
preconditions.checkState(w.settings.unitToSatoshi);
|
preconditions.checkState(w.settings.unitToSatoshi);
|
||||||
|
|
||||||
|
$scope.isMobile = isMobile.any();
|
||||||
|
$scope.isWindowsPhoneApp = isMobile.Windows() && isCordova;
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
$scope.isWindowsPhoneApp = 1;
|
||||||
|
$rootScope.wpInputFocused = false;
|
||||||
|
|
||||||
$scope.isShared = w.isShared();
|
$scope.isShared = w.isShared();
|
||||||
$scope.requiresMultipleSignatures = w.requiresMultipleSignatures();
|
$scope.requiresMultipleSignatures = w.requiresMultipleSignatures();
|
||||||
$rootScope.title =$scope.requiresMultipleSignatures ? 'Send Proposal' : 'Send';
|
$rootScope.title = $scope.requiresMultipleSignatures ? 'Send Proposal' : 'Send';
|
||||||
$scope.loading = false;
|
$scope.loading = false;
|
||||||
$scope.error = $scope.success = null;
|
$scope.error = $scope.success = null;
|
||||||
|
|
||||||
|
|
@ -44,7 +51,30 @@ angular.module('copayApp.controllers').controller('SendController',
|
||||||
$scope.isRateAvailable = true;
|
$scope.isRateAvailable = true;
|
||||||
$scope.$digest();
|
$scope.$digest();
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
|
$scope.formFocus = function(what) {
|
||||||
|
if (!$scope.isWindowsPhoneApp) return
|
||||||
|
|
||||||
|
if (!what) {
|
||||||
|
$rootScope.wpInputFocused = false;
|
||||||
|
$scope.hideAddress = false;
|
||||||
|
$scope.hideAmount = false;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$rootScope.wpInputFocused = true;
|
||||||
|
if (what == 'amount') {
|
||||||
|
$scope.hideAddress = true;
|
||||||
|
} else if (what == 'msg') {
|
||||||
|
$scope.hideAddress = true;
|
||||||
|
$scope.hideAmount = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
$timeout(function() {
|
||||||
|
$rootScope.$digest();
|
||||||
|
}, 1);
|
||||||
|
};
|
||||||
|
|
||||||
$scope.setInputs = function() {
|
$scope.setInputs = function() {
|
||||||
var w = $rootScope.wallet;
|
var w = $rootScope.wallet;
|
||||||
|
|
@ -291,7 +321,7 @@ angular.module('copayApp.controllers').controller('SendController',
|
||||||
window.ignoreMobilePause = true;
|
window.ignoreMobilePause = true;
|
||||||
cordova.plugins.barcodeScanner.scan(
|
cordova.plugins.barcodeScanner.scan(
|
||||||
function onSuccess(result) {
|
function onSuccess(result) {
|
||||||
$timeout(function(){
|
$timeout(function() {
|
||||||
window.ignoreMobilePause = false;
|
window.ignoreMobilePause = false;
|
||||||
}, 100);
|
}, 100);
|
||||||
if (result.cancelled) return;
|
if (result.cancelled) return;
|
||||||
|
|
@ -305,7 +335,7 @@ angular.module('copayApp.controllers').controller('SendController',
|
||||||
}, 1000);
|
}, 1000);
|
||||||
},
|
},
|
||||||
function onError(error) {
|
function onError(error) {
|
||||||
$timeout(function(){
|
$timeout(function() {
|
||||||
window.ignoreMobilePause = false;
|
window.ignoreMobilePause = false;
|
||||||
}, 100);
|
}, 100);
|
||||||
alert('Scanning error');
|
alert('Scanning error');
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="send" ng-controller="SendController" ng-init="init()">
|
<div class="send" ng-controller="SendController" ng-init="init()">
|
||||||
|
|
||||||
<div class="row hide-for-large-up" >
|
<div class="row hide-for-large-up" ng-hide="$root.wpInputFocused" >
|
||||||
<div class="large-10 medium-10 small-9 columns">
|
<div class="large-10 medium-10 small-9 columns">
|
||||||
<h1>{{$root.title}}</h1>
|
<h1>{{$root.title}}</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
<div class="large-8 large-centered columns">
|
<div class="large-8 large-centered columns">
|
||||||
<form name="sendForm" ng-submit="submitForm(sendForm)" novalidate>
|
<form name="sendForm" ng-submit="submitForm(sendForm)" novalidate>
|
||||||
<div class="panel">
|
<div class="panel">
|
||||||
<div class="box-notification" ng-show="error">
|
<div class="box-notification" ng-show="error && !hideForWP ">
|
||||||
<div class="box-icon error">
|
<div class="box-icon error">
|
||||||
<i class="fi-x size-24"></i>
|
<i class="fi-x size-24"></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -52,10 +52,10 @@
|
||||||
<a class="close-notification text-success" ng-click="success=null">×</a>
|
<a class="close-notification text-success" ng-click="success=null">×</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ng-if="!_merchantData">
|
<div ng-if="!_merchantData" ng-hide="hideAddress">
|
||||||
<div class="row collapse">
|
<div class="row collapse">
|
||||||
|
|
||||||
<label for="address" class="left">
|
<label for="address" class="left" >
|
||||||
<span translate>To</span>
|
<span translate>To</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
|
|
@ -73,13 +73,13 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="input">
|
<div class="input">
|
||||||
<input type="text" id="address" name="address" ng-disabled="loading || lockAddress" placeholder="{{'Bitcoin address'|translate}}" ng-model="_address" valid-address required>
|
<input type="text" id="address" name="address" ng-disabled="loading || lockAddress" placeholder="{{'Bitcoin address'|translate}}" ng-model="_address" valid-address required ng-focus="formFocus('address')" ng-blur="formFocus(false)">
|
||||||
<a class="postfix" ng-click="openAddressBook()"><i class="fi-address-book size-24"></i></a>
|
<a class="postfix" ng-click="openAddressBook()"><i class="fi-address-book size-24"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<div id="scanner" class="row" ng-if="showScanner" ng-include="'views/includes/scanner.html'">
|
<div id="scanner" class="row" ng-if="showScanner" ng-include="'views/includes/scanner.html'">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div ng-show="_merchantData">
|
<div ng-show="_merchantData && !hideAddress">
|
||||||
<div class="row collapse" ng-click="openPPModal(_merchantData)">
|
<div class="row collapse" ng-click="openPPModal(_merchantData)">
|
||||||
|
|
||||||
<label for="domain">
|
<label for="domain">
|
||||||
|
|
@ -93,7 +93,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row" ng-init="showAlternative = false">
|
<div class="row" ng-init="showAlternative = false" ng-hide="hideAmount">
|
||||||
<div class="large-12 medium-12 columns">
|
<div class="large-12 medium-12 columns">
|
||||||
<div class="m5b right" ng-hide="sendForm.amount.$pristine">
|
<div class="m5b right" ng-hide="sendForm.amount.$pristine">
|
||||||
<span translate class="has-error right size-12" ng-show="sendForm.amount.$invalid">
|
<span translate class="has-error right size-12" ng-show="sendForm.amount.$invalid">
|
||||||
|
|
@ -110,7 +110,7 @@
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<div class="input">
|
<div class="input">
|
||||||
<input type="number" id="amount" ng-disabled="loading || lockAmount" name="amount" placeholder="{{'Amount'|translate}}" ng-minlength="0.00000001" ng-maxlength="10000000000" ng-model="_amount" valid-amount required autocomplete="off">
|
<input type="number" id="amount" ng-disabled="loading || lockAmount" name="amount" placeholder="{{'Amount'|translate}}" ng-minlength="0.00000001" ng-maxlength="10000000000" ng-model="_amount" valid-amount required autocomplete="off" ng-focus="formFocus('amount')" ng-blur="formFocus(false)">
|
||||||
<a class="postfix" ng-click="showAlternative = true">{{$root.wallet.settings.unitName}}</a>
|
<a class="postfix" ng-click="showAlternative = true">{{$root.wallet.settings.unitName}}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -118,7 +118,7 @@
|
||||||
<label for="alternative"><span translate>Amount in</span> {{ alternativeName }}
|
<label for="alternative"><span translate>Amount in</span> {{ alternativeName }}
|
||||||
</label>
|
</label>
|
||||||
<div class="input">
|
<div class="input">
|
||||||
<input type="number" id="alternative" ng-disabled="loading || !isRateAvailable || lockAmount" name="alternative" placeholder="{{'Amount'|translate}}" ng-model="_alternative" requiredautocomplete="off">
|
<input type="number" id="alternative" ng-disabled="loading || !isRateAvailable || lockAmount" name="alternative" placeholder="{{'Amount'|translate}}" ng-model="_alternative" requiredautocomplete="off" ng-focus="formFocus('amount')" ng-blur="formFocus(false)">
|
||||||
<a class="postfix" ng-click="showAlternative = false"> {{ alternativeName }}</a>
|
<a class="postfix" ng-click="showAlternative = false"> {{ alternativeName }}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -131,8 +131,8 @@
|
||||||
<small translate class="has-error" ng-show="sendForm.comment.$invalid && !sendForm.comment.$pristine">too long!</small>
|
<small translate class="has-error" ng-show="sendForm.comment.$invalid && !sendForm.comment.$pristine">too long!</small>
|
||||||
</label>
|
</label>
|
||||||
<div class="input">
|
<div class="input">
|
||||||
<textarea id="comment" ng-disabled="loading" name="comment" ng-if="isShared" placeholder="Leave a private message to your copayers" ng-maxlength="100" ng-model="_comment"></textarea>
|
<textarea id="comment" ng-disabled="loading" name="comment" ng-if="isShared" placeholder="Leave a private message to your copayers" ng-maxlength="100" ng-model="_comment" ng-focus="formFocus('msg')" ng-blur="formFocus(false)"></textarea>
|
||||||
<textarea id="comment" ng-disabled="loading" name="comment" ng-if="!isShared" placeholder="Add a private comment to identify the transaction" ng-maxlength="100" ng-model="_comment"></textarea>
|
<textarea id="comment" ng-disabled="loading" name="comment" ng-if="!isShared" placeholder="Add a private comment to identify the transaction" ng-maxlength="100" ng-model="_comment" ng-focus="formFocus('msg')" ng-blur="formFocus(false)"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue