1
0
mirror of https://github.com/kakwa/ldapcherry synced 2024-11-22 09:24:21 +01:00

reindent javascript

This commit is contained in:
kakwa 2016-07-05 19:57:35 +02:00
parent c67969e2c1
commit e45c0e862e

View File

@ -1,24 +1,26 @@
$('#form').validator({ $('#form').validator({
custom: { custom: {
'ppolicy': function($el) { 'ppolicy': function($el) {
if(! $el.prop('required') && $el.val() == 0){ if(! $el.prop('required') && $el.val() == 0){
return true; return true;
}; };
var $ret = 'PPolicy error'; var $ret = 'PPolicy error';
$.ajax({ $.ajax({
url: '/checkppolicy', url: '/checkppolicy',
dataType: 'json', dataType: 'json',
async: false, async: false,
data: 'pwd=' + $el.val(), data: 'pwd=' + $el.val(),
success: function(data) { success: function(data) {
$ret = data; $ret = data;
} }
}); });
this.options.errors['ppolicy'] = $ret['reason']; this.options.errors['ppolicy'] = $ret['reason'];
return $ret['match']; return $ret['match'];
} }
}, },
errors: { errors: {
'ppolicy': 'PPolicy error', 'ppolicy': 'PPolicy error',
} }
}) })
// vim:set expandtab tabstop=4 shiftwidth=4: