Factor out the update button into its own small template
For code reuse, you know
This commit is contained in:
parent
23ca01f1b1
commit
8d0d8d72b1
|
@ -1,6 +1,7 @@
|
||||||
{% extends 'layout.html' %}
|
{% extends 'layout.html' %}
|
||||||
{% block main_content %}
|
{% block main_content %}
|
||||||
<h1>{{ account.name }}</h1>
|
<h1>{{ account.name }}</h1>
|
||||||
|
{% include 'update_button.html' %}
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<tr><td>Current balance</td><td>{{ account.balance }}</td></tr>
|
<tr><td>Current balance</td><td>{{ account.balance }}</td></tr>
|
||||||
<tr><td>Last updated</td><td>{{ account.last_updated }}</td></tr>
|
<tr><td>Last updated</td><td>{{ account.last_updated }}</td></tr>
|
||||||
|
|
|
@ -11,10 +11,7 @@
|
||||||
<td>{{ account.source.name }}</td>
|
<td>{{ account.source.name }}</td>
|
||||||
<td>{{ account.last_updated }}</td>
|
<td>{{ account.last_updated }}</td>
|
||||||
<td>
|
<td>
|
||||||
<form method="POST" action="/update/">
|
{% include 'update_button.html' %}
|
||||||
<input type="hidden" name="account_uuid" value="{{ account.uuid }}"></input>
|
|
||||||
<input type="submit" value="Update" class="btn btn-primary"></input>
|
|
||||||
</form>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
<form method="POST" action="/update/">
|
||||||
|
<input type="hidden" name="account_uuid" value="{{ account.uuid }}"></input>
|
||||||
|
<input type="submit" value="Update" class="btn btn-primary"></input>
|
||||||
|
</form>
|
Loading…
Reference in New Issue