Merge branch 'main' into form-conflict
This commit is contained in:
@ -22,7 +22,7 @@
|
||||
{% trans "Title:" %}
|
||||
</label>
|
||||
<input type="text" name="title" value="{{ form.title.value|default:'' }}" maxlength="255" class="input" required="" id="id_title" aria-describedby="desc_title">
|
||||
|
||||
|
||||
{% include 'snippets/form_errors.html' with errors_list=form.title.errors id="desc_title" %}
|
||||
</div>
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
{% trans "Subtitle:" %}
|
||||
</label>
|
||||
<input type="text" name="subtitle" value="{{ form.subtitle.value|default:'' }}" maxlength="255" class="input" id="id_subtitle" aria-describedby="desc_subtitle">
|
||||
|
||||
|
||||
{% include 'snippets/form_errors.html' with errors_list=form.subtitle.errors id="desc_subtitle" %}
|
||||
</div>
|
||||
|
||||
@ -40,7 +40,7 @@
|
||||
{% trans "Description:" %}
|
||||
</label>
|
||||
{{ form.description }}
|
||||
|
||||
|
||||
{% include 'snippets/form_errors.html' with errors_list=form.description.errors id="desc_description" %}
|
||||
</div>
|
||||
|
||||
@ -51,7 +51,7 @@
|
||||
{% trans "Series:" %}
|
||||
</label>
|
||||
<input type="text" class="input" name="series" id="id_series" value="{{ form.series.value|default:'' }}" aria-describedby="desc_series">
|
||||
|
||||
|
||||
{% include 'snippets/form_errors.html' with errors_list=form.series.errors id="desc_series" %}
|
||||
</div>
|
||||
</div>
|
||||
@ -61,7 +61,7 @@
|
||||
{% trans "Series number:" %}
|
||||
</label>
|
||||
{{ form.series_number }}
|
||||
|
||||
|
||||
{% include 'snippets/form_errors.html' with errors_list=form.series_number.errors id="desc_series_number" %}
|
||||
</div>
|
||||
</div>
|
||||
@ -75,21 +75,60 @@
|
||||
<span class="help" id="desc_languages_help">
|
||||
{% trans "Separate multiple values with commas." %}
|
||||
</span>
|
||||
|
||||
|
||||
{% include 'snippets/form_errors.html' with errors_list=form.languages.errors id="desc_languages" %}
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label class="label" for="id_subjects">
|
||||
<div>
|
||||
<label class="label" for="id_add_subjects">
|
||||
{% trans "Subjects:" %}
|
||||
</label>
|
||||
{{ form.subjects }}
|
||||
<span class="help" id="desc_subjects_help">
|
||||
{% trans "Separate multiple values with commas." %}
|
||||
</span>
|
||||
{% for subject in book.subjects %}
|
||||
<label class="label is-sr-only" for="id_add_subject={% if not forloop.first %}-{{forloop.counter}}{% endif %}">
|
||||
{% trans "Add subject" %}
|
||||
</label>
|
||||
<div class="field has-addons" id="subject_field_wrapper_{{ forloop.counter }}">
|
||||
<div class="control is-expanded">
|
||||
<input
|
||||
id="id_add_subject-{{ forloop.counter }}"
|
||||
type="text"
|
||||
name="subjects"
|
||||
value="{{ subject }}"
|
||||
class="input"
|
||||
>
|
||||
</div>
|
||||
<div class="control">
|
||||
<button
|
||||
class="button is-danger is-light"
|
||||
type="button"
|
||||
data-remove="subject_field_wrapper_{{ forloop.counter }}"
|
||||
>
|
||||
{% trans "Remove subject" as text %}
|
||||
<span class="icon icon-x" title="{{ text }}">
|
||||
<span class="is-sr-only">{{ text }}</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<input
|
||||
class="input"
|
||||
type="text"
|
||||
name="subjects"
|
||||
id="id_add_subject"
|
||||
value="{{ subject }}"
|
||||
{% if confirm_mode %}readonly{% endif %}
|
||||
>
|
||||
|
||||
{% include 'snippets/form_errors.html' with errors_list=form.subjects.errors id="desc_subjects" %}
|
||||
</div>
|
||||
|
||||
<span class="help">
|
||||
<button class="button is-small" type="button" data-duplicate="id_add_subject" id="another_subject_field">
|
||||
<span class="icon icon-plus" aria-hidden="true"></span>
|
||||
<span>{% trans "Add Another Subject" %}</span>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@ -106,7 +145,7 @@
|
||||
<span class="help" id="desc_publishers_help">
|
||||
{% trans "Separate multiple values with commas." %}
|
||||
</span>
|
||||
|
||||
|
||||
{% include 'snippets/form_errors.html' with errors_list=form.publishers.errors id="desc_publishers" %}
|
||||
</div>
|
||||
|
||||
@ -115,7 +154,7 @@
|
||||
{% trans "First published date:" %}
|
||||
</label>
|
||||
<input type="date" name="first_published_date" class="input" id="id_first_published_date"{% if form.first_published_date.value %} value="{{ form.first_published_date.value|date:'Y-m-d' }}"{% endif %} aria-describedby="desc_first_published_date">
|
||||
|
||||
|
||||
{% include 'snippets/form_errors.html' with errors_list=form.first_published_date.errors id="desc_first_published_date" %}
|
||||
</div>
|
||||
|
||||
@ -124,7 +163,7 @@
|
||||
{% trans "Published date:" %}
|
||||
</label>
|
||||
<input type="date" name="published_date" class="input" id="id_published_date"{% if form.published_date.value %} value="{{ form.published_date.value|date:'Y-m-d'}}"{% endif %} aria-describedby="desc_published_date">
|
||||
|
||||
|
||||
{% include 'snippets/form_errors.html' with errors_list=form.published_date.errors id="desc_published_date" %}
|
||||
</div>
|
||||
</div>
|
||||
@ -162,7 +201,12 @@
|
||||
<input class="input" type="text" name="add_author" id="id_add_author" placeholder="{% trans 'Jane Doe' %}" value="{{ author }}" {% if confirm_mode %}readonly{% endif %}>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<span class="help"><button class="button is-small" type="button" data-duplicate="id_add_author" id="another_author_field">{% trans "Add Another Author" %}</button></span>
|
||||
<span class="help">
|
||||
<button class="button is-small" type="button" data-duplicate="id_add_author" id="another_author_field">
|
||||
<span class="icon icon-plus" aria-hidden="true"></span>
|
||||
<span>{% trans "Add Another Author" %}</span>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@ -193,7 +237,7 @@
|
||||
</label>
|
||||
<input class="input" name="cover-url" id="id_cover_url" type="url" value="{{ cover_url|default:'' }}" aria-describedby="desc_cover">
|
||||
</div>
|
||||
|
||||
|
||||
{% include 'snippets/form_errors.html' with errors_list=form.cover.errors id="desc_cover" %}
|
||||
</div>
|
||||
</div>
|
||||
@ -214,7 +258,7 @@
|
||||
<div class="select">
|
||||
{{ form.physical_format }}
|
||||
</div>
|
||||
|
||||
|
||||
{% include 'snippets/form_errors.html' with errors_list=form.physical_format.errors id="desc_physical_format" %}
|
||||
</div>
|
||||
</div>
|
||||
@ -224,7 +268,7 @@
|
||||
{% trans "Format details:" %}
|
||||
</label>
|
||||
{{ form.physical_format_detail }}
|
||||
|
||||
|
||||
{% include 'snippets/form_errors.html' with errors_list=form.physical_format_detail.errors id="desc_physical_format_detail" %}
|
||||
</div>
|
||||
</div>
|
||||
@ -235,7 +279,7 @@
|
||||
{% trans "Pages:" %}
|
||||
</label>
|
||||
{{ form.pages }}
|
||||
|
||||
|
||||
{% include 'snippets/form_errors.html' with errors_list=form.pages.errors id="desc_pages" %}
|
||||
</div>
|
||||
</div>
|
||||
@ -251,7 +295,7 @@
|
||||
{% trans "ISBN 13:" %}
|
||||
</label>
|
||||
{{ form.isbn_13 }}
|
||||
|
||||
|
||||
{% include 'snippets/form_errors.html' with errors_list=form.isbn_13.errors id="desc_isbn_13" %}
|
||||
</div>
|
||||
|
||||
@ -260,7 +304,7 @@
|
||||
{% trans "ISBN 10:" %}
|
||||
</label>
|
||||
{{ form.isbn_10 }}
|
||||
|
||||
|
||||
{% include 'snippets/form_errors.html' with errors_list=form.isbn_10.errors id="desc_isbn_10" %}
|
||||
</div>
|
||||
|
||||
@ -269,7 +313,7 @@
|
||||
{% trans "Openlibrary ID:" %}
|
||||
</label>
|
||||
{{ form.openlibrary_key }}
|
||||
|
||||
|
||||
{% include 'snippets/form_errors.html' with errors_list=form.openlibrary_key.errors id="desc_openlibrary_key" %}
|
||||
</div>
|
||||
|
||||
@ -278,7 +322,7 @@
|
||||
{% trans "Inventaire ID:" %}
|
||||
</label>
|
||||
{{ form.inventaire_id }}
|
||||
|
||||
|
||||
{% include 'snippets/form_errors.html' with errors_list=form.inventaire_id.errors id="desc_inventaire_id" %}
|
||||
</div>
|
||||
|
||||
@ -287,7 +331,7 @@
|
||||
{% trans "OCLC Number:" %}
|
||||
</label>
|
||||
{{ form.oclc_number }}
|
||||
|
||||
|
||||
{% include 'snippets/form_errors.html' with errors_list=form.oclc_number.errors id="desc_oclc_number" %}
|
||||
</div>
|
||||
|
||||
@ -296,7 +340,7 @@
|
||||
{% trans "ASIN:" %}
|
||||
</label>
|
||||
{{ form.asin }}
|
||||
|
||||
|
||||
{% include 'snippets/form_errors.html' with errors_list=form.ASIN.errors id="desc_ASIN" %}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<header class="block">
|
||||
<h1 class="title">
|
||||
{% blocktrans with title=book|book_title %}
|
||||
{% blocktrans trimmed with title=book|book_title %}
|
||||
Links for "<em>{{ title }}</em>"
|
||||
{% endblocktrans %}
|
||||
</h1>
|
||||
|
@ -1,5 +1,6 @@
|
||||
{% extends 'settings/layout.html' %}
|
||||
{% load i18n %}
|
||||
{% load humanize %}
|
||||
{% load utilities %}
|
||||
|
||||
{% block title %}
|
||||
@ -16,12 +17,81 @@
|
||||
<p>
|
||||
{% trans "Auto-moderation rules will create reports for any local user or status with fields matching the provided string." %}
|
||||
{% trans "Users or statuses that have already been reported (regardless of whether the report was resolved) will not be flagged." %}
|
||||
{% trans "At this time, reports are <em>not</em> being generated automatically, and you must manually trigger a scan." %}
|
||||
</p>
|
||||
<form name="run-scan" method="POST" action="{% url 'settings-automod-run' %}">
|
||||
</div>
|
||||
<div class="box block">
|
||||
{% if task %}
|
||||
<dl class="block">
|
||||
<dt class="is-pulled-left mr-5 has-text-weight-bold">
|
||||
{% trans "Schedule:" %}
|
||||
</dt>
|
||||
<dd>
|
||||
{{ task.schedule }}
|
||||
</dd>
|
||||
|
||||
<dt class="is-pulled-left mr-5 has-text-weight-bold">
|
||||
{% trans "Last run:" %}
|
||||
</dt>
|
||||
<dd>
|
||||
{{ task.last_run_at|naturaltime }}
|
||||
</dd>
|
||||
|
||||
<dt class="is-pulled-left mr-5 has-text-weight-bold">
|
||||
{% trans "Total run count:" %}
|
||||
</dt>
|
||||
<dd>
|
||||
{{ task.total_run_count }}
|
||||
</dd>
|
||||
|
||||
<dt class="is-pulled-left mr-5 has-text-weight-bold">
|
||||
{% trans "Enabled:" %}
|
||||
</dt>
|
||||
<dd>
|
||||
<span class="tag {% if task.enabled %}is-success{% else %}is-danger{% endif %}">
|
||||
{{ task.enabled|yesno }}
|
||||
</span>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<div class="is-flex is-justify-content-space-between block">
|
||||
<form name="unschedule-scan" method="POST" action="{% url 'settings-automod-unschedule' task.id %}">
|
||||
{% csrf_token %}
|
||||
<button class="button is-danger">{% trans "Delete schedule" %}</button>
|
||||
</form>
|
||||
<form name="run-scan" method="POST" action="{% url 'settings-automod-run' %}">
|
||||
{% csrf_token %}
|
||||
<button class="button">{% trans "Run now" %}</button>
|
||||
<p class="help">{% trans "Last run date will not be updated" %}</p>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{% else %}
|
||||
<h2 class="title is-4">{% trans "Schedule scan" %}</h2>
|
||||
<form name="schedule-scan" method="POST" action="{% url 'settings-automod-schedule' %}">
|
||||
{% csrf_token %}
|
||||
<button class="button is-warning">{% trans "Run scan" %}</button>
|
||||
<div class="field">
|
||||
<label class="label" for="id_every">
|
||||
{{ task_form.every.label }}
|
||||
</label>
|
||||
{{ task_form.every }}
|
||||
<p class="help" id="desc_every">
|
||||
{{ task_form.every.help_text }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="label" for="id_period">
|
||||
{{ task_form.period.label }}
|
||||
</label>
|
||||
<div class="select">
|
||||
{{ task_form.period }}
|
||||
</div>
|
||||
<p class="help" id="desc_period">
|
||||
{{ task_form.period.help_text }}
|
||||
</p>
|
||||
</div>
|
||||
<button class="button is-warning">{% trans "Schedule scan" %}</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if success %}
|
||||
|
@ -4,7 +4,7 @@
|
||||
{% with goal.progress as progress %}
|
||||
<p>
|
||||
{% if progress.percent >= 100 %}
|
||||
{% trans "Success!" %}
|
||||
{% trans "Success!" context "Goal successfully completed" %}
|
||||
{% elif progress.percent %}
|
||||
{% blocktrans with percent=progress.percent %}{{ percent }}% complete!{% endblocktrans %}
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user