summaryrefslogtreecommitdiff
path: root/arduino_blog/static/admin/js/prepopulate_init.js
diff options
context:
space:
mode:
authorSashi202020-02-20 12:58:59 +0530
committerSashi202020-02-20 12:58:59 +0530
commit1fb3d381e832d5c5871c6cb2fd8b2c1ae3dbd029 (patch)
tree3a9829196102efdf509fe50b5458237966999ecf /arduino_blog/static/admin/js/prepopulate_init.js
parent802bbc270363d1432cb28cd88d6c9003d8b99b6c (diff)
downloadarduino_projects_website-1fb3d381e832d5c5871c6cb2fd8b2c1ae3dbd029.tar.gz
arduino_projects_website-1fb3d381e832d5c5871c6cb2fd8b2c1ae3dbd029.tar.bz2
arduino_projects_website-1fb3d381e832d5c5871c6cb2fd8b2c1ae3dbd029.zip
Add user registration, login and abstract submission interfaces
Diffstat (limited to 'arduino_blog/static/admin/js/prepopulate_init.js')
-rw-r--r--arduino_blog/static/admin/js/prepopulate_init.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/arduino_blog/static/admin/js/prepopulate_init.js b/arduino_blog/static/admin/js/prepopulate_init.js
new file mode 100644
index 0000000..184df92
--- /dev/null
+++ b/arduino_blog/static/admin/js/prepopulate_init.js
@@ -0,0 +1,10 @@
+(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);