add advanced options to join

This commit is contained in:
Matias Alejo Garcia 2014-08-21 11:56:02 -04:00
parent db1b7d7c45
commit 60d81e6b9f
2 changed files with 19 additions and 11 deletions

View File

@ -1,7 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('JoinController',
function($scope, $rootScope, $timeout, $location, walletFactory, controllerUtils, Passphrase, notification) {
function($scope, $rootScope, $timeout, walletFactory, controllerUtils, Passphrase, notification) {
controllerUtils.redirIfLogged();
$rootScope.fromSetup = false;
$scope.loading = false;
@ -15,10 +15,7 @@ angular.module('copayApp.controllers').controller('JoinController',
var context;
var localMediaStream;
var s = ($location.search()).advanced;
if (s) {
$scope.enterPrivate = true;
}
$scope.hideAdv=true;

View File

@ -67,17 +67,28 @@
name="joinPasswordConfirm"
ng-model="joinPasswordConfirm"
match="joinPassword" required>
<input type="text"
placeholder="Private Key (Hex)"
name="private"
ng-model="$parent.private"
ng-if="enterPrivate">
<a class="expand small" ng-click="hideAdv=!hideAdv">
<span ng-hide="!hideAdv">Show</span>
<span ng-hide="hideAdv">Hide</span>
advanced options
</a>
<div ng-hide="hideAdv">
<p>
<input type="text"
placeholder="Private Key (Hex)"
name="private"
ng-model="$parent.private"
>
</div>
<div class="text-right">
<a href="#!/" class="back-button text-primary m20r">&laquo; Back</a>
<button type="submit" class="button primary m0" ng-disabled="joinForm.$invalid || loading" loading="Joining">Join</button>
</div>
</form>
</div>
</div>