From ac36c0146f51713d584faaa4a81b5a4a14462a96 Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Wed, 2 Dec 2015 14:19:46 -0800 Subject: [PATCH] Quick fix for StudentLoginModal error when username or password is not included --- app/views/courses/StudentLogInModal.coffee | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/views/courses/StudentLogInModal.coffee b/app/views/courses/StudentLogInModal.coffee index 6f1fa85f4..cad9e3a57 100644 --- a/app/views/courses/StudentLogInModal.coffee +++ b/app/views/courses/StudentLogInModal.coffee @@ -26,6 +26,10 @@ module.exports = class StudentSignInModal extends ModalView auth.loginUser data, (jqxhr) => error = jqxhr.responseJSON[0] message = _.filter([error.property, error.message]).join(' ') + if message is 'Missing credentials' + message = 'Enter both username and password' + # TODO: Make the server return better error message + message = _.string.capitalize(message) @disableModalInProgress(@$el) @$('#errors-alert').text(message).removeClass('hide')