Always use correct format Node IDs in GUI

This commit is contained in:
Jakob Borg
2014-07-24 13:23:17 +02:00
parent b676264fca
commit f762bd5e25
3 changed files with 62 additions and 3 deletions

View File

@@ -413,7 +413,6 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http, $translate, $loca
$('#editNode').modal('hide');
nodeCfg = $scope.currentNode;
nodeCfg.NodeID = nodeCfg.NodeID.replace(/ /g, '').replace(/-/g, '').toLowerCase().trim();
nodeCfg.Addresses = nodeCfg.AddressesStr.split(',').map(function (x) { return x.trim(); });
done = false;
@@ -866,6 +865,7 @@ syncthing.directive('validNodeid', function($http) {
if (resp.error) {
ctrl.$setValidity('validNodeid', false);
} else {
scope.currentNode.NodeID = resp.id;
ctrl.$setValidity('validNodeid', true);
}
});