 BS = require 'react-bootstrap'
 _ = require 'underscore'
 {CourseStore, CourseActions} = require '../../flux/course'
+AsyncButton = require '../buttons/async-button'
 {TutorInput} = require '../tutor-input'
 classnames = require 'classnames'
 

  performUpdate: ->
    unless @state.invalid
      CourseActions.save(@props.courseId, course: {name: @state.course_name})
      @refs.overlay.hide()

  renderForm: ->
    formClasses = classnames 'modal-body', 'teacher-edit-course-form', 'is-invalid-form': @state?.invalid

      </div>

      <div className='modal-footer'>
        <AsyncButton
          className='-edit-course-confirm'
          onClick={@performUpdate}
          isWaiting={CourseStore.isSaving(@props.courseId)}
          waitingText="Saving..."
          disabled={disabled}>
        Rename
        </AsyncButton>
      </div>
    </BS.Modal>

