diff --git a/media/js/src/application.js b/media/js/src/application.js index 08a9ae7..88ada6d 100644 --- a/media/js/src/application.js +++ b/media/js/src/application.js @@ -23,6 +23,14 @@ jQuery(function($) { var pre = $pres.eq(i); pre.width(pre.parents('section.code').width() - 30); }); + + $('form#cancel-team-subscription').submit(function() { + if (confirm('Are you sure you want to cancel your subscription?\n\nYou will no longer be able to create new Snipts under this team. This action is effective immediately and we unfortunately cannot issue any refunds.')) { + return true; + } else { + return false; + } + }); }); // Angular app init. diff --git a/media/js/src/team.js b/media/js/src/team.js index 3348575..988b7f1 100644 --- a/media/js/src/team.js +++ b/media/js/src/team.js @@ -23,6 +23,7 @@ if (typeof angular !== 'undefined') { // Controllers. controllers.TeamController = function($scope, $timeout, TeamStorage) { $scope.users = []; + $scope.search = ''; $scope.$watch('search', function(val) { $timeout.cancel($scope.timeout); diff --git a/snipts/templates/snipts/list.html b/snipts/templates/snipts/list.html index 8687133..259a240 100644 --- a/snipts/templates/snipts/list.html +++ b/snipts/templates/snipts/list.html @@ -12,6 +12,11 @@ {% endblock %} {% block content %} + {% if 'team-cancelled' in request.GET %} +