Plankton_Detector/PlanktonDetector/static/admin/js/prepopulate_init.6cac7f3105b8.js
Piotr Szkudlarek 574e6b0748 Add whitenoise
2024-01-15 01:35:29 +01:00

16 lines
586 B
JavaScript

'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 +
', .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
);
});
}