Commit 1039a15a5067fd1bdfa389accfd0e932472ec535

Authored by Cyril Mougel
2 parents 4f4dddbe a7dfa577
Exists in master and in 1 other branch production

Merge pull request #648 from brandedcrate/master

scope the type selector to the choose section
Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
app/assets/javascripts/form.js
... ... @@ -81,7 +81,7 @@ function activateTypeSelector(field_class, section_class) {
81 81 $('div.'+field_class+' > div.'+section_class).not('.chosen').find('input')
82 82 .attr('disabled','disabled').val('');
83 83  
84   - $('div.'+field_class+' input[name*=type]').on('click', function(){
  84 + $('div.'+field_class).find('.choose input[name*=type]').on('click', function(){
85 85 // Look for section in 'data-section', and fall back to 'value'
86 86 var chosen = $(this).data("section") || $(this).val();
87 87 var wrapper = $(this).closest('.nested');
... ...