This repository has been archived on 2023-10-01. You can view files and clone it, but cannot push or open issues or pull requests.

100 lines
4.3 KiB
HTML
Raw Normal View History

2019-12-09 12:10:57 +01:00
{% extends "layout.html" %}
2021-07-10 20:59:36 +02:00
{% block title %}- Admin Edit {{ action_form.name.data }}{% endblock %}
2019-12-09 12:10:57 +01:00
{% block body %}
2019-12-15 16:22:39 +01:00
<form method="post">
{{ action_form.csrf_token }}
2019-12-09 12:10:57 +01:00
2019-12-10 22:19:31 +01:00
<div class="field is-horizontal">
<div class="field-body">
<div class="field column">
<div class="control is-expanded">
<div class="select is-fullwidth">
2021-07-10 18:08:37 +02:00
{{ action_form.folder }}
2019-12-10 22:19:31 +01:00
</div>
</div>
</div>
<div class="field column is-6">
<div class="control is-expanded">
<div class="select is-fullwidth">
2021-07-10 17:28:45 +02:00
{{ action_form.name(list='animes', class='input', placeholder='Name') }}
2019-12-10 22:19:31 +01:00
<datalist id="animes">
2020-03-21 20:17:31 +01:00
{% for folder in folders %}
{% for title in folder.titles %}
2021-07-10 20:59:36 +02:00
<option {{ 'selected' if title.name == action_form.name.data }}
2021-07-10 17:28:45 +02:00
data-folder="{{ title.folder.id }}" value="{{ title.name }}"
2020-03-21 20:17:31 +01:00
data-keyword="{{ title.keyword }}">
{% endfor %}
2019-12-10 22:19:31 +01:00
{% endfor %}
</datalist>
2019-12-11 21:03:25 +01:00
<script>
document.getElementById('name').oninput = function (choice) {
2019-12-11 21:04:20 +01:00
document.getElementById('animes').childNodes.forEach(function (option) {
2019-12-11 21:03:25 +01:00
if (option.value === choice.target.value) {
2020-03-21 20:17:31 +01:00
document.getElementById('folder').value = option.dataset.folder;
2019-12-11 21:03:25 +01:00
document.getElementById('keyword').value = option.dataset.keyword;
}
});
};
</script>
2019-12-10 22:19:31 +01:00
</div>
</div>
</div>
</div>
</div>
<div class="field is-horizontal">
<div class="field-body">
2021-01-30 19:40:36 +01:00
<div class="field column is-6">
2019-12-10 22:19:31 +01:00
<div class="control is-expanded">
2021-07-10 17:28:45 +02:00
{{ action_form.link(class='input', placeholder='Link') }}
2019-12-10 22:19:31 +01:00
</div>
</div>
<div class="field column">
<div class="control is-expanded">
2021-07-10 17:28:45 +02:00
{{ action_form.season(class='input', placeholder='Season') }}
2019-12-10 22:19:31 +01:00
</div>
</div>
</div>
</div>
<div class="field is-horizontal">
<div class="field-body">
2021-01-30 19:40:36 +01:00
<div class="field column is-6">
2019-12-10 22:19:31 +01:00
<div class="control is-expanded">
2021-07-10 17:28:45 +02:00
{{ action_form.comment(class='input', placeholder='Comment') }}
2019-12-10 22:19:31 +01:00
</div>
</div>
<div class="field column">
<div class="control is-expanded">
2019-12-11 19:11:50 +01:00
<div class="select is-fullwidth">
2021-07-10 17:28:45 +02:00
{{ action_form.keyword(list='keywords', class='input', placeholder='Keyword') }}
2019-12-11 19:11:50 +01:00
<datalist id="keywords">
2020-03-21 20:17:31 +01:00
{% for folder in folders %}
{% for title in folder.titles %}
2021-07-10 20:59:36 +02:00
<option {{ 'selected' if title.keyword == action_form.keyword.data }}
2020-03-21 20:17:31 +01:00
value="{{ title.keyword }}">
{% endfor %}
2019-12-11 19:11:50 +01:00
{% endfor %}
</datalist>
</div>
2019-12-10 22:19:31 +01:00
</div>
</div>
</div>
</div>
<div class="field is-horizontal">
<div class="field-body">
<div class="field column">
<div class="control is-expanded">
2019-12-13 16:49:11 +01:00
<input class="button is-info" type="submit">
2019-12-10 22:19:31 +01:00
</div>
</div>
</div>
</div>
</form>
2019-12-09 12:10:57 +01:00
{% endblock %}