mirror of https://github.com/zulip/zulip.git
Remove enterprise registration form
(imported from commit 58914685752bff3c9d0e56ffe21bd3cd367e70e7)
This commit is contained in:
parent
bded0d9d54
commit
95afea9006
|
@ -1,66 +0,0 @@
|
|||
{% extends "zerver/portico_signup.html" %}
|
||||
|
||||
{% block portico_content %}
|
||||
|
||||
<h2>Zulip Enterprise Edition</h2>
|
||||
|
||||
<p>Number of Seats: 200</p>
|
||||
<p>Subscription Fees: USD $0</p>
|
||||
<p>Expiration Date: April 30, 2014</p>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<form method="post" class="form-horizontal" id="registration"
|
||||
action="{% url 'zilencer.views.enterprise_registration' %}">
|
||||
{% csrf_token %}
|
||||
<div class="control-group">
|
||||
<label for="id_full_name" class="control-label">Name</label>
|
||||
<div class="controls">
|
||||
<input id="id_full_name" class="required" type="text" name="full_name"
|
||||
value="{% if form.full_name.value %}{{ form.full_name.value }}{% elif full_name %}{{ full_name }}{% endif %}"
|
||||
maxlength="100" />
|
||||
{% if form.full_name.errors %}
|
||||
{% for error in form.full_name.errors %}
|
||||
<div class="alert alert-error">{{ error }}</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label for="id_company" class="control-label">Company</label>
|
||||
<div class="controls">
|
||||
<input id="id_company" class="required" type="text" name="company"
|
||||
value="{% if form.company.value %}{{ form.company.value }}{% elif company %}{{ company }}{% endif %}"
|
||||
maxlength="100" />
|
||||
{% if form.company.errors %}
|
||||
{% for error in form.company.errors %}
|
||||
<div class="alert alert-error">{{ error }}</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input id="id_terms" class="required" type="checkbox" name="terms"
|
||||
{% if form.terms.value %}checked="checked"{% endif %} />
|
||||
I agree to the <a href="/terms-enterprise" target="_blank">Zulip Enterprise License Agreement</a>.
|
||||
</label>
|
||||
{% if form.terms.errors %}
|
||||
{% for error in form.terms.errors %}
|
||||
<div class="alert alert-error">{{ error }}</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<input type="submit" class="btn btn-large btn-primary" value="Download Zulip Enterprise Edition" /><br />
|
||||
<input type="hidden" name="next" value="{{ next }}" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
|
@ -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'),
|
||||
)
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue