exclude template inputs when moving to the visible section
This commit is contained in:
parent
412e0a51c7
commit
6822475674
@ -6,7 +6,10 @@ $.fn.optionalSection = function(){
|
||||
$section.on('click', '.option-add-button', function(e){
|
||||
var field = $select.val();
|
||||
var group = $optionalInputs.find(".form-group[data-field='" + field + "']");
|
||||
group.find('input, select').prop('disabled', false);
|
||||
group.find('input, select').filter(function(){
|
||||
// exclude template inputs
|
||||
return !$(this).parents('.template').length;
|
||||
}).prop('disabled', false);
|
||||
$section.find('hr').before(group);
|
||||
$select.find('option[value=\'' + field + '\']').remove();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user