Skip to content

Commit d41e3db

Browse files
committed
Move a (duplicate) style tag from python into the template CSS.
The liaison manager is horrible in the amount of HTML it includes in python. Commit ready for merge. - Legacy-Id: 9781
1 parent 59890a6 commit d41e3db

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

ietf/liaisons/widgets.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def render(self, name, value, attrs=None, choices=()):
3838

3939
class ReadOnlyWidget(Widget):
4040
def render(self, name, value, attrs=None):
41-
html = u'<div id="id_%s" class="form-control" style="height: auto; min-height: 34px;">%s</div>' % (conditional_escape(name), conditional_escape(value or ''))
41+
html = u'<div id="id_%s" class="form-control widget">%s</div>' % (conditional_escape(name), conditional_escape(value or ''))
4242
return mark_safe(html)
4343

4444

@@ -67,8 +67,8 @@ class ShowAttachmentsWidget(Widget):
6767

6868
def render(self, name, value, attrs=None):
6969
html = u'<div id="id_%s">' % name
70-
html += u'<span style="display: none" class="showAttachmentsEmpty form-control" style="height: auto; min-height: 34px;">No files attached</span>'
71-
html += u'<div class="attachedFiles form-control" style="height: auto; min-height: 34px;">'
70+
html += u'<span style="display: none" class="showAttachmentsEmpty form-control widget">No files attached</span>'
71+
html += u'<div class="attachedFiles form-control widget">'
7272
if value and isinstance(value, QuerySet):
7373
for attachment in value:
7474
html += u'<a class="initialAttach" href="%s%s">%s</a><br />' % (settings.LIAISON_ATTACH_URL, conditional_escape(attachment.external_url), conditional_escape(attachment.title))

ietf/templates/liaisons/edit.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
<link rel="stylesheet" href="/css/lib/select2-bootstrap.css">
1313
{% endblock %}
1414

15+
{% block morecss %}
16+
.widget { height: auto; min-height: 34px; }
17+
{% endblock %}
18+
1519
{% block content %}
1620
{% origin %}
1721

0 commit comments

Comments
 (0)