afimb/chouette2

View on GitHub
app/views/devise/shared/_form_registration.html.erb

Summary

Maintainability
Test Coverage
<% if Rails.application.config.accept_user_creation %>
  <div class="panel panel-default">
    <div class="panel-heading"><%= t("devise.registrations.new.title") %></div>
    <div class="panel-body">
      <%= simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name), :wrapper => "form_without_label", html: { class: "form-horizontal registration_new" } ) do |form| %>
        <%= form.simple_fields_for :organisation, organisation do |organisation| %>
          <%= organisation.input :name, :label => false, input_html: { :class => "form-control" } %>
        <% end %>
        <%= form.input :name, :label => false, input_html: { :class => "form-control" }  %>
        <%= form.input :email, :label => false, input_html: { :class => "form-control" } %>
        <%= form.input :password, :as => :password, :label => false, input_html: { :class => "form-control" } %>
        <%= form.input :password_confirmation, :as => :password, :label => false, input_html: { :class => "form-control" } %>
        <%= form.button :submit, t("devise.registrations.new.commit"), :class => "btn-info" %>
      <% end %>
    </div>
  </div>
<% end %>