     $('#to_time_minute').val(event.end.getMinutes())
     $('#template_slot_recurring').val(event.recurring || 0)
 
+  successHandler: (event, data)->
+    $('#template_form').html('')
+    $('#template_form').html('<p class="success">Saved Successfully</p>')
+    event = FormHandler.setEvent event, data
+    unless event.isNew # refresh events if update
+      templateSlotCalendar.fullCalendar 'rerenderEvents' 
+    else
+      event.isNew = false
+      templateSlotCalendar.fullCalendar "renderEvent",
+        title: data.id.toString()
+        start: event.start
+        recurring: data.recurring
+        end: event.end
+        id: data.id
+        allDay: false
+      , true # make the event "stick"
+    $('#template_form').css('display', 'block')
+    event
+
   showForm: (event)->
       $('#template_form').html(templateSlotForm)
-      FormHandler.setFormInputsValues(event)
+      FormHandler.setFormFieldsValue(event)
 
       $('#template_form form').on 'submit', (e) ->
         e.preventDefault()

    event.end.setHours(data.to_time.split(':')[0])
    event.end.setMinutes(data.to_time.split(':')[1])
    event.recurring = data.recurring
    event

  displayErros: (errors)->

    selectHelper: true

    select: (start, end, allDay) ->
      FormHandler.showForm( {start: start, end: end, isNew: true} )
      
    editable: true

