Splits creating personal and multisign wallets
This commit is contained in:
parent
58cc46de60
commit
ce0a7584b3
2 changed files with 21 additions and 8 deletions
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
|
||||
|
||||
<div class="content p20v" ng-controller="createController as create">
|
||||
<div class="content p20v" ng-controller="createController as create" ng-init="create.setTotalCopayers(1)">
|
||||
|
||||
<div class="onGoingProcess" ng-show="create.loading">
|
||||
<div class="onGoingProcess-content" ng-style="{'background-color':'#222'}">
|
||||
|
|
@ -21,6 +21,16 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row m20b">
|
||||
<a href
|
||||
class="small-6 medium-6 large-6 columns text-center"
|
||||
ng-class="{'text-gray': totalCopayers == 1}"
|
||||
ng-click="create.setTotalCopayers(1)">Personal</a>
|
||||
<a href
|
||||
class="small-6 medium-6 large-6 columns text-center"
|
||||
ng-class="{'text-gray': totalCopayers != 1}"
|
||||
ng-click="create.setTotalCopayers(3)">Multisignature</a>
|
||||
</div>
|
||||
|
||||
<form name="setupForm" ng-submit="create.create(setupForm)" novalidate>
|
||||
<div class="row">
|
||||
|
|
@ -47,10 +57,12 @@
|
|||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row" ng-show="totalCopayers != 1">
|
||||
<div class="large-6 medium-6 columns">
|
||||
<label><span translate>Select total number of copayers</span>
|
||||
<select class="m10t" ng-model="totalCopayers" ng-options="totalCopayers as totalCopayers for totalCopayers in create.TCValues">
|
||||
<select class="m10t" ng-model="totalCopayers"
|
||||
ng-options="totalCopayers as totalCopayers for totalCopayers in create.TCValues"
|
||||
ng-change="create.setTotalCopayers(totalCopayers)">
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -29,18 +29,19 @@ angular.module('copayApp.controllers').controller('createController',
|
|||
}
|
||||
|
||||
var updateRCSelect = function(n) {
|
||||
$scope.totalCopayers = n;
|
||||
var maxReq = COPAYER_PAIR_LIMITS[n];
|
||||
self.RCValues = lodash.range(1, maxReq + 1);
|
||||
$scope.requiredCopayers = Math.min(parseInt(n / 2 + 1), maxReq);
|
||||
};
|
||||
|
||||
$scope.$watch('totalCopayers', function(tc) {
|
||||
updateRCSelect(tc);
|
||||
});
|
||||
|
||||
this.TCValues = lodash.range(1, defaults.limits.totalCopayers + 1);
|
||||
this.TCValues = lodash.range(2, defaults.limits.totalCopayers + 1);
|
||||
$scope.totalCopayers = defaults.wallet.totalCopayers;
|
||||
|
||||
this.setTotalCopayers = function(tc) {
|
||||
updateRCSelect(tc);
|
||||
};
|
||||
|
||||
this.create = function(form) {
|
||||
if (form && form.$invalid) {
|
||||
this.error = gettext('Please enter the required fields');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue