maps: keep marker colour widgets aligned (#72084) #11
|
@ -1,5 +1,6 @@
|
|||
{% load i18n %}
|
||||
{% with widget_value=widget.value|stringformat:'s' %}
|
||||
<div class="colour-or-text-input">
|
||||
{% spaceless %}
|
||||
<span id="{{ widget.name }}-joined-buttons" class="gadjo-joined-buttons">
|
||||
<button data-mode="color" aria-pressed="{% if widget.value is None or widget_value|slice:":1" == '#' %}true{% else %}false{% endif %}" role="button">{% trans "Fixed" %}</button>
|
||||
|
@ -7,6 +8,7 @@
|
|||
</span>
|
||||
{% endspaceless %}
|
||||
<input id="{{ widget.name }}-input" {% if widget.value is None or widget_value|slice:":1" == '#' %}type="color"{% else %}type="text"{% endif %} name="{{ widget.name }}"{% if widget.value != None %} value="{{ widget_value }}"{% endif %}{% include "django/forms/widgets/attrs.html" %}>
|
||||
</div>
|
||||
{% endwith %}
|
||||
<script>
|
||||
$(function() {
|
||||
|
|
|
@ -678,6 +678,13 @@ form .choices {
|
|||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.colour-or-text-input {
|
||||
display: flex;
|
||||
input {
|
||||
margin-left: 0.5em;
|
||||
}
|
||||
}
|
||||
|
||||
#marker_colour-joined-buttons {
|
||||
margin: 4px 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue