Clean up the JS code that duplicates a form on add datecourse