<% content_for :extra_password_js do %>
<%= javascript_include_tag 'password_validator' %>
<% end %>

<% content_for :title do %><%= t('.title') %><% end %>

<p><%= t('.description') %></p>

<%= form_for(:reset, :url => reset_update_password_path)  do |f| %>
  <table class="editForm">
    <tr>
      <th><%= label :reset, :password, t('.password') %></th>
      <td>
        <%= show_password_requirements(@organisation_name, @school_id) %>
        <%= password_field :reset, :password, :required => 'required', autofocus: true %>
      </td>
    </tr>

    <tr>
      <th><%= label :reset, :password_confirmation, t('.password_confirmation') %></th>
      <td><%= password_field :reset, :password_confirmation, :required => 'required' %></td>
    </tr>

    <tr class="buttonRow">
      <td colspan="2">
        <input type="hidden" name="lang" value="<%= @language %>"/>
        <%= f.submit t('.submit'), class: 'btn' %>
      </td>
    </tr>
  </table>
<% end %>

<% content_for :password_validator do %>
<%= setup_password_validator(@organisation_name,
                             @school_id,
                             'reset_password',
                             'reset_password_confirmation',
                             []) %>
<% end %>
