Replace season editor with the generic editor.
This commit is contained in:
@@ -6,6 +6,18 @@
|
||||
{% block page %}
|
||||
<div class="text-center">
|
||||
<h1>{{ model.form_title }}</h1>
|
||||
|
||||
{% if model.errors %}
|
||||
<div class="alert alert-danger">
|
||||
{% for field, errors in model.errors.items() %}
|
||||
<div>
|
||||
<strong class="text-capitalize">{{ field }}</strong>:
|
||||
{{ errors|join(', ') }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<form action="{{ model.post_url }}" method="post">
|
||||
{{ wtf.quick_form(form, button_map={'submit_button': 'primary'}, form_type='horizontal', horizontal_columns=('lg', 2, 10)) }}
|
||||
</form>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
{% block page %}
|
||||
{% if g.is_editor %}
|
||||
<div class="btn-toolbar" role="toolbar">
|
||||
<a class="btn btn-primary" href="/seasons/new" role="button"><span class="fas fa-plus"></span> Season</a>
|
||||
<a class="btn btn-primary" href="{{ url_for("season_new") }}" role="button"><span class="fas fa-plus"></span> Season</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if not model.seasons %}
|
||||
@@ -40,9 +40,11 @@
|
||||
|
||||
{% if g.is_editor %}
|
||||
<td class="col-sm-auto text-center">
|
||||
<a class="btn btn-dark" href="/seasons/{{ item.id }}/edit"><span class="fas fa-pencil-alt"></span></a>
|
||||
<a class="btn btn-dark" href="{{ url_for('season_edit', season_id = item.id) }}">
|
||||
<span class="fas fa-pencil-alt"></span>
|
||||
</a>
|
||||
|
||||
<a class="btn btn-dark" href="/seasons/{{ item.id }}/new">
|
||||
<a class="btn btn-dark" href="#">
|
||||
<span class="fas fa-plus"></span> Episode
|
||||
</a>
|
||||
</td>
|
||||
Reference in New Issue
Block a user