ref: master
app/views/role/_form.html.erb
<%= error_messages_for :role %> <%= labelled_form_for :role, :url => (mode == :edit) ? {:action => 'update', :id => role} : {:action => 'create'} do |f| %> <%= required_fields_message %> <%= required f.text_field(:name) %> <% permissions.each do |key| %><% end %> <%= button_bar do %> <%= submit_button('save', (mode == :edit) ? _('Save changes') : _('Create role'), :cancel => {:action => 'index'} ) %> <% end %> <% end %>