(el, prefix, ndx)
| 23 | const $this = $(this); |
| 24 | const $parent = $this.parent(); |
| 25 | const updateElementIndex = function (el, prefix, ndx) { |
| 26 | const id_regex = new RegExp("(" + prefix + "-(\\d+|__prefix__))"); |
| 27 | const replacement = prefix + "-" + ndx; |
| 28 | if ($(el).prop("for")) { |
| 29 | $(el).prop( |
| 30 | "for", |
| 31 | $(el).prop("for").replace(id_regex, replacement), |
| 32 | ); |
| 33 | } |
| 34 | if (el.id) { |
| 35 | el.id = el.id.replace(id_regex, replacement); |
| 36 | } |
| 37 | if (el.name) { |
| 38 | el.name = el.name.replace(id_regex, replacement); |
| 39 | } |
| 40 | }; |
| 41 | const totalForms = $("#id_" + options.prefix + "-TOTAL_FORMS").prop( |
| 42 | "autocomplete", |
| 43 | "off", |
no outgoing calls
no test coverage detected