el reemplazo estaba mal
This commit is contained in:
parent
586f4c5824
commit
8af9b4a2a5
1 changed files with 2 additions and 1 deletions
|
@ -39,7 +39,8 @@ $(document).on('turbolinks:load', function() {
|
|||
_group.find('[name*="['+_own_group+'][0]"]').each(function(i, input) {
|
||||
var _input = $(input);
|
||||
var _name = _input.attr('name');
|
||||
_input.attr('name', _name.replace(/\[0\]/, '['+_date+']'));
|
||||
var _regex = new RegExp('\\['+_own_group+'\\]\\[0\\]');
|
||||
_input.attr('name', _name.replace(_regex, '['+_own_group+']['+_date+']'));
|
||||
if (['checkbox','radio'].includes(_input.attr('type'))) {
|
||||
_input.prop('checked', false);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue