app/views/profile_editor/locality.html.erb
<%= error_messages_for :profile_data %>
<%= labelled_form_for :profile_data, :url => {:action => 'locality'}, :html => {:id => 'location-form'} do |f| %>
<div class="error">
<%= flash[:error] %>
</div>
<%= render partial: 'shared/location_form', locals: { f: f, profile: @profile_data } %>
<%= button_bar do %>
<%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %>
<%= submit_button :save, _('Save') %>
<% end %>
<% end %>