intro_step_view.js 1.14 KB
Newer Older
1 2 3 4 5
/**
 * View for the "intro step" of the payment/verification flow.
 */
var edx = edx || {};

6
(function($) {
7 8 9 10
    'use strict';

    edx.verify_student = edx.verify_student || {};

11 12
    edx.verify_student.IntroStepView = edx.verify_student.StepView.extend({

13
        templateName: 'intro_step',
14

15 16 17 18
        defaultContext: function() {
            return {
                introTitle: '',
                introMsg: '',
19
                isActive: false,
20
                hasPaid: false,
21 22
                platformName: '',
                requirements: {}
23 24 25
            };
        },

26 27 28 29 30 31 32
        // Currently, this view doesn't need to install any custom event handlers,
        // since the button in the template reloads the page with a
        // ?skip-intro=1 GET parameter.  The reason for this is that we
        // want to allow users to click "back" to see the requirements,
        // and if they reload the page we want them to stay on the
        // second step.
        postRender: function() {
33
            // Track a virtual pageview, for easy funnel reconstruction.
34
            window.analytics.page('verification', this.templateName);
35 36 37
        }

    });
Eric Fischer committed
38
}(jQuery));