<script type="text/javascript">

localDomains = ""

$(document).ready(function() {
  $.validationEngineLanguage.newLang(localDomains);
  $("#user").validationEngine();
});
</script>

<fieldset>
  <h2>パスワード変更</h2>
  <%= form_with(model: @user, url: {controller: :user, action: :pw_update, id: @user.id}, 
                id: 'user', html: {name: "user"}) do |f| -%>
    <div class="table-sys-a">
      <div class="item-mid2">ユーザＩＤ</div>
      <div class="input-mid2"><%= @user.login %></div>
      <div class="item-mid2">メールアドレス</div>
      <div class="input-mid2"><%= @user.email %></div>
      <div class="item-mid2">パスワード</div>
      <div class="input-mid2"><%= f.password_field :password, style: "width:150px;", class: 'validate[required, minSize[4], maxSize[40], custom[password]]' %></div>
      <div class="item-mid2">パスワード（確認）</div>
      <div class="input-mid2"><%= f.password_field :password_confirmation, style: "width:150px;", class: 'validate[required, equals[user_password]]' -%></div>
      <div class="item-mid2"></div>
      <div class="input-mid2" align="left"><%= f.submit "変　更" -%></div>
    </div>
  <%- end -%>
</fieldset>

<br>
<div align="left">
<% if session[:target_for_back_id] -%>
  <%= link_to "戻る", {action: session[:target_for_back], id: session[:target_for_back_id]} %><br />
<% else -%>
  <%= link_to "戻る", {action: session[:target_for_back]} %><br />
<% end -%>
</div>
<br><br>
