static config

This commit is contained in:
Francisco Rodriguez
2022-11-26 20:11:52 -07:00
parent 77d2b02a92
commit 1e6b924f7c
133 changed files with 30514 additions and 7 deletions

View File

@@ -0,0 +1,15 @@
'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
);
});
}