1 var template_unsubscribenewsletter = function( static )
5 this.construct = function()
7 $('body').removeClass("black");
8 $('body').removeClass("black");
9 App.Util.updateCheckboxStyles($('#frmUnsubLogin'));
10 $('#email').val(App.Util.getCookie('UserEmail', ''));
11 $('#frmUnsubLogin').validate({
26 submitHandler: function( form ) {
28 'login', 'User', 'Profile.Login', null,
32 "email" : $('#email').val(),
33 "pin" : $('#pin').val()
38 $('#login-fail').popover('hide');
39 _w.unsubUserId = response.Data.id;
41 'UnsubscribeUser:' + _w.unsubUserId, 'User', 'Profile.Unsubscribe', _w.unsubUserId,
42 {'id':_w.unsubUserId}, function()
44 var data = {Profile:{subscribeNewsletter:false}};
46 'UnsubscribeUser:' + _w.unsubUserId, data, {},
49 $('#unsubTitle').hide();
50 $('#theLoginBox').hide();
51 $('#unsubSuccessTitle').show();
53 'logout:', 'User', 'Profile.Logout', null,
54 {}, function() {}, function() {}
58 }, _w.taskContractError
61 $('#login-fail').attr('data-content', data.StatusReason);
62 $('#login-fail').popover('show');
65 }, _w.taskContractError
70 this.destruct = function()
72 //alert('Hi there, removing bindings, etc');