mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
fix(auth): hacky fix to get around tabset hiding the surrounding
authctrl scope (due to isolate scope)
This commit is contained in:
@@ -33,12 +33,12 @@ angular.module('habitrpg')
|
||||
/*TODO highlight invalid inputs
|
||||
we have this as a workaround for https://github.com/HabitRPG/habitrpg-mobile/issues/64
|
||||
*/
|
||||
if ($scope.registrationForm.$invalid) {
|
||||
return;
|
||||
}
|
||||
var scope = angular.element(document.getElementById('registrationForm')).scope();
|
||||
if (scope.registrationForm.$invalid) return;
|
||||
|
||||
var url = ApiUrl.get() + "/api/v2/register";
|
||||
if($rootScope.selectedLanguage) url = url + '?lang=' + $rootScope.selectedLanguage.code;
|
||||
$http.post(url, $scope.registerVals).success(function(data, status, headers, config) {
|
||||
$http.post(url, scope.registerVals).success(function(data, status, headers, config) {
|
||||
runAuth(data.id, data.apiToken);
|
||||
}).error(errorAlert);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user