The $scope.is_registering is used to enable/disable the Register btn
and was not being set back to false, when the user chose to cancel
using an existing WS name, and exiting the modal.
To test
-------
1. Register a workstation.
2. Switch to a different computer or Chrome profile.
3. Try to register the same workstation name. Warning dialog will pop
up.
4. Click cancel.
5. See that the register button is now disabled and no actions on the
form seem to reactivate it.
6. Apply the patch and repeat steps 2-4. This time, the register button
should be active.
Signed-off by: Cesar Velez <cesar.velez@equinoxinitiative.org>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Ben Shum <ben@evergreener.net>
service.register_ws_api(
base_name, name, org_id, true, deferred)
},
- cancel : function() {deferred.reject()}
+ cancel : function() {
+ deferred.reject();
+ }
}
);
return $scope.set_default_ws(new_ws.name);
}
$scope.newWSName = '';
+ }, function(err) {
+ $scope.is_registering = false;
});
}
}])