adding reset to default url button

This commit is contained in:
Gabriel Bazán 2015-11-03 09:59:30 -03:00
parent e715f2ecd3
commit 86fce3af42
2 changed files with 6 additions and 1 deletions

View File

@ -11,6 +11,7 @@
<form name="settingsBwsUrlForm" ng-submit="prefBwsUrl.save()" class="columns">
<label>Wallet Service URL</label>
<input type="text" id="bwsurl" type="text" name="bwsurl" ng-model="prefBwsUrl.bwsurl">
<input class="button expand black round" ng-click="prefBwsUrl.resetDefaultUrl()" value="reset to default url" translate>
<input type="submit" class="button expand black round" value="{{'Save'|translate}}"
ng-style="{'background-color':index.backgroundColor}">
</form>

View File

@ -12,6 +12,10 @@ angular.module('copayApp.controllers').controller('preferencesBwsUrlController',
this.bwsurl = (config.bwsFor && config.bwsFor[walletId]) || defaults.bws.url;
this.resetDefaultUrl = function() {
this.bwsurl = 'https://bws.bitpay.com/bws/api';
};
this.save = function() {
var bws;
@ -46,4 +50,4 @@ angular.module('copayApp.controllers').controller('preferencesBwsUrlController',
});
});
};
});
});