lostplaces-backend/django_lostplaces/lostplaces/templates/place/place_update.html

60 lines
2.2 KiB
HTML
Raw Normal View History

{% extends 'global.html'%}
{% load static %}
2020-10-01 23:05:34 +02:00
{% load i18n %}
2021-04-10 08:23:36 +02:00
{% load widget_tweaks %}
# {% block title %}{% translate 'Edit place' %}{% endblock %}
{% block maincontent %}
2020-08-03 19:14:13 +02:00
<form class="LP-Form" method="POST" enctype="multipart/form-data">
<fieldset class="LP-Form__Fieldset">
<legend class="LP-Form__Legend">{% translate 'Edit place' %}</legend>
{% csrf_token %}
<div class="LP-Form__Composition LP-Form__Composition--breakable">
<div class="LP-Form__Field">
{% include 'partials/form/inputField.html' with field=form.name %}
</div>
<div class="LP-Form__Field">
{% include 'partials/form/inputField.html' with field=form.location %}
</div>
</div>
<div class="LP-Form__Composition LP-Form__Composition--breakable">
<div class="LP-Form__Field">
{% include 'partials/form/inputField.html' with field=form.latitude %}
</div>
<div class="LP-Form__Field">
{% include 'partials/form/inputField.html' with field=form.longitude %}
</div>
</div>
<div class="LP-Form__Composition">
<div class="LP-Form__Field">
{% include 'partials/form/inputField.html' with field=form.description %}
</div>
</div>
<div class="LP-Form__Composition">
<div class="LP-Form__Field">
{% include 'partials/form/inputField.html' with field=form.filename %}
</div>
</div>
2021-04-10 08:23:36 +02:00
{% if object.placeimages.all|length > 0 %}
<legend class="LP-Form__Legend">{% translate 'Set Hero Image' %}</legend>
<div class="LP-Form__Composition">
<div class="LP-Form__Field">
{% render_field form.hero container_class='LP-ImageGrid__Container' item_class='LP-ImageGrid__Item LP-Select' current_selected_value=object.hero.id%}
</div>
</div>
{% endif %}
{% translate 'Update' as action %}
<div class="LP-Form__Composition LP-Form__Composition--buttons">
2020-10-11 00:37:43 +02:00
{% include 'partials/form/submit.html' with referrer=request.META.HTTP_REFERER action=action %}
</div>
</fieldset>
</form>
{% endblock maincontent %}