Skip to content

Commit

Permalink
fix(apis_entities): remove merge form from the entities edit view
Browse files Browse the repository at this point in the history
Remove the merge form from the default entities edit view, given that
there is a more powerful merge view that should be used instead.

Closes: #1285
  • Loading branch information
b1rger committed Nov 18, 2024
1 parent d93a17d commit 2b0dcf1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{% extends "apis_core/apis_entities/abstractentity.html" %}
{% load crispy_forms_tags %}
{% load apis_entities %}
{% load static %}

{% block col-zero %}
Expand All @@ -10,18 +9,6 @@
</div>
{% endblock col-zero %}

{% block col-one %}
{{ block.super }}
<div class="card mt-2">
<div class="card-body">
{% mergeform as mergeform %}
{% if mergeform %}
{% crispy mergeform mergeform.helper %}
{% endif %}
</div>
</div>
{% endblock col-one %}

{% block scripts %}
{{ block.super }}
<script src="{% static "js/apis_entities.js" %}"></script>
Expand Down
7 changes: 0 additions & 7 deletions apis_core/apis_entities/templatetags/apis_entities.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from django import template
from django.contrib.contenttypes.models import ContentType

from apis_core.apis_entities.forms import EntitiesMergeForm
from apis_core.apis_entities.models import AbstractEntity
from apis_core.apis_entities.utils import get_entity_classes

Expand Down Expand Up @@ -48,9 +47,3 @@ def entities_verbose_name_plural_listview_url():
for entity in get_entity_classes()
}
return sorted(ret.items())


@register.simple_tag(takes_context=True)
def mergeform(context):
obj = context["object"]
return EntitiesMergeForm(instance=obj)

0 comments on commit 2b0dcf1

Please sign in to comment.