mirror of
https://github.com/nanoy42/coope
synced 2024-12-27 01:13:47 +00:00
11 lines
495 B
JavaScript
11 lines
495 B
JavaScript
|
(function($) {
|
||
|
'use strict';
|
||
|
var 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
|
||
|
);
|
||
|
});
|
||
|
})(django.jQuery);
|