Skip to content

Commit

Permalink
Setup form to use htmx
Browse files Browse the repository at this point in the history
 - load image from static
  • Loading branch information
ryaustin committed Oct 6, 2023
1 parent 53cdba6 commit b32a64d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions templates/cmp/army-number-search.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{% extends "base.html" %}
{% load static %}
{% block title %}Army Number Search{% endblock %}
{% block content %}

<div>
{% load static %}
<img src="/static/cmp/flag.svg" style="width:20%; height:auto;" alt="The Flag of the British Army. A lion wearing a crown on two crossed swords. ">
<img src="{% static 'cmp/flag.svg' %}" style="width:20%; height:auto;" alt="The Flag of the British Army. A lion wearing a crown on two crossed swords. ">
<p></p>
<h2> British Army Number Search Tool</h2>
<p>
Expand All @@ -15,9 +15,11 @@ <h2> British Army Number Search Tool</h2>
</p>
</div>
<div>
<form action="{% url 'army-number-search' %}" method="get">
<input type="text" name="q" placeholder="Enter army number" value="787569" class="input-text">
<input type="submit" value="Search">
<form method="post" hx-post="{% url 'army-number-search' %}" hx-target="#query-response">
{% csrf_token %}
<input type="text" name="q" placeholder="Enter army number" class="input-text">
<input type="submit" value="Search" class="btn btn-secondary">
</form>
</div>
<div class="pt-4" id="query-response"></div>
{% endblock %}

0 comments on commit b32a64d

Please sign in to comment.