Skip to content

Commit

Permalink
Merge pull request #233 from appsembler/bugfix/batch-enrollment-reason
Browse files Browse the repository at this point in the history
Check for presence of batchEnroll.reason_field
  • Loading branch information
bryanlandia authored Mar 15, 2023
2 parents 5b8cc2e + ddfada1 commit d573783
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lms/static/js/instructor_dashboard/membership.js
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ such that the value can be defined later than this assignment (file load order).
this.$request_response_error = this.$container.find('.request-response-error');
this.$enrollment_button.click(function(event) {
var sendData;
if (!batchEnroll.$reason_field.val()) {
if (batchEnroll.$reason_field.length && !batchEnroll.$reason_field.val()) {
batchEnroll.fail_with_error(gettext('Reason field should not be left blank.'));
return false;
}
Expand Down

0 comments on commit d573783

Please sign in to comment.