diff options
Diffstat (limited to 'modules/contact/contact.js')
-rw-r--r-- | modules/contact/contact.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/modules/contact/contact.js b/modules/contact/contact.js new file mode 100644 index 000000000..effac8145 --- /dev/null +++ b/modules/contact/contact.js @@ -0,0 +1,15 @@ +// $Id$ +(function ($) { + +Drupal.behaviors.contact = { + attach: function(context) { + $.each(['name', 'mail'], function () { + var cookie = $.cookie('Drupal.user.' + this); + if (cookie) { + $('#contact-site-form input[name=' + this + ']', context).once('comment').val(cookie); + } + }); + } +}; + +})(jQuery); |