| 1 |
// $Id$
|
| 2 |
|
| 3 |
/**
|
| 4 |
* Behaviours are bound to the Drupal namespace.
|
| 5 |
*/
|
| 6 |
Drupal.behaviors.ldapdata = function(context) {
|
| 7 |
$('#edit-test').click(function(event) {
|
| 8 |
$('#test-message').hide();
|
| 9 |
$('#test-spinner').show();
|
| 10 |
var url = window.location.href + '/test';
|
| 11 |
$.post(url, { binddn: $('#edit-ldapdata-binddn').val(), bindpw: bindpw = $('#edit-ldapdata-bindpw').val(), bindpw_clear: bindpw_clear = $('#edit-ldapdata-bindpw-clear').val() },
|
| 12 |
function(data){
|
| 13 |
$('#test-spinner').hide();
|
| 14 |
$('#test-message').show().removeClass('status error').addClass(data.status ? 'status' : 'error').html(data.message);
|
| 15 |
}, "json");
|
| 16 |
return false;
|
| 17 |
});
|
| 18 |
}
|
| 19 |
|