       me.fetch cache: false
       @loadPrepaid(@ppc)
     @supermodel.addRequestResource('subscribe_prepaid', options, 0).load()
+
+  destroy: ->
+    super()
+    window.nextURL = null

Prepaid = require '../../models/Prepaid'
utils = require 'core/utils'
Products = require 'collections/Products'


module.exports = class PrepaidView extends RootView
  id: 'prepaid-view'

      @ppcInfo = []
      if model.get('type') is 'terminal_subscription'
        months = model.get('properties')?.months ? 0
        days = model.get('properties')?.days ? 0
        maxRedeemers = model.get('maxRedeemers') ? 0
        redeemers = model.get('redeemers') ? []
        unlocksLeft = maxRedeemers - redeemers.length
        duration = if months then "#{months} months" else "#{days} days"
        @ppcInfo.push "This prepaid code adds <strong>#{duration} of subscription</strong> to your account."
        @ppcInfo.push "It can be used <strong>#{unlocksLeft} more</strong> times."
        # TODO: user needs to know they can't apply it more than once to their account
      else
