noesya/osuny

View on GitHub
app/views/admin/research/laboratories/_form.html.erb

Summary

Maintainability
Test Coverage
<%= simple_form_for [:admin, laboratory] do |f| %>
  <%= f.simple_fields_for :localizations, l10n do |lf| %>
    <%= f.error_notification %>
    <%= f.error_notification message: f.object.errors[:base].to_sentence if f.object.errors[:base].present? %>
    <%= lf.hidden_field :language_id, value: current_language.id %>

    <div class="row">
      <div class="col-lg-6">
        <%= lf.input :name %>
      </div>
      <div class="col-lg-6">
        <%= lf.input :address_name %>
        <%= f.input :address %>
        <%= lf.input :address_additional %>
        <%= f.input :zipcode %>
        <%= f.input :city %>
        <%= f.input :country, input_html: { class: 'form-select' } %>
      </div>
    </div>
    <% content_for :action_bar_right do %>
      <%= submit f %>
    <% end %>
  <% end %>
<% end %>