An open source, non-profit web search engine
Move the add result form to home so that the curation ID is updated appropriately
Daoud Clarke1552b3bd6b16
diff --git a/devdata/index-v2.tinysearch b/devdata/index-v2.tinysearchindex 00478b2..af813af 100644Binary files a/devdata/index-v2.tinysearch and b/devdata/index-v2.tinysearch differdiff --git a/mwmbl/templates/home.html b/mwmbl/templates/home.htmlindex 6de4c8f..0279847 100644--- a/mwmbl/templates/home.html+++ b/mwmbl/templates/home.html@@ -1,5 +1,17 @@{% load humanize %}{% include "title.html" %}+<div is="mwmbl-add-result">+ <form class="modal-content">+ <span class="close">×</span>+ <input class="add-result" name="new_url" placeholder="Enter a URL...">+ <button class="button"+ hx-post="/app/add/"+ hx-target=".main"+ hx-include=".result"+ hx-vals='{"query": "{{ query }}"{% if curation_id %}, "curation_id": {{ curation_id }}{% endif %}}'+ hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'>Save</button>+ </form>+</div><div class="main">{% if query %}<button class="button curate-add" is="mwmbl-add-button">+ Add new</button>diff --git a/mwmbl/templates/index.html b/mwmbl/templates/index.htmlindex 58761ad..595acd1 100644--- a/mwmbl/templates/index.html+++ b/mwmbl/templates/index.html@@ -76,18 +76,6 @@<main>{% include "home.html" %}</main>- <div is="mwmbl-add-result">- <form class="modal-content">- <span class="close">×</span>- <input class="add-result" name="new_url" placeholder="Enter a URL...">- <button class="button"- hx-post="/app/add/"- hx-target=".main"- hx-include=".result"- hx-vals='{"query": "{{ query }}"{% if curation_id %}, "curation_id": {{ curation_id }}{% endif %}}'- hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'>Save</button>- </form>- </div><div class="footer"><ul class="footer-list">{% for link in footer_links %}