MyHome/primary/templates/penghuni/add.html
2020-01-15 21:09:07 +07:00

39 lines
1.1 KiB
HTML

{% extends "layouts/base.html" %}
{% block subtitle %}
<h1 class="text-4xl">Tambah Penghuni</h1>
{% endblock %}
{% block content %}
<div>
<form action="/penghuni/add-post" method="POST">
<div>
<label for="User">User</label>
<select class="border py-1 px-2" name="User">
{% for entry in users %}
<option value={{ entry.UserID }}>{{ entry.NamaUser }}</option>
{% endfor %}
</select>
</div>
<div>
<label for="Rumah">Rumah</label>
<select class="border py-1 px-2" name="Rumah">
{% for entry in rumahs %}
<option value={{ entry.RumahID }}>{{ entry.NamaRumah }}</option>
{% endfor %}
</select>
</div>
<div>
<label for="Role">Role</label>
<select class="border py-1 px-2" name="Role">
<option value="1">Penghuni</option>
<option value="2">Pemilik</option>
<option value="4">Pengontrak</option>
</select>
</div>
{% csrf_token %}
<button type="submit" class="bg-blue-500 text-white py-2 px-4 text-center">Submit</button>
</form>
</div>
{% endblock %}