backoffice: fix display of "add related" button in grid widgets (#53192)

This commit is contained in:
Frédéric Péters 2021-04-16 16:55:06 +02:00
parent be90435914
commit 5ce9e765f5
2 changed files with 10 additions and 0 deletions

View File

@ -2126,6 +2126,14 @@ div.timetable-widget {
}
}
.wcs-widget-select2-container {
display: flex;
.add-related {
margin-top: 2px; // == margin-top of span.select2-container
margin-left: 3px;
}
}
.wcs-block-with-remove-button {
.BlockSubWidget {
position: relative;

View File

@ -1,6 +1,7 @@
{% extends "qommon/forms/widget.html" %}
{% load i18n %}
{% block widget-control %}
<div class="wcs-widget-select2-container">
<select id="form_{{widget.name}}" name="{{widget.name}}"
data-select2-url="{{widget.get_select2_url}}"
{% if widget.value %}data-value="{{ widget.value }}"{% endif %}
@ -12,4 +13,5 @@
href="{{ widget.add_related_url }}?_popup=1"
title="{% blocktrans with card=widget.get_title %}Add another {{ card }}{% endblocktrans %}">+</a>
{% endif %}
</div>
{% endblock %}