estimancy/projestimate

View on GitHub
app/views/fields/_form.html.erb

Summary

Maintainability
Test Coverage

<div class="tabs">
  <ul>
    <li><a href="#tabs-1"><%= I18n.t(:fields) %> </a></li>
  </ul>

  <div id="tabs-1">
    <%= simple_form_for(@field) do |f| %>
      <%= f.error_notification %>

      <div class="form-inputs">
        <%= f.input :name, label: I18n.t(:name) %>
        <%= f.input :coefficient, label: "Coefficient de conversion en unité standard" %>
        <%= f.input :organization_id, as: :hidden, input_html: { value: params[:organization_id] } %>
      </div>

        <div class="actions">
          <% if can? :manage, Field %>
              <%= submit_tag I18n.t('save'), :class => 'btn' %>
          <% end %>
          <%= link_to I18n.t('back'), organization_setting_path(@current_organization, anchor: 'tabs-fields'), :class => 'btn' %>
        </div>
    <% end %>
  </div>
</div>