forked from mirrors/bookwyrm
58 lines
2.9 KiB
HTML
58 lines
2.9 KiB
HTML
{% extends 'settings/admin_layout.html' %}
|
|
{% load i18n %}
|
|
{% block title %}{% trans "Add server" %}{% endblock %}
|
|
|
|
{% block header %}
|
|
{% if server %}{{ server.server_name }}{% else %}{% trans "Add server" %}{% endif %}
|
|
<a href="{% url 'settings-federation' %}" class="has-text-weight-normal help">{% trans "Back to server list" %}</a>
|
|
{% endblock %}
|
|
|
|
{% block panel %}
|
|
|
|
<form method="POST" action="{% url 'settings-edit-federated-server' server.id %}">
|
|
{% csrf_token %}
|
|
<div class="columns">
|
|
<div class="column is-half">
|
|
<div>
|
|
<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>
|
|
<div>
|
|
<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" or not form.status.value %}selected=""{% endif %}>{% trans "Federated" %}</option>
|
|
<option value="blocked" {% if form.status.value == "blocked" %}selected{% endif %}>{% trans "Blocked" %}</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="column is-half">
|
|
<div>
|
|
<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>
|
|
<div>
|
|
<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>
|
|
<p>
|
|
<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>
|
|
</p>
|
|
|
|
<button type="submit" class="button is-primary">{% trans "Save" %}</button>
|
|
</form>
|
|
|
|
{% endblock %}
|