mirror of https://github.com/snachodog/mybuddy.git
Update Child form for add/update differences.
This commit is contained in:
parent
e0e2e91de1
commit
195f93f7d5
|
@ -1,10 +1,20 @@
|
||||||
{% extends 'core/base.html' %}
|
{% extends 'core/base.html' %}
|
||||||
{% load i18n widget_tweaks %}
|
{% load widget_tweaks %}
|
||||||
|
|
||||||
{% block title %}Add a Child{% endblock %}
|
{% block title %}
|
||||||
|
{% if request.resolver_match.url_name == 'child-update' %}
|
||||||
|
Update a Child
|
||||||
|
{% else %}
|
||||||
|
Add a Child
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>Add a Child</h1>
|
{% if object %}
|
||||||
|
<h1>Update <span class="text-info">{{ object.first_name }} {{ object.last_name }}</span></h1>
|
||||||
|
{% else %}
|
||||||
|
<h1>Add a Child</h1>
|
||||||
|
{% endif %}
|
||||||
<form role="form" method="post">
|
<form role="form" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{% for field in form %}
|
{% for field in form %}
|
||||||
|
@ -23,6 +33,6 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<button type="submit" class="btn btn-primary">{% trans "Submit" %}</button>
|
<button type="submit" class="btn btn-primary">Submit</button>
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
Loading…
Reference in New Issue