mirror of https://github.com/zulip/zulip.git
139 lines
6.6 KiB
HTML
139 lines
6.6 KiB
HTML
{% extends "zerver/base.html" %}
|
|
{% set entrypoint = "support" %}
|
|
|
|
{# Remote servers. #}
|
|
|
|
{% block title %}
|
|
<title>Remote servers</title>
|
|
{% endblock %}
|
|
|
|
|
|
{% block content %}
|
|
<div class="container">
|
|
<br />
|
|
<form>
|
|
<center>
|
|
<input type="text" name="q" class="input-xxlarge search-query" placeholder="hostname or contact email" value="{{ request.GET.get('q', '') }}" autofocus />
|
|
<button type="submit" class="btn btn-default 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 %}
|
|
<div class="support-query-result">
|
|
<div class="remote-server-information">
|
|
<span class="label">remote server</span>
|
|
<h3>{{ remote_server.hostname }}</h3>
|
|
<b>Contact email</b>: {{ remote_server.contact_email }}
|
|
<a title="Copy email" class="copy-button" data-copytext="{{ remote_server.contact_email }}">
|
|
<i class="fa fa-copy"></i>
|
|
</a>
|
|
<br />
|
|
<b>Last updated</b>: {{ remote_server.last_updated|timesince }} ago<br />
|
|
<b>Max monthly messages</b>: {{ remote_server_to_max_monthly_messages[remote_server.id] }}<br />
|
|
<b>Plan type</b>: {{ get_plan_type_name(remote_server.plan_type) }}<br />
|
|
<b>Has remote realm(s)</b>: {{ remote_realms[remote_server.id] != [] }}
|
|
{% if remote_server.plan_type == 100 %}
|
|
<h4>On 100% sponsored Zulip Community plan.</h4>
|
|
{% endif %}
|
|
</div>
|
|
|
|
{% if remote_server.plan_type != 100 %}
|
|
<form method="POST" class="remote-server-form">
|
|
<b>Sponsorship pending</b>:<br />
|
|
{{ csrf_input }}
|
|
<input type="hidden" name="remote_server_id" value="{{ remote_server.id }}" />
|
|
<select name="sponsorship_pending">
|
|
<option value="true" {% if plan_data[remote_server.id].customer and plan_data[remote_server.id].customer.sponsorship_pending %}selected{% endif %}>Yes</option>
|
|
<option value="false" {% if not plan_data[remote_server.id].customer or not plan_data[remote_server.id].customer.sponsorship_pending %}selected{% endif %}>No</option>
|
|
</select>
|
|
<button type="submit" class="btn btn-default support-submit-button">Update</button>
|
|
</form>
|
|
{% endif %}
|
|
|
|
{% if plan_data[remote_server.id].customer and plan_data[remote_server.id].customer.sponsorship_pending %}
|
|
<form method="POST" class="">
|
|
{{ csrf_input }}
|
|
<input type="hidden" name="remote_server_id" value="{{ remote_server.id }}" />
|
|
<input type="hidden" name="approve_sponsorship" value="true" />
|
|
<button class="btn btn-default sea-green small approve-sponsorship-button">
|
|
Approve full sponsorship
|
|
</button>
|
|
</form>
|
|
{% endif %}
|
|
|
|
{% if remote_server.plan_type != 100 %}
|
|
<form method="POST" class="remote-server-form">
|
|
<b>Discount</b>:<br />
|
|
{{ csrf_input }}
|
|
<input type="hidden" name="remote_server_id" value="{{ remote_server.id }}" />
|
|
{% if plan_data[remote_server.id].current_plan and plan_data[remote_server.id].current_plan.fixed_price %}
|
|
<input type="number" name="discount" value="{{ get_discount(plan_data[remote_server.id].customer) }}" disabled />
|
|
<button type="submit" class="btn btn-default support-submit-button" disabled>Update</button>
|
|
{% else %}
|
|
<input type="number" name="discount" value="{{ get_discount(plan_data[remote_server.id].customer) }}" required />
|
|
<button type="submit" class="btn btn-default support-submit-button">Update</button>
|
|
{% endif %}
|
|
</form>
|
|
{% endif %}
|
|
|
|
{% if plan_data[remote_server.id].current_plan %}
|
|
<div class="remote-server-information">
|
|
{% with %}
|
|
{% set plan_data = plan_data[remote_server.id] %}
|
|
{% include 'analytics/current_plan_details.html' %}
|
|
{% endwith %}
|
|
</div>
|
|
|
|
<form method="POST" class="remote-server-form">
|
|
<b>Billing collection method</b><br />
|
|
{{ csrf_input }}
|
|
<input type="hidden" name="remote_server_id" value="{{ remote_server.id }}" />
|
|
<select name="billing_modality" class="billing-modality-select" required>
|
|
<option value="charge_automatically" {% if plan_data[remote_server.id].current_plan.charge_automatically %}selected{% endif %}>Charge automatically</option>
|
|
<option value="send_invoice" {% if not plan_data[remote_server.id].current_plan.charge_automatically %}selected{% endif %}>Pay by invoice</option>
|
|
</select>
|
|
<button type="submit" class="btn btn-default support-submit-button">Update</button>
|
|
</form>
|
|
|
|
<form method="POST" class="remote-server-form">
|
|
<b>Modify current plan</b><br />
|
|
{{ csrf_input }}
|
|
<input type="hidden" name="remote_server_id" value="{{ remote_server.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>
|
|
</select>
|
|
<button type="submit" class="btn btn-default support-submit-button">Modify</button>
|
|
</form>
|
|
{% endif %}
|
|
|
|
{% for remote_realm in remote_realms[remote_server.id] %}
|
|
<hr />
|
|
<div>
|
|
{% include "analytics/remote_realm_details.html" %}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
|
|
{% endblock %}
|