div.dashboard_bubble.round#provider-change-plan
  - app = provider.bought_cinstance
  - plans = app.available_application_plans

  p #{provider.name} is currently on plan <b>#{ app.plan.name  }</b> with these settings:

  table.list
    - provider.available_switches.each do |switch|
      tr
        td
          b => t(:name, scope: [:switches, switch.name])

          - if (description = t(:internal, scope: [:switches, switch.name], default: '').presence)
            | (#{description})

        td
          => switch.status.capitalize
          - if switch.denied?
            = fancy_button_to 'enable', master_provider_switch_path(provider, switch.name), method: :put, data: { confirm: 'Really?', disable_with: true }

  = form_tag edit_master_provider_plan_path(provider), :method => :get, :remote => true, :class => 'colorbox', 'data-width' => '600px' do
    = select_tag :plan_id, options_from_collection_for_select(plans, :id, :name), required: true, include_blank: true
    = submit_tag 'Change'
