diff --git a/static/js/compose.js b/static/js/compose.js index da7b1bb573..79e50d4515 100644 --- a/static/js/compose.js +++ b/static/js/compose.js @@ -333,7 +333,9 @@ function compose_error(error_text, bad_input) { $('#error-msg').html(error_text); $("#compose-send-button").removeAttr('disabled'); $("#sending-indicator").hide(); - bad_input.focus().select(); + if (bad_input !== undefined) { + bad_input.focus().select(); + } } var send_options; @@ -649,6 +651,11 @@ exports.validate = function () { return false; } + if ($("#zephyr-mirror-error").is(":visible")) { + compose_error("You need to link with Webathena before you can send messages!"); + return false; + } + if (exports.composing() === 'private') { return validate_private_message(); } else {