visrecall/WebInterface/Back-end/mysite/static/admin/js/prepopulate_init.js

12 lines
492 B
JavaScript
Raw Permalink Normal View History

2022-07-29 14:22:57 +02:00
'use strict';
{
const $ = django.jQuery;
const fields = $('#django-admin-prepopulated-fields-constants').data('prepopulatedFields');
$.each(fields, function(index, field) {
$('.empty-form .form-row .field-' + field.name + ', .empty-form.form-row .field-' + field.name).addClass('prepopulated_field');
$(field.id).data('dependency_list', field.dependency_list).prepopulate(
field.dependency_ids, field.maxLength, field.allowUnicode
);
});
}