Files
django-nepkit/example/demo/templates/demo/person_form.html
T

35 lines
1019 B
HTML

<!DOCTYPE html>
<html>
<head>
<title>Nepali Fields Demo - Add</title>
<style>
body { font-family: sans-serif; margin: 20px; }
.form-group { margin-bottom: 15px; }
label { display: block; margin-bottom: 5px; }
input, select { width: 300px; padding: 8px; }
</style>
{{ form.media }}
</head>
<body>
<h1>Add New Person</h1>
<form method="post">
{% csrf_token %}
{% for field in form %}
<div class="form-group">
{{ field.label_tag }}
{{ field }}
{% if field.help_text %}
<small style="color: grey">{{ field.help_text }}</small>
{% endif %}
{% for error in field.errors %}
<p style="color: red">{{ error }}</p>
{% endfor %}
</div>
{% endfor %}
<button type="submit">Save</button>
</form>
<br>
<a href="{% url 'demo:person-list' %}">Back to List</a>
</body>
</html>