From d80c83409557b70cb22b51497fed4eaf0a0af87b Mon Sep 17 00:00:00 2001 From: Chris Dodge Date: Thu, 18 Oct 2012 21:27:45 -0400 Subject: [PATCH] catch when users empty out a section name. don't allow them to do that. --- cms/static/js/base.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cms/static/js/base.js b/cms/static/js/base.js index e87356d038..af90a3cf3a 100644 --- a/cms/static/js/base.js +++ b/cms/static/js/base.js @@ -610,6 +610,11 @@ function saveEditSectionName(e) { id = $(this).closest("section.courseware-section").data("id"); display_name = $(this).prev('.edit-section-name').val(); + if (display_name == '') { + alert("You must specify a name before saving.") + return; + } + var $_this = $(this); // call into server to commit the new order $.ajax({