Added basic checkbox form and delete template.
This commit is contained in:
parent
19847d0e1f
commit
15a74f1f31
@ -49,7 +49,5 @@ class PlaceImageCreateForm(forms.ModelForm):
|
|||||||
|
|
||||||
self.fields['filename'].required = False
|
self.fields['filename'].required = False
|
||||||
|
|
||||||
class PlaceDeleteForm(forms.ModelForm):
|
class PlaceDeleteForm(forms.Form):
|
||||||
class Meta:
|
confirm_check = forms.CheckboxInput()
|
||||||
model = Place
|
|
||||||
fields = ['name']
|
|
||||||
|
18
lostplaces/lostplaces_app/templates/delete_place.html
Normal file
18
lostplaces/lostplaces_app/templates/delete_place.html
Normal 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 %}
|
Loading…
Reference in New Issue
Block a user