<% owner.volunteers_periods.each do |period| %>
<%= f.fields_for :volunteers_periods, period do |ff| %>
<%= render 'volunteers_plugin_myprofile/period', f: ff, period: period, owner: owner %>
<% end %>
<% end %>
<% period = VolunteersPlugin::Period.new %>
<%= f.fields_for :volunteers_periods, period, child_index: '_new_' do |ff| %>
<%= render 'volunteers_plugin_myprofile/period', f: ff, period: period, owner: owner %>
<% end %>
<%= link_to_function t('volunteers_plugin.views.myprofile.add_period'), 'volunteers.periods.add()', class: 'action-button' %>
<%= javascript_tag do %>
volunteers.periods.load();
<% end %>