moviewyrm/bookwyrm/templates/settings/federation/edit_instance.html

87 lines
3.7 KiB
HTML
Raw Normal View History

2021-09-08 21:05:08 +00:00
{% extends 'settings/layout.html' %}
2021-04-07 20:06:29 +00:00
{% load i18n %}
2021-06-01 21:28:53 +00:00
{% block title %}{% trans "Add instance" %}{% endblock %}
2021-04-07 20:06:29 +00:00
{% block header %}
2021-06-01 21:28:53 +00:00
{% trans "Add instance" %}
<a href="{% url 'settings-federation' %}" class="has-text-weight-normal help">{% trans "Back to instance list" %}</a>
2021-04-07 20:06:29 +00:00
{% endblock %}
{% block panel %}
<div class="tabs">
<ul>
{% url 'settings-import-blocklist' as url %}
<li {% if url in request.path %}class="is-active" aria-current="page"{% endif %}>
<a href="{{ url }}">{% trans "Import block list" %}</a>
</li>
{% url 'settings-add-federated-server' as url %}
<li {% if url in request.path %}class="is-active" aria-current="page"{% endif %}>
2021-06-01 21:28:53 +00:00
<a href="{{ url }}">{% trans "Add instance" %}</a>
</li>
</ul>
</div>
<form method="POST" action="{% url 'settings-add-federated-server' %}">
2021-04-07 20:17:51 +00:00
{% csrf_token %}
<div class="columns">
<div class="column is-half">
2021-06-02 16:17:53 +00:00
<div class="field">
2021-11-29 22:27:25 +00:00
<label class="label" for="id_server_name">
{% trans "Instance:" %}
</label>
<input type="text" name="server_name" maxlength="255" class="input" required id="id_server_name" value="{{ form.server_name.value|default:'' }}" placeholder="domain.com" aria-describedby="desc_server_name">
{% include 'snippets/form_errors.html' with errors_list=form.server_name.errors id="desc_server_name" %}
2021-04-07 20:17:51 +00:00
</div>
</div>
<div class="column is-half">
2021-06-02 16:17:53 +00:00
<div class="field">
2021-04-07 20:17:51 +00:00
<label class="label" for="id_status">{% trans "Status:" %}</label>
<div class="select">
<select name="status" class="" id="id_status">
<option value="federated" {% if form.status.value == "federated" %}selected=""{% endif %}>{% trans "Federated" %}</option>
<option value="blocked" {% if form.status.value == "blocked" or not form.status.value %}selected{% endif %}>{% trans "Blocked" %}</option>
2021-04-07 20:17:51 +00:00
</select>
</div>
</div>
</div>
</div>
<div class="columns">
2021-04-07 20:17:51 +00:00
<div class="column is-half">
2021-06-02 16:17:53 +00:00
<div class="field">
2021-11-29 22:27:25 +00:00
<label class="label" for="id_application_type">
{% trans "Software:" %}
</label>
<input type="text" name="application_type" maxlength="255" class="input" id="id_application_type" value="{{ form.application_type.value|default:'' }}" aria-describedby="desc_application_type">
{% include 'snippets/form_errors.html' with errors_list=form.application_type.errors id="desc_application_type" %}
2021-04-07 20:17:51 +00:00
</div>
</div>
<div class="column is-half">
2021-06-02 16:17:53 +00:00
<div class="field">
2021-11-29 22:27:25 +00:00
<label class="label" for="id_application_version">
{% trans "Version:" %}
</label>
<input type="text" name="application_version" maxlength="255" class="input" id="id_application_version" value="{{ form.application_version.value|default:'' }}" aria-describedby="desc_application_version">
{% include 'snippets/form_errors.html' with errors_list=form.application_version.errors id="desc_application_version" %}
2021-04-07 20:17:51 +00:00
</div>
</div>
</div>
2021-06-02 16:17:53 +00:00
<div class="field">
2021-11-29 22:27:25 +00:00
<label class="label" for="id_notes">
{% trans "Notes:" %}
</label>
<textarea name="notes" cols="40" rows="5" class="textarea" id="id_notes">
{{ form.notes.value|default:'' }}
</textarea>
2021-06-02 16:17:53 +00:00
</div>
2021-04-07 20:17:51 +00:00
2021-11-29 22:27:25 +00:00
<button type="submit" class="button is-primary">
{% trans "Save" %}
</button>
2021-04-07 20:06:29 +00:00
</form>
{% endblock %}