(function($) {


    /**
     * setup JQuery's AJAX methods to setup CSRF token in the request before sending it off.
     * http://stackoverflow.com/questions/5100539/django-csrf-check-failing-with-an-ajax-post-request
     */

    
    // Document READY
    $(function() {

        $("#cs_plan_attributes-group").hide();
        
        $("#id_provider").change(function() {
            console.log(this.value);
            if (this.value == 1){
                $("#cs_plan_attributes-group").show();
            }else{
                $("#cs_plan_attributes-group").hide();
            }
        });
    });

})(django.jQuery);
@@ -324,25 +324,61 @@
         
-%0A
+if ($(%22#id_provider%22).val() == 1)%7B%0A  
         
 $(%22#id_p
@@ -373,82 +373,175 @@
     
+  
 $(%22#
-id_provider%22).change(function() %7B%0A            console.log(this.value);
+cs_plan_attributes-group%22).show();%0A        %7Delse%7B%0A            $(%22#cs_plan_attributes-group%22).hide();%0A        %7D%0A    %0A        $(%22#id_provider%22).change(function() %7B
 %0A   

Fix javascript bug