Merge pull request #3384 from gabrielbazan7/feat/resetToDefaultUrl

WIP : adding reset to default url button
This commit is contained in:
Gustavo Maximiliano Cortez 2015-11-03 11:35:54 -03:00
commit 0b86d1c238
2 changed files with 8 additions and 3 deletions

View file

@ -7,9 +7,10 @@
<div class="content preferences" ng-controller="preferencesBwsUrlController as prefBwsUrl">
<h4> </h4>
<h4></h4>
<form name="settingsBwsUrlForm" ng-submit="prefBwsUrl.save()" class="columns">
<label>Wallet Service URL</label>
<label class="left">Wallet Service URL</label>
<a class="right size-12" ng-click="prefBwsUrl.resetDefaultUrl()" translate> Set default url</a>
<input type="text" id="bwsurl" type="text" name="bwsurl" ng-model="prefBwsUrl.bwsurl">
<input type="submit" class="button expand black round" value="{{'Save'|translate}}"
ng-style="{'background-color':index.backgroundColor}">

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',
});
});
};
});
});