diff --git a/frontend/src/css/modules/submission.scss b/frontend/src/css/modules/submission.scss index 957800cc48..a6384156c5 100644 --- a/frontend/src/css/modules/submission.scss +++ b/frontend/src/css/modules/submission.scss @@ -117,3 +117,8 @@ md-radio-button .md-on { flex-direction: row; align-items: center; } + +.btn-custom { + padding: 0 1rem; + font-size: 0.8rem; +} diff --git a/frontend/src/js/controllers/challengeCtrl.js b/frontend/src/js/controllers/challengeCtrl.js index 6a02c36c0c..3a035519aa 100644 --- a/frontend/src/js/controllers/challengeCtrl.js +++ b/frontend/src/js/controllers/challengeCtrl.js @@ -3025,8 +3025,11 @@ var status = response.status; if (status === 200) { $rootScope.notify("success", "You have successfully deregistered from the challenge."); + $mdDialog.hide(); $state.go('web.challenge-main.challenge-page.overview'); + setTimeout(function() { $state.reload(); + }, 100); } }, onError: function(response) { diff --git a/frontend/src/js/route-config/route-config.js b/frontend/src/js/route-config/route-config.js index 5f7b07729f..66dec96c83 100644 --- a/frontend/src/js/route-config/route-config.js +++ b/frontend/src/js/route-config/route-config.js @@ -239,7 +239,28 @@ url: "/submission", templateUrl: baseUrl + "/web/challenge/submission.html", title: 'Submit', - authenticate: true + authenticate: true, + resolve: { + challenge: function(utilities, $state, $stateParams) { + return new Promise(function(resolve) { + var parameters = {}; + parameters.token = utilities.getData('userKey'); + parameters.url = 'challenges/' + $stateParams.challengeId + '/participant_team/team_detail'; + parameters.method = 'GET'; + parameters.data = {}; + parameters.callback = { + onSuccess: function(response) { + var details = response.data; + resolve(details); + }, + onError: function() { + $state.go('error-404'); + } + }; + utilities.sendRequest(parameters); + }); + } + }, }; var my_submission = { diff --git a/frontend/src/views/web/challenge/edit-challenge/edit-challenge-deregister.html b/frontend/src/views/web/challenge/edit-challenge/edit-challenge-deregister.html index d599b88b98..017b9cbb8c 100644 --- a/frontend/src/views/web/challenge/edit-challenge/edit-challenge-deregister.html +++ b/frontend/src/views/web/challenge/edit-challenge/edit-challenge-deregister.html @@ -5,7 +5,7 @@