You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
586 B
16 lines
586 B
'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
|
|
);
|
|
});
|
|
}
|