diff --git a/cms/static/js/base.js b/cms/static/js/base.js
index 787cd2f524..a07ba7702f 100644
--- a/cms/static/js/base.js
+++ b/cms/static/js/base.js
@@ -80,11 +80,17 @@ $(document).ready(function() {
});
function showImportSubmit(e) {
- $('.file-name').html($(this).val())
- $('.file-name-block').show();
- $('.import .choose-file-button').hide();
- $('.submit-button').show();
- $('.progress').show();
+ var filepath = $(this).val();
+ if(filepath.substr(filepath.length - 6, 6) == 'tar.gz') {
+ $('.error-block').hide();
+ $('.file-name').html($(this).val());
+ $('.file-name-block').show();
+ $('.import .choose-file-button').hide();
+ $('.submit-button').show();
+ $('.progress').show();
+ } else {
+ $('.error-block').html('File format not supported. Please upload a file with a tar.gz extension.').show();
+ }
}
function syncReleaseDate(e) {
diff --git a/cms/static/sass/_import.scss b/cms/static/sass/_import.scss
index ac1044788f..a0a1f5e512 100644
--- a/cms/static/sass/_import.scss
+++ b/cms/static/sass/_import.scss
@@ -11,11 +11,14 @@
margin-right: 3%;
font-size: 14px;
- h3 {
- margin-bottom: 20px;
- font-size: 18px;
+ h2 {
+ font-weight: 700;
+ font-size: 19px;
+ margin-bottom: 20px;
+ }
+
+ strong {
font-weight: 700;
- color: $error-red;
}
p + p {
@@ -39,12 +42,17 @@
font-weight: 300;
}
- .file-name-block {
+ .file-name-block,
+ .error-block {
display: none;
margin-bottom: 15px;
font-size: 13px;
}
+ .error-block {
+ color: $error-red;
+ }
+
.choose-file-button {
@include blue-button;
padding: 10px 50px 11px;
diff --git a/cms/static/sass/base-style.scss b/cms/static/sass/base-style.scss
index 0824cc380d..6a6105c109 100644
--- a/cms/static/sass/base-style.scss
+++ b/cms/static/sass/base-style.scss
@@ -5,6 +5,7 @@
@import 'reset';
@import 'mixins';
+@import "fonts";
@import "variables";
@import "cms_mixins";
@import "base";
diff --git a/cms/templates/import.html b/cms/templates/import.html
index ffce24ed74..84e136fef9 100644
--- a/cms/templates/import.html
+++ b/cms/templates/import.html
@@ -11,15 +11,17 @@
Import
-
Importing a new course will delete all course content currently associated with your course
- and replace it with the contents of the uploaded file.
+
+
Importing a new course will delete all content currently associated with your course
+ and replace it with the contents of the uploaded file.
File uploads must be zip files containing, at a minimum, a course.xml file.
Please note that if your course has any problems with auto-generated url_name nodes,
re-importing your course could cause the loss of student data associated with those problems.