{% extends 'admin/base_admin.html' %}

{% block admin_content %}
<div class="container-xl">
	<div class="col-auto">
		<a class="btn app-btn-primary "
			href="{{url('admin:collection_del', collection=collection, lookup=lookup)}}"><svg width="1em" height="1em"
				viewBox="0 0 16 16" class="bi bi-trash me-2" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
				<path
					d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6z" />
				<path fill-rule="evenodd"
					d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1zM4.118 4L4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z" />
			</svg>Delete</a>
	</div>
	<hr class="mb-4">
	<div class="row g-4 settings-section">
		<div class="col-12 col-md-8">
			<div class="app-card app-card-settings shadow-sm p-4">

				<div class="app-card-body">
					<form class="settings-form" method="post" enctype="multipart/form-data">
						<input type="text" value="{{csrf}}" name="csrfmiddleware" hidden>

						{% for f in form.html() %}

						<div class="mb-3">
							<label for="setting-input-1" class="form-label">{{f.name|title}}</label>
							{% if f.input_type in ['checkbox'] %}
							{{f.html()|safe}}
							
							{% elif f.input_type == 'password' %}
							{{f.html(class='form-control', disabled=True)|safe}}
								
							{% else %}
						
							{{f.html(class='form-control')|safe}}
							
							{% endif %}
						</div>

						{% endfor %}

						<button type="submit" class="btn app-btn-primary">Save Changes</button>
					</form>
				</div>
				<!--//app-card-body-->

			</div>
			<!--//app-card-->
		</div>
	</div>
	<!--//row-->
	<hr class="my-4">
</div>
<!--//container-fluid-->
{% endblock admin_content %}