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