Display better error when invalid class code is entered

This commit is contained in:
phoenixeliot 2016-07-07 15:32:07 -07:00
parent cad067fa8c
commit 5e6c9709f9

View file

@ -160,7 +160,7 @@ module.exports = class CoursesView extends RootView
if jqxhr.status is 422
@errorMessage = 'Please enter a code.'
else if jqxhr.status is 404
@errorMessage = 'Code not found.'
@errorMessage = 'No class exists with this Class Code. Check your spelling or ask your teacher for help.'
else
@errorMessage = "#{jqxhr.responseText}"
@renderSelectors '#join-class-form'