Move styles form fields in a separate template
Working on yohanboniface/django-leaflet-storage#21
This commit is contained in:
parent
827304e678
commit
52e41e7cd7
3 changed files with 17 additions and 12 deletions
|
@ -6,21 +6,13 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% foundation_field form.name %}
|
{% foundation_field form.name %}
|
||||||
{% foundation_field form.description %}
|
{% foundation_field form.description %}
|
||||||
{% foundation_field form.color %}
|
|
||||||
<div class="formbox columns twelve">
|
|
||||||
<div class="six columns">
|
|
||||||
{% foundation_field form.icon_class %}
|
|
||||||
</div>
|
|
||||||
<div class="six columns">
|
|
||||||
{% foundation_field form.pictogram %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% foundation_field form.rank %}
|
{% foundation_field form.rank %}
|
||||||
<div class="formbox">
|
<div class="formbox">
|
||||||
<span>{{ form.display_on_load.label }}</span>{{ form.display_on_load }}
|
<span>{{ form.display_on_load.label }}</span>{{ form.display_on_load }}
|
||||||
</div>
|
</div>
|
||||||
<small class="help-text">{{ form.display_on_load.help_text }}</small>
|
<small class="help-text">{{ form.display_on_load.help_text }}</small>
|
||||||
{{ form.map }}
|
{{ form.map }}
|
||||||
|
{% include "umap/styles_fieldset.html" %}
|
||||||
<input type="submit" class="button" />
|
<input type="submit" class="button" />
|
||||||
{% if delete_url %}
|
{% if delete_url %}
|
||||||
<a href="{{ delete_url }}" id="delete_category_button" >{% trans "Delete" %}</a>
|
<a href="{{ delete_url }}" id="delete_category_button" >{% trans "Delete" %}</a>
|
||||||
|
|
|
@ -4,10 +4,8 @@
|
||||||
{{ form.no_field_errors }}
|
{{ form.no_field_errors }}
|
||||||
{% foundation_field form.name %}
|
{% foundation_field form.name %}
|
||||||
{% foundation_field form.description %}
|
{% foundation_field form.description %}
|
||||||
{% foundation_field form.color %}
|
|
||||||
<p>
|
|
||||||
{% foundation_field form.category %}
|
{% foundation_field form.category %}
|
||||||
</p>
|
{% include "umap/styles_fieldset.html" %}
|
||||||
{{ form.latlng }}
|
{{ form.latlng }}
|
||||||
<input type="submit" class="button" />
|
<input type="submit" class="button" />
|
||||||
{% if delete_url %}
|
{% if delete_url %}
|
||||||
|
|
15
umap/templates/umap/styles_fieldset.html
Normal file
15
umap/templates/umap/styles_fieldset.html
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{% load umap_tags i18n %}
|
||||||
|
<fieldset>
|
||||||
|
<legend>{% trans "Styles" %}</legend>
|
||||||
|
{% foundation_field form.color %}
|
||||||
|
{% if form.icon_class and form.pictogram %}
|
||||||
|
<div class="formbox columns twelve">
|
||||||
|
<div class="six columns">
|
||||||
|
{% foundation_field form.icon_class %}
|
||||||
|
</div>
|
||||||
|
<div class="six columns">
|
||||||
|
{% foundation_field form.pictogram %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</fieldset>
|
Loading…
Reference in a new issue