     if not @state.invalid
       id = @props.activeTab.id
       PeriodActions.save(@props.courseId, id, period: {name: @state.period_name})
-      @refs.overlay.hide()
+      @close()
 
   renderForm: ->
     formClasses = ['modal-body', 'teacher-edit-period-form']


    <BS.Modal
      {...@props}
      title={title}
      className='teacher-edit-period-modal'>

      <div className={formClasses.join(' ')}>
        <RenamePeriodField

    </BS.Modal>

  render: ->
    <span>
      <BS.Button onClick={@open} bsStyle='link' className='edit-period'>
        <i className='fa fa-pencil' />
        Rename <CourseGroupingLabel courseId={@props.courseId}/>
      </BS.Button>
      {@renderForm()}
    </span>
