Add ability to create a feed from the UI. Still TODO: make it not look like utter shite.

This commit is contained in:
Lewis Dale committed 2025-01-02 11:41:59 +00:00
1 parent cee4f9944e
commit 0e06d5587f
11 files changed
+946 -633

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
{% from "_includes/filterBlock.twig.html" import filterBlock %}
<h1>Create feed</h1>
<form method="POST" action="/feed/{{ feed.id }}">
{{ csrf() | raw }}
<input type="hidden" name="id" value="{{ feed.id }}"/>
<label for="url">
Feed URL
</label>
<input type="text" inputmode="url" name="url" value="{{ feed.url }}" id="url"/>
<label for="title">
Title
</label>
<input type="text" inputmode="title" name="title" value="{{ feed.title }}" id="title"/>
<fieldset>
<legend>Filters</legend>
{% for filter in feed.feedFilters %}
{{ filterBlock(_context, loop.index0, filter.filter, filter.target, filter.value, filter.id) }}
{% endfor %}
{{ filterBlock(_context, (feed.feedFilters | length)) }}
</fieldset>
<button type="submit">Save feed</button>
</form>
<script type="text/javascript">
</script>