Skip to content

Commit f8be143

Browse files
fix: add id attr to liaisons ButtonWidget (ietf-tools#10389)
1 parent 2dbe61e commit f8be143

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

ietf/liaisons/widgets.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ def render(self, name, value, **kwargs):
2626
html += '<span class="d-none attachRequiredField">%s</span>' % conditional_escape(i)
2727
required_str = 'Please fill in %s to attach a new file' % conditional_escape(self.required_label)
2828
html += '<span class="d-none attachDisabledLabel">%s</span>' % conditional_escape(required_str)
29-
html += '<button type="button" class="addAttachmentWidget btn btn-primary btn-sm">%s</button>' % conditional_escape(self.label)
29+
html += '<button type="button" id="{}" class="addAttachmentWidget btn btn-primary btn-sm">{}</button>'.format(
30+
f"id_{name}", conditional_escape(self.label)
31+
)
3032
return mark_safe(html)
3133

3234

0 commit comments

Comments
 (0)