From 95afea9006266ea25fa457592a951caa23a746ed Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Thu, 20 Aug 2015 17:09:11 -0700 Subject: [PATCH] Remove enterprise registration form (imported from commit 58914685752bff3c9d0e56ffe21bd3cd367e70e7) --- .../zilencer/enterprise-registration.html | 66 ------------------- zilencer/urls/pages.py | 4 -- zilencer/views.py | 23 ------- 3 files changed, 93 deletions(-) delete mode 100644 templates/zilencer/enterprise-registration.html diff --git a/templates/zilencer/enterprise-registration.html b/templates/zilencer/enterprise-registration.html deleted file mode 100644 index 2e80ef1241..0000000000 --- a/templates/zilencer/enterprise-registration.html +++ /dev/null @@ -1,66 +0,0 @@ -{% extends "zerver/portico_signup.html" %} - -{% block portico_content %} - -

Zulip Enterprise Edition

- -

Number of Seats: 200

-

Subscription Fees: USD $0

-

Expiration Date: April 30, 2014

-
-
- -
-{% csrf_token %} -
- -
- - {% if form.full_name.errors %} - {% for error in form.full_name.errors %} -
{{ error }}
- {% endfor %} - {% endif %} -
-
- -
- -
- - {% if form.company.errors %} - {% for error in form.company.errors %} -
{{ error }}
- {% endfor %} - {% endif %} -
-
- -
-
- - {% if form.terms.errors %} - {% for error in form.terms.errors %} -
{{ error }}
- {% endfor %} - {% endif %} -
-
-
-
-
- -
-
-
- -{% endblock %} diff --git a/zilencer/urls/pages.py b/zilencer/urls/pages.py index 3ffb110e57..5b1eff4d7e 100644 --- a/zilencer/urls/pages.py +++ b/zilencer/urls/pages.py @@ -6,8 +6,4 @@ urlpatterns = patterns('zilencer.views', # and then redirects the user to the proper deployment # SSO-login page url(r'^accounts/deployment_dispatch$', 'account_deployment_dispatch', {'template_name': 'zerver/login.html'}), - - # Enterprise terms registration, which redirects to a password-protected - # software download page. - url(r'^enterprise-registration/$', 'enterprise_registration'), ) diff --git a/zilencer/views.py b/zilencer/views.py index 23bb9fe894..c3f236ad98 100644 --- a/zilencer/views.py +++ b/zilencer/views.py @@ -2,8 +2,6 @@ from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from django.contrib.auth.views import login as django_login_page from django.http import HttpResponseRedirect -from django.shortcuts import render_to_response, redirect -from django.template import RequestContext, loader from zerver.decorator import has_request_variables, REQ from zerver.lib.actions import internal_send_message @@ -13,9 +11,7 @@ from zerver.lib.rest import rest_dispatch as _rest_dispatch from zerver.lib.validator import check_dict from zerver.models import get_realm, get_user_profile_by_email, resolve_email_to_domain, \ UserProfile -from zilencer.forms import EnterpriseToSForm from error_notify import notify_server_error, notify_browser_error -from django.core.mail import send_mail from django.conf import settings import time @@ -122,22 +118,3 @@ def account_deployment_dispatch(request, **kwargs): template_response.context_data['desktop_sso_dispatch'] = True template_response.context_data['desktop_sso_unknown_email'] = sso_unknown_email return template_response - -def enterprise_registration(request): - if request.method == "POST": - form = EnterpriseToSForm(request.POST) - if form.is_valid(): - company = form.cleaned_data["company"] - name = form.cleaned_data["full_name"] - subject = "Enterprise terms acceptance for " + company - body = loader.render_to_string( - "zilencer/enterprise_tos_accept_body.txt", - {"name": name, "company": company}) - send_mail(subject, body, settings.EMAIL_HOST_USER, - ["support@zulip.com"]) - return redirect("https://zulip.com/enterprise/download") - else: - form = EnterpriseToSForm() - return render_to_response( - "zilencer/enterprise-registration.html", {"form": form}, - context_instance=RequestContext(request))