snapshot of https://github.com/zulip/zulip.git @ 48c69911c7dd4e03b20552eb3bd77ad8151c1357 (2026-09-15)
Some checks failed
Code scanning / CodeQL (push) Failing after 15s
Zulip production suite / Ubuntu 22.04 production build (push) Failing after 26s
Zulip production suite / Debian 12 production install with custom db name and user (push) Has been skipped
Zulip production suite / Ubuntu 22.04 production install and PostgreSQL upgrade with pgroonga (push) Has been skipped
Zulip production suite / Ubuntu 24.04 production install (push) Has been skipped
Zulip production suite / Ubuntu 26.04 production install (push) Has been skipped
Zulip production suite / Debian 13 production install (push) Has been skipped
Zulip production suite / 7.0 Version Upgrade (push) Has been skipped
Zulip production suite / 8.0 Version Upgrade (push) Has been skipped
Zulip production suite / 6.0 Version Upgrade (push) Has been skipped
Zulip production suite / 10.0 Version Upgrade (push) Has been skipped
Zulip production suite / 9.0 Version Upgrade (push) Has been skipped
Zulip production suite / 12.0 Version Upgrade (push) Has been skipped
Zulip production suite / 11.0 Version Upgrade (push) Has been skipped
GitHub Actions Security Analysis with zizmor / zizmor (push) Failing after 3s
Zulip CI / Debian 12 (Python 3.11, backend + documentation) (push) Failing after 26s
Zulip CI / Ubuntu 22.04 (Python 3.10, backend + frontend) (push) Failing after 3s
Zulip CI / Ubuntu 24.04 (Python 3.12, backend) (push) Failing after 25s
Zulip CI / Ubuntu 26.04 (Python 3.14, backend) (push) Failing after 25s
Zulip CI / Debian 13 (Python 3.13, backend) (push) Failing after 28s
Zulip production suite / Required jobs (push) Has been cancelled
Zulip CI / Required jobs (push) Has been cancelled
API Documentation Update Check / check-feature-level-updated (push) Has been cancelled
API Documentation Update Check / notify-if-api-docs-changed (push) Has been cancelled

This commit is contained in:
upstream-mirror
2026-09-15 15:05:30 +05:00
commit 64898b2c79
8999 changed files with 1757358 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
<b>Organization type</b>: {{ get_org_type_display_name(realm.org_type) }}<br />
<b>Plan type</b>: {{ get_plan_type_name(realm.plan_type) }}<br />
<b>Non-guest user count</b>: {{ user_data.non_guest_user_count }}<br />
<b>Guest user count</b>: {{ user_data.guest_user_count }}<br />

View File

@@ -0,0 +1,38 @@
<div class="current-plan-information">
<p class="support-section-header">
{% if plan_data.stripe_customer_url %}
<a target="_blank" rel="noopener noreferrer" href="{{ plan_data.stripe_customer_url }}"><i class="fa fa-credit-card"></i></a>
{% else %}
<i class="fa fa-credit-card"></i>
{% endif %}
Current plan information:
</p>
{% if plan_data.warning %}
<div class="current-plan-data-missing">
<b>{{ plan_data.warning }}</b><br />
</div>
{% endif %}
<b>Plan name</b>: {{ plan_data.current_plan.name }}<br />
<b>Status</b>: {{ plan_data.current_plan.get_plan_status_as_text() }}<br />
{% if plan_data.current_plan.tier == plan_data.current_plan.TIER_SELF_HOSTED_COMMUNITY %}
<!-- Any data below doesn't makes sense for sponsored organizations. -->
{% else %}
{% if plan_data.current_plan.discount %}
<b>Discount</b>: {{ plan_data.current_plan.discount }}%<br />
{% endif %}
{% if plan_data.is_complimentary_access_plan %}
<b>End date</b>: {{ plan_data.current_plan.end_date.strftime('%d %B %Y') }}<br />
{% else %}
<b>Licenses</b>: {{ plan_data.licenses_used }}/{{ plan_data.licenses }} ({% if plan_data.current_plan.automanage_licenses %}Automatic{% else %}Manual{% endif %})<br />
<b>Billing schedule</b>: {% if plan_data.current_plan.billing_schedule == plan_data.current_plan.BILLING_SCHEDULE_ANNUAL %}Annual{% else %}Monthly{% endif %}<br />
{% if plan_data.current_plan.price_per_license %}
<b>Price per license</b>: ${{ dollar_amount(plan_data.current_plan.price_per_license) }}<br />
{% elif plan_data.current_plan.fixed_price %}
<b>Plan type</b>: Fixed price<br />
{% endif %}
<b>Annual recurring revenue</b>: ${{ dollar_amount(plan_data.annual_recurring_revenue) }}<br />
<b>Start of next billing cycle</b>: {{ plan_data.next_billing_cycle_start.strftime('%d %B %Y') }}<br />
{% endif %}
<a target="_blank" rel="noopener noreferrer" href="/activity/plan_ledger/{{ plan_data.current_plan.id }}/">License ledger entries</a><br />
{% endif %}
</div>

View File

@@ -0,0 +1,37 @@
<form method="POST" class="support-form">
<b>Billing collection method</b><br />
{{ csrf_input }}
<input type="hidden" name="{{ remote_type }}" value="{{ remote_id }}" />
<select name="billing_modality" class="billing-modality-select" required>
<option value="charge_automatically" {% if current_plan.charge_automatically %}selected{% endif %}>Charge automatically</option>
<option value="send_invoice" {% if not current_plan.charge_automatically %}selected{% endif %}>Pay by invoice</option>
</select>
<button type="submit" class="support-submit-button">Update</button>
</form>
{% if current_plan.status == current_plan.ACTIVE %}
<form method="POST" class="support-form">
<b>Plan end date</b><br />
{{ csrf_input }}
<input type="hidden" name="{{ remote_type }}" value="{{ remote_id }}" />
<input type="date" name="plan_end_date" {% if current_plan.end_date %}
value="{{ current_plan.end_date.date().isoformat() }}" {% endif %} required />
<button type="submit" class="support-submit-button">Update</button>
</form>
{% endif %}
<form method="POST" class="support-form">
<b>Modify current plan</b><br />
{{ csrf_input }}
<input type="hidden" name="{{ remote_type }}" value="{{ remote_id }}" />
<select name="modify_plan" class="modify-plan-method-select" required>
<option disabled value="" selected>-- select --</option>
<option value="downgrade_at_billing_cycle_end">Downgrade at the end of current billing cycle</option>
<option value="downgrade_now_without_additional_licenses">Downgrade now without creating additional invoices</option>
<option value="downgrade_now_void_open_invoices">Downgrade now and void open invoices</option>
{% if not remote_support_view and not current_plan.fixed_price %}
<option value="upgrade_plan_tier">Upgrade to the Plus plan</option>
{% endif %}
</select>
<button type="submit" class="support-submit-button">Modify</button>
</form>

View File

@@ -0,0 +1,26 @@
<div class="deactivation-information">
{% if remote_support_view %}
<p class="support-section-header">♻️ Reactivate server:</p>
{% else %}
<p class="support-section-header">❌ Scrub realm:</p>
{% endif %}
{% if deactivation_data %}
<b>Deactivation audit log data:</b><br />
<ul>
<li><b>Event time (UTC)</b>: {{ format_optional_datetime(deactivation_data.event_time, True) }}</li>
{% if deactivation_data.acting_user %}
<li><b>Acting user</b>: {{ deactivation_data.acting_user.delivery_email}} (ID: {{ deactivation_data.acting_user.id }})</li>
{% else %}
<li><b>Acting user</b>: Not in audit log data</li>
{% endif %}
{% if deactivation_data.billing_user %}
<li><b>Billing user</b>: {{ deactivation_data.billing_user.email}} (ID: {{ deactivation_data.billing_user.id }})</li>
{% endif %}
{% if deactivation_data.reason %}
<li><b>Deactivation reason</b>: {{ deactivation_data.reason }}</li>
{% else %}
<li><b>Deactivation reason</b>: Not in audit log data</li>
{% endif %}
</ul>
{% endif %}
</div>

View File

@@ -0,0 +1,109 @@
{% extends "zerver/portico_signup.html" %}
{% set PAGE_TITLE = "Request a demo | Zulip" %}
{% block portico_content %}
<div class="register-account flex full-page">
<div class="center-block new-style">
<div class="pitch">
<h1>Request a demo</h1>
</div>
<form method="post" class="white-box" id="registration">
{{ csrf_input }}
<fieldset class="support-request">
<div class="input-box support-form-field">
<label for="request_demo_form_full_name" class="inline-block label-title">Full name</label>
<input id="request_demo_form_full_name" class="required" type="text" name="full_name" maxlength="{{ MAX_INPUT_LENGTH }}" value="{{ form.full_name.value() or '' }}" required />
{% for error in form.full_name.errors %}
<p class="help-inline text-error">{{ error }}</p>
{% endfor %}
</div>
<div class="input-box support-form-field">
<label for="request_demo_form_email" class="inline-block label-title">Email</label>
<input id="request_demo_form_email" class="required" type="email" name="email" value="{{ form.email.value() or '' }}" required />
{% for error in form.email.errors %}
<p class="help-inline text-error">{{ error }}</p>
{% endfor %}
</div>
<div class="input-box support-form-field">
<label for="request_demo_form_role" class="inline-block label-title">Your role</label>
<input id="request_demo_form_role" class="required" type="text" name="role" maxlength="{{ MAX_INPUT_LENGTH }}" value="{{ form.role.value() or '' }}" required />
{% for error in form.role.errors %}
<p class="help-inline text-error">{{ error }}</p>
{% endfor %}
</div>
<div class="input-box support-form-field">
<label for="request_demo_form_organization_name" class="inline-block label-title">Organization name</label>
<input id="request_demo_form_organization_name" class="required" type="text" name="organization_name" maxlength="{{ MAX_INPUT_LENGTH }}" value="{{ form.organization_name.value() or '' }}" required />
{% for error in form.organization_name.errors %}
<p class="help-inline text-error">{{ error }}</p>
{% endfor %}
</div>
<div class="input-box support-form-field">
<label for="request_demo_form_organization_type" class="inline-block label-title">Organization type</label>
<select id="request_demo_form_organization_type" name="organization_type" class="required">
{% for org_type in SORTED_ORG_TYPE_NAMES %}
<option
value="{{ org_type }}"
{% if form.organization_type.value() == org_type %}selected{% endif %}>
{{ org_type }}
</option>
{% endfor %}
</select>
{% for error in form.organization_type.errors %}
<p class="help-inline text-error">{{ error }}</p>
{% endfor %}
</div>
<div class="input-box support-form-field">
<label for="request_demo_form_organization_website" class="inline-block label-title">Organization website</label>
<input id="request_demo_form_organization_website" class="required" type="url" name="organization_website" value="{{ form.organization_website.value() or '' }}" required />
{% for error in form.organization_website.errors %}
<p class="help-inline text-error">{{ error }}</p>
{% endfor %}
</div>
<div class="input-box support-form-field">
<label for="request_demo_form_expected_user_count" class="inline-block label-title">Expected number of users (approximate range)</label>
<input id="request_demo_form_expected_user_count" class="required" type="text" name="expected_user_count" maxlength="{{ MAX_INPUT_LENGTH }}" value="{{ form.expected_user_count.value() or '' }}" required />
{% for error in form.expected_user_count.errors %}
<p class="help-inline text-error">{{ error }}</p>
{% endfor %}
</div>
<div class="input-box support-form-field">
<label for="request_demo_form_type_of_hosting" class="inline-block label-title">Are you interested in Zulip Cloud (SaaS) or self-hosting Zulip?</label>
<select id="request_demo_form_type_of_hosting" name="type_of_hosting" class="required">
<option value="" disabled {% if not form.type_of_hosting.value() %}selected{% endif %}>Select an option</option>
{% for hosting_option in TYPE_OF_HOSTING_OPTIONS %}
<option
value="{{ hosting_option }}"
{% if form.type_of_hosting.value() == hosting_option %}selected{% endif %}>
{{ hosting_option }}
</option>
{% endfor %}
</select>
{% for error in form.type_of_hosting.errors %}
<p class="help-inline text-error">{{ error }}</p>
{% endfor %}
</div>
<div class="input-box support-form-field">
<label for="request_demo_form_message" class="inline-block label-title">How can we help?</label>
<textarea id="request_demo_form_message" name="message" cols="100" rows="5" required>{{ form.message.value() or '' }}</textarea>
{% for error in form.message.errors %}
<p class="help-inline text-error">{{ error }}</p>
{% endfor %}
</div>
<div class="register-button-box {% if 'captcha' in form.fields %}altcha-button-box{% endif %}">
<button class="register-button support-submit-button" type="submit">
<span>Submit</span>
<object class="loader" type="image/svg+xml" data="{{ static('images/loading/loader-white.svg') }}"></object>
</button>
{% include 'zerver/altcha_form_field.html' %}
</div>
</fieldset>
</form>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,28 @@
<div class="next-plan-information">
<p class="support-section-header">⏱️ Next plan information:</p>
<b>Plan name</b>: {{ plan_data.next_plan.name }}<br />
<b>Status</b>: {{ plan_data.next_plan.get_plan_status_as_text() }}<br />
{% if plan_data.next_plan.price_per_license %}
<b>Start date</b>: {{ plan_data.next_plan.billing_cycle_anchor.strftime('%d %B %Y') }}<br />
<b>Billing schedule</b>: {% if plan_data.next_plan.billing_schedule == plan_data.next_plan.BILLING_SCHEDULE_ANNUAL %}Annual{% else %}Monthly{% endif %}<br />
{% if plan_data.next_plan.discount %}
<b>Discount</b>: {{ plan_data.next_plan.discount }}%<br />
{% endif %}
<b>Price per license</b>: ${{ dollar_amount(plan_data.next_plan.price_per_license) }}<br />
<b>Estimated billed licenses</b>: {{ plan_data.current_plan.licenses_at_next_renewal() }}<br />
{% elif plan_data.next_plan.fixed_price %}
<b>Plan has a fixed price.</b><br />
{% if plan_data.next_plan.sent_invoice_id %}
<b>Payment pending for Invoice ID</b>: {{plan_data.next_plan.sent_invoice_id}}<br />
{% endif %}
{% endif %}
<b>Estimated annual revenue</b>: ${{ dollar_amount(plan_data.estimated_next_plan_revenue) }}<br />
{% if plan_data.next_plan.fixed_price %}
<form method="POST" class="delete-next-fixed-price-plan-form">
{{ csrf_input }}
<input type="hidden" name="{{ remote_type }}" value="{{ remote_id }}" />
<input type="hidden" name="delete_fixed_price_next_plan" value="true" />
<button type="submit" class="delete-next-fixed-price-plan-button">Delete configured fixed price next plan</button>
</form>
{% endif %}
</div>

View File

@@ -0,0 +1,24 @@
<p class="support-section-header">⏱️ Schedule plan:</p>
<form method="POST" class="support-form">
<b>Configure fixed price plan:</b><br />
{% if not plan_data.is_current_plan_billable %}
<i>Enter Invoice ID only if the customer chose to pay by invoice.</i><br />
{% endif %}
{{ csrf_input }}
<input type="hidden" name="{{ remote_type }}" value="{{ remote_id }}" />
<input type="number" name="fixed_price" placeholder="Annual amount in dollars" required />
{% if not plan_data.is_current_plan_billable %}
<input type="text" name="sent_invoice_id" placeholder="Sent invoice ID" />
{% endif %}
<button type="submit" class="support-submit-button">Schedule</button>
</form>
{% if not plan_data.current_plan and remote_support_view %}
<form method="POST" class="support-form">
<b>Configure complimentary access plan:</b><br />
<i>Once created, the end date for the complimentary access plan can be extended.</i><br />
{{ csrf_input }}
<input type="hidden" name="{{ remote_type }}" value="{{ remote_id }}" />
<input type="date" name="complimentary_access_plan" required />
<button type="submit" class="support-submit-button">Create</button>
</form>
{% endif %}

View File

@@ -0,0 +1,6 @@
<div class="push-notification-status">
<p class="support-section-header">📶 Push notification status:</p>
<b>Can push</b>: {{ status.can_push }}<br />
<b>Expected end</b>: {{ format_optional_datetime(status.expected_end, True) }}<br />
<b>Message</b>: {{ status.message }}<br />
</div>

View File

@@ -0,0 +1,251 @@
{% set demo_organization_deletion = realm.demo_organization_scheduled_deletion_date %}
<div class="realm-support-information">
<span class="cloud-label">Cloud realm</span>
{% if realm.deactivated %}
<span class="deactivated-label">DEACTIVATED</span>
{% endif %}
{% if demo_organization_deletion %}
<span class="demo-label">DEMO ORGANIZATION</span>
{% endif %}
<h3><img src="{{ realm_icon_url(realm) }}" class="support-realm-icon" /> {{ realm.name }}</h3>
{% if realm.deactivated %}
{% if realm.scheduled_deletion_date %}
<p class="support-section-header">Scheduled data deletion on {{ realm.scheduled_deletion_date.strftime('%B, %d %Y') }} ⏰</p>
{% else %}
<p class="support-section-header">No scheduled data deletion date ⛔</p>
{% endif %}
{% endif %}
{% if realm.plan_type == SPONSORED_PLAN_TYPE %}
<p class="support-section-header">On 100% sponsored Zulip Standard Free 🎉</p>
{% endif %}
{% if realm_support_data[realm.id].sponsorship_data.has_discount %}
<p class="support-section-header">Has a discount 💸</p>
{% endif %}
{% if demo_organization_deletion %}
<p class="support-section-header">Demo data deletion on {{ demo_organization_deletion.strftime('%B %d, %Y') }} 🗑️</p>
{% endif %}
{% set realm_is_scrubbed = realm_support_data[realm.id].is_scrubbed %}
{% if realm_is_scrubbed %}
<b>Realm has been scrubbed</b>
{% elif realm.deactivated_redirect %}
<b>Placeholder realm</b><br />
<b>Redirects to</b>: {{ realm.deactivated_redirect }}
<a title="Copy URL" class="copy-button" data-clipboard-text="{{ realm.deactivated_redirect }}">
<i class="fa fa-copy"></i>
</a>
{% else %}
<b>URL</b>: <a target="_blank" rel="noopener noreferrer" href="{{ realm.url }}">{{ realm.url }}</a> |
<a target="_blank" rel="noopener noreferrer" href="/stats/realm/{{ realm.string_id }}/">stats</a> |
<a target="_blank" rel="noopener noreferrer" href="/realm_activity/{{ realm.string_id }}/">activity</a><br />
<b>Date created</b>: {{ realm.date_created|timesince }} ago<br />
{% set first_human_user = realm.get_first_human_user() %}
{% if demo_organization_deletion and first_human_user.delivery_email == "" %}
<b>Demo organization owner has not configured an email address.</b>
<br />
{% else %}
{% set owner_emails_string = get_realm_owner_emails_as_string(realm) %}
<b>Owners</b>: {{ owner_emails_string }}
{% if owner_emails_string %}
<a title="Copy emails" class="copy-button" data-clipboard-text="{{ owner_emails_string }}">
<i class="fa fa-copy"></i>
</a>
{% endif %}
<br />
{% set admin_emails_string = get_realm_admin_emails_as_string(realm) %}
<b>Admins</b>: {{ admin_emails_string }}
{% if admin_emails_string %}
<a title="Copy emails" class="copy-button" data-clipboard-text="{{ admin_emails_string }}">
<i class="fa fa-copy"></i>
</a>
{% endif %}
<br />
{% if first_human_user %}
<b>First human user</b>: {{ first_human_user.delivery_email }}
<a title="Copy emails" class="copy-button" data-clipboard-text="{{ first_human_user.delivery_email }}">
<i class="fa fa-copy"></i>
</a>
<br />
{% else %}
<b>First human user</b>:
<br />
{% endif %}
{% set billing_admins = realm.get_billing_admins_delivery_email() %}
{% if billing_admins %}
<b>Billing admins</b>: {{ billing_admins }}
<a title="Copy emails" class="copy-button" data-clipboard-text="{{ billing_admins }}">
<i class="fa fa-copy"></i>
</a>
<br />
{% else %}
<b>Billing admins</b>:
<br />
{% endif %}
{% endif %}
<br />
{% with %}
{% set realm = realm %}
{% set user_data = realm_support_data[realm.id].user_data %}
{% include 'corporate/support/basic_realm_data.html' %}
{% endwith %}
<br />
<b>File upload usage</b>: {{ realm_support_data[realm.id].file_upload_usage }}<br />
{% endif %}
</div>
{% if realm_is_scrubbed %}
{% elif not realm.deactivated_redirect %}
<div>
<div class="realm-management-actions">
<p class="support-section-header">🛠️ Realm management:</p>
{% if realm.deactivated %}
<form method="POST" class="support-form">
<b>Reactivate</b>:<br />
{{ csrf_input }}
<input type="hidden" name="realm_id" value="{{ realm.id }}" />
<input type="hidden" name="status" value="active" />
<button type="submit" class="support-submit-button">Send reactivation email to owners</button>
</form>
{% else %}
<form method="POST" class="support-form">
<b>Deactivate</b>: (select reason)<br />
{{ csrf_input }}
<input type="hidden" name="realm_id" value="{{ realm.id }}" />
<input type="hidden" name="status" value="deactivated" />
<select name="deactivation_reason" id="deactivation_reason">
{% for reason in DEACTIVATION_REASONS %}
{% if reason == "owner_request" %}
<option value="{{ reason }}" selected>{{ reason }}</option>
{% else %}
<option value="{{ reason }}">{{ reason }}</option>
{% endif %}
{% endfor %}
</select>
<button type="submit" class="support-submit-button">Deactivate realm</button>
</form>
<form method="POST" class="support-form">
<b>Organization type</b>:<br />
{{ csrf_input }}
<input type="hidden" name="realm_id" value="{{ realm.id }}" />
<select name="org_type" id="org_type">
{% for organization_type in ORGANIZATION_TYPES %}
{% if realm.org_type == organization_type.id %}
<option value="{{ organization_type.id }}" selected>{{ organization_type.name }}</option>
{% else %}
<option value="{{ organization_type.id }}">{{ organization_type.name }}</option>
{% endif %}
{% endfor %}
</select>
<button type="submit" class="support-submit-button">Update</button>
</form>
<form method="POST" class="support-form">
<b>Plan type</b>: <i class="fa fa-question-circle-o" data-tippy-content="
Will also update maximum daily invitations to be the default value for the new plan type.
" data-tippy-maxWidth="auto"></i><br />
{{ csrf_input }}
<input type="hidden" name="realm_id" value="{{ realm.id }}" />
<select name="plan_type">
{% for plan_type in REALM_PLAN_TYPES %}
{% if realm.plan_type == plan_type.value %}
<option value="{{ plan_type.value }}" selected>{{ plan_type.name }}</option>
{% else %}
<option value="{{ plan_type.value }}">{{ plan_type.name }}</option>
{% endif %}
{% endfor %}
</select>
<button type="submit" class="support-submit-button">Update</button>
</form>
<form method="POST" class="support-form">
<b>Maximum daily invitations</b>: <i class="fa fa-question-circle-o" data-tippy-content="
Setting to zero will attempt to reset this to the default maximum for the current plan type.
" data-tippy-maxWidth="auto"></i><br />
{{ csrf_input }}
<input type="hidden" name="realm_id" value="{{ realm.id }}" />
<input type="number" name="max_invites" value="{{ realm.max_invites }}" min="0" required />
<button type="submit" class="support-submit-button">Update</button>
</form>
<form method="POST" class="support-form">
<b>New subdomain</b>: (max 40 characters)<br />
{{ csrf_input }}
<input type="hidden" name="realm_id" value="{{ realm.id }}" />
<input type="text" id="new_subdomain" name="new_subdomain" placeholder="lowercase letters, numbers, and '-'s" required />
<span class="support-add-redirect-url-section">
<input type="checkbox" id="add_redirect_url" name="add_redirect_url" value="true" checked />
<label class="support-redirect-url-label" for="add_redirect_url">Redirect to new subdomain?</label>
</span>
<button type="submit" class="support-submit-button">Update</button>
</form>
{% endif %}
</div>
{% if not demo_organization_deletion %}
{% if realm.deactivated %}
<div class="support-sponsorship-container">
{% with %}
{% set sponsorship_data = realm_support_data[realm.id].sponsorship_data %}
{% set dollar_amount = dollar_amount %}
{% include 'corporate/support/sponsorship_details.html' %}
{% endwith %}
</div>
{% elif realm.plan_type != SPONSORED_PLAN_TYPE %}
<div class="support-sponsorship-container">
{% with %}
{% set sponsorship_data = realm_support_data[realm.id].sponsorship_data %}
{% set PLAN_TYPES = REALM_PLAN_TYPES_FOR_DISCOUNT %}
{% set remote_id = realm.id %}
{% set remote_type = "realm_id" %}
{% include 'corporate/support/sponsorship_forms_support.html' %}
{% endwith %}
</div>
{% endif %}
{% if realm_support_data[realm.id].plan_data.current_plan %}
<div class="current-plan-container">
{% with %}
{% set plan_data = realm_support_data[realm.id].plan_data %}
{% set dollar_amount = dollar_amount %}
{% include 'corporate/support/current_plan_details.html' %}
{% endwith %}
{% with %}
{% set current_plan = realm_support_data[realm.id].plan_data.current_plan %}
{% set remote_id = realm.id %}
{% set remote_type = "realm_id" %}
{% include 'corporate/support/current_plan_forms_support.html' %}
{% endwith %}
</div>
{% endif %}
{% if realm_support_data[realm.id].plan_data.next_plan %}
<div class="next-plan-container">
{% with %}
{% set plan_data = realm_support_data[realm.id].plan_data %}
{% set dollar_amount = dollar_amount %}
{% set remote_id = realm.id %}
{% set remote_type = "realm_id" %}
{% include 'corporate/support/next_plan_details.html' %}
{% endwith %}
</div>
{% elif not realm.deactivated %}
<div class="next-plan-container">
{% with %}
{% set plan_data = realm_support_data[realm.id].plan_data %}
{% set remote_id = realm.id %}
{% set remote_type = "realm_id" %}
{% include 'corporate/support/next_plan_forms_support.html' %}
{% endwith %}
</div>
{% endif %}
{% endif %}
{% if realm.deactivated %}
<div class="deactivation-information-container">
{% with %}
{% set deactivation_data = realm_support_data[realm.id].deactivation_data %}
{% include 'corporate/support/deactivation_data.html' %}
{% endwith %}
<form method="POST" class="scrub-realm-form support-form">
{{ csrf_input }}
<input type="hidden" name="realm_id" value="{{ realm.id }}" />
<input type="hidden" name="scrub_realm" value="true" />
<button data-string-id="{{realm.string_id}}" class="scrub-realm-button">Scrub realm (danger)</button>
</form>
</div>
{% endif %}
</div>
{% endif %}

View File

@@ -0,0 +1,106 @@
<div class="remote-realm-container">
<div class="remote-realm-information">
<span class="remote-label">Remote realm</span>
<h3>{{ remote_realm.name }}</h3>
{% if remote_realm.realm_locally_deleted %}
<p class="support-section-header">Remote realm is locally deleted 🛑</p>
{% endif %}
{% if remote_realm.registration_deactivated %}
<p class="support-section-header">Remote realm registration deactivated 🛑</p>
{% endif %}
{% if remote_realm.realm_deactivated %}
<p class="support-section-header">Remote realm is deactivated on remote server 🛑</p>
{% endif %}
{% if remote_realm.plan_type == SPONSORED_PLAN_TYPE %}
<p class="support-section-header">On 100% sponsored Zulip Community plan 🎉</p>
{% endif %}
{% if support_data[remote_realm.id].sponsorship_data.has_discount %}
<p class="support-section-header">Has a discount 💸</p>
{% endif %}
<b>Remote realm host:</b> {{ remote_realm.host }}<br />
{% set billing_emails_string = get_remote_realm_billing_user_emails(remote_realm) %}
<b>Billing users</b>: {{ billing_emails_string }}
{% if billing_emails_string %}
<a title="Copy emails" class="copy-button" data-clipboard-text="{{ billing_emails_string }}">
<i class="fa fa-copy"></i>
</a>
{% endif %}
<br />
<b>Date created</b>: {{ support_data[remote_realm.id].date_created.strftime('%d %B %Y') }}<br />
<b>UUID</b>: {{ remote_realm.uuid }}<br />
<br />
{% with %}
{% set realm = remote_realm %}
{% set user_data = support_data[remote_realm.id].user_data %}
{% include 'corporate/support/basic_realm_data.html' %}
{% endwith %}
<br />
<b>Mobile user count</b>: {{ support_data[remote_realm.id].mobile_push_data.total_mobile_users }}<br />
<b>7-day mobile pushes count</b>: {{ support_data[remote_realm.id].mobile_push_data.mobile_pushes_forwarded }}<br />
<b>Last push notification date</b>: {{ support_data[remote_realm.id].mobile_push_data.last_mobile_push_sent }}<br />
</div>
{% with %}
{% set status = support_data[remote_realm.id].mobile_push_data.push_notification_status %}
{% include 'corporate/support/push_status_details.html' %}
{% endwith %}
{% if remote_server_deactivated %}
<div class="support-sponsorship-container">
{% with %}
{% set sponsorship_data = support_data[remote_realm.id].sponsorship_data %}
{% set dollar_amount = dollar_amount %}
{% include 'corporate/support/sponsorship_details.html' %}
{% endwith %}
</div>
{% elif remote_realm.plan_type != SPONSORED_PLAN_TYPE %}
<div class="support-sponsorship-container">
{% with %}
{% set sponsorship_data = support_data[remote_realm.id].sponsorship_data %}
{% set PLAN_TYPES = REMOTE_PLAN_TIERS %}
{% set remote_id = remote_realm.id %}
{% set remote_type = "remote_realm_id" %}
{% set has_fixed_price = support_data[remote_realm.id].plan_data.has_fixed_price %}
{% include 'corporate/support/sponsorship_forms_support.html' %}
{% endwith %}
</div>
{% endif %}
{% if support_data[remote_realm.id].plan_data.current_plan %}
<div class="current-plan-container">
{% with %}
{% set plan_data = support_data[remote_realm.id].plan_data %}
{% set dollar_amount = dollar_amount %}
{% include 'corporate/support/current_plan_details.html' %}
{% endwith %}
{% with %}
{% set current_plan = support_data[remote_realm.id].plan_data.current_plan %}
{% set remote_id = remote_realm.id %}
{% set remote_type = "remote_realm_id" %}
{% include 'corporate/support/current_plan_forms_support.html' %}
{% endwith %}
</div>
{% endif %}
{% if support_data[remote_realm.id].plan_data.next_plan %}
<div class="next-plan-container">
{% with %}
{% set plan_data = support_data[remote_realm.id].plan_data %}
{% set dollar_amount = dollar_amount %}
{% set remote_id = remote_realm.id %}
{% set remote_type = "remote_realm_id" %}
{% include 'corporate/support/next_plan_details.html' %}
{% endwith %}
</div>
{% elif not remote_server_deactivated %}
<div class="next-plan-container">
{% with %}
{% set plan_data = support_data[remote_realm.id].plan_data %}
{% set remote_id = remote_realm.id %}
{% set remote_type = "remote_realm_id" %}
{% include 'corporate/support/next_plan_forms_support.html' %}
{% endwith %}
</div>
{% endif %}
</div>

View File

@@ -0,0 +1,214 @@
{% extends "zerver/base.html" %}
{% set entrypoint = "support" %}
{# Remote servers. #}
{% block title %}
<title>Remote servers</title>
{% endblock %}
{% block content %}
<div class="container">
<form class="support-search-form">
<center>
<input type="text" name="q" class="input-xxlarge search-query" placeholder="hostname, UUID or contact email" value="{{ request.GET.get('q', '') }}" autofocus />
<button type="submit" class="support-search-button">Search</button>
</center>
</form>
{% if error_message %}
<div class="alert alert-danger">
<center>
{{ error_message }}
</center>
</div>
{% elif success_message %}
<div class="alert alert-success">
<center>
{{ success_message }}
</center>
</div>
{% endif %}
<div id="remote-server-query-results">
{% for remote_server in remote_servers %}
{% if remote_server.deactivated %}
{% set remote_server_query_result_class = "remote-support-query-result remote-server-deactivated" %}
{% else %}
{% set remote_server_query_result_class = "remote-support-query-result" %}
{% endif %}
<div class="{{ remote_server_query_result_class }}">
<div class="remote-server-section">
<div class="remote-server-information">
<span class="remote-label">Remote server{% if remote_server.deactivated %}: deactivated{% endif %}</span>
<h3>{{ remote_server.hostname }} {{ server_analytics_link(remote_server.id ) }}</h3>
{% if remote_server.plan_type == SPONSORED_PLAN_TYPE %}
<p class="support-section-header">On 100% sponsored Zulip Community plan 🎉</p>
{% endif %}
{% if remote_servers_support_data[remote_server.id].sponsorship_data.has_discount %}
<p class="support-section-header">Has a discount 💸</p>
{% endif %}
<b>Contact email</b>: {{ remote_server.contact_email }}
<a title="Copy email" class="copy-button" data-clipboard-text="{{ remote_server.contact_email }}">
<i class="fa fa-copy"></i>
</a>
<br />
{% set billing_emails_string = get_remote_server_billing_user_emails(remote_server) %}
<b>Billing users</b>: {{ billing_emails_string }}
{% if billing_emails_string %}
<a title="Copy emails" class="copy-button" data-clipboard-text="{{ billing_emails_string }}">
<i class="fa fa-copy"></i>
</a>
{% endif %}
<br />
<b>UUID</b>: {{ remote_server.uuid }}<br />
<b>Date created</b>: {{ remote_servers_support_data[remote_server.id].date_created.strftime('%d %B %Y') }}<br />
<b>Zulip version</b>: {{ remote_server.last_version }}<br />
<b>Has remote realms</b>: {{ remote_realms[remote_server.id] != [] }}<br />
<br />
<b>Max monthly messages</b>: {{ remote_server_to_max_monthly_messages[remote_server.id] }}<br />
{% if remote_servers_support_data[remote_server.id].has_stale_audit_log %}
<span class="stale-audit-log"><b>Last audit log update (UTC)</b>: {{ format_optional_datetime(remote_server.last_audit_log_update, True) }}</span><br />
{% else %}
<span class="current-audit-log"><b>Last audit log update (UTC)</b>: {{ format_optional_datetime(remote_server.last_audit_log_update, True) }}</span><br />
{% endif %}
<b>Plan type</b>: {{ get_plan_type_name(remote_server.plan_type) }}<br />
<b>Non-guest user count</b>: {{ remote_servers_support_data[remote_server.id].user_data.non_guest_user_count }}<br />
<b>Guest user count</b>: {{ remote_servers_support_data[remote_server.id].user_data.guest_user_count }}<br />
<a target="_blank" rel="noopener noreferrer" href="/activity/remote/logs/server/{{ remote_server.uuid }}/">View audit logs</a><br />
<br />
<b>Total mobile user count</b>: {{ remote_servers_support_data[remote_server.id].mobile_push_data.total_mobile_users }}<br />
{% if remote_realms[remote_server.id] != [] %}
<b>Uncategorized mobile user count:</b> {{ remote_servers_support_data[remote_server.id].mobile_push_data.uncategorized_mobile_users }}<br />
{% endif %}
<b>7-day mobile pushes count</b>: {{ remote_servers_support_data[remote_server.id].mobile_push_data.mobile_pushes_forwarded }}<br />
<b>Last push notification date</b>: {{ remote_servers_support_data[remote_server.id].mobile_push_data.last_mobile_push_sent }}<br />
</div>
{% with %}
{% set status = remote_servers_support_data[remote_server.id].mobile_push_data.push_notification_status %}
{% include 'corporate/support/push_status_details.html' %}
{% endwith %}
{% if remote_server.deactivated %}
<div class="support-sponsorship-container">
{% with %}
{% set sponsorship_data = remote_servers_support_data[remote_server.id].sponsorship_data %}
{% include 'corporate/support/sponsorship_details.html' %}
{% endwith %}
</div>
{% elif remote_server.plan_type != SPONSORED_PLAN_TYPE %}
<div class="support-sponsorship-container">
{% with %}
{% set sponsorship_data = remote_servers_support_data[remote_server.id].sponsorship_data %}
{% set PLAN_TYPES = REMOTE_PLAN_TIERS %}
{% set remote_id = remote_server.id %}
{% set remote_type = "remote_server_id" %}
{% set has_fixed_price = remote_servers_support_data[remote_server.id].plan_data.has_fixed_price %}
{% include 'corporate/support/sponsorship_forms_support.html' %}
{% endwith %}
</div>
{% endif %}
{% if remote_servers_support_data[remote_server.id].plan_data.current_plan %}
<div class="current-plan-container">
{% with %}
{% set plan_data = remote_servers_support_data[remote_server.id].plan_data %}
{% set dollar_amount = dollar_amount %}
{% include 'corporate/support/current_plan_details.html' %}
{% endwith %}
{% with %}
{% set current_plan = remote_servers_support_data[remote_server.id].plan_data.current_plan %}
{% set remote_id = remote_server.id %}
{% set remote_type = "remote_server_id" %}
{% include 'corporate/support/current_plan_forms_support.html' %}
{% endwith %}
</div>
{% endif %}
{% if remote_servers_support_data[remote_server.id].plan_data.next_plan %}
<div class="next-plan-container">
{% with %}
{% set plan_data = remote_servers_support_data[remote_server.id].plan_data %}
{% set dollar_amount = dollar_amount %}
{% set remote_id = remote_server.id %}
{% set remote_type = "remote_server_id" %}
{% include 'corporate/support/next_plan_details.html' %}
{% endwith %}
</div>
{% elif not remote_server.deactivated %}
<div class="next-plan-container">
{% with %}
{% set plan_data = remote_servers_support_data[remote_server.id].plan_data %}
{% set remote_id = remote_server.id %}
{% set remote_type = "remote_server_id" %}
{% include 'corporate/support/next_plan_forms_support.html' %}
{% endwith %}
</div>
{% endif %}
{% if remote_server.deactivated %}
<div class="deactivation-information-container">
{% with %}
{% set deactivation_data = remote_servers_support_data[remote_server.id].deactivation_data %}
{% include 'corporate/support/deactivation_data.html' %}
{% endwith %}
<form method="POST" class="reactivate-remote-server-form">
{{ csrf_input }}
<input type="hidden" name="remote_server_id" value="{{ remote_server.id }}" />
<input type="hidden" name="remote_server_status" value="active" />
<button class="reactivate-remote-server-button"><b>Reactivate</b>: {{ remote_server.hostname }}</button>
</form>
</div>
{% else %}
<div class="deactivation-information-container">
<p class="support-section-header">⚠️ Deactivate remote server:</p>
<form method="POST" class="deactivate-remote-server-form">
{{ csrf_input }}
<input type="hidden" name="remote_server_id" value="{{ remote_server.id }}" />
<input type="hidden" name="remote_server_status" value="deactivated" />
<b>Deactivation reason</b>:<br />
<select name="remote_server_deactivation_reason" id="remote_server_deactivation_reason">
{% for reason in DEACTIVATION_REASONS %}
{% if reason == "owner_request" %}
<option value="{{ reason }}" selected>{{ reason }}</option>
{% else %}
<option value="{{ reason }}">{{ reason }}</option>
{% endif %}
{% endfor %}
</select>
<br />
<button class="deactivate-remote-server-button"><b>Deactivate</b>: {{ remote_server.hostname }}</button>
</form>
</div>
{% endif %}
</div>
<div class="remote-realms-section">
{% if remote_realms[remote_server.id] == [] %}
<div>
<span class="remote-label">Remote realm</span>
<h3>None</h3>
</div>
{% else %}
{% for remote_realm in remote_realms[remote_server.id] %}
<div>
{% with %}
{% set remote_server_deactivated = remote_server.deactivated %}
{% set support_data = remote_realms_support_data %}
{% set get_plan_type_name = get_plan_type_name %}
{% set format_optional_datetime = format_optional_datetime %}
{% set dollar_amount = dollar_amount %}
{% include "corporate/support/remote_realm_details.html" %}
{% endwith %}
</div>
{% endfor %}
{% endif %}
</div>
</div>
{% endfor %}
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,51 @@
{% extends "zerver/portico_signup.html" %}
{% set PAGE_TITLE = "Contact sales | Zulip" %}
{% block portico_content %}
<div class="register-account flex full-page">
<div class="center-block new-style">
<div class="pitch">
<h1>Contact sales</h1>
</div>
<form method="post" class="white-box" id="registration">
{{ csrf_input }}
<fieldset class="support-request">
<div class="input-box support-form-field">
<label for="contact_sales_from" class="inline-block label-title">From</label>
<div id="contact_sales_from" class="not-editable-realm-field">
{{ user_full_name }} ({{ user_email }})
</div>
</div>
<div class="input-box support-form-field">
<label for="sales_support_request_form_organization_website" class="inline-block label-title">Organization website</label>
<input id="sales_support_request_form_organization_website" class="required" type="url" name="organization_website" required />
</div>
<div class="input-box support-form-field">
<label for="sales_support_request_form_expected_user_count" class="inline-block label-title">Expected number of users (approximate range)</label>
<input id="sales_support_request_form_expected_user_count" class="required" type="text" name="expected_user_count" maxlength="{{ MAX_INPUT_LENGTH }}" required />
</div>
<div class="input-box support-form-field">
<label for="sales_support_request_form_message" class="inline-block label-title">Please tell us about your organization and how we can help.</label>
<textarea id="sales_support_request_form_message" name="message" cols="100" rows="5" required></textarea>
</div>
<div class="register-button-box">
<button class="register-button support-submit-button" type="submit">
<span>Submit</span>
<object class="loader" type="image/svg+xml" data="{{ static('images/loading/loader-white.svg') }}"></object>
</button>
</div>
<div class="input-box" id="sales-support-form-bottom-info">
<div class="not-editable-realm-field">
Your message will be sent to <a href="mailto:sales@zulip.com">Zulip Sales</a>.
</div>
</div>
</fieldset>
</form>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,31 @@
<div class="remote-sponsorship-details">
<p class="support-section-header">💸 Discounts and sponsorship information:</p>
<b>Sponsorship pending</b>: {{ sponsorship_data.sponsorship_pending }}<br />
{% if sponsorship_data.has_discount %}
{% if sponsorship_data.monthly_discounted_price %}
<b>Discounted price (monthly)</b>: {{ dollar_amount(sponsorship_data.monthly_discounted_price) }}%<br />
{% endif %}
{% if sponsorship_data.annual_discounted_price %}
<b>Discounted price (annual)</b>: {{ dollar_amount(sponsorship_data.monthly_discounted_price) }}%<br />
{% endif %}
{% else %}
<b>Discounted price</b>: None<br />
{% endif %}
<b>Minimum licenses</b>: {{ sponsorship_data.minimum_licenses }}<br />
{% if sponsorship_data.required_plan_tier %}
{% for plan_tier in REMOTE_PLAN_TIERS %}
{% if sponsorship_data.required_plan_tier == plan_tier.value %}
<b>Required plan tier</b>: {{ plan_tier.name }}<br />
{% endif %}
{% endfor %}
{% else %}
<b>Required plan tier</b>: None<br />
{% endif %}
</div>
{% if sponsorship_data.sponsorship_pending %}
{% with %}
{% set latest_sponsorship_request = sponsorship_data.latest_sponsorship_request %}
{% include 'corporate/support/sponsorship_request_details.html' %}
{% endwith %}
{% endif %}

View File

@@ -0,0 +1,61 @@
<form method="POST" class="support-form">
<b>Required plan tier for discounts and fixed prices</b>:<br />
<i>Updates will not change any pre-existing plans or scheduled upgrades.</i><br />
{{ csrf_input }}
<input type="hidden" name="{{ remote_type }}" value="{{ remote_id }}" />
<select name="required_plan_tier">
{% for plan_tier in PLAN_TYPES %}
{% if sponsorship_data.required_plan_tier == plan_tier.value %}
<option value="{{ plan_tier.value }}" selected>{{ plan_tier.name }}</option>
{% else %}
<option value="{{ plan_tier.value }}">{{ plan_tier.name }}</option>
{% endif %}
{% endfor %}
</select>
<button type="submit" class="support-submit-button">Update</button>
</form>
<form method="POST" class="discounted-price-form support-form">
<b>Discounted price <i class="fa fa-question-circle-o" data-tippy-content="
Needs required plan tier to be set.<br />
Default price for tier will be used if discounted price for the schedule is not specified or is 0.<br />
Updates will change pre-existing plans and scheduled upgrades.<br />
Any prorated licenses for the current billing cycle will be billed at the updated discounted rate.<br />
Customer will lose flat discounted months regardless of value specified.<br />
" data-tippy-allowHTML="true" data-tippy-maxWidth="auto"></i></b>
{{ csrf_input }}
<input type="hidden" name="{{ remote_type }}" value="{{ remote_id }}" />
{% if has_fixed_price %}
<input type="number" value="{{ sponsorship_data.monthly_discounted_price }}" placeholder="Monthly discounted price" disabled />
<input type="number" value="{{ sponsorship_data.annual_discounted_price }}" placeholder="Annual discounted price" disabled />
<button type="submit" class="support-submit-button" disabled>Update</button>
{% else %}
<span>Monthly (cents)</span>
<input type="number" name="monthly_discounted_price" value="{{ sponsorship_data.monthly_discounted_price }}" placeholder="Monthly discounted price" data-original-monthly-price="{{ sponsorship_data.original_monthly_plan_price }}"
{% if sponsorship_data.required_plan_tier %}
required
{% else %}
disabled
{% endif %}
/>
<span>Annual (cents)</span>
<input type="number" name="annual_discounted_price" value="{{ sponsorship_data.annual_discounted_price }}" placeholder="Annual discounted price" data-original-annual-price="{{ sponsorship_data.original_annual_plan_price }}"
{% if sponsorship_data.required_plan_tier %}
required
{% else %}
disabled
{% endif %}
/>
<button type="submit" class="support-submit-button">Update</button>
{% endif %}
</form>
{% if not has_fixed_price and (sponsorship_data.monthly_discounted_price or sponsorship_data.annual_discounted_price or sponsorship_data.minimum_licenses) %}
<form method="POST" class="support-form">
<b>Minimum licenses</b>:<br />
{{ csrf_input }}
<input type="hidden" name="{{ remote_type }}" value="{{ remote_id }}" />
<input type="number" name="minimum_licenses" value="{{ sponsorship_data.minimum_licenses }}" required />
<button type="submit" class="support-submit-button">Update</button>
</form>
{% endif %}

View File

@@ -0,0 +1,34 @@
<p class="support-section-header">💸 Discounts and sponsorship:</p>
<form method="POST" class="support-form">
<b>Sponsorship pending</b>:<br />
{{ csrf_input }}
<input type="hidden" name="{{ remote_type }}" value="{{ remote_id }}" />
<select name="sponsorship_pending">
<option value="true" {% if sponsorship_data.sponsorship_pending %}selected{% endif %}>Yes</option>
<option value="false" {% if not sponsorship_data.sponsorship_pending %}selected{% endif %}>No</option>
</select>
<button type="submit" class="support-submit-button">Update</button>
</form>
{% if sponsorship_data.sponsorship_pending %}
<form method="POST" class="support-form">
{{ csrf_input }}
<input type="hidden" name="{{ remote_type }}" value="{{ remote_id }}" />
<input type="hidden" name="approve_sponsorship" value="true" />
<button class="approve-sponsorship-button">
Approve full sponsorship
</button>
</form>
{% endif %}
{% with %}
{% set PLAN_TYPES = PLAN_TYPES %}
{% include 'corporate/support/sponsorship_discount_forms.html' %}
{% endwith %}
{% if sponsorship_data.sponsorship_pending %}
{% with %}
{% set latest_sponsorship_request = sponsorship_data.latest_sponsorship_request %}
{% include 'corporate/support/sponsorship_request_details.html' %}
{% endwith %}
{% endif %}

View File

@@ -0,0 +1,18 @@
<div class="remote-sponsorship-details">
<p class="support-section-header">Sponsorship request information:</p>
{% if latest_sponsorship_request %}
<ul>
<li><b>Organization type</b>: {{ latest_sponsorship_request.org_type }}</li>
<li><b>Organization website</b>: {{ latest_sponsorship_request.org_website }}</li>
<li><b>Organization description</b>: {{ latest_sponsorship_request.org_description }}</li>
<li><b>Estimated total users</b>: {{ latest_sponsorship_request.total_users }}</li>
<li><b>Paid staff</b>: {{ latest_sponsorship_request.paid_users }}</li>
<li><b>Description of paid staff</b>: {{ latest_sponsorship_request.paid_users_description }}</li>
{% if latest_sponsorship_request.requested_plan != "" %}
<li><b>Requested plan</b>: {{ latest_sponsorship_request.requested_plan }}</li>
{% endif %}
</ul>
{% else %}
<b>No sponsorship requests have been submitted.</b>
{% endif %}
</div>

View File

@@ -0,0 +1,148 @@
{% extends "zerver/base.html" %}
{% set entrypoint = "support" %}
{# User activity. #}
{% block title %}
<title>Support panel | Zulip</title>
{% endblock %}
{% block content %}
<div class="container">
<form class="support-search-form">
<center>
<input type="text" name="q" class="input-xxlarge search-query" placeholder="full names, emails, string_ids, organization URLs separated by commas" value="{{ request.GET.get('q', '') }}" autofocus />
<button type="submit" class="support-search-button">Search</button>
</center>
</form>
{% if error_message %}
<div class="alert alert-danger">
<center>
{{ error_message }}
</center>
</div>
{% elif success_message %}
<div class="alert alert-success">
<center>
{{ success_message }}
</center>
</div>
{% endif %}
<div id="query-results">
{% for user in users %}
{% set realm = user.realm %}
<div class="support-query-result user-support-container">
{% if not user.is_active %}
{% set user_information_class = "user-information-section user-deactivated" %}
{% else %}
{% set user_information_class = "user-information-section" %}
{% endif %}
<div class="{{user_information_class}}">
<span class="cloud-label">Cloud {% if user.is_bot%}bot{% else %}user{% endif %}</span>
{% if not user.is_active %}
<span class="deactivated-label">DEACTIVATED</span>
{% endif %}
<h3>{{ user.full_name }}</h3>
<b>Email</b>: {{ user.delivery_email }}<br />
<b>Date joined</b>: {{ user.date_joined|timesince }} ago<br />
<b>Role</b>: {{ user.get_role_name() }}<br />
{% if user.is_bot and user.bot_owner %}
<b>Bot owner</b>: {{ user.bot_owner.delivery_email }}<br />
{% endif %}
<form method="POST" class="delete-user-form">
{{ csrf_input }}
<input type="hidden" name="realm_id" value="{{ realm.id }}" />
<input type="hidden" name="delete_user_by_id" value="{{ user.id }}" />
<button data-email="{{ user.delivery_email }}" data-string-id="{{ realm.string_id }}" class="delete-user-button">Delete user (danger)</button>
</form>
</div>
{% if realm.deactivated %}
{% set user_realm_information_class = "user-realm-information-section realm-deactivated" %}
{% else %}
{% set user_realm_information_class = "user-realm-information-section" %}
{% endif %}
<div class="{{user_realm_information_class}}">
{% with %}
{% set dollar_amount = dollar_amount %}
{% include "corporate/support/realm_details.html" %}
{% endwith %}
</div>
</div>
{% endfor %}
{% for realm in realms %}
{% if realm.deactivated %}
{% set realm_query_result_class = "support-query-result realm-deactivated" %}
{% else %}
{% set realm_query_result_class = "support-query-result" %}
{% endif %}
<div class="{{realm_query_result_class}}">
{% with %}
{% set dollar_amount = dollar_amount %}
{% include "corporate/support/realm_details.html" %}
{% endwith %}
</div>
{% endfor %}
{% for confirmation in confirmations %}
{% set object = confirmation.object %}
<div class="support-query-result confirmation-container">
<div class="confirmation-information-section">
<span class="cloud-label">Cloud confirmation</span>
{% if confirmation.type == Confirmation.USER_REGISTRATION %}
<h3>Pre-registration user</h3>
{% set email = object.email %}
{% set realm = object.realm %}
{% set show_realm_details = True %}
{% elif confirmation.type == Confirmation.NEW_REALM_USER_REGISTRATION %}
<h3>Realm creation</h3>
{% set email = object.email %}
{% set show_realm_details = False %}
{% elif confirmation.type == Confirmation.INVITATION %}
<h3>Invite</h3>
{% set email = object.email %}
{% set realm = object.realm %}
{% set show_realm_details = True %}
{% elif confirmation.type == Confirmation.MULTIUSE_INVITE %}
<h3>Multiuse invite</h3>
{% set realm = object.realm %}
{% set show_realm_details = False %}
{% elif confirmation.type == Confirmation.REALM_REACTIVATION %}
<h3>Realm reactivation</h3>
{% set realm = object.realm %}
{% set show_realm_details = False %}
{% endif %}
{% if email %}
<b>Email</b>: {{ email }}<br />
{% endif %}
<b>Link</b>: {{ confirmation.url }}
<a title="Copy link" class="copy-button" data-clipboard-text="{{ confirmation.url }}">
<i class="fa fa-copy"></i>
</a><br />
<b>Expires in</b>: {{ confirmation.expires_in }}<br />
{% if confirmation.link_status %}
<b>Status</b>: {{ confirmation.link_status }}<br />
{% endif %}
</div>
<div class="confirmation-realm-section">
{% if show_realm_details %}
{% with %}
{% set dollar_amount = dollar_amount %}
{% include "corporate/support/realm_details.html" %}
{% endwith %}
{% elif realm %}
<span class="cloud-label">Cloud realm</span>
<h3><img src="{{ realm_icon_url(realm) }}" class="support-realm-icon" /> {{ realm.name }}</h3>
<b>Realm subdomain</b>: {{ realm.subdomain }}
{% else %}
<span class="cloud-label">Cloud realm</span>
<h3>N/A</h3>
{% endif %}
</div>
</div>
{% endfor %}
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,45 @@
{% extends "zerver/portico_signup.html" %}
{% set PAGE_TITLE = "Contact support | Zulip" %}
{% block portico_content %}
<div class="register-account flex full-page">
<div class="center-block new-style">
<div class="pitch">
<h1>{{ _('Contact support') }}</h1>
</div>
<form method="post" class="white-box" id="registration">
{{ csrf_input }}
<fieldset class="support-request">
<div class="input-box support-form-field">
<label for="support_from" class="inline-block label-title">{{ _('From') }}</label>
<div id="support_from">{{ email }}</div>
</div>
<div class="input-box support-form-field">
<label for="support_realm" class="inline-block label-title">{{ _('Organization') }}</label>
<div id="support_realm">{{ realm_name }}</div>
</div>
<div class="input-box support-form-field">
<label for="request_subject" class="inline-block label-title">{{ _('Subject') }}</label>
<input id="request_subject" class="required" type="text" name="request_subject" maxlength="{{ MAX_SUBJECT_LENGTH }}" required />
</div>
<div class="input-box support-form-field">
<label for="request_message" class="inline-block label-title">{{ _('Message') }}</label>
<textarea id="request_message" name="request_message" cols="100" rows="5" required></textarea>
</div>
<div class="register-button-box">
<button class="register-button support-submit-button" type="submit">
<span>{{ _('Submit') }}</span>
<object class="loader" type="image/svg+xml" data="{{ static('images/loading/loader-white.svg') }}"></object>
</button>
</div>
</fieldset>
</form>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,21 @@
{% extends "zerver/portico.html" %}
{% block title %}
<title>{{ _("Thanks for contacting us") }} | Zulip</title>
{% endblock %}
{% block portico_content %}
<div class="flex full-page thanks-page">
<div class="center-block new-style white-box">
<h1>{{ _("Thanks for contacting us!") }}</h1>
<p>{{ _("We will be in touch with you soon.") }}</p>
<p>
{% trans %}
You can find answers to frequently asked questions in the
<a href="/help/">Zulip help center</a>.
{% endtrans %}
</p>
</div>
</div>
{% endblock %}