mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
removed isCheckboxGroup check and replace
This commit is contained in:
parent
d0d511c3a5
commit
6a8a82a287
@ -125,15 +125,11 @@ jQuery(function ($) {
|
|||||||
// When a field becomes valid.
|
// When a field becomes valid.
|
||||||
success: function (error) {
|
success: function (error) {
|
||||||
var errorId = $(error).attr('id'),
|
var errorId = $(error).attr('id'),
|
||||||
fieldId = errorId.substr(0, errorId.indexOf('-error')).replace(/[\\[\\]]/, ''),
|
fieldId = errorId.substr(0, errorId.indexOf('-error')).replace(/[\\[\\]]/, '');
|
||||||
isCheckboxGroup = $(error).closest('.requiredField').hasClass('checkboxset');
|
|
||||||
|
|
||||||
// We need to escapse the field id if it's a checkboxfield
|
// Remove square brackets since jQuery.validate.js uses idOrName,
|
||||||
// because jQuery breaks when using selector that end with
|
// which breaks further on when using a selector that end with
|
||||||
// square brackets.
|
// square brackets.
|
||||||
if (isCheckboxGroup) {
|
|
||||||
fieldId = fieldId.replace('[]', '\\\\[\\\\]');
|
|
||||||
}
|
|
||||||
|
|
||||||
error.remove();
|
error.remove();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user