Commit 4430d463 authored by Dries's avatar Dries

- Patch #440876: missing files.

parent f46e6626
......@@ -68,7 +68,6 @@ Drupal.behaviors.multiselectSelector = {
}
};
/**
* Automatically display the guidelines of the selected text format.
*/
......@@ -86,4 +85,22 @@ Drupal.behaviors.filterGuidelines = {
}
};
/**
* Prepopulate form fields with information from the visitor cookie.
*/
Drupal.behaviors.fillUserInfoFromCookie = {
attach: function (context, settings) {
$('form.user-info-from-cookie').once('user-info-from-cookie', function () {
var formContext = this;
$.each(['name', 'mail', 'homepage'], function () {
var $element = $('[name=' + this + ']', formContext);
var cookie = $.cookie('Drupal.visitor.' + this);
if ($element.length && cookie) {
$element.val(cookie);
}
});
});
}
};
})(jQuery);
// $Id$
(function ($) {
Drupal.behaviors.comment = {
attach: function (context, settings) {
$.each(['name', 'homepage', 'mail'], function () {
var cookie = $.cookie('Drupal.visitor.' + this);
if (cookie) {
$('#comment-form input[name=' + this + ']', context).once('comment').val(cookie);
}
});
}
};
})(jQuery);
// $Id$
(function ($) {
Drupal.behaviors.contact = {
attach: function(context) {
$.each(['name', 'mail'], function () {
var cookie = $.cookie('Drupal.visitor.' + this);
if (cookie) {
$('#contact-site-form input[name=' + this + ']', context).once('comment').val(cookie);
$('#contact-personal-form input[name=' + this + ']', context).once('comment').val(cookie);
}
});
}
};
})(jQuery);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment