Skip to content

Commit b724616

Browse files
committed
Fixed a problem with mismatched attribute names for ajax form field autocompletes. Closes issue ietf-tools#1049.
- Legacy-Id: 5771
1 parent 5bee7ac commit b724616

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

ietf/templates/idrfc/change_shepherd.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ <h1>Change the document shepherd for {{ doc.name }}-{{ doc.rev }}</h1>
4242
{% endblock %}
4343
{% block content_end %}
4444
<script type="text/javascript" src="/js/lib/jquery.tokeninput.js"></script>
45-
<script type="text/javascript" src="/js/emails-field.js"></script>
45+
<script type="text/javascript" src="/js/tokenized-field.js"></script>
4646
{% endblock %}

ietf/templates/wginfo/milestone_form.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
</tr>
2727
<tr class="docs">
2828
<td>Drafts:</td>
29-
<td><input name="{{ form.docs.html_name }}" class="tokenized-field" data-ajaxurl="{% url wg_ajax_search_docs group.acronym %}" data-pre="{{ form.docs_prepopulate }}"/>
29+
<td><input name="{{ form.docs.html_name }}" class="tokenized-field" data-ajax-url="{% url wg_ajax_search_docs group.acronym %}" data-pre="{{ form.docs_prepopulate }}"/>
3030
{{ form.docs.errors }}
3131
</td>
3232
</tr>

static/js/emails-field.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
jQuery(function () {
2-
jQuery(".emails-field").each(function () {
2+
jQuery(".tokenized-field").each(function () {
33
var e = jQuery(this);
44
var pre = [];
55
if (e.val())
66
pre = JSON.parse(e.val());
7-
e.tokenInput(e.data("ajax-url"), {
7+
e.tokenInput(e.data("data-ajax-url"), {
88
hintText: "",
99
preventDuplicates: true,
1010
prePopulate: pre

static/js/tokenized-field.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function setupTokenizedField(field) {
88
else if (field.data("pre"))
99
pre = JSON.parse((field.attr("data-pre") || "").replace(/&quot;/g, '"'));
1010

11-
field.tokenInput(field.data("ajaxurl"), {
11+
field.tokenInput(field.attr("data-ajax-url"), {
1212
hintText: "",
1313
preventDuplicates: true,
1414
prePopulate: pre

0 commit comments

Comments
 (0)