Added basic checkbox form and delete template.

This commit is contained in:
Marcus Scholz 2020-08-06 22:29:03 +02:00
parent 19847d0e1f
commit 15a74f1f31
2 changed files with 20 additions and 4 deletions

View File

@ -49,7 +49,5 @@ class PlaceImageCreateForm(forms.ModelForm):
self.fields['filename'].required = False
class PlaceDeleteForm(forms.ModelForm):
class Meta:
model = Place
fields = ['name']
class PlaceDeleteForm(forms.Form):
confirm_check = forms.CheckboxInput()

View File

@ -0,0 +1,18 @@
{% extends 'global.html'%}
{% load static %}
{% block title %}Lost Place Deletion{% endblock %}
{% block maincontent %}
<form class="" method="POST" enctype="multipart/form-data">
<fieldset class="">
<legend class="">Delete place</legend>
{% csrf_token %}
<p>Are you sure you want to delete {{place.name}}?</p>
{{ form.as_p }}
<div class="">
<input type="submit" class="LP-Button" value="Delete"/>
</div>
</fieldset>
</form>
{% endblock maincontent %}