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

Commit 8fdbc81

Browse files
author
vikasrohit
committed
AS#152122905738669, File upload confirmation page: change copy
-- Changed copies. -- Implemented all points except >>Also, please make sure this page can't somehow revert to an error state, which happened when the submission failed.<<
1 parent f48b606 commit 8fdbc81

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

app/submissions/submit-design-files/submit-design-files.controller.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import _ from 'lodash'
1010

1111
function SubmitDesignFilesController($scope, $window, $stateParams, logger, UserService, SubmissionsService, challengeToSubmitTo) {
1212
if (!challengeToSubmitTo.challenge) { return }
13+
var challengeTitle = challengeToSubmitTo.challenge.name
1314

1415
var vm = this
1516
vm.urlRegEx = new RegExp(/^(http(s?):\/\/)?(www\.)?[a-zA-Z0-9\.\-\_]+(\.[a-zA-Z]{2,3})+(\/[a-zA-Z0-9\_\-\s\.\/\?\%\#\&\=]*)?$/)
@@ -36,6 +37,7 @@ import _ from 'lodash'
3637
stockArts: [],
3738
hasAgreedToTerms: false
3839
}
40+
vm.progressTitle = ''
3941

4042
var userId = parseInt(UserService.getUserIdentity().userId)
4143

@@ -114,6 +116,8 @@ import _ from 'lodash'
114116
vm.errorInUpload = false
115117
vm.uploadProgress = 0
116118
vm.showProgress = true
119+
vm.progressTitle = 'Uploading submission for "' + challengeTitle + '"'
120+
vm.uploadProgressMessage = 'Hey, your work is AWESOME! Please don’t close the window while the upload is in progress, or you’ll lose all files!'
117121
vm.preparing = true
118122
vm.finishing = false
119123
vm.finished = false
@@ -178,6 +182,8 @@ import _ from 'lodash'
178182
vm.preparing = false
179183
vm.finishing = false
180184
vm.finished = true
185+
vm.progressTitle = 'Submission completed for "' + challengeTitle + '"'
186+
vm.uploadProgressMessage = 'Thanks for participating! We\'ve received your submission and will send you an email shortly to confirm and explain what happens next.'
181187
}
182188
} else {
183189
// assume it to be error condition

app/submissions/submit-design-files/submit-design-files.jade

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,12 @@
161161
modal.transition(show="vm.showProgress", background-click-close="false", style="background-color:white;")
162162
.upload-progress(ng-class="{'upload-progress--error': vm.errorInUpload}")
163163
.upload-progress__title
164-
p Uploading submission for "{{submissions.challengeTitle}}"
164+
p {{ vm.progressTitle }}
165165

166166
img.upload-progress__image(src=require("../../../assets/images/skills/id-180.svg"), ng-hide="vm.errorInUpload")
167167
img.upload-progress__image--error(src=require("../../../assets/images/robot-embarresed.svg"), ng-show="vm.errorInUpload")
168168

169-
p.upload-progress__message(ng-hide="vm.errorInUpload") Hey, your work is AWESOME! Please don’t close the window while the upload is in progress, or you’ll lose all files!
169+
p.upload-progress__message(ng-hide="vm.errorInUpload") {{ vm.uploadProgressMessage}}
170170

171171
p.upload-progress__message--error(ng-show="vm.errorInUpload") Oh, that’s embarrassing! One of the files couldn’t be uploaded, I’m so sorry.
172172

@@ -177,7 +177,6 @@ modal.transition(show="vm.showProgress", background-click-close="false", style="
177177
p Finishing...
178178

179179
.upload-progress__finished(ng-show="vm.finished && !vm.errorInUpload")
180-
p Finished!
181180

182181
.upload-progess__links
183182
a.tc-btn.tc-btn-s(ng-href="https://www.{{DOMAIN}}/challenge-details/{{submissions.challengeId}}/?type={{submissions.track}}") Back to the challenge

assets/css/submissions/submit-file.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ modal {
158158
line-height: 19px;
159159
color: $accent-gray;
160160
margin-top: 40px;
161+
padding: 0px 40px;
162+
text-align: center;
161163
}
162164

163165
.upload-progress__progress-bar {

0 commit comments

Comments
 (0)