moviewyrm/bookwyrm/templates/author/edit_author.html

121 lines
4.8 KiB
HTML
Raw Normal View History

{% extends 'layout.html' %}
2021-02-28 02:48:10 +00:00
{% load i18n %}
{% load humanize %}
2021-03-21 23:37:52 +00:00
{% block title %}{% trans "Edit Author:" %} {{ author.name }}{% endblock %}
{% block content %}
2021-01-14 22:13:23 +00:00
<header class="block">
2021-03-21 23:37:52 +00:00
<h1 class="title">
2021-01-14 22:13:23 +00:00
Edit "{{ author.name }}"
</h1>
<div>
2021-02-28 02:48:10 +00:00
<p>{% trans "Added:" %} {{ author.created_date | naturaltime }}</p>
<p>{% trans "Updated:" %} {{ author.updated_date | naturaltime }}</p>
{% if author.last_edited_by %}
2021-02-28 02:48:10 +00:00
<p>{% trans "Last edited by:" %} <a href="{{ author.last_edited_by.remote_id }}">{{ author.last_edited_by.display_name }}</a></p>
{% endif %}
</div>
2021-01-14 22:13:23 +00:00
</header>
{% if form.non_field_errors %}
<div class="block">
<p class="notification is-danger">{{ form.non_field_errors }}</p>
</div>
{% endif %}
2022-05-23 18:08:04 +00:00
<form class="block" name="edit-author" action="{% url 'edit-author' author.id %}" method="post">
{% csrf_token %}
<input type="hidden" name="last_edited_by" value="{{ request.user.id }}">
<div class="columns">
<div class="column">
<h2 class="title is-4">{% trans "Metadata" %}</h2>
2021-06-02 16:17:53 +00:00
<div class="field">
<label class="label" for="id_name">{% trans "Name:" %}</label>
{{ form.name }}
2021-11-29 21:39:01 +00:00
2021-12-05 19:02:36 +00:00
{% include 'snippets/form_errors.html' with errors_list=form.name.errors id="desc_name" %}
2021-06-02 16:17:53 +00:00
</div>
<div class="field">
<label class="label" for="id_aliases">{% trans "Aliases:" %}</label>
{{ form.aliases }}
<span class="help">{% trans "Separate multiple values with commas." %}</span>
2021-11-29 21:39:01 +00:00
2021-12-05 19:02:36 +00:00
{% include 'snippets/form_errors.html' with errors_list=form.aliases.errors id="desc_aliases" %}
2021-06-02 16:17:53 +00:00
</div>
<div class="field">
<label class="label" for="id_bio">{% trans "Bio:" %}</label>
{{ form.bio }}
2021-11-29 21:39:01 +00:00
2021-12-05 19:02:36 +00:00
{% include 'snippets/form_errors.html' with errors_list=form.bio.errors id="desc_bio" %}
2021-06-02 16:17:53 +00:00
</div>
<p class="field"><label class="label" for="id_wikipedia_link">{% trans "Wikipedia link:" %}</label> {{ form.wikipedia_link }}</p>
2021-11-29 21:39:01 +00:00
2021-12-05 19:02:36 +00:00
{% include 'snippets/form_errors.html' with errors_list=form.wikipedia_link.errors id="desc_wikipedia_link" %}
2021-06-02 16:17:53 +00:00
<div class="field">
<label class="label" for="id_born">{% trans "Birth date:" %}</label>
<input type="date" name="born" value="{{ form.born.value|date:'Y-m-d' }}" class="input" id="id_born">
2021-11-29 21:39:01 +00:00
2021-12-05 19:02:36 +00:00
{% include 'snippets/form_errors.html' with errors_list=form.born.errors id="desc_born" %}
2021-06-02 16:17:53 +00:00
</div>
2021-06-02 16:17:53 +00:00
<div class="field">
<label class="label" for="id_died">{% trans "Death date:" %}</label>
<input type="date" name="died" value="{{ form.died.value|date:'Y-m-d' }}" class="input" id="id_died">
2021-11-29 21:39:01 +00:00
2021-12-05 19:02:36 +00:00
{% include 'snippets/form_errors.html' with errors_list=form.died.errors id="desc_died" %}
2021-06-02 16:17:53 +00:00
</div>
</div>
<div class="column">
<h2 class="title is-4">{% trans "Author Identifiers" %}</h2>
2021-06-02 16:17:53 +00:00
<div class="field">
<label class="label" for="id_openlibrary_key">{% trans "Openlibrary key:" %}</label>
{{ form.openlibrary_key }}
2021-11-29 21:39:01 +00:00
2021-12-05 19:02:36 +00:00
{% include 'snippets/form_errors.html' with errors_list=form.oepnlibrary_key.errors id="desc_oepnlibrary_key" %}
2021-06-02 16:17:53 +00:00
</div>
<div class="field">
<label class="label" for="id_inventaire_id">{% trans "Inventaire ID:" %}</label>
{{ form.inventaire_id }}
2021-11-29 21:39:01 +00:00
2021-12-05 19:02:36 +00:00
{% include 'snippets/form_errors.html' with errors_list=form.inventaire_id.errors id="desc_inventaire_id" %}
2021-06-02 16:17:53 +00:00
</div>
<div class="field">
<label class="label" for="id_librarything_key">{% trans "Librarything key:" %}</label>
{{ form.librarything_key }}
2021-11-29 21:39:01 +00:00
2021-12-05 19:02:36 +00:00
{% include 'snippets/form_errors.html' with errors_list=form.librarything_key.errors id="desc_librarything_key" %}
2021-06-02 16:17:53 +00:00
</div>
<div class="field">
<label class="label" for="id_goodreads_key">{% trans "Goodreads key:" %}</label>
{{ form.goodreads_key }}
2021-11-29 21:39:01 +00:00
2021-12-05 19:02:36 +00:00
{% include 'snippets/form_errors.html' with errors_list=form.goodreads_key.errors id="desc_goodreads_key" %}
</div>
<div class="field">
<label class="label" for="id_isni">{% trans "ISNI:" %}</label>
{{ form.isni }}
{% include 'snippets/form_errors.html' with errors_list=form.isni.errors id="desc_isni" %}
2021-06-02 16:17:53 +00:00
</div>
</div>
</div>
<div class="block">
<button class="button is-primary" type="submit">{% trans "Save" %}</button>
2021-05-04 16:34:16 +00:00
<a class="button" href="{{ author.local_path }}">{% trans "Cancel" %}</a>
</div>
</form>
{% endblock %}