<p class="requiredTitle"><%= t('layouts.forms.required_field')%></p>
<%= form_for(@group, url: path, html: { method: method } ) do |f| %>

<%= render partial: 'integration_warnings', locals: { school: @school, group: @group } %>

<table class="editForm">
  <tr>
    <th class="requiredField"><%= f.label :displayName %></th>
    <td><%= f.text_field :displayName, required: 'required', autofocus: @is_new_group ? true : nil %></td>
  </tr>

  <tr>
    <th class="requiredField"><%= f.label :cn %></th>
    <td><%= f.text_field :cn, required: 'required' %></td>
  </tr>

<% if current_user.organisation_owner? %>
  <tr class="ownersOnly">
    <th><%= f.label :puavoExternalId %></th>
    <td><%= f.text_field :puavoExternalId %></td>
  </tr>
<% end %>

  <tr>
    <th class="requiredField"><%= f.label :puavoEduGroupType %></th>
    <td><%= f.select :puavoEduGroupType, group_types_for_select %></td>
  </tr>

  <tr>
    <th><%= f.label :puavoNotes %></th>
    <td><%= f.text_area :puavoNotes, rows: 10, class: 'resize-v' %></td>
  </tr>

  <tr class="buttonRow">
    <td colspan="2">
      <%= f.submit submit_text, class: 'btn' %>
      <div class="cancel"><%= link_to t('link.cancel'), path, class: 'btn btn-danger' %></div>
    </td>
  </tr>
</table>
<% end %>
