SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 3e9722b0 authored by Jorran de Wit's avatar Jorran de Wit
Browse files

Fix author form js 3

parent cd6400a6
No related branches found
No related tags found
No related merge requests found
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
{{ formset.management_form }} {{ formset.management_form }}
<ul class="fa-ul sortable-list d-inline-block"> <ul class="fa-ul sortable-list d-inline-block">
{% for form in formset %} {% for form in formset %}
<li class="handle"> <li>
<i class="fa fa-sort"></i> <i class="fa fa-sort handle"></i>
{{ form.instance.first_name }} {{ form.instance.last_name }} {{ form.instance.first_name }} {{ form.instance.last_name }}
<div class="d-none">{{ form }}</div> <div class="d-none">{{ form }}</div>
</li> </li>
......
...@@ -31,6 +31,7 @@ var sort_form_list = function(list_el) { ...@@ -31,6 +31,7 @@ var sort_form_list = function(list_el) {
.on('sortupdate', function() { .on('sortupdate', function() {
$.each($(list_el + ' > *'), function(index, el) { $.each($(list_el + ' > *'), function(index, el) {
$(el).find('input[name$=ORDER]').val(index); $(el).find('input[name$=ORDER]').val(index);
console.log(index, el, list_el);
}); });
}).trigger('sortupdate'); }).trigger('sortupdate');
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment