Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 57cc949

Browse files
committed
updates
1 parent ca79698 commit 57cc949

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

src/css/challenge-detail-software.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -734,11 +734,11 @@ h1.center {
734734
}
735735

736736
.challenge-detail .unregister {
737-
background: #e66 !important;
737+
background: #cef8c6 !important;
738738
}
739739

740740
.challenge-detail .unregister:hover {
741-
background: #d66 !important;
741+
background: #cef8c6 !important;
742742
}
743743

744744
.challenge-detail .btnAction:hover {
@@ -759,11 +759,11 @@ h1.center {
759759
}
760760

761761
.challenge-detail.develop .unregister {
762-
background: #e66 !important;
762+
background: #cef8c6 !important;
763763
}
764764

765765
.challenge-detail.develop .unregister:hover {
766-
background: #d66 !important;
766+
background: #cef8c6 !important;
767767
}
768768

769769
.challenge-detail .btnAction.disabled {

src/js/app/challenge-details/js/controllers/challenge-details-controller.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,11 +331,16 @@
331331
if (regList.indexOf(handle) == -1) {
332332
vm.isRegistered = false;
333333
}
334+
335+
var hasSubmitted = false;
336+
if (submissionMap.indexOf(handle) >= 0) {
337+
hasSubmitted = true;
338+
}
334339

335340
// If the challenge is active and in the registration phase we allow either
336341
// registration, or unregistration.
337342
if (((moment(challenge.phases[0].scheduledStartTime)) < moment() && (moment(challenge.registrationEndDate)) > moment()) && challenge.currentStatus == 'Active') {
338-
if (vm.isRegistered) {
343+
if (vm.isRegistered && !hasSubmitted) {
339344
vm.challenge.allowToUnregister = true;
340345
} else {
341346
vm.challenge.registrationDisabled = false;

0 commit comments

Comments
 (0)