       width: 90
     })
 
+    # Handle clicking on consumer state toggles
+    @$el.find('.integration-toggle').on 'toggle', (event, active) =>
+      target = $(event.currentTarget)
+      consumerName = target.data('consumer-name')
+      if active
+        @enabledMappings.push consumerName
+        console.log @enabledMappings
+      else
+        index = @enabledMappings.indexOf(consumerName)
+        if index != -1
+          @enabledMappings.splice(index, 1)
+
     @
 
   parametersByConsumer: ->

    @options = attrs
    @model = attrs.integration
    @options.parametersByConsumer = @parametersByConsumer()

  events:
    'click button#save': 'save'

      else
        console.log('missing')

    _(@$el.find('input.enabled')).each (enabled) ->
      enabled = $(enabled)
      console.log enabled.val()

    # enabled = $(".enabled:checked").map ->
    #   $(@).val()

    @model.signup parameters, @enabledMappings, error: @displayErrors
    $.modal.close()

  cancel: (event) ->
