Skip to content

Commit

Permalink
[Resolves GeoNode#6995] ADVANCED_EDIT_EXCLUDE_FIELD available also in…
Browse files Browse the repository at this point in the history
… maps and documents
  • Loading branch information
mattiagiupponi committed Apr 7, 2021
1 parent ae5d576 commit b9f701a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,19 @@ <h2 class="page-title">{% trans "Edit Metadata" %}</h2>
Unfortunately this needs to appear at the top (or the bottom) of the form since tkeywords_form is a complete other django form.
There might be a better way to solve this.-->
<div class="col-md-12 form-controls">
{{ document_form|as_bootstrap }}
{% block document_fields %}
{% for field in document_form %}
{% if field.name != 'use_featureinfo_custom_template' and field.name != 'featureinfo_custom_template' and field.name not in ADVANCED_EDIT_EXCLUDE_FIELD %}
<div class="form_item_spacing">
<div>
<span><label for="{{ field.id }}">{{ field.label }}</label></span>
{{ field }}
</div>
</div>
{% endif %}
{% endfor %}
{% endblock document_fields %}

{% if THESAURI_FILTERS %}
{{ tkeywords_form }}
{% endif %}
Expand Down
14 changes: 13 additions & 1 deletion geonode/maps/templates/maps/map_metadata_advanced.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,19 @@ <h2 class="page-title">{% trans "Edit Metadata" %}</h2>
Unfortunately this needs to appear at the top (or the bottom) of the form since tkeywords_form is a complete other django form.
There might be a better way to solve this. -->
<div class="col-md-6 form-controls">
{{ map_form|as_bootstrap }}
{% block map_fields %}
{% for field in map_form %}
{% if field.name != 'use_featureinfo_custom_template' and field.name != 'featureinfo_custom_template' and field.name not in ADVANCED_EDIT_EXCLUDE_FIELD %}
<div class="form_item_spacing">
<div>
<span><label for="{{ field.id }}">{{ field.label }}</label></span>
{{ field }}
</div>
</div>
{% endif %}
{% endfor %}
{% endblock map_fields %}

{% if THESAURI_FILTERS %}
{{ tkeywords_form }}
{% endif %}
Expand Down

0 comments on commit b9f701a

Please sign in to comment.