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

Commit e22414b

Browse files
author
Nick Litwin
committed
Form
1 parent bf78ec1 commit e22414b

File tree

4 files changed

+9
-14
lines changed

4 files changed

+9
-14
lines changed

app/submissions/submissions.controller.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
activate();
1212

13-
function activate() {
14-
vm.testValue = 'testValue';
15-
}
13+
function activate() {}
1614
}
1715
})();

app/submissions/submissions.spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,5 @@ describe('Submissions Controller', function() {
1919

2020
it('should exist', function() {
2121
expect(vm).to.exist;
22-
expect(vm.testValue).to.equal('testValue');
2322
});
2423
});

app/submissions/submit-file/submit-file.controller.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@
4141

4242
activate();
4343

44-
function activate() {
45-
46-
}
44+
function activate() {}
4745

4846
function setFileReference(file, fieldId) {
4947
var fileObject = {
@@ -63,7 +61,7 @@
6361
fileObject.mediaType = file.type;
6462
}
6563

66-
// If user picks a new file, replace the fileObject with the new one
64+
// If user picks a new file, replace the that file's fileObject with a new one
6765
// Or add it the list if it's not there
6866
if (vm.submissionsBody.data.files.length) {
6967
vm.submissionsBody.data.files.some(function(file, i, filesArray) {

app/submissions/submit-file/submit-file.jade

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66

77
a Learn more about formatting your submission file
88

9-
a.tc-btn.tc-btn-s Back to Challenge Details
9+
a.tc-btn.tc-btn-s(ng-click="'TODO: go back to challenge details'") Back to Challenge Details
1010

1111
.panel-body
12-
.form-blocks
12+
form.form-blocks(name="vm.submissionForm", role="form", ng-submit="vm.submissionForm.$valid && vm.uploadSubmission()", novalidate)
1313
.form-block.flex.wrap
1414
.form-block__instructions
1515
.form-block__title Files
1616

1717
.form-block__text
1818
p Please follow the instructions on the Challenge Details page regarding what your submission, source, and preview files should contain.
1919

20-
p Do not name any of your files "declaration.txt" as this is added by our system.
20+
p Do not name any of your files "declaration.txt", as this is added by our system.
2121

2222
p Please be sure to double-check that you have submitted the correct files and that your JPG files (if applicable) are in RGB color mode.
2323

@@ -114,8 +114,8 @@
114114
p Submitting your files means you hereby agree to the #[a(href="https://www.{{DOMAIN}}/community/how-it-works/terms/", target="_blank") Topcoder terms of use] and to the extent your uploaded file wins a Topcoder Competition, you hereby assign, grant, and transfer to Topcoder all rights in and title to the Winning Submission (as further described in the terms of use).
115115

116116
.checkbox.flex.center
117-
input(type="checkbox", ng-model="vm.hasAgreedToTerms")
117+
input(type="checkbox", ng-model="vm.hasAgreedToTerms", id="agree-to-terms", required)
118118

119-
label I understand and agree
119+
label(for="agree-to-terms") I understand and agree
120120

121-
button.tc-btn.tc-btn-secondary(ng-click="vm.uploadSubmission()") Submit
121+
button.tc-btn.tc-btn-secondary(type="submit", ng-disabled="vm.submissionForm.$invalid") Submit

0 commit comments

Comments
 (0)