moviewyrm/bookwyrm/templates/settings/edit_server.html

72 lines
3.3 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-04-07 20:17:51 +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">
{% for error in form.server_name.errors %}
<p class="help is-danger">{{ error | escape }}</p>
{% endfor %}
</div>
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 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_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:'' }}">
{% for error in form.application_type.errors %}
<p class="help is-danger">{{ error | escape }}</p>
{% endfor %}
</div>
2021-06-02 16:17:53 +00:00
<div class="field">
2021-04-07 20:17:51 +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:'' }}">
{% for error in form.application_version.errors %}
<p class="help is-danger">{{ error | escape }}</p>
{% endfor %}
</div>
</div>
</div>
2021-06-02 16:17:53 +00:00
<div class="field">
2021-04-07 20:17:51 +00:00
<label class="label" for="id_notes">{% trans "Notes:" %}</label>
<textarea name="notes" cols="None" rows="None" 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
<button type="submit" class="button is-primary">{% trans "Save" %}</button>
2021-04-07 20:06:29 +00:00
</form>
{% endblock %}